Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamically changing variables

Is it possible to contain a DATA statement within an IF statement, or similarly define variables according to existing data?

I am attempting to fix a problem with a program for calculating index values. Some systems use indexes with two decimals, others use indexes with four decimals. I don't want to make the calculations using four decimals all of the time, but I also don't want to write IF statements wherever the index is used, to check whether it is a two or four decimals index. Is there a way to check the number of decimals and define the variable according to the result?

If changing the DATA definition is not possible, perhaps it is possible to accomplish that using constants in some way?

Kind regards,

Itay Horev

SAP Israel Localization Team

Tags:
Not what you were looking for? View more on this topic or Ask a question