cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in using Bapisdorder_Getdetailedlist

DeeptiChavare
Active Participant
0 Kudos

Hi All,

I am using Bapisdorder_Getdetailedlist to display sales order details. I have written following code.


Bapisdorder_Getdetailedlist_Input salesOrderInfo =
new Bapisdorder_Getdetailedlist_Input();
wdContext.nodeBapisdorder_Getdetailedlist_Input().bind(salesOrderInfo);
	/*Set import parameters*/
	Order_View order = new Order_View();
	order.setHeader(true);
	order.setItem(true);
	order.setBusiness(true);
	order.setPartner(true);
	order.setText(true);
	order.setAddress(true);
	salesOrderInfo.setI_Bapi_View(order);
	Sales_Key salesKey = new Sales_Key();
	salesKey.setVbeln(salesorderNo);		
	salesOrderInfo.addSales_Documents(salesKey);
              /*execute bapi*/
	try {
	wdContext.currentBapisdorder_Getdetailedlist_InputElement().modelObject().execute();
                } catch (Exception exp) {}

Above code doesn't return any record. I have checked that records exist in the backend. What is wrong in above code?

Thanks and Regards,

Deepti

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Deepti,

Also after executing your BAPI just invalidate your output node.

wdContext.node<output>().invalidate();

Regards,

Murtuza

Former Member
0 Kudos

Hi Deepthi

Can you try using a break point near that <b>execute</b> statement and debug your project

Regards

Chaitanya.A

DeeptiChavare
Active Participant
0 Kudos

Hi Sumit,

Here, no exception is thrown. BAPI is executed successfully. But the output tables are empty.

Thanks,

Deepti

Former Member
0 Kudos

Hi deepti,

ur catch block is empty.even if there is any exception,it will not show.can u put this code in catch block & tey it again

StackTraceElement[] s = exp.getStackTrace();

for(int a=0;a<s.length.a++)

{

wdComponentAPI.getMessagemanager.reportException(s[a].toString())

}

if it doesn't print anything,check the data in backend

regards

Sumit

Message was edited by:

Sumit Malhotra

Message was edited by:

Sumit Malhotra

Former Member
0 Kudos

Hi deepti,

Can u put the stack trace in catch block & execute it again??then send the stack trace.

regards

Sumit