‎2014 Mar 25 9:36 AM
Hi,
Can anyone tell me how to draw a dynamic table in SAP script? Also how can i give a variable in BOX command?? I saw in one thread that we can pass variable to BOX command using the below syntax.
BOX XPOS 10 YPOS 20 width 0 CH hieght <rowcount> CH.
But what exactly that rowcount ??
Thanks,
Padmalatha M.
‎2014 Mar 25 9:41 AM
Hi,
Rowcount will be the number of entries in your table which you are trying to display.
Regards,
Munesh.
‎2014 Mar 25 9:41 AM
Hi,
Rowcount will be the number of entries in your table which you are trying to display.
Regards,
Munesh.
‎2014 Mar 25 9:47 AM
its count of the number of rows in the box, i would say height of the box in output..
‎2014 Mar 25 9:49 AM
Hi,
Thanks for your reply.But what my question is do i need to declare the rowcount somewhere in my program? Can you tell me how exactly can i draw a dyanamic table??
Thanks,
Padmalatha.
‎2014 Mar 25 10:15 AM
Hi,
Thanks for your reply.But what my question is do i need to declare the rowcount somewhere in my program? Can you tell me how exactly can i draw a dyanamic table??
Thanks,
Padmalatha.
‎2014 Mar 25 10:19 AM
can you try using &var1 instead using constant for this you need to have the required length before the box command.
‎2014 Mar 25 10:26 AM
Hi,
Rowcount will be the number of records in your internal dynamic table and you will need to declare it in the driver program and populate the variable before the WRITE_FORM.
Regards,
Munesh.
‎2014 Mar 25 10:29 AM
How can i pass a variable data into that Box command?What is the syntax?I mean say i m havng value rowcount = sy-tabix which means the length of the internal table.Suppose my internal table contains 10 values.now rowcount =10 is getting in my program.
Now if i give
/: BOX XPOS 0MM YPOS <rowcount> CH width 190 MM height 0 LN
its not printing anythng but if i give
/: BOX XPOS 0MM YPOS 10 CH width 190 MM height 0 LN
Its printing some line.
<rowcount> is this the correct syntax to pass variable value??
‎2014 Mar 25 10:38 AM
you misunderstood the syntax.
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
here XPOS, YPOS points to the upper left corner of the box(starting point of the box for example for drawing a rectangle on graph you will give the starting x and y axis and ending x and y axis, its just the same but the end point is determined by the width and height from the starting point).
so give the number of line in height parameter.
below units will help you:
TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
‎2014 Mar 25 10:39 AM
Hi,
Can you tell me the syntax to write in BOX command to pass a variable value?
Thanks,
Padmalatha.
‎2014 Mar 25 10:46 AM
Hi,
The syntax will be:
/: BOX XPOS 0MM YPOS &rowcount& CH width 190 MM height 0 LN
Also make sure that the variable 'rowcount' is of type char as scripts accepts only character variable.
Regards,
Munesh.
‎2014 Mar 25 10:47 AM
This is my output for certain po number how to draw lines for this table? the output is dynamic based on the number of rows in output i have to draw a table.how can i acheive that??
‎2014 Mar 25 10:55 AM
Hi,
Thanku. its working but how exactly we draw a dynamic table depending on the length of the output fields.?
As you can see this is my output how to draw lines for this table ??
‎2014 Mar 25 11:01 AM
Hi,
length or height?? For length you need to play with the WIDTH parameter of the box command and for height, both YPOS and HEIGHT will do.
Regards,
Munesh.
‎2014 Mar 25 11:04 AM
‎2014 Mar 25 11:21 AM
Hi,
Thanku for your replies. My issue is solved.
Thanks,
Padmalatha Meesala.
‎2014 Mar 25 11:21 AM
Hi,
Thanku for your replies. My issue is solved.
Thanks,
Padmalatha Meesala
‎2014 Mar 25 11:22 AM
if i use vline and uline thr ll be breaking between the lines as it is not continous.