cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in subroutine of SAP Script

Former Member
0 Kudos

Hi Experts,

I have defined one subroutine in the SAP script.

PERFORM Z_GET_PIC IN PROGRAM

USING &T001-BUKRS&

CHANGING &TEXT&

changing &TEXT& field i am populating from the table zmara and field is text (zmara-text).

so whether i have to define the &TEXT& in the SAP Script? how i have to define.

can i define like

DEFINE &TEXT&

Please suggest.

Regards,

udupi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

While defining your variable, define it as:


/: DEFINE &TEXT& := ' '

the := should be used.

Former Member
0 Kudos

In the SAPScript window (where I will use), I would do:

/: DEFINE &TEXT& = ' '
/: PERFORM Z_GET_PIC IN PROGRAM my_modules_program
/: USING &T001-BUKRS&
/:CHANGING &TEXT&
/:endperform.
. . .
* &TEXT&

&TEXT& will now display what you stored in your Z_GET_PIC output table of structure itcsy, index 1, in the value field.

former_member203305
Active Contributor
0 Kudos

Hello.

Always define the new variables before the PERFOM

You need to write the this code in the Sapscript


DEFINE &TEXT&
PERFORM Z_GET_PIC IN PROGRAM
USING &T001-BUKRS&
CHANGING &TEXT&

Then you can use the &TEXT&.

Regards