cancel
Showing results for 
Search instead for 
Did you mean: 

Printing variable length texts

Former Member
0 Kudos

Hi experts,

I need to print texts which come from database table onto a scriptform in which i am facing a problem.

The output is getting displayed as below.

Present output format

Company Description

1000 Company code1

200000 Company code2

30 Company code3

Required output format

Compa Description

1000 -


Company code1

200000 - Company code2

The text under the fielddescription is getting printed not exactly under the field description instead it is getting printed based on the first field 'Company'. How can i ensure that the description gets printed exactly under the field descrption. I need this text to be left aligned.

Here the text for the Second field i.e 'Company' is not taking its full length. The field 'Company' is defined as Char30. In order to fix the length of the field to 30 i used a function module also. I also tried to get the dictionay length by using &Company(30)& but none worked.

Please suggest as to how can i do this alignment. Correct answers will be << removed >>.

Regards,

Kumar

Moderator message - Please do not offer points. Given that every question you have asked in the last three or so years has this offer and that as far as I can see you have never assigned a single one, it does seem rather unlikely.

Edited by: Rob Burbank on Jun 17, 2010 11:38 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Tabs

You can define as many tab positions as you require for each paragraph format. The text can be aligned in different ways:

u2022 Left-aligned with LEFT

u2022 Right-aligned with RIGHT

u2022 Centered with CENTER

u2022 At the sign with SIGN

u2022 At the comma or decimal point with DECIMAL

You can control the tab feed in a paragraph with tab positions. The tab stops you define in the paragraph format replace the tab spacing you defined in the header data of the form. However, this depends on the extent to which you have defined tab stops in the paragraph format. If there are fewer tabs in the paragraph formats than in the header data, the tab stops of the header data are used for the rest of the line. The tab stops are represented as, , in the text editor.

/E ITEM_HEADER

IL <TI>Item,,Material,,Description</>

IP <TI>,,,,Quantity,,,,Price,,Price unit,,,,,,Value</>

/ &ULINE(71)&

/

/E ITEM_LINE

IL &VBDPA-POSNR&,,&VBDPA-MATNR&,,&VBDPA-ARKTX&

,,&VBDPA-IDNKD& &VBDPA-POSEX&

Regards,

Chandra Kavali

Former Member
0 Kudos

Hi

If you are in smartforms create templete with tabs.

regards

sateesh

Former Member
0 Kudos

Hi,

I am using SAP SCRIPTS.

Regards,

Kumar

Former Member
0 Kudos

Use Tabs in sapscript, defined in the paragraph.