‎2009 Apr 17 6:56 AM
Dear All,
I need to evaluate a formula which is stored in a Z-table at runtime.
e.g. (a + b) - c * d / 100 (stored in a z-table) at runtime.
how can this be achieved in abap.
Thanks in anticipation.
‎2009 Apr 17 7:06 AM
Try this Logic:
Suppose nees to Evaluate A + B at runtime.
Data:Fs(255) type c,
itab like standard table of fs.
Append 'Report Ztest' to Itab.
Append 'Data : a type i,' to itab.
Append 'Data : b type i' to Itab.
Get the formula from Ztable.
Append Formula into Itab. " X = A + B.
Insert Report 'Ztest' from Itab. " New program Created.
Submit Program 'Ztest' . " Send Values to variables or use IMPORT/EXPORT
Delete The Program 'Ztest'.Hope this will resolve the issue.
Regards,
Gurpreet
‎2009 Apr 17 7:18 AM