Skip to Content
author's profile photo Former Member
Former Member

Restrict end user to change confirmed operations text in a work order

Hi,

I am looking for an option to restrict end user to make operation text changes once operation is confirmed.

We are not able to achieve this functionality by writing the code in user exit IWO10009, since it's being table control once any of the operation is confirmed it's not allowing to change in other (non confirmed) operations text changes of same work order.

I tried to configure user status for operations, and selected "CHANGE" as forbidden for one of the user status, still system is allowing to operation text changes in spite having relevant user status. What does this CHANGE represents?

I have checked on final confirmation config too, did not help!

I understand that the change log for operations displays all the changes related to operation text.

Please let me know your thoughts.

Thanks,

N.Nagaraju

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Feb 12, 2016 at 12:01 AM

    Hello Nagaraju,

    Here is the solution.

    Objective:

    This code prevents changes in Operation text if the Operation is in confirmed status.

    Notes:

    • This prevention error triggers only when such operation is in fully confirmed status
    • This prevention error triggers while Saving the Order.
    • If the confirmation of operation is cancelled (IW45), then the text changes take place.
    • This does not stop you from making text changes in operations of other statuses.
    • This does not stop from adding or deleting operations.

    The following code to be used in the include ZXWOCU07 of user-exit IWO10009 .

    IF caufvd_imp-iphas <> '0' AND sy-tcode = 'IW32'.

    DATA: vbkz TYPE afvgb-vbkz.

    DATA: i_afvc TYPE STANDARD TABLE OF viauf_afvc,

    wa1 LIKE LINE OF i_afvc.

    SELECT * FROM viauf_afvc INTO TABLE i_afvc WHERE aufnr = caufvd_imp-aufnr.

    DATA: BEGIN OF i_afvg OCCURS 100.

    INCLUDE STRUCTURE afvgd.

    DATA:END OF i_afvg.

    DATA: wa2 LIKE LINE OF i_afvg.

    CALL FUNCTION 'CO_BO_AFVGBT_GET'

    EXPORTING

    aufnr_imp = caufvd_imp-aufnr

    TABLES

    afvgbt_exp = i_afvg[].

    LOOP AT i_afvc INTO wa1.

    READ TABLE i_afvg INTO wa2 WITH KEY objnr = wa1-objnr.

    IF sy-subrc = 0.

    DATA:i_stat LIKE jstat OCCURS 0 WITH HEADER LINE.

    CALL FUNCTION 'STATUS_READ'

    EXPORTING

    objnr = wa1-objnr

    only_active = 'X'

    TABLES

    status = i_stat.

    LOOP AT i_stat.

    IF i_stat-stat = 'I0009'.

    IF wa1-ltxa1 <> wa2-ltxa1.

    MESSAGE: 'You can not make changes in texts of confirmed Operations'

    TYPE 'E' DISPLAY LIKE 'I'.

    ENDIF.

    ENDIF.

    ENDLOOP.

    ENDIF.

    ENDLOOP.

    ENDIF.

    This triggers the following error pop-up, while saving the Order, in case some text changes are found in any one of the confirmed operations of the Order.

    Upon hitting the Enter key the popup goes away and user gets access to correct the changes made and Save the Order.

    Believe this is the solution you are looking for. Implement with support of ABAPer, if you are not one.

    Good luck

    KJogeswaraRao


    error.JPG (14.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2016 at 06:38 PM

    Hi,

    Have you gone through below document.

    Restrict Operation changes after Order Release (user exit IWO10009)

    May be Jogeswara can provide more info on the same

    Regards

    Terence

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I saw this thread earlier but my requirement is little bit different. I don't want to stop user adding operations and changing text based on order header, user or system status.

      Thanks for your inputs!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.