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

How to align fields with column heading in SAPSCRIPTS?

Former Member
0 Likes
2,096

Hi,

I am displaying a list of items on a SAPSCRIPT form but the item's fields are not align with the heading when the fields' lengths vary. For example, if one of the fields is 3 chars short then the subsequence fields will be shifted left by 3 spaces.

Is there a way to define a field to start at a fixed position in SAPSCRIPT with regardless to its actual length? Please help!

Best regards,

Chuong Le

1 ACCEPTED SOLUTION
Read only

former_member221770
Contributor
0 Likes
842

Hi Chuong,

What you need to do is define "Paragraph Formats" for your SAPscript. These Paragraph Formats define your font and tab definitions.

You create these paragraph formats via SE71 and are SAPscript specific. Let's say for example, you want to create a simple 2 column report in TIMES 12 font.

Go to SE71 and open up your SAPscript. CLick on the "Paragraph Format" button on the Application Toolbar. Create a new Paragraph Format and let's call it "Z1".

You will see the attributes to the Paragraph Format at the bottom of the screen. CLick on the "Font" button to define your TIMES in your Font Family and 12 as your Font Size.

Now go to the "Tabs" button and here you define your column widths. These are your Column Separators. Because we are only defining 2 columns, you only need to define 1 tab. Lets make it at 20 CH (CH means characters), and left aligned.

Save your Paragraph Format.

Now to use your Paragraph Format in your SAPscript Editor. Let's say you want to use it in Text Element 'Heading' to display Material Number and Old Material Number:

/E HEADING

Z1 &MARA-MATNR&,,&MARA-BISMT&

The ",," tells the SAPscript that you want a "Tab" here.

Hope this makes sense.

Cheers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.

1 REPLY 1
Read only

former_member221770
Contributor
0 Likes
843

Hi Chuong,

What you need to do is define "Paragraph Formats" for your SAPscript. These Paragraph Formats define your font and tab definitions.

You create these paragraph formats via SE71 and are SAPscript specific. Let's say for example, you want to create a simple 2 column report in TIMES 12 font.

Go to SE71 and open up your SAPscript. CLick on the "Paragraph Format" button on the Application Toolbar. Create a new Paragraph Format and let's call it "Z1".

You will see the attributes to the Paragraph Format at the bottom of the screen. CLick on the "Font" button to define your TIMES in your Font Family and 12 as your Font Size.

Now go to the "Tabs" button and here you define your column widths. These are your Column Separators. Because we are only defining 2 columns, you only need to define 1 tab. Lets make it at 20 CH (CH means characters), and left aligned.

Save your Paragraph Format.

Now to use your Paragraph Format in your SAPscript Editor. Let's say you want to use it in Text Element 'Heading' to display Material Number and Old Material Number:

/E HEADING

Z1 &MARA-MATNR&,,&MARA-BISMT&

The ",," tells the SAPscript that you want a "Tab" here.

Hope this makes sense.

Cheers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.