cancel
Showing results for 
Search instead for 
Did you mean: 

RFC enabled BAPI for Conditions

Former Member
0 Kudos

Hello,

I'm looking for a BAPI that is RFC enabled and able to create conditions. I found the BAPI_PRICES_CONDITIONS which unluckily is not RFC enabled.

Answers will be appreciated.

Thank you in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Hope the BAPI - BAPI_PRICES_CONDITIONS works fine for your requirement.

If the only concern is, it is not RFC enabled, then you can create a custom RFC enabled function module

using Tcode - <b>SE37</b>.

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/22/0424ba488911d189490000e829fbbd/frameset.htm">RFC Programming in ABAP</a>

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/22/0425f2488911d189490000e829fbbd/frameset.htm">Writing Remote Function Modules in ABAP</a>

In SE37, create a custom RFC FM that calls the BAPI - BAPI_PRICES_CONDITIONS.

Check the following code:

CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
* EXPORTING
*   PI_INITIALMODE       = ' '
*   PI_BLOCKNUMBER       =
  TABLES
    ti_bapicondct        =
    ti_bapicondhd        =
    ti_bapicondit        =
    ti_bapicondqs        =
    ti_bapicondvs        =
    to_bapiret2          =
    to_bapiknumhs        =
    to_mem_initial       =
* EXCEPTIONS
*   UPDATE_ERROR         = 1
*   OTHERS               = 2
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Use the same Import & Export parameters of the BAPI as the import & export parameters of the

custom RFC function module.

So, the custom RFC function module act as a wrapper function to the BAPI - BAPI_PRICES_CONDITIONS

Hope this helps!

best regards,

Thangesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Call Function module BAPI_TRANSACTION_COMMIT after calling BAPI_PRICES_CONDITIONS

For more info. check the following threads,

best regards,

Thangesh