Skip to Content
author's profile photo
Former Member

How to handle the returned values?

Hi,

I am calling a BAPI which will return just a field and a record.

How do I capture it?

For e.g. when I click on a button, it should create a customer and as soon as the control comes back to the application, it should display the customer no, that is returned by the BAPI.

I have been trying many methods of the controller and the view as well, but of no use.

please suggest.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on May 03, 2004 at 06:53 PM

    Hi Satish,

    the customer no should be part of the Adaptive RFC model you created for the BAPI. The models are created such that there should always be an "Input" node, an "Output" node and a "Return" node (prefixed by the BAPI name used, converted to Java name style). There are BAPIs without output, so the "Output" node may be missing.

    So, if the BAPI returns the customer no (and no error occurred), it should be somewhere in the "Output" node after the call. For example if you bind an InputField to the Output->customerNo and invalidate the output node after the xxx.execute(), it should be displayed without further actions. It may not be filled, if there's an error result by the BAPI, which you will find in the "Return" node.

    Hope that helps.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Satish,

      1. The attributes in the INPUT node correspond to the IMPORTING - parameters of the BAPI (what you send to R/3)

      2. The attributes in the OUTPUT node correspond to the EXPORTING - parameters of the BAPI (the results you'll receive in case of scalar parameters like INT4, single structure "instances" or whatever)

      3. The TABLES - parameters of a BAPI are structures in R/3 and are reflected by specific model classes and Dictionary structures in Web Dynpro. They are valid for both importing from and exporting to the BAPI.

      So, the values are returned in OUTPUT and/or TABLES by the BAPI, not in INPUT.

      Hope that helps,

      Regards

      Stefan