Skip to Content
0
Former Member
Dec 20, 2006 at 08:15 AM

read table parameter in RFC

54 Views

Hi All,

I am reading BAPI_PO_GETDETAIL. I want to read table parameter POItems of this Bapi. I am writing the following code:-

retValue = null;

BAPI__PO__GETDETAIL param = new BAPI__PO__GETDETAIL();

param.setPURCHASEORDER(ponumber);

param.setITEMS("X");

BAPI__PO__GETDETAILLocal local = this.getBAPI__PO__GETDETAIL();

try

{

BAPI__PO__GETDETAIL_dot_Response result = local.BAPI__PO__GETDETAIL(param);

retValue = new viewallpo();

retValue.setPonumber(result.getPO__HEADER().getPO__NUMBER());

retValue.setVendor(result.getPO__HEADER().getVEND__NAME());

retValue.setDoctype(result.getPO__HEADER().getDOC__TYPE());

retValue.setPurchase_group(result.getPO__HEADER().getPUR__GROUP());

retValue.setPurchase_org(result.getPO__HEADER().getPURCH__ORG());

retValue.setProperty("poitem",result.getPO__ITEMS().getItem());

retValue.setProperty("quantity",result.getPO__ITEMS().getItem());

}

catch(Exception e)

{

e.printStackTrace();

throw new ServiceException(e);

}

Viewallpo is datastructure which contains poitem and quantity as list.

I am creating a callable object of this application.

While testing I am getting following error:

<b>Result

Result: Technical exception

Details: Error occured during service execution. Exception Message "Error occured during service execution. Exception Message "java.lang.reflect.UndeclaredThrowableException"": Error occured during service execution. Exception Message "java.lang.reflect.UndeclaredThrowableException": java.lang.reflect.UndeclaredThrowableException

Output Parameters

Callable object implementation did not return output parameters</b>

can anyone help me to retrieve fields from table parameters?

regards,

sheetal