cancel
Showing results for 
Search instead for 
Did you mean: 

Re : MM Invoice Pricing Conditions

VijayasekarK
Active Participant
0 Kudos

Dear Friends ,

I'm stuck up with one rport requirement ,

( i.e ) i need to display the condition records for each MM Invoice Line Item.

If the PO Qty & Price is as same as Invoice Qty & Price then i can very well pick up from PO Conditions ( EKKO --> passing KNUMV --> KONV ) and display it.

But when the invoice Qty / Price differs from the PO Qty/Price its a problem.

I'm aware of function module "PRICING" but stuck up with the parameters to this function module.

If any alternate solution is availabe please suggest me.

Regards,

Vijay

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

If your requirement is to show PO item conditions adjusted according to invoice line item qty then you can use PRICING_COPY fm..

For example, if PO Item qty is 4 and invoice line item qty is 2 then this fm is very much useful to get adjusted conditions..

CALL FUNCTION 'PRICING_COPY'

EXPORTING

currency_new = "Invoice currency

currency_new_date = "Invoice date

  • CURRENCY_NEW_LOCAL = ' '

currency_new_rate = "Invoice Exch. Rate

currency_new_type = "Invoice curr. type if any

currency_old = "PO Currency

  • CURRENCY_OLD_LOCAL = ' '

document_number_from = "PO KNUMV

document_number_to = "Give invoice nr as there is no knumv

item_number_from = "PO Item

item_number_to = "Invoice Item

mode = " 'D' or 'G'

quantity_new = "Invoice Item Qty (TYPE FKLMG)

QUANTITY_OLD = "PO Item Qty Optional (TYPE FKLMG)

  • VBTYP_NEW = ' '

  • ORDER_NUMBER = ' '

  • AMOUNT = 0

  • PROPORTION = 0

  • AMOUNT_RULE = ' '

  • SOURCE = ' '

check_rebate = 'X'

TABLES

tkomv = t_komv_new[] "this you will get back

source_komv = t_komv_old[]. "If you have read PO conditions using KNUMV pass here otherwise leave it empty system will read on its own..

Also see christian's reply. I think he is correct may be you need to verify your requirements once..

Hope this helps..

Sri

Message was edited by: Srikanth Pinnamaneni

Message was edited by: Srikanth Pinnamaneni

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Vijay!

Don't go for FM pricing - you won't find what you need.

One part (already done) is getting values of PO - here can be manual changes, so no new price determination (with 'pricing') will be of help.

Second part is 'actual' invoiced price by vendor. But thats manual (or IDOC) entry in MIRO - again no saved conditions in SAP can be of any help.

Normally only (line-) totals are entered in MIRO, not prices + discounts. If found RBKP-KNUMVE and RBKP-KNUMVL - but they are empty in our (dev-) system. Next try would be RSEG - check with display in MIRO, which fields are relevant for your report.

Regards,

Christian

former_member188685
Active Contributor
0 Kudos

check this include MM06EFKO_PREISFINDUNG

how they are using..the FM PRICING..

regards

vijay

VijayasekarK
Active Participant
0 Kudos

Hi Vijay ,

I have checked the program....but it's going in to toooo many loops...

regards,

vijay

former_member188685
Active Contributor
0 Kudos
<b>  CALL FUNCTION 'PRICING'
    EXPORTING
      calculation_type = prf_calct
      comm_head_i      = komk
      comm_item_i      = komp
    IMPORTING
      comm_head_e      = komk
      comm_item_e      = komp
    TABLES
      tkomv            = tkomv.</b>

try to pass the same parameters...

i think try to do with the Christian logic.

that might solve

Message was edited by: Vijay Babu Dudla

VijayasekarK
Active Participant
0 Kudos

Hi Vijay ,,

Can you help me to get KOMK & KOMP values...

Regards,

Vijay

former_member188685
Active Contributor
0 Kudos

Hi

please see this program MM06EFKO_PREISFINDUNG you might get some idea..

regards

vijay

VijayasekarK
Active Participant
0 Kudos

Hi Vijay ,

I have checked the program , since it's doing lot's of calculations in the program ...it is very difficult to implement the same .

Can any one tell me is there is any function module which i can directly fetch the details .

Regards,

Vijay

former_member188685
Active Contributor
0 Kudos
 call function 'SD_SALES_PRICING_INFORMATION'
            exporting
               i_posnr    = v_posnr
               i_read_doc = 'X'
               i_vbeln    = v_vbeln
            importing
               e_komk = tkomk
            tables
               ftkomk = lt_komk.

       delete lt_komk where belnr ne v_vbeln.

       loop at it_vbap where vbeln = v_vbeln.

            call function 'SD_SALES_PRICING_INFORMATION'
                 exporting
                    i_posnr    = vbap-posnr
                    i_vbeln    = v_vbeln
                 importing
                     e_komp = tkomp.
            ls_xkomp = tkomp.
            append ls_xkomp to da_xkomp.
       endloop.
       da_comm_head_i-hwaer = tkomk-hwaer.

      call function 'PRICING_GET_CONDITIONS'
        EXPORTING
          comm_head_i     = da_comm_head_i
          read_conditions = us_read_cond  "Should be 'X'
        TABLES
          tkomv           = da_xkomv
               skomk           = lt_komk
               skomp           = da_xkomp
          skonh           = da_xkonh
          skonp           = da_xkonp
          skonm           = da_xkonm
          skonw           = da_xkonw
        EXCEPTIONS
          error_message   = 1
          others          = 2.

try this and let me know if you have any doubts..

regards

vijay

VijayasekarK
Active Participant
0 Kudos

Dear Vijay ,

thanks for your timely response ....

Iam looking for MM Invoice ....not SD invoice details..

regards,

VIjay

former_member188685
Active Contributor
0 Kudos

But using this FM you can use for any module i guess.

PRICING_GET_CONDITIONS

only thing is you need to pass the info of komk,komp

then you can get the conditions.

regards

vijay

VijayasekarK
Active Participant
0 Kudos

HI Vijay ,

No...I checked ..It wont help...

Regards,

Vijay

former_member188685
Active Contributor
0 Kudos

Ok ,You should wait for some responses in the forum.

hope you get some positive response..

regards

vijay