Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

scripts

Former Member
0 Likes
1,529

In scripts when we download from standard script by copying from the standard client. If i want to suppress some windows which should not be displayed.

What can I do. Can any one help me in this issue. Can any one send this type of questions and answers. It will be great help for me .Good questions and answers will be rewarded more.

13 REPLIES 13
Read only

Former Member
0 Likes
1,393

Hi!

In SAPScripts (SE71 transaction) you can deactivate the connection between the pages and the windows.

SE71 - Page window subobject - Change

Set the page then select the removable window, then choose Edit - Delete element menu.

Don't forget, you can only do this with the original language of the sript, it is mostly DE, if you copied it from a standard one.

Regards

Tamá

Read only

Former Member
0 Likes
1,393

Hi,

In the copied Script, do not delete any code, just coment the code if you do not want it.

To copy the lines use the Paragraph format <b>/*</b>

 (" Comment a line)

Regards

Sudheer

Read only

Former Member
0 Likes
1,393

Hi ,

I want to how to suppress the window in which I want some window not to be appeared. I donot want to delete that or comment it.

Read only

Former Member
0 Likes
1,393

Hi,

You can do one thing> Go to se71> Go to menu bar > setting>form painter> select Graphical Form Painter>deselect Grapical PC editor

once done --> page layout (radio button) from se71 screen (i.e from screen where you enter your Script name and language) >clcik on change button> it will show you page layout.

Just single click on window inside layout which you want to suppress--> then go to menu bar > Edit> window-->delete.

Hope this will help you.

Thanks,

Shilpa K

Read only

Former Member
0 Likes
1,393

Hi shilpa,

Thanks for the answer you have given . Finally which you are saying is to delete the window. I donot want the window to be deleted. I want the window should not appear and only to be suppressed.

Read only

Former Member
0 Likes
1,393

Hi ,

Try like this ..

since u dont want to delete the window ....

dont call the window in the print program. i mean comment the code of write_form which is calling that window.

Reward points if it is useful

Thanks,

Manjunath MS

Read only

Former Member
0 Likes
1,393

Hi Manjunath,

This is not for a script of scratch development. This is only for Standard scripts and now you tell me. I have copied from standard script from client '000' in to our client. After that If i want to hide or suppress a window what can we do. Tell me if you can guide me

Read only

Former Member
0 Likes
1,393

if u want to suppress the window, without deleteing the window,,, then how u have copied std script to zscript .. like that u copy the print program to zprogram, search for the write_form of the window , which u have to supress. then comment that write_form....

let me know

Reward points if it is useful.

Thanks,

Manjunath MS

Read only

Former Member
0 Likes
1,393

Hi friend,

Go through this info. It is given step by step clearly.

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

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

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

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

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

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

• 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 . We quit the Pages Screen pressing the command button Paragraph formats.

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

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

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

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

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

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

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

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

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

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

• 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).

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

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

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

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

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

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

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

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

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

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

• 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).

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

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

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

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

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

• 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 ( ,, ) .

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

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

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

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

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

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

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

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

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

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

• We select the menu path Form -> Copy from.

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

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

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

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

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

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

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

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

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

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

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

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.

Rewards some points.

Rgds,

P.Naganjana Reddy

Read only

Former Member
0 Likes
1,393

Answered

Read only

Former Member
0 Likes
1,393

Hi,

I think, this will help u.

you need to deactivate the connection between the pages and the windows-se71 form.

SE71 - Page window subobject - Change

Set the page then select the removable window, then choose Edit - Delete element menu., now it's fine.

Regards,

Mani...

Read only

0 Likes
1,393

Deleting from Page windows instead of Windows should work. http://scn.sap.com/thread/727805. Just a thought.

Read only

Former Member
0 Likes
1,393

Hi

Just comment the codes of the respective windows that you want to hide since there is no such functionality to hide/disable a window in Script.