Retrieve the Purchase Order Condition Records Table

Hallo!
I have found this code right here:
http://www.sap-basis-abap.com/sapab025.htm
It is very useful particular for purposes which I need. Please can somebody
try to fix the error to get it working. There is an internal table missing.
Regards
Ilhan
Retrieve the Purchase Order Condition Records Table
select * from ekko.
       select * from konv where knumv = ekko-knumv
           "Get all the condition records for the purchase order
       endselect.
endselect.
* Get the info record conditions record
* First declare the record structure for the key
data: begin of int_konp,
             txt1(5),
             lifnr(5),
             matnr(18),
             txt2(4),
             txt3(1),
        end of int_konp.
clear: konh, konp, int_konp.
* data for the record key konh-vakey
int_konp-txt1    = '00000'.
int_konp-lifnr    = ekko-lifnr+5(5).
int_konp-matnr = ekpo-matnr(18).
int_konp-txt2    = 'ALL'.
int_konp-werks = ekpo-werks.
int_konp-txt3    = '0'.
select * from konh where      kschl = 'PB00'            "Conditions (Header)
                                     and datab => p_datum.       "valid from date
      if konh-vakey = int_konp.                                  "Conditions (Item)
             select single * from konp where knumh = konh-knumh.
             continue.
      endif.
endselect.

Hi flora
Just get through the sequence .
see the table fields ...
1. From EKKO table take an entry which is having pricing conditions.
Now in the fields list check out for field EKKO-KNUMV(document condition number).
2.Take this condition number and now goto table KONV.
Give the document condition number in the field  KONV-KNUMV and execute .
This will lead to a list of document condition numbers and some other fields .
3.Now check for field KONV-KNUMH ,KONV-KAWRT(quantity) and note the value KONV-KWERT  .
(Remember this is at header level).
This is ur condition record number.
**comments
Now from document condition number we got the condition record number (KNUMH).
4. now since u want the item level tax procedure go to table KONP and give the condition record number and execute .
This will give u a list of details .
Now concentrate on KONV-KAWRT (scale quantity) KONP-KBETR(rate) as this table will store “Pricing  per UNIT “ so product of these two will give u the total pricing tax, for a particular condition type say PR00  .
For that particular condition item .
Check the pricing procedure .
See t-code VK13 and check the pricing procedure .
From me23 check the same PO num select the item and check the pricing conditions applicable .
Select a particular pricing and goto condition->analysis->analysis pricing  ,
Better take help of a SD functional consultant in the process.
regards,
vijay.

Similar Messages

  • Is there any function module to get the purchase order conditions from EONP

    Hi,
    I want to get the EONP and EONH table details for the purchase orders with the help of function module. Can anyone tell me any function module name which would give me those details.
    Thanks,
    Atanu

    Hi
    Check with BAPI function module BAPI_PO_GETDETAIL and BAPI_PO_GETDETAIL1.
    Regards
    Srilaxmi

  • Retrieve the Purchase Order *TAX* Condition Records

    Hi,
    Tcode : ME23n
    Area  : Item
    Tab   : Invoice Tab in Item
    On clicking the button <b>taxes</b>  I can see different condition attached in the tax code. These taxes are available in KONH KONP table and the related Axxx table, (in my case A003 table).
    My Question is:
    2) How to find  Cond.record no. ( KONH-KNUMH) on the basis of EBELn that is PO number. I am able to see Cond.record no. from konv table for all the conditions applied on the item directly, but can not see for tax realted conditions, though on debugging I got the KONH-KNUMH and can see the realted data.
    <b>But how to find KONH-KNUMH on the basis of Ebeln</b>
    1) KONP table has KBETR but not kwert, so how can i find the <b>Condition Value</b>
    Let me know if there is any gaps in my problem statement.

    Hi flora
    Just get through the sequence .
    see the table fields ...
    1. From EKKO table take an entry which is having pricing conditions.
    Now in the fields list check out for field EKKO-KNUMV(document condition number).
    2.Take this condition number and now goto table KONV.
    Give the document condition number in the field  KONV-KNUMV and execute .
    This will lead to a list of document condition numbers and some other fields .
    3.Now check for field KONV-KNUMH ,KONV-KAWRT(quantity) and note the value KONV-KWERT  .
    (Remember this is at header level).
    This is ur condition record number.
    **comments
    Now from document condition number we got the condition record number (KNUMH).
    4. now since u want the item level tax procedure go to table KONP and give the condition record number and execute .
    This will give u a list of details .
    Now concentrate on KONV-KAWRT (scale quantity) KONP-KBETR(rate) as this table will store “Pricing  per UNIT “ so product of these two will give u the total pricing tax, for a particular condition type say PR00  .
    For that particular condition item .
    Check the pricing procedure .
    See t-code VK13 and check the pricing procedure .
    From me23 check the same PO num select the item and check the pricing conditions applicable .
    Select a particular pricing and goto condition->analysis->analysis pricing  ,
    Better take help of a SD functional consultant in the process.
    regards,
    vijay.

  • Purchase Order - COndition Record

    Hi
    I like to know (IMG Settings) where we have to maintain Condition Records for Purchase order ?
    Please help me on this issue
    Thanks & Regards,
    senthil.

    Steps for MM Pricing Procedures
    Can anyone please help me on the Pricing Procedures?
    I have read it many times but fail to understand.
    Pricing Procedure :
    In MM module, pricing procedure is used during RFQ and PO creation. Total value of material based on all addition and subtraction like discount, surcharge, tax, freight, etc. In this we are defining pricing procedure and linking to vendor and purchase department through the virtual schemas. 
    Following steps for pricing procedure as,
    1. Define conditions.
    2. Define pricing procedure.
    3. Define virtual purchase organization and vendor.
    4. Info Record.
    Customization for Pricing Procedure : 
    1. Definition of Conditions :
    /NMEK0-condition typeu2026condition types- definition (define for basic price, net price, discount, surcharge, tax etc.)
    2. Defining pricing procedure :
    /NMEK0- calculation schema-calculation schemasu2014New entries (Define procedure and put the conditions like formula so that final price will be net price / total value as per company requirement)
    3. Linking pricing procedure to independent condition types.
    /NMEK0-condition typeu2026condition types- definition for position for defined conditions (Enter the defined pricing procedure in the each independent conditions u201CPricing Procedureu201D box)
    4. Defining Schema group for Vendor :
    /NMEK0- calculation schema-schema groupsu2014vendoru2014New Entries.
    5. Defining Schema group for Purchase Organization--- New entries.
    /NMEK0- calculation schema- schema groups---- purchasing organization--- new entries.
    6. Linking Virtual Purchase Organization to actual Purchase Organization.
    /NMEK0- calculation schema- schema groups----- Assign P.Org. (in actual P.Org, enter virtual P.Org)
    7. Linking Pricing procedure to virtual P.Org and virtual vendor :
    /NMEK0- calculation schema- Determine Schema--- -Standard --- New entries (Enter virtual schema and P.Org. along with pricing procedure)
    8. Linking virtual vendor to actual vendor-- /NXK02   then  enter schema group vendor in Purchasing Data )
    9. Info Records (/NME11)---- click on u201CPurch. Org. data1u201D and enter condition types and pricing procedure
    Anand
    What are the steps in pricing determination in MM? Condition, Access sequence and schema.
    In the SAP MM Pricing is more important. Just yesterday I have completed the Pricing as I am doing the SAPMM now. I can give some light on this Topic, not 100%. After 2 days definitely some more I can share.
    The Basic thing is Condition Technique. In which there are
    1. Access Sequence 2. Condition Record 3. Condition Type 4. Condition Table.
    A Access Sequence access a Condition Record of a Condition Type in a Condition Table is a  Condition Technique.This is a simple logic
    Here the Condition Type is very important like PB00, PBXX,RA01 etc.
    In the background every Condition Type has its own defition means the purpose of the Condition Type  like, is it for Pricing or Percentage, Quntity base, Accrual Feilds etc is to be defined to work this functions.
    Normally we use the existing ones without any risk. But some cases, we have to Create a New Condition Types as per the organisation requirement.
    The Pricing Schema is useful to minimise condition types while mention prices for Vendor on the basis of Pricing Schema which we defined according to organisation requirement.
    The Pricing Schema means the calculations procedure of Condition Type.
    Ex.  RA01 - Discoount % is caclulated on PB00 - Gross Price  means
    RA01 is based on PB00  like that we have to define in the Pricing Schema
    which makes easy to use in realtime. 
    Here PB00 has the Access Sequence - 0002. 
    But RA01 does not have the Access Sequence.Why because it is a dependent on PB00. But both are Condition Types.
    In the system, by default some standard  Scheme will be there at Vendor Schema Group in the Vendor Master Screen means the standard one is assigned which is very lengthy which may fullfil our requirement. But some cases which may not fullfil our requirement, in such we have to define.
    For the configuration, I may not able to explain properly through here but will give some Idea.
    Configuration: SPRO-IMG-Material Management- Purchasing- Conditions-Define Price Deternmination Process
    1. Define Access Sequence
    2. Define Condition Type
    3. Defince Calculation Schema:- Here you have to define the Schema 
    Define Schema group
    1. Define Schema Group vendor
    2. Define Pricing Schema group
    3.  Schema group for Purchase Organisation
    4. Assign Schema group to Purchase Organisation 
    Define Schema determination
    1.define calculation schema for Standard purchase organisation
    After completion of the Schema Group, we have to assign it to Vendors.
    Then whenever we use any transaction with this Vendor, the concerned  Schema will work as configured by us.
    I think this will help you. Actually the Pricing is a vast. Becuase each Condition have its own importance and each Access Sequence have its own importance. So  you need not bother about this. First you learn how to define the Calculation Schema through the above.
    Here we can create many Calculation Schemas which can assign one schema to Local vendors
    another schema to out side vendor one more schema to foreign vendors like that we can classify.

  • Sales & purchase output condition records

    Hi ,
    I am asked to develop a query for the sales output condition records and the purchase output condition records.
    Can someone help me with the details like tables and the selection I can make to test them ?
    Please help me with the transaction code for the same too.
    Thanks in advance.

    You can use transaction NACE to display condition records.
    Execute NACE > Select Application V1 - Sales from list > then select button 'Condition Records' > select output > select key conbination > then report will occur with Slection.
    You can do the same steps for Application EF - Purchase Order
    If you wants to find out tables you can go to respective reports and find tables given in program under statement TABLE
    For sales there are tables for different key combinations like B001, B915, B520, B511 etc. for Purchase Order tables like B025, B504, B027 etc basically tables starts with B*
    I am not sure why you need to develope query because these reports gives list of condition records maintained for particular output.
    Hope it helps !!

  • Extracting Purchase Order condition data

    Hi All,
    I have requirement where as i need to pull the purchase order condition data, but i haven't found any datasources regarding that, can somebody guide me how to pull that data to BW.
    thanks
    Neel

    Hi Neel,
    Create view of EKKO ( Purchasing header ) and KONV  (Conditions (Transaction Data)) and link it on EKKO-KNUMV to KONV-KNUMV.
    Create Generic Extractor based on the View.
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

  • Purchase order Condition control tab?

    Hi,
    Here in the purchase order condition control tab I need to get Price Date and Price date category. Presently they are not appearing in my purchase orders. When I go to screen layout, I am not able to get those fields to configure.
    Could please anybody help me urgently?
    Thanks,
    Bhairav

    Hi
    GOTO----> OLME--> PO -> Define Screenlay out at Document level -> There Choose your Field Selection ( NBF  and ME21N)... and go into to details--> And select the field selection group  Quantity and Price and Double Click--> There you choose the field  <b>PRICING DATE CONTROL</b>    and  Check it as a Required Entry or Optional Entry and save . <b>DO IT FOR BOTH NBF and ME21N FIELD SELECTION.</b>
    Now when ever you make PO in ME21N.....You will get Pricing Date Category and  Price Date Fields in  PO-> Item Details---> Condition Control Tab.
    Reward if useful
    Regards
    S.Baskaran
    Message was edited by:
            baskaran srinivasan

  • Changing the Condition type Text in the Purchase Order

    Hi SAP,
    Hi,
    We have a requirement where by we need to change the Description of the condition type text in the Purchase order.
    The condition type is a entered at item level.
    Normally this description comes from the Condition type Definiton i.e., T685T-VTEXT.
    can any one of you suggest a User exit or a method where by we can change this text at PO.
    Has any one of you came across such situation before. if so please provide me with your inputs.
    Thanks
    Best Regards
    ShitalD
    Edited by: Shital Deshpande on Feb 21, 2010 1:07 PM

    Hi,
    I think it is a config setting..Please check with your functioal consultant regarding the same.. I won't suggest to change the standard SAP table T685T but you can keep it as last option .
    From SPRO you can follow the below path
    Sales and Distribution->Basic Functions -> Pricing > Pricing Control -> Define condition types.
    Regards,
    Nagaraj

  • Table name for WBS Element & Purchase Order Conditions

    Dear All,
    I need a table which stores WBS Elemnt No. & Purchase Order Conditions ( Like Excise Duty, Sales Tax, Packing & Forwarding etc.)
    Thanks & Regards,
    Sandeep N.Theurkar

    Hi ,
    It is not possible to get all this information from one table. But you can get the data by writing ABAP , or by creating a query.
    As Amit posted WBS table is PRPS.
    You can get the account assignment of a purchase order (whether it is network or WBS element) from table :EKKN.
    Pass PO number into EKKN and get the following:
    WBS No - PS PSP PNR
    Network -NPLNR
    Activity - AUFPL
    Hope all the postings together will provide an integrated picture.
    Regards
    Muraleedharan.R

  • User Exit / BAdI to update the pricing conditions of the Purchase Order

    Hello SAPients,
    This is my requirement:
    "Copy the Pricing Conditions from the Shipment Cost Document (VI01 / VI02) to the automatically generated Purchase Order".
    I'm using the enhancement V54U0002 (Function Module EXIT_SAPLV54U_002) to EXPORT  the values of the Pricing Conditions to memory and I have used the enhancement MM06E005 ( FM EXIT_SAPMM06E_006, 007, 012, 013, 014, 016, and 017) to IMPORT the values from memory and store them in TKOMV. But, when the PO is generated the values don't stay, they are always changed with the standard PBXX pricing conditions.
    My question is: Does anyone know the User Exit / BAdI that I can use to change the Pricing Conditions of the Purchase Order?
    <<removed_by_moderator>>
    Thanks!
    Edited by: Vijay Babu Dudla on Jan 14, 2009 11:08 PM

    >
    kartik tarla wrote:
    > check this badi
    > ME_PROCESS_PO_CUST
    >
    > and the following user exit
    > Goto-> include RV61AFZA then search for
    > USEREXIT_PRICING_RULE see if its helpful to u.
    Hello Kartik / SAPients,
    I tried with ME_PROCESS_PO_CUST but didn't work. The system doesn't execute that code. Any other idea would be greatly appreciated.
    Thanks.

  • Need to turn off Purchase Info records in the purchase order

    Is there a way to turn off the Purchase Info records from appearing in the purchase orders? or atleast not update the Info records?

    Kevin,
    Please follow the below path in SPRO:
    Material management-----Purchasing---environment Data-----Define default values for buyers
    Here Remove the Info Record Update
    Regards,
    Manish

  • Need to find how to relate the purchase order table with account assignment

    i need to reterieve the account assignment from the table bbp_pdacc, what is field or any tables that is between BBP_PDACC and Purchase order number or the purchase order items. I am working on the SRM system

    Jacques-Antoine,
    You can't directly translate a repeating node or element (such as an Item or a Project Task from the Accounting Coding Block of an Item) to a singular node or element.
    The reason is that, though your use case may have the elements assumed to be the same for all items, this isn't necessarily the case, so ByDesign won't assume that you can use that kind of logic.
    The simplest approach would be to do an On-Save at the Root node of the Purchase Order along the following lines:
    this.projecttaskpo = this.Item.GetLast().ItemAccountingCodingBlockDistribution.AccountingCodingBlockAssignment.ProjectTaskKey.TaskID;
    i wouldn't actually recommend this code.
    You'd need validations for IsInitial, IsSet, and those kinds of functions.
    i'd at least use some foreach loop to check that all the accounting coding blocks were for the same task, raise warnings if they weren't, etc.

  • Add Z conditions in the Purchase Order

    Hi Gurus,
    We have created a Z condition in the RM0000 pricing procedure and we have addded a requirement and Formula for the same.
    If the requirement matches, then Formula is executed for assigning value in this condition. Now, when I try to create Purchase Orders using transaction ME59n, it works fine. Condition is added in the purchase orders that match the requirement.
    Now, when I try to create the purchase order through a background job, condition is not getting added in it. I debugged the background job, and requirement is satisfied for the Purchase Order.
    Can anyone help me in this issue.
    Thanks in Advance,
    Amit Rai

    I have scheduled a job using transaction SM36, that runs the program RM06BB30 (transaction ME59n) in the background.
    Regards,
    Amit

  • Change the Purchase Order : Item - Conditions value

    Hi,
    How to change the Purchase Order : Item - Conditions value.
    In my PO, Item conditions shows the SKTO - Cash Discount value is 0. I want to change the Discount value 10.
    How can i change it??

    Hi,
    Goto the Transaction code MN05 and give the CONDITION TYPE SKTO and change the value
    MN05 is the Transaction code for Purchase order  condition types.
    Please check and revert back if you need more details.
    regards,
    santosh

  • Table containeing both the purchase order number and the sales order number

    hi all!!!
    what is table that contains both the purchase order number and sales order number corresponding to that purchase order number.
    Moderator message: please search before posting.
    Edited by: Thomas Zloch on Jan 31, 2012

    Hi Sunny,
    Yes they are same. You will be creating a purchase order in ME21n. After creating purchase order you will shown a number for that order.
    Reward points if useful.
    Thanks,
    Swamy Kunche

Maybe you are looking for

  • Need help urgent!! regarding Database connection failure

    Hi Experts, when i try to login sqlplus...i came across with this error 'TNS adaptor error' as i try to restart the services i dont have the sufficient privilages to start. Mean while, i have another database in my another system. i know the port num

  • I downloaded to iTunes using Lossless,can I burn cd's using another format?

    I've downloaded all my music to iTunes using Lossless. What I want to know is,can I burn cd's using another format so I can get more music on to a cd for my car stereo.I would like to keep the Lossless format for my home stereo use. All help is welco

  • Sorry, having real trouble with this...

    import java.lang.*; public class Alphabet_frequency {      public static void main(String[] args) { int length_of_string;           length_of_string = length("java");           System.out.println(length_of_string); and javac tells me it can't find th

  • Reading Controller Context Data in "Z" view of ERP Quotation UI

    Hi We are on CRM 2007 . I could not find an appropriate forum area for CRM 2007 , hence posting here. We have a Z table that stores some additional information related to Quotations and Orders in CRM itself and passes it on to ERP when certain condit

  • Does the client need to install Contribute to edit their website?

    I have recently started out in the website design world (feeling VERY much like Alice!), and am trying to get my head around CMS. Starting to explore Contribute/Joomla/Wordpress and although I  understand the manipulating templates/coding part of thi