Skip to Content

Commit work and wait after ISU_S_FICA_DOC_CREATE

Mar 10, 2017 at 12:02 PM


avatar image
Former Member

Dear experts,

I have a question regarding the FM ISU_S_FICA_DOC_CREATE.

I'm using this FM to create a tax document, the problem is that after running this FM successufuly I check DFKKOP table to see if my document was added, I don't find it,

Why am I looking for it in DFKKOP? well, after creating this document I need to create a payement for this doc so I am using FKK_CD_PAYMENT_CREATE , and while this FM tries to update DFKKOP I get a short dump (SOMETIMES, not everytime because when I re-run the same test I don't get any dump), so I supposed that maybe I need a very brief delay until the document is added to dfkkop.

Do I need to add a COMMIT WORK AND WAIT statement after each one of the FMs?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raymond Giuseppi
Mar 10, 2017 at 12:50 PM

Non-liability clause: Many unreleased FM?

you can try the COMMIT WORK AND WAIT statement, but insure pass an initial value to paraleter I_COMMIT of the FM, else the FM execute a COMMIT WORK without the WAIT option, and your statement won't have any effect.

Nevertheless there are potential delays in the database update and buffer management, so you could try to read from database the generated document before calling next FM, in some DO/SELECT/if found EXIT/else WAIT UP TO 0 SECONDS/ENDDO.

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for the replay,

So what you are suggesting is that I set the I_commit parameter to 'X' and add the Commit work and wait statement to the both Function Module

I've already tried to read from the database before calling the second FM ( using a while endwhile loop ) but it ended as an endless loop ( as I don't know exactely when does SAP add that entery to DFKKOP)

so here is the code

        i_fikey       = fikey
        i_applk       = applk
        i_herkf       = herkf
        i_blart       = 'FT'
        i_waers       = devise
        i_bldat       = sy-datum
        i_budat       = sy-datum
        i_gpart       = partner
*       I_XNETT       =
        i_commit      = 'X'
        i_update_task = 'X'
*       I_XBLNR       =
        e_opbel       = opbel_tax
        t_input_pos   = t_input_pos
*       T_ISUCADOC_FKKOP       =
*       NOT_CREATED   = 1
*       OTHERS        = 2.
    IF sy-subrc <> 0.
      commit work and wait.

      call function 'FKK_CD_PAYMENT_CREATE'
        if sy-subrc = 0.
          commit work and wait.




Quite the reveses, keep the I_COMMIT to space, and then you can use the COMMIT AND WAIT.

Former Member

You've also mentionned something about the unreleased FM? how to know if function is released I check

TFDIR table for the two FMs 'freedate' was initial so they're unreleased ?

Would you please explain ?




Yes, not release date EQ not released. (look with SE37 for FM attributes) so use BAPI_ISUCADOC_CREATEFROMDATA.

Former Member

Is there any thing wrong with using the unreleased FM?

I've already checked for BAPI_ISUCADOC_CREATEFROMDATA in TFDIR table FREEDATE is also initial, plus this BAPI calls ISU_S_FICA_DOC_CREATE.


Many people use unreleased FM when no other solution exists, this is mainly some warranty/support problem (read 109533 - Use of SAP function modules and 415983 - Modification/customer developments of SAP function modules) so at your own/company/customer risks.

For the BAPI, check object ISUSLDCMNT in SWO1. But alas even the 'BAPI' FM appears to be implemented and not released (no longyuer?) So consider looking at the released BAPIs BAPI_CTRACDOCUMENT_*, e.g. BAPI_CTRACDOCUMENT_CREATE.