2007 Feb 08 4:13 AM
Hi Experts,
In a Fucn Module, I need to write a perform statement and the corresponding FORM lies in an include. I need to pass an internal table(itab) & workarea(wa_itab) in perform as below :
Declaration of itab:
types: BEGIN OF ty_out1,
f1(16) TYPE c,
f2 TYPE wrbtr,
END OF ty_out1.
data : itab type standard table of ty_out1,
wa_itab type ty_out1,
PERFORM <form name> tables itab
USING wa_itab
test1.
-
Dbl click on above perform takes us to an include prog and the form is declared as below -
what should be the syntax of the FORM in INCLUDE statement.
Note: I should not use the top include of the main prog for any declarations.
form search_slash tables ptab2 like itab
using wa2_itab like wa_itab
test2 .
Now what should be the syntax of the form above? Is the above right?
Please suggest
Thanks
Dan
2007 Feb 08 5:04 PM
Hi,
Try declaring your int table with table types in se11. You need to use table types and then pass it in perform.
Award points if you find its useful.
bye
2007 Feb 08 4:17 AM
Hi,
once you click on the perforn name system will prompt you for cration new form
if you select a new include then you have to initiliase the same in main program or in a include
otherwise select the main program and write the perform there only
Regards
Shiva
2007 Feb 08 4:18 AM
Hi,
As i am in a FM, Its not possible to write the form statement in the same main program.
Thanks
2007 Feb 08 4:17 AM
Hi,
Whne u double click on the perform it will ask where u need to create it.
Choose that and automatically the FORM will get created.
No need to create a form explicitly.
2007 Feb 08 4:24 AM
Hi,
If you want to pass only the internal table with header line,
then use tables ptab2 structure wa2_itab
For internal table with header line use:
tables ptab2 like wa2_itab
or
tables ptab2[ ] like wa2_itab.
Hope this helps.
Reward if helpful.
Regards,
Sipra
2007 Feb 08 4:31 AM
double click on the perform it will ask where u need to create it.
Choose that and automatically the FORM will get created.
so there is No need to create a form explicitly.
2007 Feb 08 5:04 PM
Hi,
Try declaring your int table with table types in se11. You need to use table types and then pass it in perform.
Award points if you find its useful.
bye
2007 Feb 08 5:06 PM