Skip to Content
0

BAdI or User Exit for changing document type of accounting document

Mar 27 at 04:47 PM

48

avatar image

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

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

1 Answer

Raymond Giuseppi
Mar 28 at 06:58 AM
0

Did you consider a substitution rule (tr. OBBH)

Show 3 Share
10 |10000 characters needed characters left characters exceeded

I didn't know OBBH was a thing, I'm looking into it thanks.

0

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 ?"

Sorry for the unconvenience...
0

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.

0