Skip to Content
0
Former Member
Jun 30, 2009 at 04:31 PM

Strange issue - BAPI returning only 1 record

50 Views

Hi Experts,

I am using following code to get data from backend. I am getting only 1 record from the back end. When I am executing the same BAPI using se37, I can see 28 records. Can you please let me know what is going wrong here? I have done proper context mapping etc. I am NOT new for Web Dynpro.

Regards,

Gary

public void executeData( )
  {
    //@@begin executeData()
	BigDecimal a ;
	a = BigDecimal.valueOf(0);
	Bapi_Orgunitext_Data_Get_Input input = new Bapi_Orgunitext_Data_Get_Input();
	wdContext.nodeBapi_Orgunitext_Data_Get_Input().bind(input);
	wdContext.currentBapi_Orgunitext_Data_Get_InputElement().setScenario("MDT1");
	wdContext.currentBapi_Orgunitext_Data_Get_InputElement().setObjid("50050585");
	wdContext.currentBapi_Orgunitext_Data_Get_InputElement().setPlvar("01");
	wdContext.currentBapi_Orgunitext_Data_Get_InputElement().setKeydate(new java.sql.Date(System.currentTimeMillis()));
	wdContext.currentBapi_Orgunitext_Data_Get_InputElement().setEvalpath("o-s-p");
	wdContext.currentBapi_Orgunitext_Data_Get_InputElement().setEvaldepth(a);
	try {
	 wdContext.currentBapi_Orgunitext_Data_Get_InputElement().modelObject().execute();
	 wdContext.nodeOutput_orgunit().invalidate();
	}
	catch (Exception e) { 
	 wdComponentAPI.getMessageManager().reportException("error while getting orgunit from Bapi_Orgunitext_Data: " +e.getLocalizedMessage(), false);
	}