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

MGAME during pricing

I am trying to see how KOMP-MGAME structure field gets filled during pricing? can anyone plz guide me as to how this field gets its value (during update pricing).

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 20, 2005 at 12:50 PM

    Hi SSG!

    E.g. in a purchase order pricing, function module

    ME_FILL_KOMP_PO is responsible. Following code might help you:

    *- Mengen richtig fuellen  (filling amoung correctly)-----*
      IF i_ekko-bstyp EQ bstyp-best.
        e_komp-mglme = i_ekpo-menge.
      ELSE.
        IF i_ekko-bstyp EQ bstyp-kont AND i_ekpo-abmng GT 0.
          e_komp-mglme = i_ekpo-abmng.
        ELSE.
          e_komp-mglme = i_ekpo-ktmng.
        ENDIF.
      ENDIF.
      IF NOT i_preisfindungsmenge IS INITIAL.
        e_komp-mglme = i_preisfindungsmenge.
      ENDIF.
      IF e_komp-mglme EQ 0.  "falls keine Menge gesetzt --> auf 1 setzen
    "if nothing found -> set default 1 
        e_komp-mglme = 1000.  "z.B. bestellte Banf nochmal bestellt
    "e.g. re-ordering a purchase requisition
      ENDIF.
    *- Menge umrechnen bei abweichender Preiseinheit (convert amount in case of different order price unit)---*
      IF i_ekpo-meins NE i_ekpo-bprme.
        IF i_ekpo-bpumn NE 0.
          refe1 = e_komp-mglme * i_ekpo-bpumz / i_ekpo-bpumn.
          IF refe1 LE maxmenge.
            e_komp-mgame = refe1.
          ELSE.
            e_komp-mgame = maxmenge.
          ENDIF.
        ENDIF.
        e_komp-umvkz = i_ekpo-bpumz.
        e_komp-umvkn = i_ekpo-bpumn.
        e_komp-vrkme = i_ekpo-bprme.
      ELSE.
        e_komp-mgame = e_komp-mglme.
        e_komp-vrkme = i_ekpo-meins.
      ENDIF.
    

    In sales some coding in WV_KOMP_FILL_V is relevant to your question.

    But for a detailed explanation, an example has to be checked (debugged!).

    Regards,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2005 at 01:50 AM

    Christian thanx.. I will check it out and let you know

    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.