cancel
Showing results for 
Search instead for 
Did you mean: 

Problem calling subroutine from Script Form

Former Member
0 Kudos

Hello All,

I added a variable &PO_USD1& to a subroutine in a Script Form. But while calling the subroutine from Script form, the OUT_TAB[] doesn't contain the new variable. While debugging the program, SY-SUBRC is 4 for the statement  -> READ TABLE OUT_TAB INDEX 3.

Script Form code:

/: DEFINE : &AMT_IN_WORDS&

/: DEFINE : &AMT_IN_WORDS1&

/: DEFINE : &PO_USD1&

/: PERFORM AMT_WORDS IN PROGRAM ZXXXXXXXX

/: USING &PEKKO-NETWR&

/: USING &EKKO-WAERS&

/: CHANGING &AMT_IN_WORDS&

/: CHANGING &AMT_IN_WORDS1&

/: CHANGING &PO_USD1&

/: ENDPERFORM

Program - ZXXXXXXXX

FORM AMT_WORDS TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...........

READ TABLE OUT_TAB INDEX 1.          "SY-SUBRC is 0

READ TABLE OUT_TAB INDEX 2.          "SY-SUBRC is 0

READ TABLE OUT_TAB INDEX 3.          "SY-SUBRC is 4

............

ENDFORM.

OUT_TAB[] contains only 2 records:

1. &AMT_IN_WORDS&

2. &AMT_IN_WORDS1&

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member209685
Participant
0 Kudos

Hi shalesh,

have you made sure that you activated the SAPScript form after you made the change. and if it's a translated form that you are printing in the same language as the language you made the change in,