cancel
Showing results for 
Search instead for 
Did you mean: 

How to Draw table in SAPscript ???

Former Member
0 Kudos

Hi all Guru of SAPScript!

I want to draw a table with column and row in SAPscript. Who can help me step by step?

Thanks!

Edited by: kathy a on May 6, 2008 11:53 AM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks a lot everybody,

I have a new problem about box.

If I want to put data into box which I draw, how to put???

Please , give me a example about this.

Former Member
0 Kudos

Hi Kathy,

Please post this question in a new thread. That would be better for anyone to understand and answer you.

Thanks in advance for your kind cooperation.

Warm Regards.

Abhijit.

Former Member
0 Kudos

hi kathy,

u define text elments for window , and also define the box command in same window of the text editor. then data will appear in the box from the text elements.

example.

/: BOX FRAME 10 TW WIDTH '11.5' CM HEIGHT '1.6' CM.

/ &it_mara-matnr& &it_mara-mbrsh& &it_mara-meins&

Former Member
0 Kudos

Hi,

Use BOx Syantax How to Draw table in SAPscript ??? Pls Read the description

Syntax:

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

2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]

BOX

Syntax:

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

Effect: draws a box of the specified size at the specified position.

Parameters: For each parameter (XPOS, YPOS, WIDTH, HEIGHT and FRAME), both a measurement and a unit of measure must be specified. The INTENSITY parameter should be entered as a percentage between 0 and 100.

•XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.

Default: Values specified in the POSITION command.

The following calculation is performed internally to determine the absolute output position of a box on the page:

X(abs) = XORIGIN + XPOS

Y(abs) = YORIGIN + YPOS

•WIDTH: Width of the box.

Default: WIDTH value of the SIZE command.

•HEIGHT: Height of the box.

Default: HEIGHT value of the SIZE command.

•FRAME: Thickness of frame.

Default: 0 (no frame).

•INTENSITY: Grayscale of box contents as %.

Default: 100 (full black)

Measurements: Decimal numbers must be specified as literal values (like ABAP/4 numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.

Units of measure: The following units of measure may be used:

•TW (twip)

•PT (point)

•IN (inch)

•MM (millimeter)

•CM (centimeter)

•LN (line)

•CH (character).

The following conversion factors apply:

•1 TW = 1/20 PT

•1 PT = 1/72 IN

•1 IN = 2.54 CM

•1 CM = 10 MM

•1 CH = height of a character relative to the CPI specification in the layout set header

•1 LN = height of a line relative to the LPI specification in the layout set header

Examples:

/: 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.

POSITION

Syntax:

/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started the POSITION value is set to refer to the upper left corner of the window (default setting).

Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words as a value which specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.

•XORIGIN, YORIGIN: Origin of the coordinate system.

•WINDOW: Sets the values for the left and upper edges to be the same of those of the current window (default setting).

•PAGE: Sets the values for the left and upper edges to be the same as those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).

Examples:

/: POSITION WINDOW

Sets the origin for the coordinate system to the upper left corner of the window.

/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'

Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.

/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM

Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.

SIZE

Syntax:

/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]

Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started the SIZE value is set to the same values as the window itself (default setting).

Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.

•WIDTH, HEIGHT: Dimensions of the rectangle or line.

•WINDOW: Sets the values for the width and height to the values of the current window (default setting).

•PAGE: Sets the values for the width and height to the values of the current output page.

Examples:

/: SIZE WINDOW

Sets WIDTH and HEIGHT to the current window dimensions.

/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM

Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.

/: POSITION WINDOW

/: POSITION XORIGIN -20 TW YORIGIN -20 TW

/: SIZE WIDTH +40 TW HEIGHT +40 TW

/: BOX FRAME 10 TW

A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.

Reward Helpfull Answers

Regards

Fareedas

0 Kudos

You can create Boxes in the SAPScript using the BOX command specifying the x,y co-ordinates and the width and the height

BOX XPOS '0' CM YPOS '0.5' CM WIDTH '9.2' CM HEIGHT '3.5' CM FRAME 8 TW

Regards,

Sathish

Former Member
0 Kudos

Hi Kathy,

Use BOX statement to draw tables in a Script.

thanks & Regards

Kishore Kumar Maram

Former Member
0 Kudos

Hi,

http://pijush.wordpress.com/2007/05/08/to-print-the-total-in-a-sapscript/

go to this site...here u will get the every details to create a table in script.

Thank u,

Manjula Devi.D