2018 Mar 27 5:47 PM
Hello,
During MIGO or MIRO transaction, an accounting document is created (table
BKPF & ACCIT) with a certain document type (field BLART) and I need to change this type to 'ZB' for some of them.
I've already tried without success:
- BAdI FAGL_SET_SEGMENT => changes on document type doesn't work
- BAdI AC_DOCUMENT => no access to document type
- Some user exit (don't remember)
I've looked at those question without success:
https://archive.sap.com/discussions/thread/1037784
https://archive.sap.com/discussions/thread/1245157 (no answer...)
https://archive.sap.com/discussions/thread/1103081 (not triggered by MIGO)
I have no problem using two user exit (one for MIGO, one for MIRO), but for the moment I didn't found anything working for MIGO.
Regards,
William Mateille
2018 Mar 28 7:58 AM
2018 Mar 28 9:24 AM
I didn't know OBBH was a thing, I'm looking into it thanks.
2018 Mar 28 2:19 PM
For the mods, I don't have any "reply" button, I tried to edit my last comment but I can't (clicking on submit don't do anything). I'm on IE maybe that is the problem but I can't use another browser, I have only the possibility to "share", "accept" or "alert moderator" for a comment.
Is there something I'm doing wrong ?
Anyway, I want to answer that to Raymond: "By creating a substitution rule I must associate an exit because I need to make this substitution only if the purchasing group of the document is in a custom table. But this does only report the problem, now which exit can I use ? If I create one, will my code be executed each time I go through MIGO & MIRO, or it depends on the exit ?"
2018 Mar 28 2:34 PM
Put a condition in OBBH, e.g. BKPF-AWTYP = 'MKPF' OR BKPF-AWTYP = 'RMRP' then execute the substitution if code required in an User Exit defined in the Substitution/Validation/Rules, it will be called if and only if MIGO OR MIRO transactions, or related BAPI, are executed.