I'm new to SAP ABAP and want to achieve the following: I've my custom Z function module (SE37) which should have a table as import parameter. This table I want to read/loop in the code, parse the values and pass it back to an export parameter (which is also the [same] table). What I did so far:
- In SE11 I've created a structure containing all required fields
ZCOLLECTSTRUCT
- Also in SE11 I've created a new table type
ZCOLLECTTYPE
which refers to this struct - In the function module for an import parameter I've entered
TYPE ZCOLLECTTYPE
.
Now I want to loop over the entries of this table (which will be passed by a RFC call to the function module). I thought I just need to declare an internal table and a workarea based on the table type. But the gap is still, how can I bring the data to the internal table?
DATA: itabImport LIKE ZCOLLECTTYPE.
DATA: itabExport LIKE ZCOLLECTTYPE.
DATA: wa_itabImport TYPE ZCOLLECTTYPE.
DATA: wa_itabExport TYPE ZCOLLECTTYPE.
loop at itabImport into wa_itabImport.
MOVE-CORRESPONDING itabImport TO itabExport.
APPEND wa_itabExport.
endloop.
Appreciate any insights.
Edit: I dont know how to get the data (values) from the import parameter table to the internal table.
to my itabImport
?