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

Please help with 'Pricing' function module

Hi!

I am trying to use function module 'Pricing' but the table it_komv is still empty even after calling. I am basically trying to print some free of charge items on invoice sapscript and hence I am using 'Pricing' function in the print program. I am passing the below parameters. Please tell me whatelse I need to pass/not to pass.

wa_komk-mandt = sy-mandt.

wa_komk-kalsm = vbdkr-kalsm.

wa_komk-kappl = 'V'.

wa_komk-waerk = vbdkr-waerk.

  • wa_komk-knumv = vbdkr-knumv.

wa_komk-knuma = vbdkr-knuma.

wa_komk-vbtyp = vbdkr-vbtyp.

wa_komk-land1 = vbdkr-land1.

wa_komk-vkorg = vbdkr-vkorg.

wa_komk-vtweg = vbdkr-vtweg.

wa_komk-spart = vbdkr-spart.

wa_komk-prsdt = vbdkr-erdat.

wa_komk-kurst = vbdkr-kurst.

wa_komk-kurrf = vbdkr-kurrf.

wa_komk-kurrf_dat = vbdkr-kurrf_dat.

wa_komp-kposn = vbdpr-posnr.

wa_komp-kursk = vbdpr-kursk.

wa_komp-kursk_dat = vbdpr-kursk_dat.

wa_komp-werks = vbdpr-werks.

CALL FUNCTION 'PRICING'

EXPORTING

  • CALCULATION_TYPE = 'A'

comm_head_i = wa_komk

comm_item_i = wa_komp

  • PRELIMINARY = ' '

  • NO_CALCULATION = ' '

IMPORTING

comm_head_e = wa_komk

comm_item_e = wa_komp

TABLES

tkomv = it_komv

  • SVBAP =

  • CHANGING

  • REBATE_DETERMINED = ' '

Thanks a lot!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2006 at 04:45 PM

    Hi,

    Try using the Function module RV_PRICE_PRINT_ITEM to get the pricing information..

    THanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2006 at 04:55 PM

    Hi Krishen,

    Firstly populate this fields bcoz

    KOMK, KOMP structures has many fields

    CLEAR KOMK.
    KOMK-MANDT = SY-MANDT.
    KOMK-KALSM = VBDKR-KALSM.
    KOMK-FKART = VBDKR-FKART.
    KOMK-KAPPL = 'V'.
    IF VBDKR-KAPPL NE SPACE.
    KOMK-KAPPL = VBDKR-KAPPL.
    ENDIF.
    KOMK-WAERK = VBDKR-WAERK.
    KOMK-KNUMV = VBDKR-KNUMV.
    KOMK-VBTYP = VBDKR-VBTYP.
    
    KOMK-BUKRS = VBDKR-BUKRS.
    KOMK-BELNR = VBDKR-VBELN.
    KOMP-KPOSN = VBDPR-POSNR.

    Then pass the fm 
    
    CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
    EXPORTING
    COMM_HEAD_I = KOMK
    COMM_ITEM_I = KOMP
    IMPORTING
    COMM_HEAD_E = KOMK
    COMM_ITEM_E = KOMP
    TABLES
    TKOMV = TKOMV
    TKOMVD = TKOMVD.

    Revert back for any help

    Regards

    Naresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2006 at 04:57 PM

    Hi,

    Check this example..

    tables: vbdkr.

    data: s_komk type KOMK.

    data: s_komp type komp.

    data: t_komv like KOMV occurs 0 with header line.

    data: t_komvd like komvd occurs 0 with header line.

    • Input

    s_komk-mandt = sy-mandt.

    s_komk-knumv = vbdkr-knumv.

    CALL FUNCTION 'RV_PRICE_PRINT_ITEM'

    EXPORTING

    comm_head_i = s_komk

    comm_item_i = s_komp

    tables

    tkomv = t_komv

    tkomvd = t_komvd

    .

    You can check the program RVADIN01 for a sample..

    Hope this helps..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 09:25 PM

    Krishen, did you ever get this to work? I have the exact same issue and was having the same results with the Pricing function module. Did you end up using the other function module?

    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.