Skip to Content

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

scripts:totaling of all items

hi

i am facing a small problem

actually i used the below code for summing of all items coming into g_dmshb and g_mhngf.

but am not able to get get overall total am able to get only for last two items

can u suggest me whether the above code is correct or not

thank u

LOOP AT INTAB WHERE NAME = 'F150D-MHNGF' .

IF SY-SUBRC = 0.

MOVE INTAB-VALUE TO G_MHNGF1.

G_MHNGF1 = INTAB-VALUE .

ENDIF.

ENDLOOP.

G_TOT2 = G_DMSHB + G_MHNGF1.

DATA G_TOT3(15).

CLEAR OUTTAB.

READ TABLE OUTTAB WITH KEY NAME = 'G_TOT2'.

IF SY-SUBRC = 0.

WRITE G_TOT2 TO G_TOT3 CURRENCY 'GBP'.

OUTTAB-VALUE = G_TOT3.

CONDENSE OUTTAB-VALUE NO-GAPS.

MODIFY OUTTAB INDEX 1 TRANSPORTING VALUE.

ENDIF.

Tags:

Helpful Answer

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