Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

validation - WO technical completion

Former Member
0 Likes
542

Hi experts..

i have written validation that when ever user trying to do Techo (technical completion) by pressing techo button, and if the order already confirmed i need to throw an error message .

my logic is  as below.

IF sy-tcode = 'IW32' OR sy-tcode = 'IW38' OR sy-tcode = 'IW22' OR sy-tcode =  'IW28'.

    CLEAR :  lw_jest.

    SELECT SINGLE * FROM jest INTO lw_jest WHERE

                                        objnr = caufvd_imp-objnr

                                         AND   stat  = 'I0009'

                                         AND   inact <> 'X'.

    IF sy-subrc = '0'.

      CLEAR lv_resb_flag1.

      CALL FUNCTION 'ZPMFM_TYPE4_QTY_DEC_VAL_Z09'

        EXPORTING

          caufvd_input = caufvd_imp

        IMPORTING

          lv_resb_flag = lv_resb_flag1.

      IF lv_resb_flag1 = 'X'.

        MESSAGE e036(zmm_dev).

      ENDIF.

    ENDIF.

but the issue iis after complition if the user trying do any change the same message is throwing , kindly let me know how can i restrict it only for techo button

regards

niru

1 ACCEPTED SOLUTION
Read only

davis_raja
Active Participant
0 Likes
502

Dont just check the Tcode, also check the user command of the action done. i.e sy-ucomm

2 REPLIES 2
Read only

Former Member
0 Likes
502

HI Experts

any ideas/thoughts on this?

regards

niru

Read only

davis_raja
Active Participant
0 Likes
503

Dont just check the Tcode, also check the user command of the action done. i.e sy-ucomm