Skip to Content

Two Transactions in One BDC session

Hello Friends,

I have a requirement of creation of an asset(AS01) and after the asset is created, process one more operation in tcode ABNAN. The user wants it as a BDC session method. Until the user process the session I cannot retrieve the asset number which is mandatory field for ABNAN transaction. So I decided to use BAPI to create asset and for the second transaction I will use the BDC session (at that time asset number will be available). But in this case, before user process the session, the asset will be created, which is wrong. Is there anyway to use the two tcodes sequentially in a session ?

Thanks & Regards,

Priyanka.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 08, 2017 at 07:44 PM

    Use 'ABAP Development' tag for ABAP questions.

    The users want to be BDC session to be created and they will process it separately? Then, naturally, you can't combine BAPI call and session on the same LUW. It's not possible.

    If you use a BAPI and don't COMMIT but call BDC afterwards it has at least a chance of working together (although it seems like a poor design choice) but session is a separate update.

    I believe you can combine two transaction calls in one session but then you can't use BAPI (unless you put it in a transaction and then call it using BDC, which would be rather ridiculous).

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 09, 2017 at 12:59 PM

    Why don't you use only BAPIs: First creation BAPI BAPI_FIXEDASSET_CREATE1 and then a posting BAPI like BAPI_ASSET_ACQUISITION_POST (BUS6029) or BAPI_ASSET_POSTCAP_CHECK (BUS6027) ?
    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • With the BAPI you can use the WAIT option, with BDC the standard transactions don't usually use the WAIT option. You can move the WAIT from COMMIT to a LOCK request before second call. What behavior do your users want when the second call fail?