on 01-20-2005 5:43 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you can pass tables in and out of subroutines quite easily. What error message are you getting?
Regards,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.