06-07-2007 3:50 AM
Hi Guys,
Can somebody share a simple code of FM using an internal table as CHANGING parameter.
Thanks,
06-07-2007 4:18 AM
Hi,
I did not understand the problem you are facing with using an internal table as a changing parameter.
Any ways i will provide you a peice of code:
PC_TABLE type ZT_LEAVE_APPL."This is the changing parameter.
(Zt_leave_appl is a table type of structure ZLEAVE_APPL_STRUC )
This is what i have written in the source code:
data ls_leave type ZLEAVE_APPL_STRUC.
ls_leave-EMPLOYEE_ID = '2343'.
ls_leave-LEAVE_TYPE = 'A'.
append ls_leave to pc_table.
So when i execute the FM, internal table pc_table will be filled a singe row of record.
Hope this gives you an idea.
06-07-2007 4:01 AM
chaging parameter is combination import and export parameter,
define i_matnr like mara-matnr ( Changing parameter)
just write the code under source code
select single * from mara into table mara
where matnr = i_matnr.
changing parameter will work as structure and it will not work as internal table.
you see the output -
input i_matnr
output i_matnr
06-07-2007 4:18 AM
Hi,
I did not understand the problem you are facing with using an internal table as a changing parameter.
Any ways i will provide you a peice of code:
PC_TABLE type ZT_LEAVE_APPL."This is the changing parameter.
(Zt_leave_appl is a table type of structure ZLEAVE_APPL_STRUC )
This is what i have written in the source code:
data ls_leave type ZLEAVE_APPL_STRUC.
ls_leave-EMPLOYEE_ID = '2343'.
ls_leave-LEAVE_TYPE = 'A'.
append ls_leave to pc_table.
So when i execute the FM, internal table pc_table will be filled a singe row of record.
Hope this gives you an idea.
06-07-2007 4:48 AM
hi
good
go through this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
thanks
mrutyun^
06-07-2007 4:54 AM
Hi,
You can use internal table/structure in TABLES tab only. IMPORTING,EXPORTING,CHANGING can accomodate only one record at a time.
Hope your clear!!!
Get back if you have any doubts.
Regards,
Younus
<b>Reward Helpful Answers:-)</b>
06-07-2007 5:09 AM
Hi,
In SE11 you can create a "Table Type" of the required structure.
use that table type as the reference type for your changing parameter.
Regards,
Guarav