cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript box drawing

Former Member
0 Kudos

Hi Guys,

I'm facing difficulties on drawing a box with records in SAPScript. Im using below for box drawing:

1. Draw main box

/: BOX WIDTH 280 MM HEIGHT 130 MM FRAME 10 TW

2. Draw vertical line to separate each different COLUMN

/: BOX XPOS 15 CH WIDTH 0 CH HEIGHT 130 MM FRAME 10 TW

3. Draw <b>horizontal line</b> to separate each different RECORD

/: BOX YPOS 4 CH WIDTH 280 MM HEIGHT 0 CH FRAME 10 TW

Problems:

1. For drawing <b>horizontal line</b> to seprate each record, basically i fix a static incremental counter for YPOS xxx CH.

For eg:

1st line -> /: BOX YPOS <b>4</b> CH WIDTH 280 MM HEIGHT 0 CH FRAME 10 TW

2nd line -> /: BOX YPOS<b> 6</b> CH WIDTH 280 MM HEIGHT 0 CH FRAME 10 TW

3rd line -> /: BOX YPOS <b>8</b> CH WIDTH 280 MM HEIGHT 0 CH FRAME 10 TW

... and so on, until the end of the box

The output LINE for first few records still ok, but for the rest it is <b>overlapping</b> with the records.

---> Please comment the right way to overcome above.

2. The code for drawing horizontal line is a lot, is there a better to perform the drawing?

-


> Please comment

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

increase or decrease <b>ypos</b> in u r program

there is no another way to this one

and for data displaying better to add line position in that one(in parameters indent first line give some .5 or 1CM)

this may helps u

Regards

Vijay Pawar

Former Member
0 Kudos

Hi Vijay,

Thanks for your reply.

I did tried to increase or decrease the <b>YPOS</b> by 0.5 CH, but there is no effect at all.

And you mentioned, "data displaying better to add line position in that one(in parameters indent first line give some .5 or 1CM)" . I'm not so sure on what should i do, could you please further elaborate?

Thanks in advance.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Change the unit of <b>ypos</b> from CH to MM or CM. So, that you can give like 2.5 mm or 3.2 mm.

So, the problem can be resolved.

"<i>2. The code for drawing horizontal line is a lot, is there a better to perform the drawing?

/: BOX YPOS 4 CH WIDTH 280 MM HEIGHT 0 CH FRAME 10 TW</i>"

For this write the following.

/: SIZE width 280 MM.---> This is main box width and this is applicable to all the boxes followed by it.

i.e, you can write

/: BOX YPOS 4 CH HEIGHT 0 CH FRAME 10 TW

Reward if helpful.

Regards,

Sandhya

Former Member
0 Kudos

Hi,

My problem solved by using LN as below:

😕 BOX YPOS 4 <b>LN</b> WIDTH 280 MM HEIGHT 0 CH FRAME 10 TW

-


But right now, im using command SIZE to draw a box for me automatically by following the actual window size. I did that with no problem.

But im facing problem when im drawing Vertical line(column separator)within the box. Im intend to draw a line <b>without</b> specific the height for <b>Vertical</b> line(because my 2nd page's height is larger than 1st page and thus i do not want to harcode the height). Below is my code:

/:SIZE WINDOW                      -->Draw main box
/:BOX FRAME 10 TW                  -->Draw main box
/:BOX XPOS 15  CH FRAME 10 TW      --> Draw vertical line

The result returned with problem, there are 2 vertical line being draw out. 1st line is draw at position 15 ch as instructed by the command, but there is <b>2nd line draw out of my main box</b> on right, this is not expected.

Please comment on how should i fix the code.

Thanks in advance.

Former Member
0 Kudos

Hi Guys,

Please give me some ideas....

Thanks in advance.

Former Member
0 Kudos

Hi,

You can try the below line of code and adjust the length of horizantal line(I kept as 80) in the braces of below code as per your requirement.

&ULINE(80)&

Hope this will help you. Reward points if it's helpful.

Regards,

Ravi

Message was edited by:

Ravi Shankar