Application Development and Automation 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: 
Read only

Query on BAPI_TRANSACTION_COMMIT

Former Member
0 Likes
644

Hi All,

We are updating Purchase Requisition(PR) data into SAP ECC with ETL Informatica using BAPI_PR_CREATE.

For the above, I have done the following testing:

I have executed the BAPI_PR_CREATE usign SE37 Transaction code with the suitable data and created a PR. Ireceived successful with PR number.

After the above step I have executed BAPI_TRANSACTION_COMMIT for physical uploding data into SAP tables.

After completion of the above two steps I have checked in EBAN (PR) tables/ME53N Trcode to see the new PR data. But I could not find.

Please guide me what is the procedure to see the data.

Thanks,

Sudarsan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
583

Hi Koyya,

If you want to use BAPI_TRANSACTION_COMMIT for testing purposes in trx SE37, you have to use "Test sequences" (Shift + F8).

In the first place put your BAPI and in the second place put the BAPI_TRANSACTION_COMMIT.

Good luck!

Fernando

4 REPLIES 4
Read only

h_senden2
Active Contributor
0 Likes
583

I think it's better to build a small abap where you're doing the testing. Add a call of you BAPI and a call of BAPI_TRANSACTION_COMMIT to it.

Then it will propably work !

regards,

Hans

Please reward all helpful answers !!!!!

Read only

uwe_schieferstein
Active Contributor
0 Likes
583

Hello Sudarsan

You have to call your BAPI and BAPI_TRANSACTION_COMMIT <b>consecutively</b>:

DATA:
  ls_return   TYPE bapiret2,
  lt_return    TYPE bapirettab.



  CALL FUNCTION 'BAPI_PR_CREATE'
    EXPORTING
       ...
   TABLES
     return  = lt_return
    ...

  LOOP AT lt_return TRANSPORTING NO FIELDS
                              WHERE ( type CA 'AEX' ).
    EXIT.
  ENDLOOP.
  IF ( syst-subrc ne 0 ).
    CALL FUNCTION 'BAPI_COMMIT_WORK'.
  ELSE.
    CALL FUNCTION 'BAPI_ROLLBACK_WORK'.
  ENDIF.

Regards

Uwe

Read only

former_member219399
Active Participant
0 Likes
583

Hi,

within the same program u have to call the BAPI and BAPI commit also.

with regards,

Vamsi

Read only

Former Member
0 Likes
584

Hi Koyya,

If you want to use BAPI_TRANSACTION_COMMIT for testing purposes in trx SE37, you have to use "Test sequences" (Shift + F8).

In the first place put your BAPI and in the second place put the BAPI_TRANSACTION_COMMIT.

Good luck!

Fernando