ABAP – Convert numbers on input and output

SAPI’m affraid there might be a standard function module already available to achieve the same what I’m going to write myself, but I believe it is good to know that the number format can be different when different user settings is used in SAP.
If you forget about this during your development you might start fighting serious problems in the future.
Therefore I’ve written two short code snippets for numbers conversion for INPUT (save to database) and OUTPUT (display to the user) Continue reading

ABAP – How to declare a variable dynamically

SAPIn case you need to create a variable dynamically during runtime with different type, length or precision, you can use the following piece of code to achieve the same – the variable is created dynamically based on given type, length and number of decimals. Continue reading

ABAP – append a component to ITAB dynamically

SAPIt’s not a trivial thing to add new field into already existing itab during run time, but there is a way how to modify the ITAB strucuture. You can add, remove or modify order of the components (fields) in the itab.  Continue reading