Skip to Content
0
Former Member
May 16, 2005 at 06:21 AM

Perform in Script

11 Views

Hi All,

I am using perform statement in script.

following is code.

I debug the program & check tha value of in_tab-name = it_mara-matnr, in_tab-value = ''.

Why it is taking it as blank?

:/ PERFORM GET_VAL IN PROGRAM ZGET_VAL

:/ USING &IT_MARA-MATNR&

:/ CHANGING &DESCR&

:/ ENDPERFORM

In my Program my code is :

REPORT zget_val .

TABLES makt.

DATA descr LIKE makt-maktx.

DATA it_makt LIKE makt OCCURS 0 WITH HEADER LINE.

FORM get_val TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

READ TABLE in_tab INDEX 1.

IF NOT in_tab-value IS INITIAL.

SELECT * FROM makt INTO TABLE it_makt

WHERE matnr = in_tab-value.

ENDIF.

DATA descr(40).

LOOP AT it_makt.

descr = it_makt-maktx.

out_tab-name = 'maktx'.

out_tab-value = descr.

APPEND out_tab.

ENDLOOP.

ENDFORM.