cancel
Showing results for 
Search instead for 
Did you mean: 

Designing tables in sapscripts

former_member207835
Participant
0 Kudos

Hi,

my requirement is i have to desing a script

it contains two tables. which is of variable size.

that means in runtime they may get one entry or multiple entries.

can any one plz tell me how to desing tables in sap scripts with variable size.

Thanks & Regards

Nageshwar

Accepted Solutions (1)

Accepted Solutions (1)

madan_ullasa
Contributor
0 Kudos

Hi,

If I am not wrong, you cannot really design tables in SAP Scripts. Instead you can use vline uline or box commads(?) after each line is displayed to draw the table.

regds,

Madan..

Answers (2)

Answers (2)

former_member207835
Participant
0 Kudos

i am planning to use box command only.

can any one provide some code or some idea to design table using box command .the table size should be dynamic.

naresh_bammidi
Contributor
0 Kudos

Hi eswer ,

yes you can do it with ulines and vlines.first write your script under an element.call that element from your driver program.

for eg.if you want to display a table with two columns.write the code as below

/E 100

  • &ULINE&

  • &vline& &field1& &vline& &field2& &vline&

  • &ULINE&

then call this element from your driver program.it prints the data with rows and column

thanks and regards

Naresh bammidi

former_member193831
Active Participant
0 Kudos

/: BOX WIDTH ‘20’ CM HEIGHT 1 IN FRAME 10 TW INTENSIFY 15

Former Member
0 Kudos

Hi,

You can draw box in your SAPscript form by applying this command.

Syntax

/: BOX XPOS YPOS WIDTH HEIGHT FRAME INTENSITY (Each position and size should be inside [ ] )

Example

We will draw box begins x origin 1 cm, y origin 2 cm, width 3 cm, height 4 cm, frame 10 tw and shade 10 %

/: BOX XPOS 1 CM YPOS 2 CM WIDTH 3 CM HEIGHT 4 CM FRAME 10 TW INTENSITY 10Output

We can draw the horizontal line by applying this command.

/: BOX XPOS 1 CM YPOS 1 CM WIDTH 10 CM HEIGHT 0 CM FRAME 10 TWOutput

We can draw the vertical line by applying this command.

/: BOX XPOS 1 CM YPOS 1 CM WIDTH 0 CM HEIGHT 5 CM FRAME 10 TWOutput

Thanks,

Renuka

former_member207835
Participant
0 Kudos

Hi,

thanks for your information.

i need to print table headers using boxes repeatedly with in loops dynamically.

how can i achieve this..

Thanks & Regards

Eswar

Former Member
0 Kudos

Hi,

You can refer the following link.

Link:[http://www.sapfans.com/forums/viewtopic.php?f=14&t=329361]

Thanks,

Renuka S.

former_member207835
Participant
0 Kudos

Hi Renu,

thanks for your information.

can you know how two hanlde main window in mulltiple pages

i.e while printing table contents repeatedly it flow across multiple pages how can i handle it in second and third..etc pages.

Thanks & Regards

Eswar

Former Member
0 Kudos

Generally speaking, you have a FIRST page, that points to NEXT or PAGE2 or something...this is declared in the SAPScript page....

One usually has a MAIN window of the same width, but different placement on page NEXT for example....

My MAIN might start at 10CM from top on page FIRST, but on NEXT, the data is a continuation, so I might start MAIN on page 2 at 2CM from the top.... Set your MAIN using page windows....SAPScript will expect same width but will allow different height, etc.

Former Member
0 Kudos

well you could however use box-commands.

the box-command can work with variables as well instead of hardcoded values.

These values can be determined and set at runtime in driver program or external perform.

But still i wouldnt advise to host tables in sap-script. This is gonna be a endless task.

regards