Badi ME_PROCESS_PO_CUST-PROCESS_ITEM

Hi,
I have using the badi ME_PROCESS_PO_CUST-PROCESS_ITEM and the works fine.
But i need to write in a item field that the status is "display", in that status the badi does not write in the field.
To write i have to change the status to "optional entry" in spro, but the ideia is the field is the field stay non-edit.
Can someone help with that question?

Can everyone help me?

Similar Messages

  • BADI ME_PROCESS_PO_CUST Method:PROCESS_ITEM

    Hi,
    I have to update the vendor material field through BADI ME_PROCESS_PO_CUST.
    I have created an implementation for this BADI.Can anyone help me find the solution for the same.
    Thanks.

    DATA: wa_ekko TYPE ekko,
            wa_ekkn TYPE ekkn,
            wa_ekpo TYPE ekpo,
            wa_vbap           TYPE vbap.
      DATA : lt_item TYPE mepoitem.
      IF im_item->is_persistent( ) EQ mmpur_no. "Only check for new items
    * Retrieve item data into BADI buffer
    *get data
        CALL METHOD im_item->get_data
          RECEIVING
            re_data = lt_item.
        ENDIF.
        SELECT SINGLE * FROM ekko
          INTO wa_ekko
          WHERE reswk NE ''.
        IF sy-subrc EQ 0.
          SELECT SINGLE * FROM ekkn
              INTO wa_ekkn
              WHERE ebeln = wa_ekko-ebeln.
          IF wa_ekkn-vbeln <> ''.
            SELECT SINGLE * FROM ekpo
              INTO wa_ekpo
              WHERE ebeln = wa_ekko-ebeln
              AND   idnlf = ''.
            IF sy-subrc EQ 0.
            SELECT SINGLE * FROM vbap
              INTO wa_vbap
              WHERE vbeln = wa_ekkn-vbeln
              AND   posnr = wa_ekkn-ebelp.
            IF sy-subrc EQ 0.
              lt_item-idnlf = wa_vbap-kdmat.
            ENDIF.
          ENDIF.
        ENDIF.
            ENDIF.
    * Update changes
        CALL METHOD im_item->set_data
          EXPORTING
            im_data = lt_item.

  • ME_PROCESS_PO_CUST~PROCESS_ITEM Shipping data doesn't get populated

    Hi Gurus,
    I need your help to solve one issue while populating shipment data  via 'BAPI_PO_CREATE1' to create a PO I am populating poshipping[] and poshippingx[] with Route field and and also 'X' but the value I am passing it is overwritten by other value.
    Then I have implement ME_PROCESS_PO_CUST BADI method PROCESS_ITEM where I was trying to pass the value what I have pass through my custom program but when PO is created shiping tab is missing.
    Attaching my code written in BADI method:
      ASSIGN (lc_ship_table) TO <lfs_ship_tab>.
        IF <lfs_ship_tab> IS ASSIGNED.
    Retrieve Item level details
          lw_ship = ir_purchase_order_item_mm->get_shipping_data( ).
    Read item
          READ TABLE <lfs_ship_tab> ASSIGNING <lfs_ship_line>
          WITH KEY po_item = lw_ship-ebelp.
          IF sy-subrc EQ 0.
            lw_ship-route = <lfs_ship_line>-route.
            CALL METHOD ir_purchase_order_item_mm->set_shipping_data
              EXPORTING
                IM_EKPV = lw_ship.
    Any suggesions and how to acheive this.
    Dip

    Hello All,
    I am also facing the same problem.
    Can anyone help me to make the standard fields non editable ?
    Either user exit or badi.
    Thanks in advance..
    Regards
    Prapul Kumar

  • BADI ME_PROCESS_PO_CUST - DOES NOT CLEAR OUT ERROR

    In ME21N I want to validate the field Commodity Code - STAWN. I have used the BADI ME_PROCESS_PO_CUST*
    . Have used get_foreign_trade() in the PROCESS_ITEM method . I am able to throw an error . It is doing it but*
    after throwing error then when we give a valid Commoditycode too it is still showing the error and not clearing the error  .*
    As suggested by Dean Q I used   INCLUDE mm_messages_mac,
    tried im_item->set_foreign_trade( ls_mepo_eipo)  still when a valid Commodity code is entered after an invalid one  it does not clear out the error. In fact on checking using break-point I found that the second time it does not enter into the method  PROCESS_ITEM.    Any help is welcome
    Nivedita

    Hi,
    In SE18 give ME_PROCESS_PO_CUST as the enhancement spot and display. At the left side of the screen you can see the badi definition ME_PROCESS_PO_CUST. Expand the tree and double click on implementations. You can see the enhance implementations created. Double click on the enhancement implementation and in that screen there is a check box 'Implementation is active' and field 'Effect in current client'.
    If you know the enhancement implementation name(not the badi implementation name), you can check it directly from se19.
    Regards,
    Poornima

  • How to issue warning message in BADI ME_PROCESS_PO_CUST

    Hi Guys,
    I have already checked the forum regarding this. There are lots of threads. Unfortunately none of them helped me. I must be missing some thing in my code.
    I tried issuing warning message in BADI ME_PROCESS_PO_CUST and method PROCESS_ITEM.
    First i tried with normal message statement
    MESSAGE w001(00) WITH text-001 text-002.
    Didn't worked.
    Next tried calling standard macros
      DATA:mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
      call method cl_contextfield_mm=>set_current_field
                                      exporting im_field = mmmfd_cust_01.
      mmpur_metafield mmmfd_cust_01.
    mmpur_message_config 'W' 'X' ' '.      "Tried all permutations here
    mmpur_message_forced 'W' '00' '001' text-001 text-002 '' ''.
    Still no solution
    Tried with macro mmpur_message also
    Can some one helpme out to solve this issue.
    Thanks,
    Vinod.

    Hi all,
    Thanks for the responce.
    Not sure whether you have looked into BADI documentation or not. Please check below.
    "Further notes
    The above-mentioned macros are defined in the program MM_MESSAGES_MAC. Please include this program in your own application.
    Never issue messages in BAdI ME_GUI_PO_CUST! This is the task of the business logic and must therefore be done via the BAdI ME_PROCESS_PO_CUST.
    "Never use the ABAP statement MESSAGE in the BAdI ME_PROCESS_PO_CUST. Please use the macro mmpur_message_forced only. This macro only writes a message in the message collector.
    If you wish to mark the business object as invalid in order to prevent posting, you must additionally use the INVALIDATE ( ) method of the relevant interface. In this connection, see also the code example in the PROCESS_ITEM method of the BAdI ME_PROCESS_PO_CUST.
    I have tried almost all macros including mmpur_message_forced 'E' 'ME' '083' l_text ' '  ' '  ' '.
    Not sure where i am missing:(
    If i give error using MESSAGE statement it is working perfectly i.e. give error and save the PO. Only wanted to know if there are any implications.
    Thanks,
    Vinod

  • Badi-- ME_PROCESS_PO_CUST, PROCESS_ACCOUNT method

    Hi,
    My requirement is that While Creating PO,if the first four characters of Cost Center and FundsCenter is not equal to Plant then an error message should be raised . For this i used
    Badi>ME_PROCESS_PO_CUST   and Method->PROCESS_ACCOUNT .
    The problem is that  in  PROCESS_ACCOUNT method the parameter IM_ACCOUNT doesn't contain Plant value.
    If I am using PROCESS_ITEM method,in this IM_ITEM is not capturing Fundscenter value.
    Please help in solving the issue. Is  there any User Exit or Badi which gives me Plant,CostCenter,FundsCenter Values.?
    Thanks
    K Srinivas

    Hi,
      You can use same Badi for getting Plant,CostCenter,FundsCenter. what are all values you are not getting for that you use field-symbols. like here for getting Plant value Try these steps.
    1. Press F1 on PO Screen Plant value. Get Program name, screen field structure from that.
    2. declare one variable as field as field-symbols, in badi.
    FIELD-SYMBOLS: <lv_var> type any.
    Assign '((SAPLMEGUI)MEPO1211-NAME1) to <lv_var>.
    Here SAPLMEGUI is Program Name And MEPO1211-NAME1 is field structure of your program screen.
    in <lv_var> you will get the value of plant.
    Same process you can try for other fields also.
    Regards
    Vishnu Gupta

  • BADI ME_PROCESS_PO_CUST is not triggering while creating/changing PO

    Hi,
    I am new to BADIs,
    I am trying to implement BADI ME_PROCESS_PO_CUST in ECC 6.0. I have done the implementation and activated. I kept a break point in PROCESS_ITEM method, but the BADI is not triggering while creating or changing the PO. Please advice me what could be the reason behind this?
    I used the SQL trace but i couldn't get the BADI ME_PROCESS_PO_CUST in the list.
    thanks in advance
    Regards
    Jagadish

    hello jagdish,
    implement   this user exit.....
    MM06E005...
    go to     EXIT_SAPMM06E_017   in that   then you can put a break point in the user defined function module.....
    or use
    BREAK  'C5133392'  (use your user in place of C5133392)....it will stop here while creating PO or changing PO...
    now you can do whatever you want to do in create or change PO using this function exit......
    perform the validations on import parameters.....to create  or change ....and activate the project....
    hope this will give you some idea and help

  • Implementing Badi ME_PROCESS_PO_CUST

    Hi all,
    I'm trying to implement the BADI ME_PROCESS_PO_CUST, the method PROCESS_ITEM, and I'm trying to change the field ls_positem-lebre, but it doesn't works. I've seen that this field is in the mepoitem_tech structure in the method set_data and it restores this value to his old value, anyone knows how to change this field?
    ..and another question...
    In the same BADI, I'm trying to change the sale's area in the shipping data, but when I call the method set_shipping_data there is a firewall that only allows me to change the fields vstel, lprio, vsbed, route and ablad. Is there any way to change the other fields?
    Thanks,
    Xavi

    Hi,
    By implementing the above badi you can change limited fields at item level.
    I am using this to change the following and it is working fine for me.
    a) Chaning field -- PLIFZ and RESWK and NETPR based on some header conditions
      DATA  : LS_MEPOITEM TYPE MEPOITEM.
      DATA  : ZZPLIFZ TYPE EKPO-PLIFZ.
    Get the Item data
        LS_MEPOITEM = IM_ITEM->GET_DATA( ).
         LS_MEPOITEM-PLIFZ = ZZPLIFZ.
         LS_MEPOITEM-NETPR = V_NETPR.
    Set the Item data
        CALL METHOD IM_ITEM->SET_DATA
          EXPORTING
            IM_DATA = LS_MEPOITEM.
    Try this.
    I hope this will help.
    Message was edited by: Lanka Murthy

  • BADI ME_PROCESS_PO_CUST with ME21N

    Hi.
    I'm using the BADI ME_PROCESS_PO_CUST, i create an implementation and i'm using the method process_item to make some checks in the field Payment Term (autocomplete this field from the table lfm1 acording to lifnr). I have a problem, when i hold a PO and after open it and save it the method process_item dont work (because i dont do any change in the PO).  Anyone know some way to do this cheks in a held PO? I try to using the method open to do this but dont work either. Thx (sorry for my english)

    Yes, i use this method too. I get the data from im_header to a variable X, change the fileld zterm (if the conditions are true) and use the methos im_header->set_data ( X ); but the change is not visible in the screen and when i save lost this change.

  • BADI ME_PROCESS_PO_CUST Implementation is not called

    Hello,
    I have created a test implementation(local object) for BADI ME_PROCESS_PO_CUST and implemented the Process_Item method to compare item price with material master commercial price. I have also activated the implementation.
    When I create a PO using ME21N, this implemenation is not getting called. I have put a breakpoint in the implementation but processing doesn't stops here. Also I am not able to find 'Where used' of the BADI name or the interface 'IF_EX_ME_PROCESS_PO_CUST'.
    What are the reason for above behaviour? Do we maintain this BADI name in some Customizing Table?
    Please help.
    Regards,
    Shubham

    i did the same as you did and the code is clearly getting triggerred.
    Samle Code:
      DATA : l_header TYPE REF TO if_purchase_order_mm.
      DATA : l_conditions TYPE mmpur_tkomv.
      DATA : l_item LIKE LINE OF l_conditions.
      DATA : l_data TYPE mepoheader.
      CALL METHOD im_item->get_header
        RECEIVING
          re_header = l_header.
      CALL METHOD l_header->get_data
        RECEIVING
          re_data = l_data.
      CALL METHOD im_item->get_conditions
        IMPORTING
          ex_conditions = l_conditions.
      CALL METHOD im_item->set_conditions
        EXPORTING
          im_conditions = l_conditions.
    if i put break-point on any of these methods the implementation is getting trigerred.

  • BADI ME_PROCESS_PO_CUST get item nr

    Hi experts,
    I would like to get the item number EBELP in a purchase order ME21N, ME22N.
    My problem is that when I change of item, I can't get the item n° in the BADI ME_PROCESS_PO_CUST
    Thks for help,
    Ant

    Yes , you can get that values.check this .
    badi: ME_PROCESS_PO_CUST
    method:PROCESS_ITEM
    data:ls_mepoitem TYPE mepoitem,
           ls_mepoitem_prev TYPE mepoitem,
        ls_mepoitem = im_item->get_data( ).
        CLEAR ls_mepoitem_prev-netpr.
        SELECT SINGLE netpr FROM ekpo
        INTO ls_mepoitem_prev-netpr
        WHERE ebeln = ls_mepoitem-ebeln
          AND ebelp = ls_mepoitem-ebelp.
          if  ls_mepoitem-netpr GT ls_mepoitem_prev-netpr.
           MESSAGE 'Not Allowed to change values of Previous years WBS'
            TYPE 'E'.
            ENDIF.

  • BADI ME_PROCESS_PO_CUST AND BADI ME_DEFINE_CALCTYPE

    Hi,
    How do I change the pricing type when creating aPurchase Order using BADI ME_PROCESS_PO_CUST and ME_DEFINE_CALCTYPE.
    I need to set the value  IM_DATA-Calctype = 'B'  (Calctype) on the first badi.
    Please help!

    hi this is the code:
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:   RE_DATA TYPE MEPOITEM,
              IM_DATA TYPE MEPOITEM.
         CALL METHOD IM_ITEM->get_data
         RECEIVING
            RE_DATA = RE_DATA.
    MOVE 'B' TO RE_DATA-calctype.
    CALL METHOD IM_ITEM->set_data
             EXPORTING
                IM_DATA  = RE_DATA.
    endmethod.
    Upon creation of PO error message prompt
    'Data from Business Add-In ME_PROCESS_PO_CUST not adopted'

  • Custom tab data not saving in ME22N w/ BAdI ME_PROCESS_PO_CUST

    Hello all,
    I have implemented BAdis ME_PROCESS_PO_CUST & ME_GUI_PO_CUST and created a custom tab at the header level in ME21N/ME22N. I have fields such as Delivery Date and Ex Factory Date in my tab.
    We are able to put data in these fields and have that data populate their respective fields in the Purchase Order.
    Our users would like to be able to run ME22N and select certain line items and have only those items changed with the data from the custom fields. 
    So, my question is how do I handle line selection in the context of these BAdIs?  Is there a way to know which lines have been selected and then only change the data in those items?
    I have looked in Class CL_PO_ITEM_HANDLE_MM for an attribute or method that might help but I haven't found anything as of yet. 
    I have found that the field MEPO1211-TCSELFLAG is set when a line is selected in ME22N.  However, I haven't found a way to work with it.  It doesn't get passed to any of the methods in the BAdIs, as far as I know. 
    January 27, 2012  **************
    We were able to capture the lines selected by using code from method mass_change in Include LMEGUICJK, Function Group MEGUI.  The lines are in the lt_models table. 
    So, now my issue is getting data to save in ME22N.  When I put data in my custom tabs and select a line, the data gets changed on the screen but does not save.  It does work when I make a change in another field, like changing the description for instance.  I'm using the set_changed method in Process_Header from ME_PROCESS_PO_CUST but it doesn't work. 
    I'm getting the idea that I'm the first ABAP developer to try this...
    Thanks for any help.
    Kind Regards,
    Chris
    Edited by: Chris  Mowl on Jan 11, 2012 10:33 AM
    Edited by: Chris  Mowl on Jan 11, 2012 4:24 PM
    Edited by: Chris  Mowl on Jan 27, 2012 10:57 AM
    Edited by: Chris  Mowl on Jan 27, 2012 2:00 PM

    Hi,
    Checkout the below link :
    <link to blacklisted site removed by moderator>
    Shailaja Ainala.
    Edited by: Thomas Zloch on Jan 28, 2012 9:06 PM

  • How to fetch newly updated item data in BADI  ME_PROCESS_PO_CUST?

    Hi Everyone,
    While changing a PO, I have a requirement where I need to only modify fields of newly added items of a purchase order and keep the values of existing items as it is. I have implemented the BADI ME_PROCESS_PO_CUST for this. but not able to know how to achieve this requirement. please suggest a solution.
    Thanks and Regards,
         Indudhar P.G

    Hi,
    interfaces for PO header and item have method is_persistent. This method returns true if the item/header is persistent which is equal to that it has been written to DB. So new items are not be persistent and old items are persistent.
    Cheers

  • BADI ME_PROCESS_PO_CUST

    hi experts,
    we are using me59n to create the stock transfer orders from stock transport requisitions. the requirement is during the creation of STO we need to stop the creation of STO for some of the STR based on custom logic. the logic needs the STR number.
    i tried "check" method  of BADI ME_PROCESS_PO_CUST and it seems working. i was able to stop the creation of PO based on some condition. but, in the actual requirement i need to to know STR ( that is purchase requisition number ) number in the method. based on the values in STR i need to stop the PO creation. i have checked the import parameters of the method but could not find anything.
    but when i went inside IM_HEADER associated type IF_PURCHASE_ORDER_MM I this is the importing parameter of the "check" method) i found a method IF_MESSAGE_OBJ_MM~GET_PARENT. I am not sure whether this will help? or is there any other way u think i can get the STR number in this method.
    or is there any other BADI / exit to meet this requirement.
    thanks

    no replies from anybody

Maybe you are looking for

  • My Firefox browser opens to a white screen and when I try to browse a website it opens a new page and is also blank

    - installed a new updates for windows last night and restarted my PC -When I open my Firefox browser it sits at a white screen, with nothing in the URL area. -When I try to go to a website it reloads says "New Tab" and doesn't load any content and st

  • Getting total on the basis of non-primary key.

    Hi Experts, Iam having an internal table it_ekpo which is having material group(matkl),plant(werks) and net order value(netwr). My requrement is to get the total sum of NETWR against a particular plant which may have duplicates. I need to get the pla

  • Media Center Z556 w/ no tv

    My "new" Z556 keeps looking for digital signals when I try to set up the guide and TV channels. I have tried without success to override this procedure manually.  I cannot find how to input my local signals.  Any ideas ??

  • A string of question about Locking & Isolation Level

    Hi All It is highly appreciated if someone give offer answers to my below questions 1) There are two ways of locking mechanism: Pessimistic & Optimistic. In general, do all J2EE app server support all these two ways of locking ? 2) It seems to me tha

  • After upgrading to Safari 3.1 (Tiger), application crashes on open

    I just upgraded to Safari 3.1 on a MacBook Pro (Tiger). The installer prompted me to reboot. After rebooting, clicking on the Safari icon in the dock makes it bounce once, then nothing. The browser doesn't open. The console reports the following: dyl