cancel
Showing results for 
Search instead for 
Did you mean: 

reg webdynpro link 2 views and get data from view 1 to view 2 ?

Former Member
0 Kudos

hi friends..

i am new to webdynpro abap...

i have some doubt plz guide me...

i created 2 views, one for input screen "material type" based on the material type i am going to fetch data from mara table and show it in second view in "table view format"

for these how can i link 2 views ?

how i get tha data from view1 (material type data in view 2) ?

thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos
Former Member
0 Kudos

Pass it as a plug parameter. Create an outbound plug in view 1 with parameter material type, and create an inbound plug in view 2. In view1, read the material type from the context and call the fire plug with the value. In the inbound plug handler of view 2, read the value and process.

Regards,

Nithya

Former Member
0 Kudos

hi nithya..

thanks for ur replay,

i created plug also in view1 as well as view 2..

while clicking go button in view1 i want to get the table view...

in button action how i call the view2 ?

then in view2 how i get the material type value (based on the material type only i am gng fetch the data for table view)

Former Member
0 Kudos

In the button in view1, you have to define an action. In the action handler, read the context attribute in which you have the material type, and then call the fire plug method. Use the code wizard and select the fire plug option. You have to pass the attribute that you have read in the method call. In your inbound plug in view2, material type should be declared as an importing parameter. Read it in the handler and pass it to your API. Fetch all the table entries and do a bind_table.

Regards,

Nithya

Former Member
0 Kudos

hi nithya..

once again thanks for ur giudance..

can you give me the datails of coding...

within in button action i don't which method to call ?

like wise i want to know by using which method i can get the data in view 2?

plz guide me

Former Member
0 Kudos

Use the code wizard to get the code. Select the option "fire outbound plug" and select the plug using F4 help. Whatever variable has the context attribute material type, pass that in the method call. In the inbound plug, the importing parameter will have the value. It could be anything that you define!

Regards,

Nithya

Former Member
0 Kudos

now i m getting the view 2 from view1 by clicking the button in view1...

but now i want to fetch the data for table view based on the input field in view1...

for this kindly tell me what to do now?

Former Member
0 Kudos

sorry nithya...

i don't know abt code wizard...

plz can you tell me abt that , how i use that?

Former Member
0 Kudos

Use Ctrl+F7 to get the code wizard. It would be good if you can have a look at the SDN Wiki, and other examples in package SWDP_DEMO before you start building applications.

regards,

Nithya

Former Member
0 Kudos

hi deva,

1)U create context attribute for example attr1 for input field in component controller.

2)do context mapping for both the views.

3)In the first view i.e. view1 bind the attr1 to input field.For the submit button onaction keep a fire plug for second view.

4)In the second view i.e view2 in the wddoinit() go to wizard get attr1 by selecting read node\attribute.

5)write select statement using where condition for input value entered.

6)Bind it to the table using node->bind_table( itab ). where itab is the internal table into which u get the data from select statement.

U will get ur required output

Reward points if helpfull,

Regards,

Anusha