on 03-10-2017 12:02 PM
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?
Regards,
Houriya
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
CALL FUNCTION 'ISU_S_FICA_DOC_CREATE'
EXPORTING
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 =
IMPORTING
e_opbel = opbel_tax
TABLES
t_input_pos = t_input_pos
* T_ISUCADOC_FKKOP =
* EXCEPTIONS
* NOT_CREATED = 1
* OTHERS = 2.
IF sy-subrc <> 0.
ELSE.
commit work and wait.
call function 'FKK_CD_PAYMENT_CREATE'
if sy-subrc = 0.
commit work and wait.
endif.
endif.
Regards,
Houriya
Quite the reveses, keep the I_COMMIT to space, and then you can use the COMMIT AND WAIT.
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.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.