cancel
Showing results for 
Search instead for 
Did you mean: 

bind statement

Dev164
Participant
0 Kudos

I am using bind statement in loop am getting all required data in internal but when binding internal table is displaying only last retrived value.

ex.

     loop at it into wa.

  Processing

    lo_nd->bind_table(it1).

endloop.

it returns only last table binded

Accepted Solutions (0)

Answers (4)

Answers (4)

Dev164
Participant
0 Kudos

I am using row repeater my parent node table (one which am binding to row repeater) contains 2 entries and its subnode contains 14 entries

,I want to display the the row repeater with my parent node (project) and subnode times.

but is been able to display it only project times,

EX.

     Parnet node (binding to row repeater)

     |

     ---------------------Subnode (wanna display row repeater for every subnode with parnet node)

Thanks regards

Mangesh

amy_king
Active Contributor
0 Kudos

Hi Mangesh,

If you don't explicitly pass in parameter SET_INITIAL_ELEMENTS, its default value is TRUE, which tells the method to overwrite any existing elements and replace them with NEW_ITEMS. If you instead pass in SET_INITIAL_ELEMENTS = FALSE, the method will append the NEW_ITEMS to the existing elements, which I think is what you are trying to do.

Cheers,

Amy

Former Member
0 Kudos

Hello Mangesh,

If I understood you correctly, you are trying to bind the table During the loop. In this case while looping, each time it is binding the table. That mean each time the new data is replacing the old data from the bound table. Hence you are able to see only the last retrieved value.

In this case what you could do is, you could take another internal table and according to your filter during the loop, instead of bind the table, you could append these data to your new internal table.

Then you bind your new internal table after  the loop.

I hope this should work for you.

Regard,

Nitin,

RBEI

Dev164
Participant
0 Kudos

plz find my code am doing am using rowrepeater

Shivesh
Advisor
Advisor
0 Kudos

HI Mangesh,

    You should bind the Node, outside the loop. Append all the records in lt_witml & lt_ptskl respectively.

     And, then use Bind Table->with respective Node.

Regard's,

Shivesh Ranjan.

Dev164
Participant
0 Kudos

I tried it but it displays only first entry

chengalarayulu
Active Contributor
0 Kudos

Mangesh,

try to avail set_initial_elements parameter also while bind_table...

i think for both lo_nd_wp & lo_nd_task you should export SET_INITIAL_ELEMENTS flag to ABAP_FALSE..

then you can see all the elements which comes to your criteria...

former_member184578
Active Contributor
0 Kudos

Hi,

First loop your internal table into final internal table and then bind it. Don't use bind stmt inside loop.

loop at itab in wa.

do processing

append wa to itab_final.

endloop.

now bind.

lo_nd->bind( itab_final ).   " all the required data will be in itab_final

Regards,

Kiran

Dev164
Participant
0 Kudos

hello kiran ,

               Actually my requriement is to display project specific users and display tasks assign to particular users of the project.So what am doing is loop at project and then bind users table and while users bind task'

former_member184578
Active Contributor
0 Kudos

Hi,

I didn't get you. You have 2 tables users and tasks..!! if so, bind 2 tables separately .

bind( itab_users)

bind( itab_tasks )

Or you have the task as separate column in the table user?

Regards,

Kiran