Floyd’s Cycle-Finding Algorithm

If you want to check if your linked list is circular you can use  Floyd’s Cycle-Finding Algorithm aka Tortoise and the Hare Algorithm.

It’s quite efficient as It has O(n) complexity.
Continue reading

Create new batch characteristics with values checked and suggested by a function module

SAPIn this example I’ll try to show you how to create new characteristics for a material batch. This will include the following steps:

  1. Creation of a function module to check characteristics value (optional)
  2. Creation of a function module to suggest characteristics value – search help (optional)
  3. Creation of new characteristics (CT04)
  4. Creation/modification of a class (CL02)
  5. Object/Class assignment to a class (CL24N or CL20N and OMS2 if necessary)
  6. Batch modification with our new characteristics (MCS2N)

Continue reading

How to maintain text IDs in SAP

SAPIf you want to create new text ID that will be available in SO10 transaction, then follow these easy steps below. Continue reading