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

SAPSCRIPT

Former Member
0 Likes
809

hi all

well i just wanted to know if i have 8 windows in sap scripts , how many write_forms shuld be called . say one window for address another for details .... these are other than the main window.....

how many write _ form needs to be called.....

THANKS

5 REPLIES 5
Read only

Former Member
0 Likes
781

Hi,

Generally write form is used only for the Main Window. All other windows are considered to Header/Fotter Windows.

Only if you have various cases, and you need to print different data for different windows, you need to define Text Elements. In this case the no of write_form will be equal to to no of Text Elements.

<b>Reward if Helpful</b>

Read only

Former Member
0 Likes
781

hi,

The number of write_form depends on the elements used in windows. Depending on the number of elements, one has to call that number of write_form. IF in all the windows there are only one element, for 8 windows you will call 8 write_forms.

Regards,

Mallick

Read only

Former Member
0 Likes
781

Hi Swetha,

You have to use WRITE_FORM function modules based on how many Text elements you are using. But not on how many windows you are using.

/E HEADER_TEXT

/E CHANGE_REMARKS

So here you have to use 2 WRITE_FORMs.

Regards,

RAJ

*Reward points if it is useful*

Read only

Former Member
0 Likes
781

Hi ,

Hope the below will be usefull.

WRITE_FORM

The system outputs the form element specified in parameter ELEMENT into the currently opened form.

In the parameter WINDOW you can specify the name of a window for the output. Remember that the form element must be defined in this window. The parameter FUNCTION specifies how to merge the text lines to be output with any existing contents in the window. In this case, there are differences between the different window types or areas.

ELEMENT

Specify the name of the text element you want to output into the form window specified in the parameter WINDOW. The element must be defined in that form window. If you specify no element, the system uses the default element, if one is defined in the form.

Default value: SPACE

The parameter ELEMENT contains the name of a form element that the system could not find.

Possible reasons:

An element refers to a window, and the specified window does not contain the element. If no window is specified, the system searches for the element in the main window.

For this parameter, the following values are allowed:

SET

DELETE

TYPE The type of window area specified in parameter TYPE is invalid.

• BOTTOM: only for the main window

Depending on the window type, these entries are valid:

UNOPENED The current form function could not be executed, since the form output was no

yet initialized using OPEN_FORM.

UNSTARTED

No form was opened yet.

• The element does not exist.

• The specified element is not defined in the form.

• The form version that contains the text element in the specified form window is not active.

WINDOW

Specify the name of the window into which you want to output the form element specified in the parameter ELEMENT.

Default value: 'MAIN'

Thanks,

Ramya.R

Reward If Helpfull

Read only

Former Member
0 Likes
781

A WRITE_FORM for each window, and hence <b>8 WRITE_FORMS's</b> in total.

regards,

srinivas

<b>*reward for useful answers*</b>