To use graphics in the SAPScript FORMS they must be imported to R/3 system for this we use transaction
SE78 or report RSTXLDMC and give the graphics a name . The image type is generally .TIF(tagged image format) or .BMP (windows
bitmap file) .
The RSTXLDMC report is used to import images which are in Tagged Image Format
(.TIF) into R/3 and saved as standard text (OBJECT TEXT and ID ST) in the system. Since these images (.TIF) are stored as
standard text they can be included in the sapscript using the standard INCLUDE statement. The image to be used if is not in
.TIF format than it should be converted to this format e.g. by using IMAGING program in WINDOWS.
Once converted to .TIF they can be used in RSTXLDMC report. The image is stored
by the name of ZHEX-MARCO-name . The other parameters in this report e.g. are used to indicate the type of IMAGE
BCOL for color or BMON for mono color images.
e.g. /:INCLUDE ZHEX-MARCO-name OBJECT TEXT ID ST
After the graphics has been imported we can
use the INCLUDE statement to include the graphics or use the menu Edit->Graphics->Create.
e.g. /:BITMAP logo OBJECT GRAPHICS ID BMAP .
The above include statement is inserted automatically if we use the menu command.
BOXES and LINES
To use boxes in the form or to create a table in the form we use BOX statement.
a table can be constructed by using a combination of BOXes.
/:BOX XPOS val unit YPOS val unit WIDTH val HEIGHT val INTENSITY val FRAME val unit
The Unit used in the sapscript cane be:
The parameters like WIDTH , XPOS etc should be followed by a proper unit.
The INTENSITY is in the percentage of the grey scale.
The FRAME parameter is the thickness of the frame the default value is 0.
/:BOX XPOS '5' CM YPOS '2' CM WIDTH '14' CM HEIGHT '20' CM FRAME 20 TW INTENSITY 10.
/:BOX INTENSITY 10
will fill the current window background with a shading of grey scale 10%..
To draw a horizontal line we set the HEIGHT parameter to the value of 0.
/:BOX XPOS '5' CM HEIGHT 0 TW FRAME 10 TW.
This will draw a horizontal line across the top edge of the window.
To draw a horizontal line we should set the value of WIDTH parameter to 0.
/:BOX XPOS '5' CM YPOS WIDTH '0' TW FRAME 10 TW.
This will draw a vertical line across the complete height of the left edge of the current window.
POSITION and SIZE
We can use POSITION and SIZE to set default position and size of the window and also for relative
positioning. With POSITION we can use the paramters XORIGIN , YORIGIN ,WINDOW. With SIZE we can use WIDTH and HEIGHT and WINDOW
/:POSITION XORIGIN '5' CM YORIGIN '5'CM
/:SIZE HEIGHT '5' CM WIDTH '14' CM
/:BOX FRAME 10 TW INTENSITY 10
We can use POSITION WINDOW to set the position relative to current window i.e to the left,top
of the current window ,then we can use POSITION with XORIGIN and YORIGIN to specify the current position relative to the start
of the window, we can use '+' and '-' with the values.
/:POSITION XORIGIN '+5' CM YORIGIN '+5' CM
In the above example the position now becomes 5 CM left from the origin of the window and 5
CM from the top of the window.
WINDOW sets the value of the WIDTH and HEIGHT to current window and
PAGE sets the value of the WIDTH and HEIGHT to current page.