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: 

CREATION OF CUSTOM BAPI

Former Member
0 Kudos

How to update the Return table while creating a custom bapi.

2 REPLIES 2

Former Member
0 Kudos

Hi

U have to give the fields in the return table in which u want to populate the success or error records after the bapi is executed.

So, check ur code and then give the fields.

Regards,

Vishwa.

Former Member
0 Kudos

Hi,

1st Check for the return value ( Sy-subrc). You can check as shown below

* select plant and its description

  select werks from t001w into t_plant where werks = t_werks.

  IF sy-subrc <> 0.
* if the details is not found pass return value
    CALL FUNCTION 'BALW_BAPIRETURN_GET2'
      EXPORTING
        type   = 'S'
        cl     = 'ZMSG'
        number = '001'
      IMPORTING
        return = return.

    APPEND return.

  ENDIF.

Goto TCode- SE91 & create own msg class (here ZMSG) & populate.

Regards.

Nikhil.