on 08-24-2009 9:49 AM
hi
currently im modifying a program via smart forms... i need to get the GRAND TOTAL of the ff.
S_EECTB - Employee Contribution
S_ERCTB - Employer Contrinution
S_TOT - Total
my plan is to get the grandtotal then pass it to smartform but i dont know how to start.
please help... thank you...
here the code...
IF P_CTYP EQ 'SS'.
LOOP AT GT_OUTTAB INTO GS_OUTTAB .
GV_TABIX = SY-TABIX.
MOVE-CORRESPONDING GS_OUTTAB TO LT_OUTTAB2.
APPEND LT_OUTTAB2.
S_RMNTH = LT_OUTTAB2-RMNTH.
S_RYEAR = LT_OUTTAB2-RYEAR.
S_ISSDATE = LT_OUTTAB2-ISSDATE.
S_REC = LT_OUTTAB2-RECEIPT.
S_EECTB = LT_OUTTAB2-EECTB.
S_ERCTB = LT_OUTTAB2-ERCTB.
S_ECCTB = LT_OUTTAB2-ECCTB.
S_TOT = LT_OUTTAB2-TOTAL.
SELECT SNAME INTO S_NAME FROM PA0001 WHERE PERNR = LT_OUTTAB2-PERNR.
ENDSELECT.
SELECT SSSNO INTO S_SSS FROM PA0422 WHERE PERNR = LT_OUTTAB2-PERNR.
ENDSELECT.
IF P_CTYP = 'SS'.
S_TEXT1 = 'CERTIFICATE OF SSS PREMIUM CONTRIBUTION'.
S_TXT = 'SSS# :'.
ENDIF.
AT END OF PERNR.
GV_PERNR = GS_OUTTAB-PERNR.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZHRPYHPHRSBR0_V2'
IMPORTING
FM_NAME = FNAME.
IF SY-SUBRC EQ 0.
ENDIF.
CALL FUNCTION FNAME
EXPORTING
OUTPUT_OPTIONS = GS_SSFCOMPOP
S_TEXT1 = S_TEXT1
S_TXT = S_TXT
S_NAME = S_NAME
S_SSS = S_SSS
S_RYEAR = S_RYEAR
S_RMNTH = S_RMNTH
S_ISSDATE = S_ISSDATE
S_REC = S_REC
S_EECTB = S_EECTB
S_ERCTB = S_ERCTB
S_TOT = S_TOT.
IF SY-SUBRC EQ 0.
ENDIF.
ENDAT.
ENDLOOP.
Hi,
Try this...
loop at itab into fs.
w_total = w_total + fs-numeric.
at last.
call smartform.
endat.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check this link for Totals and subtotals,
http://help.sap.com/saphelp_nw04/helpdata/en/55/610e2ab57911d4b62c006094192fe3/frameset.htm
https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS
surya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Standard Form : SF_TOTALS
Print Program : SF_TOTALS
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi!
the grandtotal can be calculated in
LOOP AT GT_OUTTAB INTO GS_OUTTAB .
S_TOT = LT_OUTTAB2-TOTAL.
GRAND_TOT = S_TOT + LT_OUTTAB2-TOTAL.
(calculate the grandtotal.)
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'(call the function module)
and pass the grandtotal parameter in the smartform also.
ENDLOOP .
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.