‎2010 Feb 12 8:28 AM
Hi,
We have one print program of sap script for 57F4 Challan print out from the below code we are getting all the items of 57f4 challan with there amount on the print out but at the end o fprogram i want to print the sum of amount of alla materials can u give the code or idead to modify the progra
Code with which it is printing the material with price
SELECT * FROM J_1IEXCDTL WHERE EXNUM = DOC_NO AND
EXDAT = DOC_DT.
PERFORM WRITE_FORM USING 'MAIN' 'ITEM_VALUES' 'SET'.
ENDSELECT.
PERFORM WRITE_FORM USING 'MAIN' 'DASH_LINE' 'SET'.
****
at the end i want to add the amount and then print .
regards,
zafar
‎2010 Feb 12 9:18 AM
Hi,
Inbetween select and endselect add all the amount fields and pass it to one global variable.Pass the total field to form to print.
Regards,
Ramya.
‎2010 Feb 12 9:13 AM
Hi,
Can u help on this, i am new to abap and in this code as the all filed is selected from table J_1IEXCDTL but there is no into so for adding all the amount to calculate the sum i am not getting where to do loop.
regards,
zafar
‎2010 Feb 12 9:18 AM
Hi,
Inbetween select and endselect add all the amount fields and pass it to one global variable.Pass the total field to form to print.
Regards,
Ramya.
‎2010 Feb 12 9:22 AM
Hi,
Can i do as below
SELECT * FROM J_1IEXCDTL WHERE EXNUM = DOC_NO AND
EXDAT = DOC_DT.
SUM = SUM + J_1IEXCDTL-DMBTR
PERFORM WRITE_FORM USING 'MAIN' 'ITEM_VALUES' 'SET'.
ENDSELECT.
THEN IN SUM WILL I GET THE TOTAL AMOUNT.
regards,
zafar
‎2010 Feb 12 9:32 AM