Hi,
In my requirement,I am having two performs.Both are calling the same form.Perform is passing one internal table.But the structure of the internal tables in two performs are different.But I want both the perform should call the same form.
Problem is coming in accessing the individual field inside the form.
CODE
TYPES: begin of itab1,
pernr TYPE pa2001-pernr,
begda TYPE pa2001-begda,
endda TYPE pa2001-endda,
y06halfday TYPE pa2001-y06halfday,
END OF ITAB1.
TYPES:BEGIN OF ITAB2,
pernr TYPE pa2003-pernr,
begda TYPE pa2003-begda,
endda TYPE pa2003-endda,
subty TYPE pa2003-subty,
tprog TYPE pa2003-tprog,
END OF ITAB2.
DATA:TB_ITAB1 TYPE STANDARD TABLE OF ITAB1.
DATA:TB_ITAB2 TYPE STANDARD TABLE OF ITAB2.
START-OF-SELECTION.
if p_check = '2001'.
perform perform_operation using TB_ITAB1.
ELSE.
perform perform_operation using TB_ITAB2.
ENDIF.
FORM perform_operation TABLES ITAB
LOOP AT ITAB INTO ??? -
What work area i should use.How to decide work area at runtime
here i want to access all the fields of the table..
...........
............
ENDLOOP.
Please help
Thanks in advance
Shweta