Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RFC doesnt work when import parameter is passed from Jco

Former Member
0 Kudos

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

1 REPLY 1

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Asia,

although the "doesn't work" issue is a very common one, I am afraid that no one is able to help you as there are so many different solutions to this issue.

Maybe you can be a bit more precisely what exactly doesn't work? What do you expect and what error/exception/output/wrong data do you get?

Best regards,

Stefan