cancel
Showing results for 
Search instead for 
Did you mean: 

how to loop an internal table content into sapscript

Former Member
0 Kudos

Hi, all.

My code is currently like below.

FORM GET_MATERIAL_TEXT

TABLES

IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

LOOP AT T_TEXT INTO R_LINES.

read table out_tab INDEX sy-tabix.

move R_LINES-TDLINE to out_tab-value.

modify out_tab INDEX sy-tabix.

ENDLOOP.

ENDFORM..

PERFORM GET_MATERIAL_TEXT IN PROGRAM Zabc

CHANGING &MATERIAL_TEXT1&

CHANGING &MATERIAL_TEXT2&

CHANGING &MATERIAL_TEXT3&

......

CHANGING &MATERIAL_TEXT99&

Do anyone know how to pass the T_TEXT internal table content to sapscript's element &MATERIAL_TEXT&?? I think that is not possible to hard to material text element for so many lines, bcz sometime we don't know how much of lines in the t_text internal table.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Just create text using function module.

'create_text' and include the same in your script.