Issue with BADI 'ME_PROCESS_PO_CUST'

Hi People,
       I have a requirement wherein we need to make the Delivery Date in Schedule line of PO as Uneditable. This needs to be done for specific User-Group. Hence I have decided to use the BADI 'ME_PROCESS_PO_CUST' to attain the solution.
I am facing a problem in using the BADI. I have created 2 different Field Selection(one with editable and other without) through SPRO and  am trying to swap the field selection based on user in the Method 'FIELDSELECTION_ITEM_REFKEYS' of the BADI interface. This swapping doesn't seems to be working. Can anyone give me some idea on why is this not working, Eventhough the Method is getting trigerred.
Also i have tried the other method 'FIELDSELECTION_ITEM' to make them uneditable by changing the Field Selection Properties. but still no luck as this method not getting trigerred at all.
Regards,
Simin Raveendran.

Hi Simin,
Did you check the sample code which is delivered with the BADI. This code can be accessed by following:
GOTO->Sample Code->Display.
Check the method FIELDSELECTION_ITEM to see an code example. It appears to me that you should do something like that by changing the properties for field mmmfd_deliv_date.
Below is the documentation for the method FIELDSELECTION_ITEM:
Special Field Selection Item
Functionality
The FIELDSELECTION_ITEM method enables you to influence the field selection properties for a field.
Parameters
The following parameters are available:
IM_HEADER - Document header
The interface reference is of the type IF_PURCHASE_ORDER_MM.
IM_ITEM - Document item
The interface reference is of the type IF_PURCHASE_ORDER_ITEM_MM.
CH_FIELDSELECTION - Fiele selection table
By making changes to this table, you can influence the display properties of a field.
This table consists of value pairs <METAFIELD|FIELDSTATUS>.
The Metafield represents a business content (e.g. the PO quantity). Thus, for example, the database field EKPO-MENGE is linked to a certain metafield value just like the field MEPO1211-MENGE on the item overview screen in the purchase order.
Through this abstraction, reference can be made to business contents on a uniform basis.
Standard metafields are defined in the type group MMMFD.
The field selection status has four possible instances:
'-' Field is suppressed
'*' Field is purely a display field
'.' Input field
'+' Mandatory field
Notes
Under no circumstances make any changes to the database within this method. On no account use Commits.
Kind regards,
Robert

Similar Messages

  • Post changes of Purchase Order with BADI  ME_PROCESS_PO_CUST

    Hello All,
    I have to make changes to a Purchase Order when it is posted. In some cases I have to set the field WEBRE.
    What i tried is the BADi - Method ME_PROCESS_PO_CUST~post.
    Following Code I entered:
    DATA: position TYPE PURCHASE_ORDER_ITEM,
            tab_pos TYPE PURCHASE_ORDER_ITEMS,
            position_data TYPE mepoitem,
            xcheck TYPE MMPUR_BOOL,
            kopf TYPE REF TO CL_PO_HEADER_HANDLE_MM,
            position_check TYPE mepoitem.
      CLEAR: kopf.
      tab_pos = IM_HEADER->get_items( ).
      xcheck = IM_HEADER->IS_CHANGEABLE( ).
      TRY .
        kopf ?= IM_HEADER.
      CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF kopf is  NOT INITIAL.
         kopf->MY_CUST_FIREWALL_ON = 'X'.
      ENDIF.
    LOOP AT tab_pos INTO position.
      position_data = POSITION-item->get_data( ).
      xcheck = POSITION-item->IS_PERSISTENT( ).
      IF position_data-werks(1) EQ 'D' OR
         position_data-werks(1) EQ 'G' OR
         position_data-werks(1) EQ 'P' OR
         position_data-werks(1) EQ '1'.
      ELSE.
        IF position_data-wepos = 'X' and position_data-UMSON is initial.
          position_data-webre = 'X'.
          POSITION-item->set_data( position_data ).   "write data
        ENDIF.
      ENDIF.
       position_check = POSITION-item->get_data( ). " check if it is written
    ENDLOOP.
    Now my Problem is, that my changes in  position_check are ok, but they are not written to database and I don't know why.
    I have made the changes with TA ME22n.
    I also tried ME_PROCESS_PO_CUSTcheck and ME_PROCESS_PO_CUSTprocess_item. With method process_item it is written to database, but it is not the right point of time. I just want these changes when the purchase order is posted.
    Got anybody an idea, maybe another Exit, Badi or what I'm doing wrong?
    Best regards,
    Ronny

    HI
    Try using this BADI
    ME_PURCHDOC_POSTED - Define Follow-On Processing for External Purchasing Documents
    We have used this BADI for updating the fields in the header and item level; after posting
    Thanks & Regards
    KK

  • Issue with BADI for ALE

    Hi,
    I have a requirement where we need to incorporate a Talent group functionality in BADI.
    We are not using the SAP standard functionality of talent group, though we are customising the BADI, method HRRCF_CAND_FROM_EE_ALE  in class CL_HRRCF_EMPLOYEE_INBOUND.
    We get data from HR through ALE, now in this data we have a  special indicator(from HR infotype 34) which we will use as a talent group.We have a custom mapping table in which we have fields infotype 34 and subtype (which is special indicator) and object ID. Now, once we get the candidate ID and based on indicator we need to find obj Id from custom table.Now I need to map candidate ID and Obj Id from custom table and assign it to the relation B658 in hrp1001
    (NA<->NF). 
    But I couldnt proceed further with technical logic on this. Could someone help me in this regard.
    THanks a bunch.
    VIkram

    Hi,
    I have a requirement where we need to incorporate a Talent group functionality in BADI.
    We are not using the SAP standard functionality of talent group, though we are customising the BADI, method HRRCF_CAND_FROM_EE_ALE  in class CL_HRRCF_EMPLOYEE_INBOUND.
    We get data from HR through ALE, now in this data we have a  special indicator(from HR infotype 34) which we will use as a talent group.We have a custom mapping table in which we have fields infotype 34 and subtype (which is special indicator) and object ID. Now, once we get the candidate ID and based on indicator we need to find obj Id from custom table.Now I need to map candidate ID and Obj Id from custom table and assign it to the relation B658 in hrp1001
    (NA<->NF). 
    But I couldnt proceed further with technical logic on this. Could someone help me in this regard.
    THanks a bunch.
    VIkram

  • Issue with BADI in BAPI_GOODSMVT_CREATE

    Dear All,
    I am using BAPI BAPI_GOODSMVT_CREATE to create GR with some custom fields for this custom fields am using EXTENSION in BAPI but while execution am getting exception 'badi not implemented' in internal BADI below am sending that code.
    Call BAdI MB_BAPI_GOODSMVT_CREATE to fill own fields
        TRY.
            get badi lo_mb_bapi_GOODSMVT_CREATE.
          CATCH cx_badi_not_implemented.                    "#EC NO_HANDLER
        ENDTRY.
    Kindly suggest me some solution why this BADI throwing exception...as i think this BADI should implemented automatically when i call BAPI BAPI_GOODSMVT_CREATE

    Hello Raj
    Can you share your answer?
    I have added my fields in MSEG table and i want to update those fields using BADI
    MB_BAPI_GOODSMVT_CREATE.
    Can you pls tellme how you have done this.
    Regards
    Chandra

  • Performance Appraisal-Issue with BADI HRHAP00_COL_ACCESS

    Hello
    The requirement: For a given year, say 01/01/2007 to 12/31/2007, if an EE has a value 01 in a field on IT0001, then show the column X else do not show the column.
    By implementing the BADI, we are now able to control the access to the column, but it seems that the BADI is checking the value of the field as of the system date and then showing/hiding the column. We would like the BADI to check for the value for any time between 01/01/2007 to 12/31/2007, irrespective of the system date. The ABAP person working on the BADI is not able to check for the dates in the BADI. Can you please assist and advice on what can be done in this regard.
    Many thanks in advance.

    Hi,
    Ask your ABAPer to code like this.
    He must be using a select query to get the 0001 infotype data or a FM.
    If its a select query then
    code for the begda and endda like this.
                     AND ( ( BEGDA <= V_BEGDA AND ENDDA >= V_BEGDA )
                     OR
                     ( BEGDA <= V_ENDDA AND ENDDA >= V_ENDDA ) ).
    here your V_BEGDA is 01.01.2007 and V_ENDDA is 31.12.2007.
    Hope this helps you.
    Regards,
    Subbu.

  • Issues with bad apps

    What recourse do I have if I buy an app and it does not work ot it works poorly?

    there isnt a terminal app to acess the iPhone file ssytem but there is a telnet app to access remote systems in the app store - also a couple VNC app and even a TH520 for IBM AS 400's
    i dont mind not being able to access the file system on the iPhone but my organiation turns off telnet access - so what i want is for someone to write an ssh app so i could could access my unix systems from the phone

  • 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

  • I have bought a used macbook, to bad i do not have the admin password. is there any way to bypass this issue with out the Mac OS X disk? (without loosing my obtained files?)

    i have bought a used macbook, to bad i do not have the admin password. is there any way to bypass this issue with out the Mac OS X disk? (without loosing my obtained files?)   I NEED HELP BADLY PLEASE....

    What version of the Mac OS X are you running. Go to the Apple in the upper left corner and select About This Mac and post the version.

  • Issues while creating implementation for BADI  "ME_PROCESS_PO_CUST"

    Hi Group,
    I have issues while creating implementation for  BADI "ME_PROCESS_PO_CUST".
    I tried to create implementation for the above mentioned BADI but, I was getting an error like this:
    "Interface implementation IF_EX_ME_PROCESS_PO_CUST does not exist".
    I want to implement this BADI and so, ideas/views at the earliest will be appreciated.
    Please let me know how to overcome this error.
    Thanks,
    Vishnu.

    Hi,
    Have you activated the class which is implementing the interface? (in transaction SE19 you should see class name)
    Best regards,
    Wojciech

  • Adobe 9 Multiple issues with scale resetting, hand tool disappearing, and bad parameters

    Hello and thank you for help!
    We are having a single machine have issues with the scale resetting on a documents after they have been saved.  We will set the scale to 1-30 and after re-opeing the pdf, its back to 1-1
    Also having issues with the hand tool reverting to the pointer tool after an indeterminet amount of time.  And lastly we recieve the bad parameter message when using the clouding tool, the feature can be used right after that with no issues.  Where to start troubleshooting this issue?
    Adam

    Are you saying that
    you are going to the Document Properties tab->Initial View and setting the magnification and then saving the file, that this setting does not stick when you reopen the file
    or
    you just changing the view magnfication while looking at the file, saving the file and that view mangification doesn't stick.
    If the latter, its not supposed to. If the former, then Houston we have a problem.

  • HT201401 Has anyone had issues with the iPhone 5'S power cord going bad? I have purchased 2 in a 4 month span and they keep going out.

    Has anyone had an issue with the power cord for the iPhone 5? I have replaced two in a four month period

    Did you check with Verizon to make sure that your destination country would allow the device you have to connect? The possibility is that this country does not have (or you are not in range) a carrier that uses CDMA. If the carriers in this country use GSM you may be out of luck. VZW cannot guarantee service in any country outside the USA.
    Here is the number to call 908-559-4899

  • Issue with New BADI activation

    Hi,
         I am working with BADI BADI_HRTMC_DR_FIELDS. I need to create a new implementation with filter value 'SAP_BP'. Already a standard implementation HRTMC_IM_DR_FIELDS_BUS_PARTNER exists with same filter value, but I dont want it to get executed. When I tried to activate my new implementation, I get error saying another implementation exists with same filter value. I am not seeing any options for deactivating the standard implementation. Please suggest how I can make my new implementation run instead of the standard.
    Thanks,
    Mahesh

    Done through IMG settings for this BADI.

  • 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

  • Ipod sync issues with Windows 7

    I just purchased a new computer with the Windows 7 operating softeware and now I cannot sync my Ipod Touch (3rd generation) but I do not experience this issue with my old computer with Windows Vista.  When I need to update my Ipod I have to connect it to my old computer.  Help.  I do not want to pay Apple for support when I see countless post about this issue.

    Diane Wordsmith wrote:
    Are you set to manually manage on both computers? If not, an auto sync on one of them will erase the iPod and place that computer's library on it.
    No that wouldn't be it. The manual vs. Auto sync setting is stored on the iPod, not on iTunes. So if you take a manually managed iPod and plug it into an iTunes it has never connected to before, the new iTunes will still recognize the iPod as manually managed and not do anything bad to it (in theory).
    Patrick

Maybe you are looking for

  • I am suddenly no longer able to pick up wifi...Please help!

    Ever since I added a 4th gen ipod to my family, my 2nd gen ipod no longer picks up the wifi signal in my house.  It wont pick up any wifi signal on my street where as the other ipod, as well as my cell and laptop pick up 5 or 6 networks!  I had an ap

  • 24" iMac won't sleep!

    Just wondering whether anyone else has encountered the same problem: my 24" Intel iMac won't go to sleep! Every single method of putting the machine to sleep does not work: CMD-OPT-EJECT; (ii) Apple menu - SLEEP; (iii) setting the Power button to put

  • Problem opening PDF email attachments

    How do I get email attachments to open as PDF files in Adobe Reader instead of Photoshop Element?

  • Storing and loading global values in JVM...

    Is it possible to store and then read global values from the JVM? If it is possible, could please give me the code fragmant to do this or direct me to some place where I can read more about this. Thanks. -PV

  • Aperture 3.6 will not start after new install

    Rebuilt my Mac Mini with a clean install of Yosemite 10.10.2 and reinstalled all my apps. Downloaded and installed Aperture from the App Store but it will not start. No crash, just nothing. Does its animated thing when double-clicked in Finder, and g