Skip to Content
author's profile photo Former Member
Former Member

the equivalent of : tables and structure in the implement of method

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 05, 2007 at 12:52 PM

    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
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.