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 draw dynamic table in SAP Script !

Former Member
0 Likes
1,987

Hi,

<i>I like to draw a table in the main window, the table height should depends on number of rows displayed on it.

Could any one please help on this.

Thank you,

Senthil</i>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,353

HI senthil

you have to use the BOX command in the SAPSCRIPT using which you can draw the table in script.

in the starting of the MAIN WINDOW draw a horizontal line and then display your vairables

in end again draw a horizontal line to close the table.

the height of the vertical line will the number of records in the internal table.

the vertical line can be drwan uisng

BOX XPOS 10 YPOS 20 width 0 CH hieght <rowcount> CH.

regards

kishore

regards

kishore

6 REPLIES 6
Read only

Former Member
0 Likes
1,353

Hi Senthilkumar,

It is one of the problems in SAPScript where you cannot draw lines or boxes dynamically.

However, you can use Smartforms to do this easily.

The other solution may be to draw the table to the maximum possible height of the main window. Other than this I think there is no such posibility in SAPScript.

Regards,

Wenceslaus.

Read only

Former Member
0 Likes
1,353

Box command is used to draw a table with single column. If you have multiple columns, you need to use those many box commands.

For BOX command

/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

need to pass x position, y position, width, height.

In your case you can use variable sfor the same. After each record display update height variable with the height of each row. In this way you can display dynamic boxes/ tables.

Read only

0 Likes
1,353

Hi Ashish,

You can draw boxes only statically like.

BOX XPOS '3.4' CM WIDTH 0 TW HEIGHT '8.2' CM FRAME 10 TW

But you cannot pass values in BOX command like:

BOX XPOS <b>&xpos&</b> CM WIDTH 0 TW HEIGHT <b>&height&</b> CM FRAME 10 TW

Read only

0 Likes
1,353

<i>Hi,

Thank you for your reply.

Is it possible to define a variable in form and assign a value to it from program variable and then use that in form.

Please give me syntax of define statement.

Thank you,

Senthil</i>

Read only

Former Member
0 Likes
1,354

HI senthil

you have to use the BOX command in the SAPSCRIPT using which you can draw the table in script.

in the starting of the MAIN WINDOW draw a horizontal line and then display your vairables

in end again draw a horizontal line to close the table.

the height of the vertical line will the number of records in the internal table.

the vertical line can be drwan uisng

BOX XPOS 10 YPOS 20 width 0 CH hieght <rowcount> CH.

regards

kishore

regards

kishore

Read only

Former Member
0 Likes
1,353

hi dear,

use BOX command to draw table