Badi ME_PROCESS_PO_CUST IN ME21N

HI,
I USING BADI ME_PROCESS_PO_CUST IN ME21N IN THIS im_item->GET_SCHEDULES( ).
HOW TO GET DATA FROM THIS METHOD.... IF IT POSSABLE PLEASE SEND THE CODE
Edited by: Rob Burbank on Mar 12, 2009 9:21 AM

Please use an informative subject and do not use all caps.

Similar Messages

  • 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.

  • 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

  • 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

  • Error in badi ME_GUI_PO_CUST for ME21n/22n/23n

    Dear All,
    I want to add 1 tab in ME21n/22n/23n.
    In that 2 field in EKKO table using ci_ekkodb include is add
    For that I use badi ME_GUI_PO_CUST.
    in that
    MAP_DYNPRO_FIELDS
    TRANSPORT_FROM_MODEL
    TRANSPORT_TO_DYNP
    TRANSPORT_FROM_DYNP
    TRANSPORT_TO_MODEL
    these method find error do to field name passing.
    method IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS.
      FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
        LOOP AT ch_mapping ASSIGNING <mapping>.
          CASE <mapping>-fieldname.
            WHEN 'ZZDEPT'.                                            " Field Name
              <mapping>-metafield = mmmfd_cust_03.
            WHEN 'ZZPOGR'.                                            " Field Name
              <mapping>-metafield = mmmfd_cust_04.
          ENDCASE.
        ENDLOOP.
    endmethod.
    Referening **************** - Step by step guide on adding a new tab in ME21N using a BADI
    Replay is appreciable.
    Regards,
    Pooja

    First you go to se18 and read documentation of this badi.
    You have to implement BAdI ME_PROCESS_PO_CUST before implementing this BAdI.
    Sample code is available here.... goto->sample code->display
    In case any doubt u ask..
    Regards
    Sreekanth

  • 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

  • BADI ME_PROCESS_PO_CUST Method Post

    Hi, how can we know in the method post of the BADI ME_PROCESS_PO_CUST if we are in creation mode (me21n) or change mode (me22n), I need to do some coding only at the creation of the PO but this method is call anytime we click save!
    thanks!

    Hello Alexandre
    It would be possible to check the transaction. However, if the BAPI BAPI_PO_CREATE is used the BAdI is also processed yet the transaction is most likely wrong.
    An <u>unambigous </u>approach is to check IMPORTING parameter IM_TRTYP in method IF_EX_ME_PROCESS_PO_CUST~OPEN:
    METHOD if_ex_me_process_po_cust~open.
    * define local data
      DATA:
        lo_po          TYPE REF TO cl_po_header_handle_mm,
        ls_header      TYPE mepoheader.
      me->md_trtyp = im_trtyp.  " save transaction type
      IF ( im_trtyp = 'H' ).  " add new purchase order
    I would add an instance attribute MD_TRTYP to the BAdI implementing class and save the transaction type in method IF_EX_ME_PROCESS_PO_CUST~OPEN (see above).
    Now you can simply add the following IF condition to your POST method:
    METHOD if_ex_me_process_po_cust~open.
      CASE me->md_trtyp. 
        WHEN 'H'.    " add new purchase order
      ...  " do required action for CREATE
        WHEN ... .
        WHEN others.
      ENDCASE.
    The possible transaction types can be found at: im_trtyp -> data element -> <b>domain </b>(fixed values).
    Regards
      Uwe

  • Query on  User-Exit or  BADI  For  ME21/ME21N

    HI All,
    I am working on purchase order release strategy.Version  4.7E
    The requirement is 'without reference to purchase requestion(PR) Purchase Order should not be created.
    Ifound out one badi-ME_PROCESS_PO_CUST and i have implemented it.
    It is working fine for ME21N transaction.
    But when i create PO through  me21 it is not being triggered.
    Can any body tell me suitable user-exit for this.
    Regards,
    Prasanth

    Transaction Code - ME21                     Create Purchase Order
    Exit Name           Description
    AMPL0001            User subscreen for additional data on AMPL
    LMEDR001            Enhancements to print program
    LMELA002            Adopt batch no. from shipping notification when posting a GR
    LMELA010            Inbound shipping notification: Transfer item data from IDOC
    LMEQR001            User exit for source determination
    LMEXF001            Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001            Customer-Specific Source Determination in Retail
    M06B0001            Role determination for purchase requisition release
    M06B0002            Changes to comm. structure for purchase requisition release
    M06B0003            Number range and document number
    M06B0004            Number range and document number
    M06B0005            Changes to comm. structure for overall release of requisn.
    M06E0004            Changes to communication structure for release purch. doc.
    M06E0005            Role determination for release of purchasing documents
    ME590001            Grouping of requsitions for PO split in ME59
    MEETA001            Define schedule line type (backlog, immed. req., preview)
    MEFLD004            Determine earliest delivery date f. check w. GR (only PO)
    MELAB001            Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1            Enhancement to Document Overview ME21N/ME51N
    MEVME001            WE default quantity calc. and over/ underdelivery tolerance
    MM06E001            User exits for EDI inbound and outbound purchasing documents
    MM06E003            Number range and document number
    MM06E004            Control import data screens in purchase order
    MM06E005            Customer fields in purchasing document
    MM06E007            Change document for requisitions upon conversion into PO
    MM06E008            Monitoring of contr. target value in case of release orders
    MM06E009            Relevant texts for "Texts exist" indicator
    MM06E010            Field selection for vendor address
    MMAL0001            ALE source list distribution: Outbound processing
    MMAL0002            ALE source list distribution: Inbound processing
    MMAL0003            ALE purcasing info record distribution: Outbound processing
    MMAL0004            ALE purchasing info record distribution: Inbound processing
    MMDA0001            Default delivery addresses
    MMFAB001            User exit for generation of release order
    MRFLB001            Control Items for Contract Release Order
    No of Exits:         35
    Transaction Code - ME21N                    Create Purchase Order
    Exit Name           Description
    AMPL0001            User subscreen for additional data on AMPL
    LMEDR001            Enhancements to print program
    LMELA002            Adopt batch no. from shipping notification when posting a GR
    LMELA010            Inbound shipping notification: Transfer item data from IDOC
    LMEQR001            User exit for source determination
    LMEXF001            Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001            Customer-Specific Source Determination in Retail
    M06B0001            Role determination for purchase requisition release
    M06B0002            Changes to comm. structure for purchase requisition release
    M06B0003            Number range and document number
    M06B0004            Number range and document number
    M06B0005            Changes to comm. structure for overall release of requisn.
    M06E0004            Changes to communication structure for release purch. doc.
    M06E0005            Role determination for release of purchasing documents
    ME590001            Grouping of requsitions for PO split in ME59
    MEETA001            Define schedule line type (backlog, immed. req., preview)
    MEFLD004            Determine earliest delivery date f. check w. GR (only PO)
    MELAB001            Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1            Enhancement to Document Overview ME21N/ME51N
    MEVME001            WE default quantity calc. and over/ underdelivery tolerance
    MM06E001            User exits for EDI inbound and outbound purchasing documents
    MM06E003            Number range and document number
    MM06E004            Control import data screens in purchase order
    MM06E005            Customer fields in purchasing document
    MM06E007            Change document for requisitions upon conversion into PO
    MM06E008            Monitoring of contr. target value in case of release orders
    MM06E009            Relevant texts for "Texts exist" indicator
    MM06E010            Field selection for vendor address
    MMAL0001            ALE source list distribution: Outbound processing
    MMAL0002            ALE source list distribution: Inbound processing
    MMAL0003            ALE purcasing info record distribution: Outbound processing
    MMAL0004            ALE purchasing info record distribution: Inbound processing
    MMDA0001            Default delivery addresses
    MMFAB001            User exit for generation of release order
    MRFLB001            Control Items for Contract Release Order
    no of Exits:         35
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • 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.

  • Help BADI ME_PROCESS_PO_CUST !?!?

    Hi Friends,
    I've created an implementation for BADI ME_PROCESS_PO_CUST to enhance TCode ME21n. I use method CHECK to check line item but I don't know how to collect the message error if any wrong data exists in that line item.
    My message(s) will be collected as the original program do i.e :
       Typ | Message text                                        |
    |----
    |                             
    Item 20 Sched.line 1
         w  | Can delivery date be met?                      |
    When you chose that line above, program will bring you to the screen field that have wrong value.
    Any one can help me collect the message(s)? Please!
    Thanks,
    Gy

    Check if it's useful  
    DATA : lt_items TYPE purchase_order_items ,
             ls_item TYPE purchase_order_item,
    CALL METHOD im_item->get_data
          RECEIVING
            re_data = lt_item.
    give the condition for the  Error message 
       mmpur_metafield mmmfd_cust_01  .
        mmpur_message_forced 'E' 'ME' '083' text-003 '' '' ''.
       LOOP AT lt_items INTO ls_item.
          CALL METHOD ls_item-item->invalidate( ).
        ENDLOOP .

  • 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

  • BADI ME_PROCESS_PO_CUST for changing header data

    Hello Experts,
    I'm using Method PROCESS_HEADER in Badi ME_PROCESS_PO_CUST in order to change some header data.
    I want to change header data depending on the partner data which are on header level.
    It works fine as long as there are data changed in the header or item level and not only on the partner screen.
    The method in this Badi isn't processed if only partner data are changed. But for me it is necessary to set a special field on the header depending on the partner data.
    Regards,
    Sven

    Hi,
    Firstly, for changing Header data without any INSERT/UPDATE?MODIFY statement, badi - ME_PROCESS_PO_CUST  will not be useful.
    As method you mentioned has no header parameters under CHANGING / EXPORTING clause.
    You can use the badi which has the parametrs you want in either change/ Export mode. It can be defined under table also.
    Below is the list of important badis gettign called, however none of them contains header values in change/export clause.
    ME_CCP_ACTIVE_CHECK
    MD_STOCK_TRANSFER
    ME_DEFINE_CALCTYPE
    ME_PO_PRICING
    ME_FIELDSTATUS_STOCK
    ME_COMMITMENT_STO_CH
    ME_COMMITMNT_PARKING
    ME_INFOREC_SEND
    ME_CHECK_SOURCES
    ME_PURCHDOC_POSTED
    Instead you can use enhacement MM06E005  Customer fields in purchasing document.
    Create a project under Transaction CMOD.
    Assign enhancement as Project component.
    You'll find Exit 012. At time of save you can change header im_ekko based on you parterner data tab.
    Regards,
    Amee.

  • Urgent Help Needed in BAdI ME_PROCESS_PO_CUST

    Hello friends,
    I m workin on BAdI ME_PROCESS_PO_CUST , my requirement is to store header level text in po if it is left blank by user , for this i have creadted standard text for every po header text , and implemeted method POST of the badi. so when user is saving the po , i m checking whether all header text is filled by user or not , for this i have called method GET_TEXT , if the text is blank i m reading data from standard text using READ_TEXT function module and setting in perticular text by using method SET_TEXT , every thing is working fine , the respective text ifrom standard text  getting filled to the perticular text of the po , if left blank by the user .  But the actual problem is that when i m going to display the same po again , the text that i was supplied by standard text is not showing in po.
    is there is anything that i missed out , i also done coomit work , but its not working ,
    so please suggest.......
    dont worry abt points

    Dear Mr Mahesh
    I also face similar problem . But my limitation is that I am new to BADI . Sir it will be great help if you can please mail me the steps / procedure and code to be written for implementing the above BADI .
    Sir , I look forward for your kind help please .
    Regards
    B V Mittal
    [email protected]

Maybe you are looking for

  • A problem with plsql trigger in my form

    i created two text field and a button(insert) to take the value of the text feild at run time and insert it in the table this is my procedure CREATE OR REPLACE PROCEDURE insert_value (brn_id_in_p IN branch.brn_id%TYPE, brn_name_in_p IN branch.brn_nam

  • IWeb freezing

    I'm new to Macs, so i'm not quite sure how to solve this. After i create a section with photo albums and add a effect to the album cover, everything freezes and literally nothing helps! That stupid beach ball keeps on spinning and force quit won't re

  • Invalid pdf document

    I get an error screen saying "INVALID PDF DOCUMENT" when I can see that it isn't.

  • URGENT help on ESS-ITS

    Hi, URGENT Issue: When ITS is accessed through Mozila Firefox 2.0 browser(not happening in IE), the screen freezes giving an Error: uncaught exception: Permission denied to get property SAPWF_nfop in the Error console Points will be rewarded BR, Abdu

  • Did security preferences in Safari break with version 7.1?

    I updated to Safari 7.1 and Mavericks 10.9.5. With this update I can no longer open a pdf from a website using the Adobe Reader plugin without first having to change the security settings in Safari from Ask to Allow. I did not have to do this in vers