cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript fixed space in row

Former Member
0 Kudos

Hi, experts

In sapscript I need to show a fixed material data, right now I'm using these lines

 	PERFORM LONGITUD IN PROGRAM ZMMR03
 	USING &MABDR-MAKTX&
 	CHANGING &STRLENX&
 	IF &STRLENX& < 40
 	&MSEG-MATNR&,,&MABDR-MAKTX&,,,,t<&MSEG-MENGE(C.0)&,,&MSEG-MEINS&
 	ELSEIF &STRLENX& >= 40
 	&MSEG-MATNR&,,&MABDR-MAKTX&,,,,t>&MSEG-MENGE(C.0)&,,&MSEG-MEINS&
 	ENDIF
 	ENDPROTECT

and the output is when is a short text:

<i>Material:

10000000000220 SHORT TEXT 3 UN</i>

but if the text is longer:

<i>Material:

10000000000220 LONG TEXT SHOWED 3 UN</i>

I need a fixed space between variables ... how can I do this? for example:

-


10000000000220

SHORT TEXT

3

UN

10000000000220

LONG TEXT SHOWED

3

UN

-


I need a big helpfull, the go-live was two days ago, thanks in advance.

Regards,

mmg

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

GO to the paragraph format..that you gave for displaying..

In the paragraph format press the tabs button..

There you can see the tab position for the 1st column, 2nd column...

For the material text column give the tab position accordingly...

Hope this works..

Thanks,

Naren

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks to all of you, answers were very helpfull

mgg

Former Member
0 Kudos

Hi,

There are 2 ways, you can define the paragraph format, and use the correct TAB positions and give for that fields, so these will come with the fixed space.

another ways is

&MSEG-MATNR(10)&,,&MABDR-MAKTX(25)&,,,,t<&MSEG-MENGE(10.0)&,,&MSEG-MEINS(15)&

Regards

Sudheer

former_member196280
Active Contributor
0 Kudos

Hi,

Goto the paragraph format and try altering the lenght of second tab. You will see the position of SHORT TEXT/LONG TEXT varying. Try to fix the tab scape according to your requirment.

I hope this info will help to solve your issue.

Reward points to all useful answers

Regards,

SaiRam

dev_parbutteea
Active Contributor
0 Kudos

Hi,

Either you specify the output lenght like this &MABDR-MAKTX(40)&

or you modify the tabulations in paragraph formats.

Reward if helpful,

Regards,

Sooness.