cancel
Showing results for 
Search instead for 
Did you mean: 

how to send output of one Bapi to another Bapi??

Former Member
0 Kudos

dear all,

I am having two BAPIs. From one Bapi I am getting value(Output) in one dropdown box.

Now my problem is how to give output of first BAPI(in drop down box) as input to second BAPI which should display in second drop down.

Am I clear???

I have two drop down boxes and two BAPIs. I am able to get output of first BAPI into first drop down box. Now i have to use the data in first drop down box as input to second BAPI(second drop down box).

The second BAPI takes first BAPI output as its Input.

As I am new to Web Dynpro please help me in this regard detailly.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pradeep,

Consider you have dropdown1 displays all the countryNames which is output of BAPI1..

Now you want to input this to BAPI2.Am i right ?

If so

1. create model instance of BAPI2 as you did for BAPI1.

2. get the value from outputnode of BAPI1 by

wdCOntext.outputNode().getXXX()

and set this value to the input model instance of BAPI2 and call execute method on the model.

Regards, ANilkumar

Former Member
0 Kudos

thank you anil, where i need to write this code?? in onSelction of the drop first drop down or some where.

i tried it in onSelect of first dropdown but i am bit confused about that wdContext.outputNode()...... what is this outputNode() is this the node of second bapi?? or what??

please help me out

Former Member
0 Kudos

Yes ...You have write it on click of first dropdown.

I am referring to the first BAPI outputnode.

If you see you want to pass the output of BAPI1 to BAPI2.

So you have to bind the BAPI2 input with BAPI1 output .

Regards,Anilkumar

Answers (1)

Answers (1)

monalisa_biswal
Contributor
0 Kudos

Your drop down's selectedKey must be binded to a value attribute inside the model node.To retrieve selected key value on selct of dropdown use the following method: wdContext.current<Node>Element().get<attribute>()

Now you have to pass this value to the second BAPI.

In the same way to set the value to the model node

wdContext.current<second BAPI Model Node>Element().set<attribute>()