Hi abapers,
I have the peace of code (FORM):
FORM start_two TABLES p_boardSTRUCTURE board CHANGING p_car p_bike. ... ... ENDFORM.
Which is the "equivalent" ,if it is passed to METHOD?
CLASS two DEFINITION. PUBLIC SECTION. DATA: ... .. METHODS: start_two TABLES p_board STRUCTURE board ??? EXPORTING car TYPE n bike TYPE n. ... ... ENDCLASS.
In methods the syntax "TABLES" does not exists.
You should use a global well-defined type (suchs ad a table type, like P0001_TAB) or use the generic addiction TYPE ANY TABLE (or TYPE STANDARD TABLE, TYPE SORTED TABLE, and so on).
Like this:
CLASS two DEFINITION. PUBLIC SECTION. DATA: ... .. * // This if you don't have a global type: METHODS: start_two IMPORTING p_board TYPE STANDARD TABLE EXPORTING car TYPE n bike TYPE n. * // This if you have a global type: METHODS: start_two IMPORTING p_board TYPE board_tab "Should be defined in DDIC EXPORTING car TYPE n bike TYPE n. ... ... ENDCLASS.
Hope this helps.
Roby.
Add a comment