on 06-04-2007 3:51 PM
Hi!
How can I
perform a form routine within a sap script form.
Regards
sas
Use like :
/: PERFORM (PERFORMNAME) IN PROGRAM (SE38 PROGRAM NAME)
/: USING VAR1
/: USING VAR2.
/: CHANGING OUTPUT
/: ENDPERFORM
CALL FORM ROUTINE IN SE38
FORM NAME tables in_tab structure itcsy
out_tab structure itcsy.
USE YOUR CODE HERE.
ENDFORM.
Reward Points if it is helpful
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Basically any way u can loop at ... . using perform or simply in the driver prg that will not affect any performance.
My way of doing this is the second one.. it all depends upon ur decision.
Sathish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In Form
PERFORM <sub routine name> IN PROGRAM <program name>
USING <var1>
CHANGING<var>.
ENDPERFORM.
In Include or program( <program name>)
FORM <sub routine name> TABLES in_tab structure itcsy
out_tab structure itcsy.
READ TABLE ................
*etc,.
*I guess you can do it from here
ENDFORM.
Don't forget to reward points.
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK,
many thanks for your kindly reply.
But basically there is a matter which I don't understand.
Which way is the better way to loop at internal table:
Solution1:
FORM xxx.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
FORM = 'ZSD_PACKING_LIST'
LANGUAGE = SY-LANGU .
LOOP AT gt_versand_plan INTO gw_versand_plan.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SHELEM'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN' .
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'.
ENDFORM.
Solution 2:
Having the LOOP within the sapscript form -> 'ZSD_PACKING_LIST'
Regards
sas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perform SUB_FRM_NAME In Program <PROGRAM_NAME>
Using <Using_Parameters>
Changing<Changing_parameters>.
EndPerform.
in the above program
Form SUB_FRM_NAME Tables Out_tab structure itcsy
In_tab structure itcsy.
EndForm.
santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.