cancel
Showing results for 
Search instead for 
Did you mean: 

Pass internal table values from a method to another

tharaka_fernando
Contributor
0 Kudos

Hi All gurus,

How to pass internal table values to another method.

Ex :

Method ONSUBMIT

Call Method get_VBAK

Method  get_VBAK


Select * from VBAK into table it_tab.

How to pass this it_vbak internal table values again to method on_Submit.





Thanks all in advance

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member212148
Participant
0 Kudos

Hi Tharu,

If you want to pass internal table data into another method.

Declare import parameter as table and pass this internal table in import parameter.

Thanks,

Ranjit Kumar.

tharaka_fernando
Contributor
0 Kudos

HI Sankar,

Thanx for the reply..But the actual table Im passing is COEJ. TT_COEJ table doesn not take as Table Type in Export parameter.

former_member222068
Active Participant
0 Kudos

Hi Tharu,

Declare Table Type in the DDIC and use it the component.

Thanks & Regards,

Sankar Gelivi

former_member222068
Active Participant
0 Kudos

Hi Tharu,

Define an exporting parameter  of a method GET_VBAK as shown

Note : Define TT_VBAK( Table type )

Now call the method GET_VBAK on action of a button

Hope this should solve your issue

Thanks & Regards,

Sankar Gelivi

tharaka_fernando
Contributor
0 Kudos

HI Vaibhav,

thanks for the reply and I understood that creating Context Nodes will satisfy my request. Is there any other alternative since Iam gonna call this method Method  get_VBAK (according to my example above)several times in Method ON_Submit for various purposes . This is in the same view.

Former Member
0 Kudos

hi Tharu

You can do this by binding the internal table with the node and then reading that node attributes in the desired method. (if both the methods are in same view)

Regards

Vaibhav