What development constructs are people using to update custom fields in extractors? I can think of three here. Each has pluses and minues:
1)
CASE I_DATASOURCE.
WHEN '2LIS_11_VAHDR'.
include zvahdr. "has code directly
WHEN '2LIS_11_VAITM'.
include zvaitm.
etc.
2)
CASE I_DATASOURCE.
WHEN '2LIS_11_VAHDR'.
where the "form" routine is part of function group
PERFORM FILL_VAHDR TABLES C_T_DATA.
3)
CASE I_DATASOURCE.
WHEN '2LIS_11_VAHDR'.
where the "form" routine is in a separate ABAP
PERFORM FILL_VAHDR TABLES C_T_DATA IN PROGRAM ZFILLHD.
Hello Kenneth,
this is a good question. Most of the time I have seen option 1. However, the disadvantage of options 1 and 2 is that you share (global) variables. A clean solution is option 3 but using CALL FUNCTION. It's better than PERFORM since parameters are defined and checked much thoroughly and you have a clean separation of the code.
Regards,
Marc
SAP NetWeaver RIG, US BI
Add a comment