‎2007 Aug 29 12:26 PM
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
‎2007 Aug 29 12:30 PM
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>
‎2007 Aug 29 12:31 PM
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
‎2007 Aug 29 12:36 PM
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*
‎2007 Aug 29 12:42 PM
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
‎2007 Aug 29 12:44 PM
A WRITE_FORM for each window, and hence <b>8 WRITE_FORMS's</b> in total.
regards,
srinivas
<b>*reward for useful answers*</b>