Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Printing Multiple lines in sapscript using just one variable

deepak_dhamat
Active Contributor
0 Likes
1,777

hi all,

Please understand my requirment first .

i am displaying Material PO text description -- in SAPscript LAyout ,

it is ok i am displaying upto 10 lines but for displaying ten lines i have taken 10 variable

but need to display 100 lines if data is present in 100 lines .

so to avoide using multiple variable is ther any other option

Logic i am using is

/:	 	PERFORM KTSL_LONG_TEXT IN PROGRAM ZMMLAYOUT1
/:	 	USING &EKPO-EBELN&
/:	 	USING &EKPO-EBELP&
/:	 	CHANGING &TDLINE1&
/:	 	CHANGING &TDLINE2&
/:	 	CHANGING &TDLINEK3&
/:	 	CHANGING &TDLINEK4&
/:	 	CHANGING &TDLINEK5&
/:	 	CHANGING &TDLINEK6&
/:	 	CHANGING &TDLINEK7&
/:	 	CHANGING &TDLINEK8&
/:	 	CHANGING &TDLINEK9&
/:	 	CHANGING &TDLINEK10&
/:	 	ENDPERFORM

ZMMLAYOUT1 IS DRIVING PROGRAM FOR PERFORM .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,073

Hi Deepak

Did you try the option of concatenating all the variables separated by carriage return/line feed attribute from cl_abap_char_utilities.

Regards

Ranganath

5 REPLIES 5
Read only

Former Member
0 Likes
1,074

Hi Deepak

Did you try the option of concatenating all the variables separated by carriage return/line feed attribute from cl_abap_char_utilities.

Regards

Ranganath

Read only

Former Member
0 Likes
1,073

Why would not not put this READ_TEXT in the driver program, then loop at your text table and do the WRITE_FORM with the correct element name for each row in your text table. Going to be a MUCH better fix than what you're trying to do here.

Read only

0 Likes
1,073

HI ,

Actually i am priting this in main window .

Regards

Deepak.

Read only

0 Likes
1,073

The create a text element /E text_line in Main window ...

In the Driver Program call read text...

and the call the Text element windoe in the driver program by putiing the Loop .

See the belwo Links

http://help.sap.com/saphelp_nw70/helpdata/EN/d6/0db538494511d182b70000e829fbfe/content.htm

D@s

Read only

Former Member
0 Likes
1,073

Hi ,

try this way..

Include &Object-ID& &Text-id& &text-name&

INCLUDE &ORDCONF_TEXT& OBJECT TEXT ID ZSD PARAGRAPH A1

By this you can print multiples lines present in the Text.

D@s