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

Sap Script Drawing boxes and table in main window

Former Member
0 Likes
2,660

Hi All,

I am new to Sapscript, I want to know how we can get the table in the main window .I want some columns in the main window. I dont know how to use box statements and other required data.

Its better if I get Sample code .

Thanks in advance.

Yuvaraj

Hi All,

I am new to Sapscript, I want to know how we can get the table in the main window .I want some columns in the main window. I dont know how to use box statements and other required data.

Its better if I get Sample code .

Thanks in advance.

Yuvaraj

6 REPLIES 6
Read only

Former Member
0 Likes
1,320

Hi,

/: BOX FRAME 10 TW

Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).

/: BOX INTENSITY 10

Fills the window background with shadowing having a gray scale of 10 %.

/: BOX HEIGHT 0 TW FRAME 10 TW

Draws a horizontal line across the complete top edge of the window.

/: BOX WIDTH 0 TW FRAME 10 TW

Draws a vertical line along the complete height of the left hand edge of the window.

/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15

/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.

Read only

Former Member
0 Likes
1,320

U can try with this code.

BOX XPOS '0' CM WIDTH '17.5' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '4.4' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '5.6' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '6.8' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '7.9' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '13.7' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '10.5' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

BOX XPOS '9.1' CM WIDTH '0' CM HEIGHT &G_F_COUNT17& CH FRAME 2 TW

If it is useful for u don't forgget to award points.

Regards,

Vasanth

Read only

Former Member
0 Likes
1,320

Hi,

thanks for ur quick replies.but I want to add column headings also in the table.

So plz tell me how to use both box and top endtop together.

Thanks in advance.

Yuvaraj

Read only

0 Likes
1,320

Hi Yuvraj,

One method to provide headings to each column in the table is like this.

First create the outer box with the following details(say)

BOX WIDTH 14 CM HEIGHT 10 CM FRAME 5 TW INTENSITY 1

Now give the headings to the columns using tabs in the paragraph settings or using spaces.

For eg: NAME,,INCOME,,DEPARTMENT

Now draw a horizontal line under the columns

BOX XPOS 0 CM YPOS 2 CM WIDTH 15 CM HEIGHT 0 CM FRAME 5 TW INTENSITY 1

Now give the vertical lines for separating the columns(<b>under the assumption that the first tab position is at 7.6CM second at 10.7 CM</b> )

BOX XPOS '7.6' CM YPOS 0 CM WIDTH 0 CM HEIGHT 5 CM FRAME 5 TW INTENSITY 1 " First vertical line

BOX XPOS '10.7' CM YPOS 0 CM WIDTH 0 CM HEIGHT 5 CM FRAME 5 TW INTENSITY 1 "third vertical line

Now you can loop the table and draw the remaining horizontal lines to create a table and fill the values.

Reward points if found useful..

Regards,

SP.

Read only

0 Likes
1,320

hi yuvaraj,

u cannot use BOX in bt TOP and ENDTOP.

for TOP and ENDTOP.

/: TOP

  • Column Headings

/: ENDTOP

eg:

/: BOX FRAME 10 TW

/: TOP

  • Column Headings

/: ENDTOP

/: BOX XPOS '0' CM YPOS '1' CM HEIGHT '0' CM FRAME 10 TW

Read only

Former Member
0 Likes
1,320

Hi,

It is much easier to draw boxes using smartforms.

If the requirement has the flexibility to use either Sap script or smartforms, then opt for smartform.

Coding is not required for boxes.

Best regards,

Prashant