Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting list of Sales condition types based on matnr , vkorg,vtweg

Sivakumar_Subramaniam
Product and Topic Expert
Product and Topic Expert
0 Kudos
4,003

Hi ,

I would like to know if there are any FM that retrieve condition values similar to transaction:VK13 based on access sequence.What I mean by access sequence is if there are no records maintained for the first key combination then it should search for the next key combination until a condition value exist.

I have all the mandatory information like VKORG,VTWEG,MATNR,VKGRP..etc similar to VK13

for all the key combinations of VK13.

i tried using FM's

WV_KOMK_FILL_V

WV_KOMP_FILL_V

CONDITION_RECORD_READ

SALES_PRICE_COND_TYPE_GET

PRICING_GET_CONDITIONS

PRICING_LOAD_CONDITION_TYPS

SD_COND_TYPES_OF_PRICING_PROC

WB2_SD_MAUNAL_PRICING_COND_GET

CONDITION_TYPS_FOR_PRICING

SALES_PRICE_CALCULATE_01

SD_COND_AUTH_CHECK

SD_GET_ALL_CONDTYPE_FROM_KOTAB

But i couldn't get the solution . Plz guide me in using these FM's in which order.

My input will be MATNR(Article Number),Sales Organisation(VKORG),Division(VTWEG),Customer(kunnr) .

I want to list all the condition types .

Thanks in advance .

Regards,

S.Sivakumar

Edited by: sivakumar subramaniam on Oct 31, 2009 4:29 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,283

Hi Friend,

In the below link you will get the full logic for getting the SALES CONDITION types based on

sales group,

customer,

Material.

there is no standard function.module for getting the list .

you can create a function module and add the core logic from the below link .

make the selection screen parameters as your input parameters .

Please see this link :[http://sample-code-abap.blogspot.com/2008/11/reterieve-sales-pricing-condition.html]

Regards,

8 REPLIES 8

Former Member
0 Kudos
1,283

Hi,

You can use the tables A073 and KONP.

From table A073, you can get the condition record number as per your Article /SOrg/DstCh/DATBI / DATAB.

From KONP, you can get condition type as per your condition record number.

Thanks,

Chenna.

Former Member
0 Kudos
1,284

Hi Friend,

In the below link you will get the full logic for getting the SALES CONDITION types based on

sales group,

customer,

Material.

there is no standard function.module for getting the list .

you can create a function module and add the core logic from the below link .

make the selection screen parameters as your input parameters .

Please see this link :[http://sample-code-abap.blogspot.com/2008/11/reterieve-sales-pricing-condition.html]

Regards,

0 Kudos
1,283

Hi Loganahan,

I found the same link 3 days before and that solved my problem . Thank u . I awarded points to u .

Regards,

S.Sivakumar

0 Kudos
1,283

You can try the function : SD_CONDITION_TIME_INTERVAL_GET

This func reture condition records and types:

      KOMG-VKORG = P_VKORG.
      KOMG-VTWEG = P_VTWEG.
      KOMG-MATNR = P_MATNR.
      KOMG-VKGRP = P_VKGRP.
      CALL FUNCTION 'SD_CONDITION_TIME_INTERVAL_GET'
        EXPORTING
          KOMG_I      = KOMG
          DATVO_I     = S_DATAB-LOW
          DATBI_I     = S_DATAB-HIGH
        TABLES
          PERIODS_TAB = GT_PREDATE
          KSCHL_TAB   = GT_TKSCH
        EXCEPTIONS
          OTHERS      = 1.
      READ TABLE GT_PREDATE INDEX 1.
      CHECK SY-SUBRC = 0.
      LOOP AT GT_PREDATE.
        SELECT SINGLE H~ERNAM H~ERDAT P~KBETR
            INTO (GT_ITAB-ERNAM, GT_ITAB-ERDAT,GT_ITAB-KBETR)
            FROM KONH AS H
            JOIN KONP AS P
              ON P~KNUMH = H~KNUMH
           WHERE H~KNUMH = GT_PREDATE-KNUMH.
        APPEND GT_ITAB.
      ENDLOOP.

Edited by: Song Huang on Jan 20, 2010 11:46 AM

Former Member
0 Kudos
1,283

Hello,

Do you have a copy of this html page please (or the sample abap code) :

http://sample-code-abap.blogspot.com/2008/11/reterieve-sales-pricing-condition.html]


This html page don't exist now.

I have the same needs like you.


Thanks in advance.

0 Kudos
1,283

0 Kudos
1,283

Hello Raymond,

Thanks for your answer, but in fact, it's not my need.

Effectively, my need is to get SD price (NETP like in VA01) for a Sales org, a customer and materials and quantities for an real time WS interface.

I have using BAPI_SALESORDER_SIMULATE and SD_SALESDOCUMENT_CREATE, but not much faster.

So, my idea is to use pricing like it's done in VA01 (function PRICING i think, SCN : https://scn.sap.com/thread/1059574).

But the example of abap code of the html page of this message sounds interesting for me.

Best regards.

0 Kudos
1,283