Skip to Content
0
Former Member
Apr 25, 2007 at 11:52 AM

SUB TOTAL CORRECTION

11 Views

hi all

in d below code am doing the total wrbtr so in d driver program i pass it to the variable sum but am not getting any result for the sum..please luk into and if der r any modifications please do it...thank u

vijay

<b>Code in script</b>

/: IF &BSEG-BSCHL& = '01' or &BSEG-BSCHL& = '70'

T3 <S> &SKAT-TXT50(13)& (am getting this values)

= &BSEG-WRBTR& &BSEG-PRCTR& &BSEG-KOSTL& </>

/: PERFORM ADDR1 IN PROGRAM ZF141

/: USING &BSEG-WRBTR&

/: <b>changing &sum&</b>

/: ENDPERFORM

T3 <b>&SUM&</b>

<b>Code in ABAP editor</b>

REPORT ZF141.

TABLES:BSEG.

data:sum LIKE BSEG-WRBTR.

data:WRBTR1 like BSEG-WRBTR.

FORM ADDR1 tables IN_PAR structure itcsy

OUT_PAR structure itcsy.

STATICS SUM1 TYPE BSEG-WRBTR.

READ TABLE IN_PAR WITH KEY 'bseg-wrbtr'.

CHECK SY-SUBRC = 0.

SUM = IN_PAR-value.

sum = sum + SUM1.

READ TABLE OUT_PAR WITH KEY VALUE = 'sum'.

OUT_PAR-VALUE = sum.

MODIFY OUT_PAR TRANSPORTING VALUE WHERE VALUE = 'SUM'.

ENDFORM.