Application Development 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: 

Pulling of Pricing using SALES DOCUMENT and CONTRACT

Former Member
0 Kudos

Hi,

Please help me the process of bringing price using sales document contract.

We can do using Customer, please explain similar using Contract.

Krishna.

3 REPLIES 3

Former Member
0 Kudos

Hi Krishna,

What exactly is your requirement? Are you trying to read pricing data of the contract or are you trying to simulate the pricing in a contract?

I am not sure I understood your statement that you can do this by cutomer. Please explain.

Srinivas

0 Kudos

Hi Srinivas,

I want the Sales document pricing.

For this i need the procedure of bringing the data.

0 Kudos

Here is a sample code to get the conditions in all its details. This one is for header conditions, but if you have them at item level, you need to do the same but give an item number instead of '000000' that I have in here.


DATA: comm_head_i LIKE komk,
      comm_head_e LIKE komk,
      i_skomv     LIKE komv OCCURS 0 WITH HEADER LINE,
      i_tkomv     LIKE komv OCCURS 0 WITH HEADER LINE,
      i_skomp     LIKE komp OCCURS 0 WITH HEADER LINE,
      i_skonh     LIKE konh OCCURS 0 WITH HEADER LINE,
      i_skonp     LIKE konp OCCURS 0 WITH HEADER LINE,
      i_skonm     LIKE konm OCCURS 0 WITH HEADER LINE,
      i_skonw     LIKE konw OCCURS 0 WITH HEADER LINE.
 
  CALL FUNCTION 'SD_SALES_PRICING_INFORMATION'
   EXPORTING
*    I_POSNR          = '000000'
     i_read_doc       = 'X'
     i_vbeln          = p_vbeln
   IMPORTING
     e_komk           = comm_head_i
*    E_KOMP           =
*  TABLES
*    FXKONV           =
*    FTKOMV           =
            .
 
  CALL FUNCTION 'PRICING_GET_CONDITIONS'
       EXPORTING
            comm_head_i     = comm_head_i
            read_conditions = 'X'
       IMPORTING
            comm_head_e     = comm_head_e
       TABLES
            skomv           = i_skomv
            tkomv           = i_tkomv
            skomp           = i_skomp
            skonh           = i_skonh
            skonp           = i_skonp
            skonm           = i_skonm
            skonw           = i_skonw.

Regards,

Srinivas