12-15-2006 6:19 AM
12-15-2006 6:24 AM
Hi ramu,
1. In sapscript layouts, there are Elements (/E)
for printing block of texts, such as line items, in a loop.
2. To print such text elements, from the driver program, and with flow,
we use WRITE_FORM, and pass the element name to be printed.
(For line items, such as po items,
we use LOOP in the driver program,
and inside the loop, we use WRITE_FORM and pass the element name)
3. START_FORM is totally different.
Usually it is not used.
We use it only when we want to
use 2 or more different layouts, in one single driver program.
In that case,
we have to start layout 1, then layout 2, etc...
then we print them, using write_form,
and then we stop/end them with END_FORM,
each for layout1, layout 2, etc.
regards,
amit m.
12-15-2006 6:25 AM
The FM Start_form is used to start a layout set in Scripts
and the FM write_form is used to Output text element in form window.
12-15-2006 6:25 AM
12-15-2006 6:29 AM
To run a sap script we need driver program ,In that program we should call our
sap script for that we are using open form function module.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZNEW_SCRIPT'.
Write Form:
is to display any contents in your sap script.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
Element = 'E1'
window = 'MAIN'.
The form shoud be ended ,thatz y v r using end form.
CALL FUNCTION 'CLOSE_FORM'.
Our driver program need to consist of the above three function module,
or v cant run sapscript.