BADI - ME_PROCESS_PO_CUST - To update Condition Types at time of creation

Hi All
I'm relatively new to Implementing BADIs. I'm using the BADI ME_PROCESS_PO_CUST.
I have to update certain condition types with values determined from a custom table maintained for related Vendors.
I have created a 'Z' implementation for ME_PROCESS_PO_CUST and activated the implementation. But when I try to create a PO, the code doesn't seem to be execute!
Following is the code bundle -
METHOD if_ex_me_process_po_cust~process_header .
  DATA : l_items TYPE purchase_order_items.
  DATA : l_single TYPE purchase_order_item.
  DATA : l_item_cond TYPE mmpur_tkomv.
  CALL METHOD im_header->get_items
    RECEIVING
      re_items = l_items.
  LOOP AT l_items INTO l_single.
    CALL METHOD l_single-item->get_conditions
      IMPORTING
        ex_conditions = l_item_cond.
  ENDLOOP.
ENDMETHOD.       "IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER
Could you please give me your inputs on this?
Regards
Kripal
[email protected]

Kripal,
       The method PROCESS_HEADER gets trigerred only when you make an entry in any of the header fields and then press ENTER or do some action.
For a simple case of analysis put a break-point at
CALL METHOD im_header->get_items
RECEIVING
re_items = l_items.
in your code.
Now if you execute ME21N you will see that the code will not get triggered.But make an entry for one of the fields say fpr purchasing organisation.Now if you press ENTER or click on any other tab your code will get triggered.
Hope this helps.
<i>Reward helpful answers</i>
Cheers
Nishanth

Similar Messages

  • User exit / BADI to add the condition type in PO

    Hi Friends,
    The scenario is like user will be creating the Sales order & after that user will create the PR & immidiately after that PO will be created from PR no.
    I will be checking for some Z* condition type in sales order & if its present in sales order I have to add that condition type in PO.
    So for this I am searching for user exit or BADI.
    Please help me out with this.
    I have already tried following user exits & bADIs
    1. RV61AFZA - cant use because i dont get the PR no or SO no in this exit.
    2. RV61AFZB - cant use because i dont get the PR no or SO no in this exit.
    3. also tried the enhancement MM06E004 - if I add new condition type in XKOMV table condition type is not getting updated in PO.
    4. MM06E005 - if I add new condition type in XKOMV table condition type is not getting updated in PO.
    5. ME_PURCHDOC_POSTED - this BADI dont allow us to add the new condition type to std internal table.
    If you know anything apart from this then please do let me know.
    Full points will be awarded for the correct answer!!
    Best Regards,
    Aditya
    Edited by: aditya aghor on May 26, 2008 8:59 AM
    Edited by: aditya aghor on May 26, 2008 10:33 AM

    Transaction Code - MIRO                     Enter Invoice                                                                               
    Exit Name           Description                                                                               
    LMR1M001            User exits in Logistics Invoice Verification                   
    LMR1M002            Account grouping for GR/IR account maintenance                 
    LMR1M003            Number assignment in Logistics Invoice Verification            
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs   
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting   
    LMR1M006            Logistics Invoice Verification: Process XML Invoice            
    MRMH0001            Logistics Invoice Verification: ERS procedure                  
    MRMH0002            Logistics Invoice Verification: EDI inbound                    
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP                
    MRMN0001            Message output and creation: Logistics Invoice Verification    
    kevin

  • Enter condition type several times in a sales order

    Hello Gurus,
    I have a Pricing Procedures with net price minus some discounts and sales price. This is standard. One of the discount condition types you can enter manually in a sales order. Now my problem. This discount  condition type you can enter several times in a sales order. How I can solve this for one time enter.
    Regards
    Artur

    Yes, it is a standard behaviour only, you can only control with User exit only. Include MV45AFZZ , co ordinate with your ABAPer for the same.
    Regards,
    Ramesh

  • Updating Condition Type from Pricing Type customer reserve 'Z'

    Hi ,
           I've created a sales order using BAPI. Now I want to update the condition type using pricing type 'Z' customer reserve . I'm using BAPI_SALESORDER_CHANGE.
    I'm passing the values as:
      condition-itm_number = '000000'.
          condition-CONDTYPE = 'Z'.
          condition-cond_count = '01'.
          condition-currency = w_temp_itab_so-currency.
         condition-CALCTYPCON = 'Z'.
          APPEND condition.
          conditionx-itm_number = '000000'.
          conditionx-cond_count = '01'.
          conditionx-updateflag = 'I'
          APPEND conditionx.
    But its not getting updated.
    Thanks and regards,
    Jyoti Shankar

    One option is
    you have to execute SE16, input table KONV where you maintain the tax condition type and execute.
    System will populate all SD documents that are having that tax condition type.  There you have to copy the field "Doc. condition" and paste it in VBAK table in SE16 so that you will get all sale orders.
    The other option is
    you need to identify what access sequence is maintained for that tax condition type which you can see in V/06.  Next go to V/07, select this access sequence and execute.  There check what tables are maintained.  For example, in your case, it could be table 110.  So you have to develop a query by table joining A110 and VBAK in SQVI where you can take sale orders based on sales organisation.
    thanks
    G. Lakshmipathi

  • Update condition types on changing    CK40N / CK24 / ck74n / ck75n

    Hi Gurus,
    Requirement:
    1. Whenever there is adding/updating additive costs (ck74n and ck75n), we need to populate the corresponding condition types on the INFO records (say: ZABC for freight cost).
    2. Whenever a cost is released (CK40N and CK24),  we need to populate the overhead condition type on the INFO record.
    Do you have any idea about user exits/enhancement spots/bapi available for this.
    Thanks,
    Anuroop

    Hi
    You have BAPIs in Std cost estimate like BAPI_COSTESTIMATE_GETDETAIL , BAPI_COSTESTIMATE_ITEMIZATION to get the required info of CK40n, then you might need to push the required info into Condition records by writing BDC's or BAPI's.
    Till ECC 6.0 there is no BAPI's for Additive cost, you might have to use the Function Module of CK76n to pass the info to corresponding Info Types.
    Regards,
    Suraj

  • Bapi to update condition types

    Hi All ,
    I want to change an existing Delivery(transaction Code: VL02N), by adding a Header Condition Type. I dont want to use any BDC. Can any one recommend any BAPI which handles the Condition Type of a Delivery.
    Regards
    Venkat

    thank you for your answar . but i am using an aditabule alv screen to update these values . these are the values i want to update .here bdc is not working .
    Delivery no
    LR number
    LR Date
    Shipping Type
    Total Wight
    UOM
    Net wight
    Forwarding Agent
    Unloading Point
    Condition type
    Rate
    UOM
    these are the   fields i have to update through bapi .

  • Updating Condition Type based on pricing type in Sales order

    Hi ,
           I've created a sales order using BAPI. Now I want to update the condition type using pricing type 'Z' customer reserve . I'm using BAPI_SALESORDER_CHANGE.
    I'm passing the values as:
      condition-itm_number = '000000'.
          condition-CONDTYPE = 'Z'.
          condition-cond_count = '01'.
          condition-currency = w_temp_itab_so-currency.
         condition-CALCTYPCON = 'Z'.
          APPEND condition.
          conditionx-itm_number = '000000'.
          conditionx-cond_count = '01'.
          conditionx-updateflag = 'I'
          APPEND conditionx.
    But its not getting updated.
    Thanks and regards,
    Jyoti Shankar

    Hi G's
    Iam trying to get my fields hidden based on the conditon type i give, and not in a position make that hidden so, how can be that done,,
    The actual instance is:
    I am having different plants for the company and two plants have different taxation procedure and rest differemt and if i select plant with different taxation procedure the condition type should be supresses only for the particular plant...
    All your Support is Appreciated

  • Inactivate the cash discount condition type during return order creation.

    Hi All,
    I have created a Pricing procedure its having a  condition type Cash Discount.
    The client requirment is during the return order creation system should inactivate the cash discount condition type.
    Please sugget me what to do to fulfill this requirment.
    Thanks in advance.
    Regards
    Vankat.

    Hi
    You can achieve through creating new pricing procedure for Return process
    Otherwise try with user exit
    MV45AFZZ  USEREXIT_SAVE_DOCUMENT_PREPARE
    Maintain access Sequence with Document type and maintain condition record , so at the time of return order system wont pick that material 
    Regards,
    Prasanna
    Edited by: prasanna_sap on Feb 9, 2012 3:31 PM

  • Condition types in Sales order creation process

    Hi Friends...
    While creating the sales order with BAPI,
    What is the condition type i have to pass for pricing procedure...
    There many condition types for my pricing procedure, which one o have to select...
    Some of them are mannual, and other reuired, which one I have to pass?
    I want the information related to this condition types.., as here no SD consultant availble for me.
    Sales order creation, Line item error
    Thanks,
    Naveen.I

    Hi Friends...
       Please let me know is it mandatory to give condtion type while creating the sales order...?
    I am using BAPI_SALESORDER_CREATEFROMDAT2  to create my sales order...
    http://www.sap-img.com/abap/bapi-salesorder-createfromdat2.htm
    Thanks,
    Naveen.I

  • MWST condition type missing in contract creation,VA41

    Hi, got a problem here during contract creation. I can't get the MWST show up in the contract condition tab. Analysis result :
    010 Access not made (requirement not fulfilled)
    Error Message : Pricing error: Mandatory condition MWST is missing
    Things I have done :
    a) checked pricing procedure V/08
    b) created condition records VK11
    c) checked customer tax classification : Liable for taxes
    d) checked material tax data : Full tax
    e) ???
    what else did I miss out?
    Thanks
    Andy

    Option 1: If you do not want MWST condition as mandatory, then remove the check from check box in the pricing procedure (T.Code: V/08). MWST is tax condition & Tax condition are normally not mandatory, as it may vary according to Business Requirement.
    Option 2: <b>"010 Access not made (requirement not fulfilled)"</b>: Check the access sequence maintained for Condition Type MWST (T.Code": V/06). Next, Check the Access Sequence & the access 010 assigned to it. (T.Code:V/07). Check whether Accesses & fields are assigned correctly.
    Option 3: Instead of maintaining condition record for access 010, maintain for different combination & check the result. Even in my case, once the access with reference to tax classification did not give desired result, but was achieved bu maintaining another combination.
    Regards,
    Rajesh Banka
    Reward points if helpful.

  • Pricing date for the tax condition type should be invoice creation date

    HI Folks,
    As per the current design taxes conditions are determining based on the Service rendered date which is similar to the GI date and pricing type is G in copy control .
    New requirement is taxes should calculate based on the Invoice creation date in the invoice.in order to acheive the solution i have customized the tax related condition type functionality "pricing date" as KOMP-ERDAT but still system calcualting the taxes based on the service rendered date and same also writing in the invoice also.
    pLease help me out what need to be configured here to acheive the solution.
    Regards,
    Ram.

    Hello XYZ,
    As you said the tax is calculated in Taxware system, i think taxware system is configured to calculate the taxes based on the "service rendered date". That is the reason why even you have changed the pricing date to be billing date for condition type XR1 taxware is not behaving as you expected.
      You have two options.
    1. Invocie creation date/ blling date is available in the structure "TAX_CAL_ITEM_IN00".If it is available in the structure ask the Taxware team to make changes in their system to consider that field value instead of the service rendered date.
    2. Alternatively you can over write the filed which contains the service rendered date value with the value of billing date. This way no changes required in Taxware system. You can do that in cusotmer exit  "EXIT_SAPLFYTX_USER_001" include ZXFYTU03 .
       Based on my exeperince i think the consistant approach would be going with option 1 . Please revert if you need furhter information on the same
    Thanks,
    Srini
    Edited by: srini vasarao on Jul 14, 2011 12:02 PM

  • BADI 'ME_PROCESS_PO_CUST to populate TEXT at the time of PO creation

    Hello All,
    I am using the above BADI to attempt to populate calculated text from class characteristics into a purchase order. Does anyone know if this can be done.I have checked the  parameters that are available for this BADI (MEPOHEADER and MEPOITEM) and I do not see fields for TEXT.
    The business requirement is that certain text is calculated from the vendor characteristics and this must be populated into the PO during its creation. Since the PO has not been committed to the database the function modules for this 'SAVE_TEXT' cannot be used.
    Please advise.

    hi,
    Vivek is right u have to use  same badi , it helps u out,
    below i gives u code plz ref that, in which u have to call
    CALL METHOD im_header->if_longtexts_mm~set_text
    as given below through this code u can maintain long text for each id in header of po.
    METHOD if_ex_me_process_po_cust~process_header.
      DATA: l_repid  TYPE sy-repid,
            l_dynumb TYPE d020s-dnum,
            l_fldnam TYPE dynpread-fieldname.
      DATA: l_value2(80).
      DATA : re_data1 TYPE mepoheader.
      l_repid = 'SAPLMEGUI'.
      l_dynumb = '1105'.
      l_fldnam = 'MEPO_TOPLINE-BSART'.
      CALL FUNCTION 'GET_DYNP_VALUE'
        EXPORTING
          i_field             = l_fldnam
          i_repid             = l_repid
          i_dynnr             = l_dynumb
      I_CONV_INPUT        = ' '
      I_CONV_OUTPUT       = ' '
        CHANGING
          o_value             = l_value2.
    CODE IS ADDED BY SANTOSH KUBAL**** DT :8.01.2009
    REQ : SANTOSH JAGTAP***
    ***PURPOSE: FOR PUR.ORGANISTION 2700 & 2701 WHEN NEW PO IS CREATED
    DEFULT HEADER TEXT WILL BE CALL IN HEADER NOTE  ID- F02 ***
    ***DEFULT HEADER TEXT is mentain in SO10 TEXT ID ST .
      IF sy-tcode = 'ME21N'.
      DATA: l_purorg(8).
      DATA: im_tdid   TYPE  tdid. "Importing
      DATA: im_textlines  TYPE  mmpur_t_textlines .
      DATA: wa_textlines LIKE LINE OF   im_textlines.
      DATA: text_tab TYPE TABLE OF  tline,
                wa_text_tab TYPE tline.
    l_repid = 'SAPLMEGUI'.
    l_dynumb = '1221'.
    l_fldnam = 'MEPO1222-EKORG'.
      CALL FUNCTION 'GET_DYNP_VALUE'
        EXPORTING
          i_field             = l_fldnam
          i_repid             = l_repid
          i_dynnr             = l_dynumb
        CHANGING
          o_value             = l_purorg.
    IF l_purorg = '2700' OR l_purorg = '2701'.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
             client                        = sy-mandt
             id                            = 'ST'
             language                      = sy-langu
             name                          = 'DEFULT_HEADR_TEXT'
             object                        = 'TEXT'
            TABLES
             lines                         = text_tab
          IF sy-subrc <> 0.
           * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
              IF text_tab IS NOT INITIAL.
                LOOP AT text_tab INTO wa_text_tab .
                wa_textlines-tdline = wa_text_tab-tdline.
                APPEND wa_textlines TO im_textlines.
                ENDLOOP .
             ENDIF.
          wa_textlines-tdobject     = 'TEXT'  .
          wa_textlines-tdid =     'ST'.
          wa_textlines-tdformat = 'SP'.
          APPEND  wa_textlines  TO im_textlines.
          CALL METHOD im_header->if_longtexts_mm~set_text
            EXPORTING
              im_tdid         =  'F02'
              im_textlines    = im_textlines.
              ENDIF.
         ENDIF.
    ***end of code**
    ENDMETHOD.

  • How to update cost related condition type amount in sales order without disturbing other condition types.

    Hi ,
    How to updae only one item condition  ZYV0 value in sales order. If I can see we have several options from pricing type to update condition types but here My requirement is to update only one condition amount .If I can see other pticing types they will update all condition types .
    -Exclusive option is checked for all the tables maintained in access sequence,
    Below options were not worked for me.
    -In condition type ----> Condition category has been updated with "D"(Tax) pricing type-"G" to update in sales order
    - This option worked for me but  condition category  "F"(frieght) and pricing type -H but in conditions tab when I update two condition amounts are activated for one condition type like below.
    ZYV0--30 % (old condition record value updated in sales order)
    ZYV0- 50% (updated condition record)
    Regards

    Hi Rita,
    Tried with condition category "u" and updated with pricing type "U" . It works as same I used old logic.
    with condition categories "D" and "F" it will update old and new condition record values in sales order.
    ZYV0--30 % (old condition record value updated in sales order)
    ZYV0- 50% (updated condition record)
    I have updated  here existing condition record value from 30 % to 50 % validity periods are not changed.
    Regards

  • Updation of condition type in conditions tab while creation of sales order

    Hi folks
    I have added one field called  price key in Sales B screen of VA01 in item level.
    When user will input price key here and then put enter. Then the Price should be updated in Conditions tab i.e the condition type will be updated in conditions tab.
    I need to maintain this price key in VK11. So As per the Price key i need to update condition types in conditions tab.
      here i am using a user exit  SAPMV45A. i can get condition type for the specified price key from A905 table.Then how to update this condition type in conditions tab through user exit.
    Plz suggest.
    Thanks
    pmr

    Dear friend,
        if the sales order is saved and you want to change the pricing click on update which will be on the lower level of your condition tab in va02.
    and if you are trying to create a new sales order  and if the value is greyed our - check whether in pricing procedure - control data - you would have maintained statistics against that condtion tab.
    check this out and get back
    regard,
    Sudhir

  • Reprice at time of billing - only certain condition types not all of them

    Hi,
    My client has a requirement to reprice certain condition types at time of billing. Is there a way to reprice certain conditions at time of billing document creation and leave other conditions as they are copeid over from the sales document?
    It doesn't matter if a User Exit is used, routine, etc.
    Thanks
    Chris

    Hi,
    It is not possible to reprice only specific condition types and not all the conditiontypes. We have a pricing type to redetermine the tax conditiontypes. But it is difficult to reprice the c.types of our choice.
    However through user exits, it should be possible. If you discuss with ur developer, he can help you. Also you can look at the possibility of creating a new pricing type (again withthe help of developer). I think it is not possible, but give it a try,may be the developers will find a way to dothis.

Maybe you are looking for

  • Bookmarks in FireFox Sync

    Currently, I have two computers syncing in firefox. I am only syncing bookmarks. The screen I will be referring to is when I hit ctrl + B to show all my bookmarks. With Firefox sync, it separates the bookmarks for computer 1 and computer 2 with a lin

  • Charging iPhone 3Gs when turned off.

    I have had my iPhone 2 days and I have realised that it does not charge when turned off. If I turn the phone off and insert the wire (wall plug or USB on computer) the phone automatically turns on and when I turn it off it doesn't charge. Has anyone

  • Partners not defaulting in UB doc type STO

    Hi Gurus, Can anybody please explain why the partners do not default in the partners tab of the PO with doc type UB when i enter the supplying plant. But the partners default in NB doc type when i enter the vendor. Why is this so? Thanks Anusha

  • Open folder, date modified date changing

    I finally updated to OSX Lion and now when i access our Windows server 2012 server, as soon as i click to open a folder the date modified date changes to today. I am not opening any files just viewing the contents of the folder. This is causing a pro

  • Deploy Exception - ServiceGroup for name SampleTimerServiceGroup is not fou

    Hello, When trying to deploy the BPM project I've the following error, Description: 1. Exception has occurred on update operation for application xxx.com.pe/bpm_poclienac_v5. Failed on add new service references. Reason:Matching ServiceGroup for name