Loading program for pricing conditions

Hi,
Can anyone guide me in writing the code for Loading Condition records in Vk11, either BAPI or BDC.
<<removed by moderator>>
Thank you

Hi
check this code
  loop at it_werks into wa_werks.
    clear v_index.
    perform bdc_dynpro      using 'SAPMV13A' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV13A-KSCHL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RV13A-KSCHL'
                                  'ZPUP'.
    perform bdc_dynpro      using 'SAPMV13A' '1911'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'KOMG-WERKS'
                                   wa_werks-werks.
    v_index = 1.
    loop at it_bdcdata into wa_bdcdata where werks = wa_werks-werks.
      if v_index > 15.
        perform bdc_dynpro      using 'SAPMV13A' '1911'.
        perform bdc_field using 'BDC_OKCODE' '=P+'.
        v_index = 2.
      endif.
      clear v_string.
      concatenate 'KOMG-MATNR(' v_index ')' into v_string.
      perform bdc_field       using  v_string
                                     wa_bdcdata-matnr.
      clear v_string.
      concatenate 'KONP-KBETR(' v_index ')' into v_string.
      perform bdc_field       using  v_string
                                     wa_bdcdata-kbetr.
      clear v_string.
      concatenate 'KONP-KONWA(' v_index ')' into v_string.
      perform bdc_field       using  v_string
                                     wa_bdcdata-konwa.
      clear v_string.
      concatenate 'KONP-KPEIN(' v_index ')' into v_string.
      perform bdc_field       using  v_string
                                     wa_bdcdata-kpein.
      clear v_string.
      concatenate 'RV13A-DATAB(' v_index ')' into v_string.
      perform bdc_field       using  v_string
                                     wa_bdcdata-datab.
      clear v_string.
      concatenate 'RV13A-DATBI(' v_index ')' into v_string.
      perform bdc_field       using  v_string
                                     wa_bdcdata-datbi.
      clear v_string.
      v_index = v_index + 1.
    endloop.
    perform bdc_field       using 'BDC_OKCODE'
                                '=SICH'.
    perform bdc_transaction using 'VK11'.
  endloop.
form bdc_field using fnam type bdcdata-fnam
                     fval type any.
  if fval <> ''.
    clear wa_bdc.
    wa_bdc-fnam = fnam.
    wa_bdc-fval = fval.
    append wa_bdc to it_bdc.
  endif.
endform.                    "BDC_FIELD
form bdc_transaction using tcode type c.
REFRESH it_messtab.
  call transaction tcode using it_bdc
                   mode  c_ctumode
                   update c_cupdate.
  commit work and wait.
  refresh it_bdc[].
endform.                    "bdc_transaction
redards
Rao

Similar Messages

  • Mandatory Fields for IDOC ORDERS01 for Pricing Condition EDI1 to trigger

    Hi ,
    I'm Testing an Inbound ORDRSP using we 19  for Pricing Conditions EDI1. What are the Mandatory Fields for IDOC ORDERS01
    Thanks

    hello,
    I think it's better to execute VA01 to create a sales order; in that way you should have an idea of mandatory fields.
    Thanks.

  • Receive "The page cannot be displayed" for Pricing Conditions

    To all,
    I receive the message "The page cannot be displayed" for Pricing Conditions when I select the "Accesses" button.  I then received the message "HTML field saved to C:\temp\CRM_IPC.html". 
    This only seems to happen when using the pricing in the service order confirmation.

    Hi Bob,
    R u using IPC for pricing, if yes just check the connections to the IPC server.
    The error is because of the IPC connection not getting established.
    <b>Please reward points if it helps.</b>
    Regards,
    Amit Mishra

  • BAPI or BDC Program For pricing VK11

    Hi All,
       Is there any standard program for pricing VK11 using batch input or send me some coding on Bapi or BDC.
    Thanks in Advance.
    Arun.
    Edited by: Arun Kumaran on Dec 24, 2009 11:40 AM

    Hi,
    You can go for BAPI "BAPI_PRICES_CONDITIONS " instead of a BDC.. you could have search in forums first for these type of questions any ways
    See the link below..
    BDC (VK11)
    regards,
    NZR

  • Function module to change the value for pricing condition type

    Hello experts,
    I want to change the value for pricing condition type for an item in the transaction CRMD_ORDER.
    I used many function modules but none are working.
    Please kindly suggest a function module that will change the value for a condition type .
    I have used the following function module but its not working, please correct the coding if anything needs to be changed or added. Please help me .
    Thank you.
    CLEAR PRCD_COND.
         SELECT SINGLE * FROM PRCD_COND WHERE KPOSN = WA_ORDERADM_I-GUID AND
                                              KSCHL = COND_TY.
      IF SY-SUBRC = 0.
    *    MOVE-CORRESPONDING PRCD_COND TO L_COND_CHG.
    *    CLEAR L_COND_CHG-KBETR.
        L_COND_CHG-STUNR = PRCD_COND-STUNR.
        L_COND_CHG-KBETR = COND_PRC.
    *    L_COND_CHG-KSCHL = COND_TY.
        INSERT L_COND_CHG INTO TABLE T_COND_CHG.
    L_HEAD_GUID = CRMD_ORDERADM_H-GUID.
    L_ITEM_GUID = WA_ORDERADM_I-GUID.
    INSERT L_HEAD_GUID INTO TABLE HEAD_GUID.
    INSERT L_ITEM_GUID INTO TABLE ITEM_GUID.
        CALL FUNCTION 'CRM_ORDER_READ'
         EXPORTING
           IT_HEADER_GUID                    = HEAD_GUID
           IT_ITEM_GUID                      = ITEM_GUID
         IMPORTING
           ET_ORDERADM_H                     = LT_ORDERADM_H
           ET_ORDERADM_I                     = LT_ORDERADM_I
           ET_PRIDOC                         = IT_PRIDOC_RD
           ET_DOC_FLOW                       = T_DOC_FLOW
    *     CHANGING
    *       CV_LOG_HANDLE                     =
    *     EXCEPTIONS
    *       DOCUMENT_NOT_FOUND                = 1
    *       ERROR_OCCURRED                    = 2
    *       DOCUMENT_LOCKED                   = 3
    *       NO_CHANGE_AUTHORITY               = 4
    *       NO_DISPLAY_AUTHORITY              = 5
    *       NO_CHANGE_ALLOWED                 = 6
    *       OTHERS                            = 7
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRI_COND.
    INSERT L_PRI_COND INTO TABLE PRI_COND.
    LOOP AT IT_PRIDOC_RD INTO LS_PRIDOC_RD.
    MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRIDOC_CHG.
    L_PRIDOC_CHG-PRIC_COND = PRI_COND.
    L_PRIDOC_CHG-REF_GUID = LS_PRIDOC_RD-GUID.
    L_PRIDOC_CHG-COND_CHANGE = T_COND_CHG.
    INSERT L_PRIDOC_CHG INTO TABLE PRIDOC_CHG.
    ENDLOOP.
    LOOP AT LT_ORDERADM_H INTO LS_ORDERADM_H .
    MOVE-CORRESPONDING LS_ORDERADM_H TO L_HEADER.
    INSERT L_HEADER INTO TABLE HEADER.
    ENDLOOP.
    LOOP AT LT_ORDERADM_I INTO LS_ORDERADM_I.
    MOVE-CORRESPONDING LS_ORDERADM_I TO L_ITEM.
    INSERT L_ITEM INTO TABLE ITEM.
    ENDLOOP.
    L_FIELD-FIELDNAME = 'STUNR'.
    INSERT L_FIELD INTO TABLE FIELD.
    L_FIELD-FIELDNAME = 'KBETR'.
    L_FIELD-CHANGEABLE = 'X'.
    INSERT L_FIELD INTO TABLE FIELD.
    L_INPUT-FIELD_NAMES = FIELD.
    L_INPUT-REF_KIND = 'E'.
    L_INPUT-REF_GUID = LS_PRIDOC_RD-GUID.
    L_INPUT-OBJECTNAME = 'PRIDOC'.
    INSERT L_INPUT INTO TABLE INPUT.
        CALL FUNCTION 'CRM_ORDER_MAINTAIN'
         EXPORTING
           IT_PRIDOC                     = PRIDOC_CHG
         IMPORTING
           ET_EXCEPTION                  = EXCEPT
         CHANGING
           CT_INPUT_FIELDS               = INPUT.
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    REFRESH EXCEPT.
    CALL FUNCTION 'CRM_ORDER_SAVE'
      EXPORTING
        IT_OBJECTS_TO_SAVE         = HEAD_GUID
    *   IV_UPDATE_TASK_LOCAL       = FALSE
    *   IV_SAVE_FRAME_LOG          = FALSE
    *   IV_NO_BDOC_SEND            = FALSE
    *   IT_ACTIVE_SWITCH           =
    IMPORTING
       ET_SAVED_OBJECTS           = SAVED
       ET_EXCEPTION               = EXCEPT
       ET_OBJECTS_NOT_SAVED       = UNSAVED
    * CHANGING
    *   CV_LOG_HANDLE              =
    * EXCEPTIONS
    *   DOCUMENT_NOT_SAVED         = 1
    *   OTHERS                     = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK AND WAIT.

    Hi,,
    To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to Update with immediate start
    Alternatively u can use this function module.
    CRM_STATUS_DATA_SAVE_DB
    BAPI_CUSTOMERCRM_CHANGE (If u wish to use a bapi for this).
    Also , Let me know what error you got when implementing other function module.Does the function module didnt return any error but still the value is not changed for pricing condition type?

  • Automatic PO adjustment for pricing condition changes sap

    Hello SAP users,
    How to prevent automatic PO adjustment for pricing condition changes to purchase order items that are marked for deletion. Please respond.
    Thanks

    Hi,
    Check the settings in below configuration:
    SPRO>MM>Purchasings>Conditions>Automatic document adjustment-->Control doc. adjustment.
    SAM

  • Standard report for pricing condition.

    Hello everyone,
    Is there any standard report to see the price maintain in particular condition record in VK11 with different key combination. can anybody tell me in which table it is maintain.
    Regards,
    Naveed Ansari.

    Hi
    The Standard report for Pricing condition is V/LD.
    You can get datas like Material prices, Individual prices, discounts & surcharge prices, Material list/Material pricing Group with & without scal display, Price list types with & without scale display.
    V/LB   SAPMV14A       Change Pricing Report
    V/LC   SAPMV14A       Display Pricing Report
    V/LD   SAPMV14A       Execute pricing report
    V/LE   RV14ALLE       Generate pricing reports
    Award if useful to you
    Thank you
    Edited by: narendran vajravelu on Oct 14, 2008 7:23 AM
    Edited by: narendran vajravelu on Oct 14, 2008 7:25 AM

  • What is a "Load Program" for material master?

    Hi All,
    What is a "Load Program" for the Material master? Is this the Mass Maintainence MM17? Can a Material be extended to all VIEWs + all Plants in one shot via MM17?
    What are the steps using MM17?
    Thanks in advance

    Yes, There is a Program to Upload Material Master Ie : RMDATIND, RMDATGEN
    Using the above Program you can Upload Material Master. And You can Also use Uploading Tools like LSMW / BDC etc.
    MM17 is For MAss Maintenance. Suppose If you want to Update Purchase Group / Purchase Value Key / MRP Controller / Etc... to 1000 Materials Using this MM17 you can Update in Bulk.
    For Extending Views You can Use MM50 with LSMW if Material is Bulk.
    Regards,
    Ashok

  • Load Program for Export Licenses

    Does anyone know if there is a load program for export licenses or is the only way to do it is to use transaction /sapsll/lclic01?

    Hi,
    As far as I know you have to create them all one, by one manually by using the transaction. Upload is not possible.
    Regards,
    Marc

  • Maintain Excise defaults for pricing condition in TAXINN procedure

    Hi all,
    I post this message as I'm customizing CIN part for creation and calculation of excise invoice. I have read lot of post but i'm a bit confused about right procedure to adopt. I try to explain:
    I'm doing a stardard sales flow (sales order -> delivery -> commercial invoice -> excise invoice) and the only method I have found to flow excise values in excise invoice is to insert pricing conditions in India -> Basic settings -> Determination of excise duty -> Maintain excise defaults for TAXINN procedure.
    In this table I have insert pricing conditions I use in my SD pricing schemas (in this case I use a copy of JINFAC). I have insert pricing conditions corresponding to BED % and BED total, and also CESS % and total and S&HCESS % and total.
    If I remove pricing condition from this table, corresponing value in excise invoice, when I create it, become 0.
    My dubt is if is correct to populate with table to flow excise values in excise invoice. I ask it as I have read differents approach and differents customizing settings applied in similar situations. In particular, I have found documentation in which, for TAXINN procedure, is recommended to leave blank "excise defaults" (with exception of CVD condition). What is the right method to use?
    There is one right procedure or, as it seems reading posts, someone have to do his "proper CIN customizing" based on results that have to obtain?
    Thanks in advance for any contribute that can help to clarify this situation.
    Regards
    Gianpaolo

    Hi all,
    I think to have found solution to my dubt.
    If I use "condition based Excise determination" I have to insert records with pricing schema (if is a copy of standard J* schema, like ZINFAC that is a copy of JINFAC) and excise pricing conditions in the transaction below:
    India -> Basic settings -> Determination of excise duty -> Condition-based Excise determination -> Classify condition type
    To determine value in excise invoice seems that program check before table in transaction described before. If in this table don't find records for pricing schema-excise pricing condition the program check also table in transaction below:
    India -> Basic settings -> Determination of excise duty -> Maintain excise defaults
    If during this second check find excise pricing conditions insert, can determine equally the values of excise in excise invoice.
    This is the result of my checks. I hope this could be useful for other people with similar problem.

  • Authorisation for pricing conditions in sales order

    Hi,
    This could be a tipical requirement. he requirement is a sfollows:
    Some users should not be allowed to enter / change some of the pricing conditions (manual) in the create / change mode of sales order (VA01/VA02). But they should be allowed to enter/change couple of other condtion types (manually).
    The other requirement is to disable the functionality of adding new condtions type through dropdown in the item pricing condition screen in VA01/VA02. The pricing update button also should be in a disabled mode for some users.
    Please advice me whether this can be achieved through some user exits or Basis authorisation?
    Regards,
    Sam

    Hi,
    Yes this can be done. If you are on EP4 you cna use the Badi PRICING_AUTHORITY_CHECK_UI to disallow users to use certain conditions.
    If you are not on EP4 you can still use the exit userexit_field_modification in program LV69AFZZ to check against authorisation.
    Choose the one that best suits your needs.
    Regards,
    Naveen

  • Users autorizations for pricing condition in sales order

    HI all,
    Can anyone tell me if there is any posibilities to control users autorization for certain pricing condition in a sales order? For example: User A can add/edit/display K007 but user B can only display K007 for a new sales order.
    Thanks in advance
    GeorgeR

    Hi
    Please check this link on WIKi
    http://wiki.sdn.sap.com/wiki/display/ERPLO/UserexitforRestrictingUserModifyingConditiontypeinSales+Order
    regards
    Prashanth

  • Custom Report for Pricing Conditions Master

    Hi Everyone,
    We know that Pricing Conditions Master Data is stored in KONH and KONP. If a condition is populated in a document then transactional data can be obtained from KONV with 'condition record number' as the foreign key.
    The requirement is to design a custom report that lists for order items the pricing conditions (basic price) that are not populated in the sales orders. The pricing is not carried out in these orders as these are not chargeable orders, but the user wishes to know in an existing custom report the price from the conditon master data.
    The idea is that the sales order has no pricing calculated but how much Sales Price the material has as per the price condition master record.This can be known by the custom report.
    Visiting the standard prcing preports like V/LD is laborious for the user and wishes to add a column in an exisitng report of order item list for the price of each order item.
    The challenge here is that in KONH there is no field for material exlusively. It gets stored as a text and hence fetching data from this table for a given material seems difficult. Let us remember that we are not refering to any sales order while accessing data from KONH or KONP.
    Any thoughts / views on how this can be achieved are most welcome.
    Thanks,
    Hemant

    You will have to work on exact condition table in access sequence instead of KONH. For eg: If condition table in access sequence is 601 then you will have fetch the condition number KNUMH from table A601 (prefix A before the condition table number). With the KNUMH you can get the condition value from KONP.
    Regards,
    GSL.

  • Changing the Sequence of the Access Sequence for Pricing Condition Type

    Hi Friends,
    We have an access sequence to determine the pricing. We have 8 key combinations for the same.
    Customer/Plant/Material/Batch
    Sales Org/ Dist Ch/ Cust Region/Plant/Material/ Batch
    Price List Type/Currency/Plant/Material/ batch
    Plant/Material/ Batch
    1st 4 is with batch. and 2nd 4 is without batch.  At the time of implementation ie., before 8 years the 1st 4 key combinations were used.  But now based on the business need we are not using the 1st 4 key combination rather we are using the 2nd 4 which is without batch.
    My question is that can we change the access sequence so that while the system fetches the price it need not go through the entire ( 91,02,401 ) records.
    If this is possible then
             Will there by any impact during viewing of past data?

    Hi,
    There are two options.
    1)Change the validity dates for those condition records to earlier date.
    2)Usually the sytem checks from top to bottom.If it finds the record in first table then it will return that value and stop searching.
    As your not required things are on the top,remove the condition records for them using VK12 T.Code.And maintain the records for what condition tables you are required.
    Regards,
    Krishna.

  • Database table for Pricing Condition

    Hi,
    Can some one pls help me in finding the database table where I can fetch all the Access Sequences ('A' tables) associated for a particular Pricing Condition.
    Regards,
    Pankaj.

    Hi,
    Goto T685 and fetch KOZGF for your condition type(KSCHL) and KVEWE = 'A'.
    Goto T682I and fetch KOTABNR vaues for all entries in above selected table based on KVEWE = 'A', KAPPL and KOZGF.
    Prefix 'A' to above selected KOTABNR values to get the 'A' tables.
    Hope this helps you!!!
    Regards,
    Ganga

Maybe you are looking for

  • IPod headphone-jack no longer making connection

    The headphone-jack connection is worn-out. I've tried using 3 different headphones with the same male specifications and music was still audible from the iPod and not through any of the headphones. Thus, I am sure that the iPod headphone-jack is malf

  • Question about using a Projector with MacBook Pro

    Sorry if this is the wrong post location, but I figured people here would be the most knowledgeable about the topic. I'm looking into getting a portable projector for under $450 that will work with my 2009 MacBook Pro for: a) watching instructional v

  • How can I burn a Word document that will be used on a PC?

    Hello, I have to burn a Word document onto a disk for a friend who is using either PC or a Mac. It will eventually go to a publisher. I haven't burned a .doc in ages and can't remember how to do it. Do I want to use a CD-R and not a DVD-R? Also can I

  • Very large collection, slow iTunes

    I have a massive iTunes library, about 500 GB and 95,000 songs. I have been collecting music for almost 40 years and have ripped my entire CD collection and about 1,000 of my LP's so far. But iTunes is very slow with a large collection like this. Bro

  • How are goals calculated?

    QuestionHow are goals calculated? AnswerGoals are calculated by the number of dishes cooked and served. Each dish produces a different number of servings, however this is not related to your goal.   One fully cooked and served dish counts as one dish