Skip to Content
0
Former Member
Aug 24, 2009 at 08:49 AM

Getting Grand total then pass it to smartform

16 Views

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.