Skip to Content

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

Fox Formula In IP.

Hi Friends,

I have a problem in Executing Fox Formula.

I want to Add all rows of the Column. And want to Use the Total Summation Of Column in Another Column Using ForEach Loop but it is not working as Expected.

I Posted the Following Code :

DATA Z_MAT TYPE 0MATERIAL.

DATA Z_COM TYPE 0COMP_CODE.

DATA TLACTSUM TYPE F.

FOREACH Z_MAT, Z_COM.

TLACTSUM = TLACTSUM + {ZTP_TOTC,Z_MAT,Z_COM }.

{ ZTP_LP2 ,ZFISC_YEAR }= TLACTSUM.

ENDFOR.

My Requirement is :

ZTP_TOTC ZTP_LP2

20 140

40 140

30 140

50 140

140 is addition of all the fields in Column (i.e 204030+50).

But Output i'm getting is :

ZTP_TOTC ZTP_LP2

20 20

40 40

30 30

50 50

Please Help with Answer.

Regards,

Girish

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