cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with bind_table and bapiret2

Former Member
0 Kudos

Hi all,

I need to bind a a table to a node to retrieve some information after a bapi call.

The problem is when i bind a table. It doesn't work and the table stay empty.

Here is the code :

DATA: l_return_tab type standard table of bapiret2.
 lo_node_4 = wd_context->get_child_node( name = 'RETURN' ).
 lo_node_4->BIND_TABLE(l_return_tab ).

But when i do get_attribute from the node it works and i collect information of the first row in the table.

here is the code :


  DATA: l_return_wa type bapiret2.
  lo_node_4 = wd_context->get_child_node( name = 'RETURN' ).
  lo_node_4->GET_ATTRIBUTE( exporting NAME = 'TYPE'
                                   importing value = l_return_wa-TYPE ).
  lo_node_4->GET_ATTRIBUTE( exporting NAME = 'ID'
                                   importing value = l_return_wa-ID ). 

I don't understand what is the problem ?

I'm sure that is a table because i bind it before to a UI table and it shows its content.

And the cardinality in the context is 0..n .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try with this...

DATA: l_return_tab type standard table of bapiret2.

lo_node_4 = wd_context->get_child_node( name = 'RETURN' ).

lo_node_4->get_static_Attributes_table( table = l_return_tab ).

lo_node_4->BIND_TABLE(l_return_tab ).

Cheers,

Kris.

Former Member
0 Kudos

hi ,

Thanks for your response.

I have an error in this line . " lo_node_4->get_static_Attributes_table(table = l_return_tab )."

saying missing 'importing statement'.

When i add importing like this : "lo_node_4->get_static_Attributes_table( impoting table = l_return_tab )."

ihave another one saying :

"enable to interpret "table". Possible causes : incorrect spelling or comma error".

Do i have to replace the word "table" by something else ?

Former Member
0 Kudos

Hi,

Use code wizard to read that node, and check AS TABLE OPERATION checkbox u find at last.

u get complete code and use bind table statement.

Cheers,

Kris.

Former Member
0 Kudos

Sorry it was a spelling mistake.

I activate it and i try it but the table is still empty.

Former Member
0 Kudos

It is resolved,

The problem was that i do all this before the bapi call.

It's amazing but the bind must be done after the bapi call.

Thanks a lot for your help.

Answers (0)