Skip to Content
author's profile photo Former Member
Former Member

MIGO BADIs

Hi,

I am posting a GR for a subcontracting PO. The movement for the parent is 101 and the component are 543 (out of vendor stock - stock type O).

I want to be able to change the value of the components as they post to value of the parent (field MSEG-DMBTR). Effectively, I want to control the valuation update before creating the accounting document.

I have tried the BADIS:

MB_DOCUMENT_UPDATE

MB_DOUCMENT_BADI

MB_MIGO_BADI

But I am not sure I am using them correctly.

Any advice is appreciated.

Thanks.

JP

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jan 10, 2005 at 04:33 PM

    Hi JP,

    since you got no other suggestions, here comes my idea, which might complicate the whole stuff:

    You thought about changes in booking GR, I think about changing PO. In pricing of PO you can influence value of subtotal B (KOMP-WAVWR).

    You might a) add a requirement to prevent adding the costs or b) add a formula to correct the value of KOMP-WAVWR directly.

    By this way you avoid differences between PO / GR / invoice... I don't know, if there might be a problem - but better make some changes at the beginning, not at the end.

    Maybe an other field has to be changed in your case, but without having an example I can't help much further. There are some routines in RV61AFZB in addition to normal pricing-UE for communication-structure filling.

    Somewhere here also price control (moving average / standard) is used - perhaps switching temporarily to standard with amount 0.00 is easier to handle.

    Good luck!

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks for the response. My subcontracting PO is marked as free of charge (no added cost other than the cost of the components), so I don't have access to the conditions and therefore I don't have access to the subtotal fields? I still want the cost of the component to be posted, so I need to have valuation (I can't use standard price of zero, as then no cost will be posted for the consumption of the component). Any other suggestions would be great.

      Thanks.

      JP

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2005 at 07:26 PM

    Jean could you explain with more detailsyour problem?

    What is your problem exactly?

    Regards,

    Carlos

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I will give you an example.

      I have a subcontracting PO. The parent has 2 sub-items:

      Sub-item A - moving average price $1 price control V

      Sub-item B - moving average price $2 price control V

      The subcontracting PO is flagged as free of charge, so when I post the GR, the cost of the sub-items (in this case $3 is posted to the parent)

      In some cases I want to prevent the cost of sub-item A, from being posted to the cost of the parent. There is no 'free of charge' flag at sub-item level, so I was looking for a userexit or some other means to control this.

      Let me know if you need any more information. Thanks for the initial response.

      JP

  • Posted on Jan 11, 2005 at 08:43 AM

    Hi,

    your right, condition approach can't work. Anyway, I misunderstood your requirement ('I want to be able to change value of component', I want to prevent the cost(s) of sub-item A ... being posted').

    So you 'just' want to re-direct the costs from parent to somewhere else. (I can't imagine any other place as the parent, because that is the result of the production, but customers are very inventive in such tasks).

    Sounds like (one of) the first two BADIs are correct place to do the changes.

    It's not a smart solution, but perhaps more 'standard' way: create a correction booking.

    To be able to create an additional document, you have to be outside of the GR booking.

    To leave GR, create change pointers with FM CHANGE_POINTERS_CREATE_DIRECT (in MB_DOCUMENT_UPDATE)

    and start a report with FM BP_EVENT_RAISE (this complicate way is needed to leave transaction without an (implicit) commit work). In the additional report you can make the correction booking. By this way you will have more documents in the system, but you won't get a mess with wrong bookings - separate documents should always be able to identify and changed if necessary.

    Regards,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks once again for the response. I can try this, but do you think there is any customer function/BADI/userexit that will allow me to control the value posting, without having to do a 'reversal posting'. I put break-points in most of these BADIs, did some manual changes, but they did not seem to be carried over to the calling functions. In the SD area, there are very distinct areas 'save_prepare' for example where you can make such changes.

      Any more ideas?

      Thanks.

      JP

  • Posted on Jan 12, 2005 at 08:17 AM

    Hi JP,

    if you like to CHANGE XMKPF and XMSEG in MB_DOCUMENT_UPDATE, then you should have a look at the ABAP-help on assign->dynamical assign->variant 4a.

    With a pointer linking to the variables of the calling program of this BADI, you can make value changes - from process point of view that's as bad as a modification (but you don't need object keys with your coding inside the BADI).

    Regards,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.