Application Development 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: 

Script

Former Member
0 Kudos

What are TABs in SAP scripts. Where do we define then and explain with an Example of how to use them?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Tabs are created in the paragraph formats

Create a new PARAGRAPH format (ZA) in the script

and in that paragraph format you can define the TAB settings and the FONT settings also

Tab settings like

10 CHAR left

20 CHAR left

40 CHAR left

it is the space between the fields on the output

then in the script write

ZA &ITAB-KUNNR&,, &ITAB-ADRNR&,,&ITAB-NAME1&

,, IS Used to separate the fields so that it takes the space defined in TAB settings

<b>Reward points for useful Answers</b>

Regards

Anji

6 REPLIES 6

Former Member
0 Kudos

Hi

Tabs are created in the paragraph formats

Create a new PARAGRAPH format (ZA) in the script

and in that paragraph format you can define the TAB settings and the FONT settings also

Tab settings like

10 CHAR left

20 CHAR left

40 CHAR left

it is the space between the fields on the output

then in the script write

ZA &ITAB-KUNNR&,, &ITAB-ADRNR&,,&ITAB-NAME1&

,, IS Used to separate the fields so that it takes the space defined in TAB settings

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

we define tabs in character format and paragraph formats. When u define character format and paragraph format at that time u can define tabs.

Former Member
0 Kudos

Whenever you want to provide some space between variables, especially of TAB size,

example as below.

&EKPO-MATNR&,, &EKPO-MENGE&,,,, &EKPO-MEINS&

You use ,, to set a tab.

Regards,

Pavan

Former Member
0 Kudos

hi,

We can control the tab feed in a paragraph with tab positions. The tab stops us

define in the paragraph format replace the tab spacing we defined in the header data of theform. However, this depends on the extent to which we have defined tab stops in theparagraph format. If there are fewer tabs in the paragra ph formats than in the headerdata, the tab stops of the header data are used for the rest of the line.

1) Use this Std program RSTXSCRP.

i) First Export to Presentation file(.doc).

ii) Whenever you need that Export into SAP.

2) Normally we call them as Program symbols. Those are defined in Driver program. We can use in Script as for exp. &itab-matnr& Other variables ---System symbols : ex &page& ---Std symbols : ---Text symbols :We define them in script editor itself. Ex : /: Define &mysymbol& = 'XX'

3) We can control the tab feed in a paragraph with tab positions. The tab stops us define in the paragraph format replace the tab spacing we defined in the header data of the form. However, this depends on the extent to which we 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.

Regards

Former Member
0 Kudos

Based upon data display, you can define left aligned, right aligned tabs which helps to format output columns in layouts. The tab stops you define in the paragraph format replace the tab spacing you defined in the header data of the form.

For eg my first field is Sales order which is 10 characters long, second field is MATNR which is 18 character long and then MAKTX - 40 characters long.

In paragraph format i will use first tab at 11th position and second at 30th position. You need to consider field lengths while declaring tab positions.

For more details check this link -

http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm

<b>rewards point for helpful answer</b>

Former Member
0 Kudos

Hi

Setting the TABS:

In SE71, open your form and click on the paragraph format.

Then select the paragraph and hit the TABS button.

You can specify your TAB positions and the Alignment here.

In the code, you can saperate the tabs using ,, (comma comma).

Reward all helpfull answers

Regards

Pavan