10-29-2007 10:14 AM
Hi
I am writing a RFC FM.
I am passing order no to the subroutine and I need to get back all the components for that Production order from RESB table.
Perform get_next_component_list using l_aufnr
based on the AUFNR passed to subroutine I have to get all the details of the components in to the FM.
Please let me know the syntax of how to fetch the data back in Intrenal table.
Thanks in advance
10-29-2007 10:17 AM
PARAMETERS: p_carr TYPE sflight-carrid,
p_conn TYPE sflight-connid.
DATA sflight_tab TYPE STANDARD TABLE OF sflight.
...
PERFORM select_sflight TABLES sflight_tab
USING p_carr p_conn.
...
FORM select_sflight TABLES flight_tab LIKE sflight_tab
USING f_carr TYPE sflight-carrid
f_conn TYPE sflight-connid.
SELECT *
FROM sflight
INTO TABLE flight_tab
WHERE carrid = f_carr AND
connid = f_conn.
ENDFORM.
10-29-2007 10:22 AM
Hi,
do as below
create a structure with the fields what ever you require from RESB table.
In the Function module
Import Parameter: I_AUFNR.
Table Parameter: T_DATA like zstructure.
In the source code do like below
select <fields> from RESB into table t_data.
write the below code in your subroutine get_next_component_list
Call Z_Function_module
exporting
i_aufnr = i_aufnr
tables
t_data = itab.
<b> Reward points for helpful answers</b>
Satish