cancel
Showing results for 
Search instead for 
Did you mean: 

Trasferring context from bapi

Former Member
0 Kudos

Hi all,

I'm making a web dynpro progect that makes a list of the sales orders with BAPI_SALESORDER_GETLIST and changing the value of SHORT_TEXT with BAPI_SALESORDER_CHANGE.

I've used the first bapi output to fill the ChangeSalesOrderView but how can i copy the context node values from the GETLIST output to the CHANGE input?

thanks,

Daniele

p.s. i've another doubt why does NetWeaver makes 2 models for each BAPI? It's because the fist is in display mode and the other in modify?

Accepted Solutions (1)

Accepted Solutions (1)

Yashpal
Active Contributor
0 Kudos

Hi Daniele,

I think in ur program u select any salesorder and then modify it okay u can get the selected data through the current selected node

like wdContext.nodeName().CurrentNodeNameElement().getAttributeNaem()....using this set the input for the change parameter u want......

Now answer to ur second question ......

In RFC u have Import ,Export and Tables Parameter.....

so in Dynpro Side......

Import->RFCName_Input

Export->Output

tables->present in both Input and Output

Classes-> if structure is used as any of the types...above

Regards,

yash

Answers (2)

Answers (2)

Former Member
0 Kudos

has anyone an example of the loop?

Former Member
0 Kudos

Hi,

I guess you are asking for a looping thru the various elements of a node (say 'Test').

for(int i=0;i<wdContext.nodeTest.size();i++) {

// to get the element by element

IPrivate<controller/view name>.ITestElement currElement = (IPrivate<controller/view name>.ITestElement)wdContext.nodeTest.getElementAt(i);

}

Thanks and regards

RK

Former Member
0 Kudos

Hi,

Please refer this link. This explains how to set an input table for the RFC.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/linking%20rfc%20to%20web%20dynpro.pdf">Linking RFC to Web Dynpro</a>

Noufal

Former Member
0 Kudos

Hi Daniele,

As far as I understand, your question is about "Tranferring data from one context node to the other one".

If it is so,

I think you have to loop through all the instances of the first node, take the attribute's value from there, create an instance of the other node, fill the data to the attributes of that.

Regards,

Mausam