Thursday, July 30, 2009

Display background (water mark) image using SAPscript

Joyjit Ghosh, Kolkata

Detail Steps:

Step 1: Create a standard text (transaction SO10) and insert the background image in it


Step 2: Now open the layout set (transaction SE71) in which background image needs to be displayed and do the required changes as mentioned below.

Note: Here I am using an existing custom sapscript layout where all windows, pages and page windows are already created except the background image. And for this demo I am showing the changes required for inserting the background image in the 1st page.

Goto “Page window” of the 1st page and create another page window of type ‘MAIN’. And its attributes must be same as the existing “MAIN” window.





Now open the Text Elements of the main window in edit mode and in the 1st line of the Sapscript editor insert the standard text (created above) that contains the background image.




Now in the 2nd line insert the special command NEW-WINDOW


Definition of NEW-WINDOW command:

Each page can consist of up to 99 main windows. Each main window is assigned a consecutive identifying number (0..98), and the windows are filled in this order. This feature enables SAPscript to print labels and to output multi-column text. When one main window fills up, the next main window on that page is taken, if there is a next one. A page break is inserted after the last main window.

You can use the NEW-WINDOW command to call the next main window explicitly, even if the current main window is not yet full. If you are in the last main window of the page, the command has the same effect as the NEW-PAGE command

Now activate the form

Step 3: Maintain required configuration for triggering the form

Step 4: Now trigger the form and see the print preview


Result:

Form is displayed with background image in print preview.





No comments: