on 07-05-2005 3:16 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.