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

script

Former Member
0 Likes
522

Hi all,

I want to print the material description

bon35665(cekonstekkers aansluiten)

in two lines , like,

bon35665(cekonstekkers

aansluiten)

How to do it in script? Plz tell me the code if you can...

Thanks a lot in advance.

Regards,

Martina.

5 REPLIES 5
Read only

Former Member
0 Likes
505

u can split the material description into two strings and using two variable u can print this.

Read only

Former Member
0 Likes
505

Hi martina,

As you are working in the scripts you must have the Description in your print program.In the print program create two texts.

data:lz_text(40) type c,

lz_text(100) type c.

Now split your Desc here into lz_text and lz_text1.

lz_text = lz_str+0(40).

lz_text1 = lz_str+40(100).

Now print these two texts in the two lines in your script.

Regards,

Mueksh Kumar

Read only

0 Likes
505

Yes, exactly....

i have taken 2 variables like ,

txz01 TYPE txz01,

txz011 TYPE txz01,

and took the values as,

v_txz01 = wa_final-txz01+0(12).

v_txz011 = wa_final-txz01+12(28)

Now, how to make it print in the script ?

I am trying in the script with 'new-line'.

But i think its not working...

Thanks.

Read only

Former Member
0 Likes
505

Hi,

if you need the whole text then you can display that in two lines as

&itab-maktx(20)& in one line and

&itab-maktx+20(20)& in other line.

Regards,

Omkar.

Read only

Former Member
0 Likes
505

Hi Martina,

You can split any text by specifying the max. number of characters that you want in one line by using a function module.

SWA_STRING_SPLIT

This FM splits the data into many lines of an internal table. Each line would contain a maximum of characters specified by you.

Now you could read out the lines of the internal table and format your text as you require.

Reward points if this helps,

Kiran