Frames, Lines and shading

Started by jayanthi mandhalapu, Aug 07, 2009, 02:54 AM

previous topic - next topic
Go Down

jayanthi mandhalapu

BOX
Draws a box

Syntax:

/: BOX <xpos> <ypos> <width> <height> <frame> <intensity>

The intensity is the grey scale of the box as %. The frame parameters is the thickness of the frame. Default is 0.

Each of the paramteters ypos, xpos, width, height and frame muts be followed of the measurement unit:

TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
Examples:

/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MM INTENSITY 10 FRAME 0 TW

/: 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 shading 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 and SIZE
You can use the POSITION and SIZE commands to set default parmeters for a box. This can be usefull if you
have several boxes that share the same parameters.

Example:

/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
/: SIZE HEIGHT '2' MM WIDTH '76' MM
/: BOX FRAME 10 TW INTENSITY 10


If you want to set the position realtively to the window use POSITION WINDOW to set the position to the top/left
start of the window. Then use POSITION to set the current position relatively to the start of the Window. Note
that
you uses "+" or "-" in the ORIGIN position to the set the position relatively.


/: POSITION WINDOW
/: POSITION XORIGIN '+5' MM YORIGIN '+10' MM

the position is now 5 MM from the left and 10 MM from the top of the window.

NOTE: After using the position command you can move the current position realtively to the last used position

/: POSITION XORIGIN '+10' MM YORIGIN '+20' MM


Now the position will be X = 15 and Y = 30


More 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.


Drawing a line
You can draw a line by setting the Height or Width of a box to 0 and add a frame. E.g. a horizontal line:

/: SIZE HEIGHT '0' MM WIDTH '200' MM
/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100



Window and Page
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.


Calling ABAP subroutines


You can call an ABAP subroutine from SapScript using the PERFORM statment. You can use this to get data
without havning to cnahge the print program. In the examole below NAME is retreived from table SCUSTOM.

SapScript
/:DEFINE &CUST& = '00000021'.
/:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF
/: USING &CUST&
/: CHANGING &NAME&
/:ENDPERFORM.

Dear &NAME&



The ABAP routine
The ABAP routine could be defined as follows:

IMPORTANT: The structure itcsy must be used for the parameters.

REPORT Z_HENRIKF_SCRIPT_FORM .
TABLES scustom.

FORM get_name tables in_tab structure itcsy out_tab structure itcsy.
read table in_tab index 1.

select single * from scustom
where id = in_tab-value.


if sy-subrc = 0.
read table out_tab index 1.
move scustom-name to out_tab-value.
modify out_tab index sy-tabix.
else.
read table out_tab index 1.
move 'No name' to out_tab-value.
modify out_tab index sy-tabix.
endif.

** You could also fill the ouput parameter table this way
* READ TABLE out_par WITH KEY 'NAME1'.
* out_par-value = l_name1.
* MODIFY out_par INDEX sy-tabix.

ENDFORM.


Note that if you use more than one parameter you must use Using or Changing before every parameter !

/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
Be Happy And Always Remain So

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification:
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens Web Designing Chennai | GinGly :: Build your Personal Website | CineBuzz :: Cinema News | My Kids Diary :: Gift your Kids Memories :: Book Website @ 349 Rs monthly
Copyright 2005 - 2021 :: IT Acumens :: All Rights Reserved. :: XML Sitemap
ITAcumens Discussion Forum with 2 lakhs post running for 15 years - Powered by IT Acumens Pro Dedicated Server

My Kids Diary