Disabling 'Change' and 'Delete' button in Attachment List in ME52N

Hi Friends,
The reuqirement is this:
A user attaches doucments  ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
Awaiting your response.......
Regards,
Fawaz

Hi,
Probably you have uncommented the call to super class when you reimplement the method on child class (z class)
I just implement the same thing now and it worked for me. Take a look:
1 - Modify the SGOSATTR table by SM30, just write a Z class (in my case CL_GOS_SRV_ATTACHMENT_CREATE) .
2 - Create/inheridt a subclass (not a copy) in SE24 of the standard class.
3 - Implement the method CHECK_STATUS in the z class. Note that the call to method on super class came commented. You only uncomment if you want to also execute a standard code in the super class.
Here is my code:
method CHECK_STATUS.
NOTE - In my real implementation I have uncommented the code below because I want do standard code be executed before my own check.
*CALL METHOD SUPER->CHECK_STATUS
EXPORTING
   IS_LPORB  = IS_LPORB
   IS_OBJECT = IS_OBJECT
IMPORTING
   EP_STATUS = EP_STATUS
   EP_ICON   = EP_ICON
  Check for BUS2012 = Bussinnes Object for Purchase Order
  IF IS_LPORB.TYPEID = BUS2012
  Check authorization and disable create attachment item if the user does not have authority...
IF IS_LPORB-TYPEID = 'BUS2012'.
AUTHORITY-CHECK OBJECT 'Z_MM001' ID 'ACTVT' FIELD '01'.
  IF sy-subrc <> 0.
    ep_status = mp_status_inactive.
  ENDIF.
ENDIF.
endmethod.
Regards,
Alexandre

Similar Messages

  • Disabling 'Change' and 'Delete' buttons in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    I have solved the issue Alhamdulillah by the foll. method:
    1. Copied CL_GOS_SRV_ATTACHMENT_LIST to ZCL_GOS_SRV_ATTACHMENT_LIST
    2. In ZCL_GOS_SRV_ATTACHMENT_LIST there is a method called: CHECK_STATUS. I overwrote with my check;
    on_mode_changed( 'D' ). --- For display
    on_mode_changed( 'E' ). --- For edit mode.
    3. In SGOS tcode, added VIEW_ATTA to point to ZCL_GOS_SRV_ATTACHMENT_LIST
    Regards,
    Fawaz

  • How to disable block and delete button in me22n transaction

    Hi experts !,
    as per my requirement i want to disable delete and block button in me23n . for this i wrte my logic but problem
    is when my logic satisfies then i want to disabele those two buttons . those block button function code is 'MEPO1211LOCK'
    if it is screen field we can use loop at screen and input = 0 . but here it is funtion code how to disable this funtion code as per
    condition .
    i tried this  SET PF-STATUS ' pf status name ' EXCLUDING ' fucntion code name  '.  also but not working ..
    if any one have any idea pls share ......

    Hello Experts,
    I have similar requirement. Please help....

  • Unable to disable Save and Cancel button on change user answer form

    Hi,
    I am not able to disable Save and Cancel button on change user answer form depending on a condition. Any kind of help will be appreciated.
    Thanks

    save and cancel are the default buttons
    check the disable default buttons...
    Nsankar

  • Disable or Deactivate Delete Button in SAP Easy DMS.

    Dear All,
    My client is using Easy DMS and is working fine. Now the issue is as soon as files become more in Private or Public folder he is Deleting Documents using DELETE Button which is available on the Tool Bar. Whereas if he uses Delete Document from Context Menu it shows Authorization is not given to delete the Document.
    Is there any way to overcome this by Disabling or Deactivating Delete Button on the Toolbar.
    rgds,
    Dayanand

    Dear Anubhav,
    I have already tried this option. It shows this can not be implemented.
    Please let me know any other option is there to overcome this issue.
    rgds,

  • Disable PUT and DELETE HTTP methods in Sun ONE Web Server 6.1

    Hello ,
    i want disable PUT and DELETE methods in SunOne 6.1 , i don't find the solution ...
    Thnaks to help me .
    telnet www.mywebsite.com 80
    Trying 145.248.193.13...
    Connected to www.mywebsite.com.
    Escape character is '^]'.
    OPTIONS * HTTP/1.0
    HTTP/1.1 200 OK
    Server: Sun-ONE-Web-Server/6.1
    Date: Wed, 18 Jan 2006 08:07:41 GMT
    Content-length: 0
    Allow: HEAD, GET, PUT, POST, DELETE, TRACE, OPTIONS, MOVE, INDEX, MKDIR, RMDIR
    Connection: close

    are you sure that it isn't a vulnerability ? if i understand you , OPTIONS * HTTP/1.0 list all the possible methods but they are not actived ?
    i have test with OPTIONS / HTTP/1.0 , is that the those possible methods : HEAD , GET ??
    thanks
    telnet www.mywebsite.com 80
    Trying 145.248.193.13...
    Connected to www.mywebsite.com.
    Escape character is '^]'.
    OPTIONS / HTTP/1.0
    HTTP/1.1 200 OK
    Server: Sun-ONE-Web-Server/6.1
    Date: Wed, 18 Jan 2006 11:11:07 GMT
    Content-length: 0
    Allow: HEAD, GET
    Connection: close

  • Updating database table for 'CHANGE' and 'ADD' buttons.

    Hi,
    I am working on module pool program. Here i am using table control.Below is my requirement:
    1) I have designed a selection - screen with 'CHANGE' and 'DISPLAY' buttons and in screen 100 i have 'ADD' and 'SAVE' buttons.
    2) when i click on 'CHANGE' , it will move to screen 200 here i need to change quantity field for that particular record which is in table control.once i change the field value and click on 'SAVE'  a message should be populated that "RECORD IS SAVED' and  this record should be updated in database table with new quantity field value and it should return back to my selection screen.
    3) When i click on 'ADD' , it should display already existing records in disable mode and a new line should be added inorder to enter new records. Once i enter the data and click on SAVE, this new record should be saved in the database table along with existing records.
    Kindly suggest me a sample code for this as am new to table control in module pool programming.

    Hi Gaurav,
    I've a similar problem!! any solutions to your problem!!

  • Insert ,Change and Delete  records  in OO ALV

    Hi All,
    This is regarding the functionlaties  Insert ,Change and Delete records  in OO ALV ,
    I have gone through the threads posted here and checked the standard  program BCALV_EDIT_04,
    but still I am not able to capture the Deleted and Inserted records,
    as  I am new to OO ALV,can some one help me out pls.
    Thanks and regrds,
    Sree.

    Hi Sree,
    A lot of material is available on SDN.
    Please see this link. This link contains good example of insertr, delete records in OOPS ALV.
    [OOPS ALV.|Re: Insert ,Delete & Add a row in ALV;
    May it helps you.
    Regards.
    DS.

  • How to disable Save and SaveAs Button in Adobe Reader ??

    I am having Dynamic XML Form (XFA based) designed on LC Designer ES2
    I Want to disable Save and SaveAs button  whenever it would be opened in Adobe Reader only.
    Other way around, i want to provide only facility to save form programmatically through Javascript to apply validation.
    Plz help
    Thnx in advance..!!

    I can apply folder level java script ...But How to handle this way on CLIENT SIDE..???

  • FBE2: BAPI or FM for Changing and Deleting Payment Advice

    Hi,
    I am looking for BAPI or FM for changing & deleting payment advice as we can accomplish from FBE2.
    This is EC 6.0 upgrade issue for not be able to post using CALL TRANSACTION in background mode.
    I tried the below FM's in the Function group  FARMATCH, but all have them have the follwing code to select payment advice Header Table [AVIK].  
    SELECT * FROM AVIK INTO TABLE LT_AVIK WHERE (LT_WHERE) AND
                                                  AVSID LIKE '09%'.    "This is not the case for my requirement
    FARMATCH_CHANGE_PAYMENT_ADVICE               
    FARMATCH_DELETE_PAYMENT_ADVICE               
    I found another set of FM's  REMADV_CHANGE  &  REMADV_DELETE but I am not sure if i can
    achieve the same functionality of change and delete that we can do using FBE2.
    If anyone had similar scenario, Appreicate your feedback.

    Below is a sample code.
    I am able to delete the details....
    Take a look...:)...imp to add wait for few seconds
    REPORT z.
    PARAMETER: vbeln TYPE vbak-vbeln.
    PARAMETERS: fplnr TYPE fplnr.
    DATA: t_zfpla TYPE STANDARD TABLE OF fplavb WITH HEADER LINE.
    DATA: t_zfplt TYPE STANDARD TABLE OF fpltvb WITH HEADER LINE.
    DATA: t_fpla_new TYPE STANDARD TABLE OF fplavb WITH HEADER LINE.
    DATA: t_fpla_old TYPE STANDARD TABLE OF fplavb WITH HEADER LINE.
    DATA: t_fplt_new TYPE STANDARD TABLE OF fpltvb WITH HEADER LINE.
    DATA: t_fplt_old TYPE STANDARD TABLE OF fpltvb WITH HEADER LINE.
    *DATA fplnr TYPE fplnr.
    IF NOT vbeln IS INITIAL.
      SELECT SINGLE rplnr INTO fplnr FROM vbak WHERE vbeln = vbeln.
    ENDIF.
    CALL FUNCTION 'BILLING_SCHEDULE_READ'
      EXPORTING
        fplnr = fplnr
      TABLES
        zfpla = t_zfpla
        zfplt = t_zfplt.
    LOOP AT t_zfpla.
      MOVE-CORRESPONDING t_zfpla TO t_fpla_old.
      t_fpla_old-updkz = 'D'.
      APPEND t_fpla_old.
    ENDLOOP.
    LOOP AT t_zfplt.
      MOVE-CORRESPONDING t_zfplt TO t_fplt_old.
      t_fplt_old-updkz = 'D'.
      APPEND t_fplt_old.
    ENDLOOP.
    BREAK-POINT.
    *CALL FUNCTION 'BILLING_SCHEDULE_SAVE'
    TABLES
       fpla_new = t_fpla_new
       fpla_old = t_fpla_old
       fplt_new = t_fplt_new
       fplt_old = t_fplt_old.
    DATA fpltr TYPE fpltr.
    CALL FUNCTION 'BILLING_SCHEDULE_MAINTAIN'
      EXPORTING
      I_FPLA           =
      I_FPLT           =
       i_upd_fpla       = 'X'
       i_upd_fplt       = 'X'
        i_fplnr          = fplnr
    IMPORTING
      E_DATALOSS       =
      E_UPD_FPLA       =
      E_UPD_FPLT       =
       e_fplnr          = fplnr
       e_fpltr          = fpltr
    TABLES
        fpla_new = t_fpla_new
        fpla_old = t_fpla_old
        fplt_new = t_fplt_new
        fplt_old = t_fplt_old.
    WAIT UP TO 2 SECONDS.

  • Apply and delete buttons need differentiation

    How do we get the apply and delete buttons put in different locations on the info window for ical? I've accidentally deleted when I meant apply because the buttons are in the same location. Mabye delete should be at the top right.

    Richard,
    That sounds like a great idea. Be sure to submit iCal Feedback.
    In the meantime, don't forget about the iCal>Edit>Undo menu command (⌘Z).

  • Cant open pages that need log in info. I've cleared cache, disabled extensions and deleted all cookies to no avail....help!!!

    Any page that requires a username and password will not open, this started last Thursday and at that time I was able to reinstate by clearing cache, disabling extension and deleting cookies. Subsequently that fix failed and now doing all those things has no effect.

    I found the answer: http://forums.adobe.com/thread/1018071?tstart=0 It was a conflict with RealPlayer. Incidentally, in order to find this thread again, I had to use a google search. Is there really no way to find a person's own questions via our own profile???

  • Anyone.know.how.to.get.spacebar.and.delete.button.to.work??

    anyone.know.how.to.get.spacebar.and.delete.button.to.work??

    I think you are asking this in the wrong forum.  This is for TBD issues.

  • Analyzer API command to disable Navigate and Open button

    Hi,I would like to pass the parameters to Analyzer Java Web Client to disable Navigate and Open button.Is there any posibility in Analyzer API to do this?Thanks,Grofaty

    Hi,My system is:- Essbase 6.5.3- Analyzer 6.1.1

  • I can not delete or compose an email on iphone 5.  The icon and delete button are not on the screen.

    I can not delete or compose an email on iphone 5.  The icon and delete button are not on the screen.

    I had the same problem.  I completely powered down the iphone and then powered it back up.  I then had the bar at the bottom of the email app that I think you are looking for.
    iPhone5, OS6

Maybe you are looking for