Você está na página 1de 59

Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Stefanos Moschidis - SAP Certified Technical Consultant - How to create a SAPSCRIPT form

Creating a SAPSCRIPT form

With the call of the transaction SE71, the screen to create or change a SAPSCRIPT form appears. We type the name of the Form and the code of the
Language on the appropriate fields. In order to build a new Form we press the command button Create. In order to modify or show the technical elements
of an Existent Form we press the Change or Display command button respectively.

After pressing the command button Create, a popup window appears informing us that the Form does not exist on the Client we are working. We press
the ÏÊ button.

1 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the appearing screen we type a description of the Form on the appropriate field and we press the command button Basic Settings.

2 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

After pressing the button Basic Settings, a screen appears where the paper size is defined e.g. DINA4, the page orientation e.g. Landscape, the default
paragraph e.g. df and the First page e.g. first .

3 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Pressing the command button Pages, we get a warning message stating that the DF paragraph does not exist. We bypass the message pressing [Enter].

4 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

With a second [Enter] we get a new warning message that the Page FIRST does not exist. We bypass this message too by pressing [Enter], and we press
the command button Pages.

5 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the screen of Pages we type the name of the Page we wish to create on the appropriate field and we select the menu path Edit -> Create Element.

6 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the appearing screen we type the Page Description on the appropriate field and on the field Next Page we set as next page the one we have just
created. We press [Enter]. We quit the Pages Screen pressing the command button Paragraph formats.

7 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the screen of Paragraph we type the name of the Paragraph we wish to create and we select the menu path Edit -> Create Element.

8 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the appearing screen, we type the Description and if we want, we can specify Fonts and Tabs for this Paragraph with the corresponding command
buttons. In the case of this example, the Font and the Tabs specified in the Basic Settings screen apply. We quit the Paragraph screen by pressing the
command button Windows.

9 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the Window creation screen, there is already the MAIN window. This window can be located in a page and can contain a variable number of lines. It is
used to present the detail lines of a SAP document e.g. the lines of materials billed from table VBRP.

10 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the window creation screen we select the menu path Edit -> Create Element.

11 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

A popup window appears, where we type the name of the new window (Our_addr) and its description (Our Address) in the fields Window and
Description respectively. We press the command button OK.

12 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

As window type we set VAR (in the field Window type).

13 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

We repeat the same process of window construction and we build the windows CUSTADDR (Customer Address), and Header (Header Window). We quit
the screen of windows by pressing the command button Page Windows.

14 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the screen of Page Windows there is the page FIRST in the field Page.

15 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

We select the menu path Edit -> Create Element, in order to create a new Page Window.

16 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

A popup window appears with all windows we have created previously in the appropriate screen. We select one of them e.g. CUSTADDR with a double
click of the mouse.

17 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

The selected window is now located in the FIRST page as a Page Window. We fill the fields Left Margin, Upper Margin, Window Width and Window
Height in the desired unit of measurement (e.g. CH i.e. characters or CM i.e. centimeters).

18 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

We select again the menu path Edit -> Create Element, and in the appearing popup window with all windows shown, we have available the windows not
located yet in the FIRST page as page windows. We select the next window and we give its coordinates and its dimensions.

19 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

So we locate all the windows in the Page and we have an IMAGE of their positions and the information which will be contained in the various areas of
the SAPSCRIPT form.

20 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In this stage we can select the menu path Form -> Activate. This action stores the work we have done in the system and activates the changes so that
they are available to the users.

21 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

The activation finds an error and gives a warning message saying that the page window ÌÁÉÍ in the dimensions specified, is too wide for an Á4 page in
landscape orientation. We bypass the message by pressing [Enter].

22 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In this stage we can select the menu path Settings -> Form Painter.

23 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

With the selection of the menu path Settings -> Form Painter, a popup window appears where we select the SAPscr tab, we check the field Graphical
Form Painter and we press the OK command button.

24 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

The Graphical Form Painter environment shows the page windows as white rectangulars, while the page is shown as a grey background with grid lines.

25 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the graphical environment of this editor we can drag and drop the Page Windows or we can change their dimensions with the mouse.

26 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

When we have arranged the Page Windows with "drag and drop", we select the menu path Settings -> Form Painter.

27 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the appearing popup window we select the tab SAPscr, we uncheck the field Graphical Form Painter, and we press the OK command button.

28 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the Page Windows screens the coordinates and the dimensions of the Page Windows have now been changed. On dot matrix printers neither the
fractions of lines make a difference in the vertical position of the text, nor the fractions of characters make a difference in the horizontal location of the
words. The fractional parts are rounded up. (However there is no activation error).

29 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Now that we have located the Page Windows correctly, we select one of them with the mouse e.g. CUSTADDR page window and we press the command
button Text Elements.

30 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

So an editor appears where we can write the variables (symbols) that should be printed on the page window. The variables are included in ampersands i.e.
& and the constant texts are written as they should appear. If we want to change a font in an area of the page window, we include this area in the
notations and (where F is a Character format, as shall see later). The cells to the left of the lines of the editor have the corresponding paragraph. The
asterisk shows the default paragraph.

31 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

When we have written all the Text Elements in the editor of a Page Window, we press the BACK command button and we return to the Page Window
screen. Here we select another Page Window and we call again the Text Elements editor.

32 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

The Page Window Our_addr contains some variables (symbols) and some constant texts as well. The paragraph is default (asterisk).

33 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the Text Elements editor we can write comments by typing /* in the paragraph cell to the left of the line. Furthermore a series of characters appearing
in the printout as one line can be split in many lines of the Text Elements editor by typing = (the continuity symbol) in the paragraph cell.

34 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the Text Elements editor we can define areas, which are called and displayed by the program flow under certain conditions. These areas are called
Elements and their beginning is defined by the characters /Å in the paragraph cell. The end of an Element is the definition of the next Element or the end
of the text in the editor. In the Page Widow MAIN we have the Element ITEM_HEADER and the Element ITEM_LINE. The texts in these Elements are
in the IT paragraph format, which has not yet been defined. The tabs are denoted in the editor with double comma ( ,, ) .

35 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In order to define the Character Format <Â>, which was used in the Text Elements editor, we go to screen Page Window and we press the button
Character Formats. From the screen of Character Formats, we select the menu path Edit -> Create element.

36 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the appearing popup window we fill in the Char Format field the notation  and in the field Description we type an explanation (Bold), and we press
OK.

37 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the Character Formats screen we press the Fonts button and we select in the Family field a font e.g. COURIER and in the field Font Size a size e.g.
12,0 pt. We select as well the Bold characteristic, setting the radio button to On.

38 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In order to create the Paragraph Format IT used in the Text Elements editor in the page window MAIN, from the tab Character Formats we press the
Paragraph Formats button. From the Paragraph Formats tab we select the menu path Edit -> Create element.

39 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On the appearing popup window we type in the field Paragr. format the notation IT and in the field Description an explanation (Item Paragraph), and we
press the OK button.

40 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the Paragraph Formats screen we press the button Tabs and we fill the positions where the alignment points are located (Tabs) in the desired unit of
measurement (e.g. CH for characters).

41 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

At this point the construction of the SAPSCRIPT form has been completed we select the menu path Form -> Activate.

42 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

We receive a message saying that the form has been activated. We go to the initial screen on the transaction SE71 with the button BACK.

43 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

The SAPSCRIPT forms vary in the various languages. For this reason, when working in multilingual systems, as soon as we construct a form in the
original language, we should copy it and fit it in the other languages. So in the screen of transaction SE71 we type the name of the form in the field Form
and the destination language in the field Language. We press the button Create.

44 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

A message informs us that the original language of the form is English.

45 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

We select the menu path Form -> Copy from.

46 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the appearing popup window we fill the source form and original language and we press OK.

47 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

After copy, we select the menu path Form -> Activate.

48 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

A message appears saying that the form has been activated. Pressing the BACK command button, we quit the transaction SE71. (Of course if necessary
we change the Text Elements in the Page Windows, where we have constant texts, replacing them with their equivalents in the destination language).

49 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Calling a SAPSCRIPT form from an ABAP program

There are five basic function modules used for communication between the ABAP runtime environment and the, so called, "Composer" of the
SAPSCRIPT tool:
1. OPEN_FORM starts the communication between the ABAP runtime and the Composer
2. START_FORM introduces a blank SAPSCRIPT form which can be filled with data from the ABAP runtime.
3. WRITE_FORM fills the SAPSCRIPT form with values from the ABAP runtime.
4. END_FORM completes the writing to the SAPSCRIPT form.
5. CLOSE_FORM closes the communication between the ABAP runtime and the Composer.
The linked code is an ABAP program writing a set of SD documents to the SAPSCRIPT form of the example shown above

Downloading SAPSCRIPT forms to a workstation and uploading them to another SAP system

The SAPSCRIPT forms can be stored on a hard disk and can be loaded to other SAP systems. To do this we select the transaction SE38 and in the field
Program we type RSTXSCRP. We press F8 key for executing this program.

50 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the selection screen we select the radio button Form and we fill the field Object Name with the name of the SAPSCRIPT form and the field Mode with
the word EXPORT. We select the radio button From/on Frontend and we fill the field Dataset name with a path on the hard disk and a file name. We
press the F8 key for executing the program with the previous selections.

51 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

A popup window appears with the path and the filename we have selected and we confirm our selections pressing the OK button.

52 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Finally with the execution of the program we have a log with the results of the transport of the SAPSCRIPT form from the SAP system to the hard disk.

53 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the target system we call again the transaction SE38 and in the filed Program we type RSTXSCRP. We press the F8 key for executing the program. On
the selection screen we select the radio button Form and we type in the field Object Name the name of the SAPSCRIPT form, and in the field Mode the
word ÉÌPORT. We select the radio button From/on Frontend and in the field Dataset name we type the path and the filename, where the SAPSCRIPT
form has been downloaded. We press the F8 key for executing the program with the previous selections.

54 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

A popup window appears, where we fill the development class, and we press the SAVE button.

55 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

On a following popup window we fill the request, and we press the OK button.

56 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Finally we have a popup window with the path and the filename we have selected. We confirm our selections pressing the OK button.

57 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

In the end with the execution of the program we have a log with the results of the transport of the SAPSCRIPT form from the hard disk to the SAP
system.

58 of 59 5/16/2011 12:01 PM
Stefanos Moschidis - SAP Certified Technical Consultant http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create...

Ads by Google

UK Education Fair-Mumbai
Meet 45 UK Universities/Colleges on 28 May. For free entry Register now
www.geebeeworld.com/Hyatt-Regency

59 of 59 5/16/2011 12:01 PM

Você também pode gostar