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

Pasting of Tables

Hi Guys,

Is there a way to pass a table of type 'crmxif_bustrans_t' into a subroutine and return it to the main program?

I have tried

PERFORM get_info

tables tab

USING top_node

FORM get_info

tables it like crmxif_bustrans_t

USING

value(node) TYPE REF TO if_ixml_node

but there seems to be an error. Thanks.

Regards,

Conrad Chia

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jan 20, 2005 at 07:26 PM

    Hello Conrad Chia,

    If you are getting type conflict error, then verify your type definition of 'tab' in your 'PERFORM' statement. Both 'tab' in your PERFORM statement and the 'it' in your FORM should be of the same type.

    Also, in your FORM statement I see that you defined 'it' <u>like</u> crmxif_bustrans_t. If 'crmxif_bustrans_t' is a table type defined in a type-pool as an internal table, then your FORM statement should be changed like this.

    FORM get_info TABLES it TYPE crmxif_bustrans_t
                  USING VALUE(node) TYPE REF TO if_ixml_node.
    

    Otherwise, if it is a structure, then your FORM statement should be like this

    FORM get_info TABLES it STRUCTURE crmxif_bustrans_t
                  USING VALUE(node) TYPE REF TO if_ixml_node.
    

    Please let us know if it works else, let us know the error message you are getting.

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 20, 2005 at 05:48 PM

    Yes, you can pass tables in and out of subroutines quite easily. What error message are you getting?

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 21, 2005 at 07:43 AM

    Hi Conrad,

    you must'nt use form ... tables...

    -> only by internal tables with headerline !

    -> if it's e.g. a sorted table you can say:

    FORM get_info

    using it type sorted table

    ...

    regards Andreas

    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.