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

Retrieving of Pricing conditions for Sales Orders Item Level

Hello,

I'm trying to retrieve pricing conditions for a sales order item using an ABAP program. However I'm not too sure which tables is this information stored in. Please advice. Thanks

Regards

Gladys

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2006 at 11:35 AM

    Hi

    Thanks for all the inputs. Just want to clarify that I would like retrieve the pricing conditions for sales order item level, not the header level. Which means the pricing is for the material in line item 1,2,3..etc. I should think that it is in KONP, however I'm not sure how it is linked to the table VBAP. As to the reports, I'll check and see if they solve my problems tomorrow. Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      - The table with pricing of items order is KONV,

      - The link between VBAK e KONV is field KNUMV,

      - The link between VBAP e KONV is field KPOSN

      - The field KSCHL is the condition type.

      SELECT SINGLE * FROM VBAK WHERE VBELN = ........

      SELECT * FROM VBAP WHERE VBELN = VBAK-VBELN

      SELECT * FROM KONV WHERE KNUMV = VBAK-KNUMV

      AND KPOSN = VBAP-PSONR.

      The table KONP is for conditions records, so here you can find out the master data values.

      These are the values are loaded in a order to be created, afters saving the order the pricing data are stored in KONV, not in KONP.

      It's hard to read the KONP table because you need to know the KEY COMBINATION to get out the record number (field KONP-KNUMH).

      Every condition type has own KEY COMBINATIONS, this key is stored in a table is automatically generated when KEY COMNINATION is created.

      The name of these table is usually A<NUMB>, the NUMB is the number of KEY COMBINATION.

      For example in my sistem the condion type for the material price is PR00.

      This condition type has 3 KEY COMBINATIONS, the their table are A004, A005 and A006.

      So it needs to know the right KEY COMBINATION and read the right table of it to find out the value of field KNUMH and at the end read the table KONP.

      SELECT * FROM A004 WHERE KAPPL = 'V'

      AND KSCHL = 'PR00'

      AND VKORG = VBAK-VKORG

      AND VTWEG = VBAK-VTWEG

      AND MATNR = VBAP-MATNR

      AND DATBI => VBKD-PRSDT

      AND DATAB <= VBKD-PRSDT.

      EXIT.

      ENDSELECT.

      IF SY-SUBRC = 0.

      SELECT * FROM KONP WHERE KNUMH = A004-KNUMH

      ..........

      ENDIF.

      But are you sure you need the data in KONP instead of KONV?

      Infact from KONV you can find out the values are load in sales order and get the record number (KONV-KNUMH) and so read the original value from KONP:

      SELECT SINGLE * FROM VBAK WHERE VBELN = ........

      SELECT * FROM VBAP WHERE VBELN = VBAK-VBELN

      • Get the value of document

      SELECT * FROM KONV WHERE KNUMV = VBAK-KNUMV

      AND KPOSN = VBAP-PSONR.

      • Get the original value

      SELECT * FROM KONP WHERE KNUMH = KONV-KNUMH.

      You should only know the condition type for material price.

      Max

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2006 at 10:11 AM

    Hi Gladys,

    why don't you try the fm 'CONDITION_RECORD_READ'?

    Tables are konh, konp ...

    Siggi

    Message was edited by: Siegfried Szameitat

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 02, 2006 at 10:14 AM

    Hi,

    Check the table KONV.

    Regards

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 02, 2006 at 10:17 AM

    Hi,

    Check this Fm <b>RV_PRICE_PRINT_ITEM</b>.

    Regards

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2006 at 10:18 AM

    check konv & konp

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 02, 2006 at 10:25 AM

    hi

    PRICING_GET_CONDITIONS

    PRICING

    SD_SALES_PRICING_INFORMATION

    SD_SALES_PRICING_PUT

    RV_PRICE_PRINT_HEAD

    RV_KONV_SELECT

    regards

    vinod

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 02, 2006 at 10:28 AM

    Hi ,

    For that partcular Sales Document number (VBELN) get the

    KNUMV (Number of the document condition) from table VBAK (Sales Document: Header Data) and fetch the condition amounts(KWERT) and Condition values (KSCHL) from KONV(Conditions (Transaction Data)) table.

    Thanks and Regards,

    Sriranjani Chimakurthy.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2006 at 10:32 AM

    Hi,

    In your program,

    retrieve the value of KNUMV field from table VBAK for your sales order no (VBELN).

    Then pass this value to KNUMV field of table KONV.

    You wont be able to use joins as KONV is a cluster table.

    Tables involved are VBAK and KONV.

    Hope this logic will help.

    Regards,

    Shashank

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2006 at 12:07 PM

    hi ,

    for a sales order at item level u can check the pricing conditions in the VA02 or VA03 by selecting the particular line item and goto-header-conditions.

    this will give u pricing conditions.

    this pricing will be for a particular order type/sales area/..

    table vbak for a given vbeln and check field knumv (vbak-knumv = X)Number of the document condition,make a note of this.

    goto table vbap- giv the same vbeln and execute it will list the details of the item level in the sales order.

    this will hav quantity fields .

    goto table konv and give the value of VBAK-KNUMV = x in the field KNUMV

    and now execute

    this will giv u details of the KONV-KNUMH,KONV-KOPOS feild which is Condition record number and item.

    this is at header level.

    now goto table konp and give the KONY-knumh field in

    in and execute.

    this is at item level.

    this will giv u KONP-KSTBM and KONP-KBETR ,

    the product of this is the pricing of the condition type .

    just check VK12 , and VK13 transactions which will giv u teh pricing condition types applicable .

    regards,

    vijay.

    Add a comment
    10|10000 characters needed characters exceeded

    • You can use following FM.

      REPORT ztest.

      data km like STANDARD TABLE OF konv WITH HEADER LINE.

      CALL FUNCTION 'ISM_SD_GET_PRICING_CONDITIONS'

      EXPORTING

      in_vbeln = '0010000229'

      in_posnr = '010'

      TABLES

      KONV_TAB = km.

      LOOP at km.

      NEW-LINE.

      WRITE km-kbetr.

      write km-kschl.

      ENDLOOP.

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.