cancel
Showing results for 
Search instead for 
Did you mean: 

script;problem with subroutine.

Former Member
0 Kudos

hi gurus,

i am facing problem with executing subroutines.here i have give u the code wat i wrote .can anyone pl help me out.Thanks.

script:

/:ENDPERFORM "dont consider this pl.

/:PERFORM TAX_AMT IN PROGRAM y_GETSGTXT_PAYVOUCH

/:USING &BSEG-HKONT&

/:USING &BESG-WRBTR&

/:CHANGING &WRBTR1&

/:ENDPERFORM

editor:

form TAX_AMT TABLES IN_PAR STRUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

*CLEAR wrbtr1.

READ TABLE IN_PAR WITH KEY 'bseg-BELNR'.

CHECK SY-SUBRC = 0.

BELNR1 = IN_PAR-VALUE.

READ TABLE IN_PAR WITH KEY 'bseg-WRBTR'.

CHECK SY-SUBRC = 0.

WRBTR1 = IN_PAR-VALUE.

READ TABLE IN_PAR WITH KEY 'bseg-hkont'.

CHECK SY-SUBRC = 0.

hkont1 = IN_PAR-VALUE.

select * from bseg

where bseg~belnr = BELNR1 and

bseg~wrbtr = wrbtr1 and

bseg~hkont between '177000' and '177999' and

bseg~hkont = hkont1 .

endselect.

READ TABLE OUT_PAR WITH KEY ' WRBTR'.

CHECK SY-SUBRC EQ 0.

OUT_PAR-VALUE = WRBTR1.

MODIFY OUT_PAR INDEX SY-TABIX.

endform.

Edited by: Ranganayahi Chandirasekaran on Feb 23, 2008 7:24 AM

Edited by: Ranganayahi Chandirasekaran on Feb 23, 2008 7:51 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

check ur script code

script:

/:ENDPERFORM - First line is extra , pls remove this.

endperform should come after perform.

/:PERFORM TAX_AMT IN PROGRAM y_GETSGTXT_PAYVOUCH

/:USING &BSEG-HKONT&

/:USING &BESG-WRBTR&

/:CHANGING &WRBTR1&

/:ENDPERFORM

anya

Former Member
0 Kudos

b4 this subroutine i wrote one more subroutine that is ended there.pl dont consider that.sorry for the inconvenience.

Former Member
0 Kudos

Hi,

In debugging mode did you check if the values of WRBTR are coming correctly to the subroutine, coz there can be a problem with the format while passing to the subroutine. Chk it out, it may help.

Regards,

Narendra.