cancel
Showing results for 
Search instead for 
Did you mean: 

accessing BAPISDORDER_GETDETAILEDLIST through WebDynpro

Former Member
0 Kudos

Hello experts,

I am trying to use BAPISDORDER_GETDETAILEDLIST through adaptive RFC model to fetch only item details of sales order.

Here is my code to fetch only item details:

Bapisdorder_Getdetailedlist_Input input1 = new Bapisdorder_Getdetailedlist_Input();

wdContext.nodeBapi_Sales_Getitem_Input().bind(input1);

Order_View tab = new Order_View();

tab.setItem("X");

input1.setI_Bapi_View(tab);

Sales_Key tab1 = new Sales_Key();

tab1.setVbeln("0000006816");

input1.addSales_Documents(tab1);

wdContext.nodeBapi_Sales_Getitem_Input().bind(input1);

try {

wdContext.currentBapi_Sales_Getitem_InputElement().modelObject().execute();

}

catch (Exception ex)

{

ex.printStackTrace();

}

wdContext.nodeOutput().invalidate();

I have no compile time errors. But the above code is unable to fetch the item details. May be I am wrong in giving the import parameters. Please tell me the way to interact with structure and a table and where I am going wrong.

Thank you very much

Regards,

Bharath.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bharath,

Your code looks fine but no need to bind input1 twice. so, remove first binding from the code.

And the second thing because of which you can't get reply is, You have to invalidate all nodes in output.

so, invalidate all output nodes after executing your BAPI using following code.

wdcontext.node<node name>().invalidate();

Let me know the status.

Regards,

Bhavik

Former Member
0 Kudos

Hi,

Instead of printing the stacktrace try to print the error in the catch block

WDComponentAPI.getMessageMnager.reportException(e.toString(),false);

Also check if the you are executing the correct node.

Regards

Noufal

Former Member
0 Kudos

Hi Bharath,

Have you resloved your problem?

If no then update the post otherwise close this thread.

Regards,

Bhavik

Former Member
0 Kudos

Hi

Your code seems fine. The interaction between tables and structures is also fine. But why you are binding input1 twice.

In the code snippet

input1.addSales_Documents(tab1);

wdContext.nodeBapi_Sales_Getitem_Input().bind(input1);

remove this line which contains the binding and then try.

The output will come in the table ORDER_ITEMS_OUT.

it works . Just remove the binding like i told you.

Hope that helps

regards

ravi