Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

RFC doesnt work when import parameter is passed from Jco

Hi,

I am passing import parameter from JCO to RFC , however it doesn't work

Following are the code:

        JCoDestination destination = JCoDestinationManager.getDestination(DESTINATION_NAME2);

        JCoFunction function = destination.getRepository().getFunction("ZTEST_BAPI_SALES");

        ;

        if (function == null)

            throw new RuntimeException("ZTEST_SALES not found in SAP.");

       

       JCoParameterList ipl=function.getImportParameterList();

       ipl.setValue("WERKS","5200");

        try {

 

           

            function.execute(destination);

           

        } catch (AbapException e) {

            System.out.println("error in fetching data: "+e.toString());

           

            return;

        }

        System.out.println(" Response: " + function.getExportParameterList().getString("RETURN"));

Pls help.

Regards,

Asia Khan

Former Member
Not what you were looking for? View more on this topic or Ask a question