Application Development 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: 

How to Refresh "Internal table values" in User EXIT.

Former Member
0 Kudos

Dear All,

My requirement is to place some checks in exit ZXQQMU20 in different tabs from the TCODE IW21 . IW22 etc.

Now after placeing the checks towards the different tabs while doing "NOCO" from IW21 the conditions are fullfilled but

when i go ahead to modify the created "NOCO " from the TCODE IW22 by deleting the created values and saving in IW22 , the conditions written in the exit are still satisfied eventhough i have deleted the values in IW22.

The reason for this is that the tables which are there in the exit ZXQQMU20 T_VIQMFE , T_VIQMUR , T_VIQMMA

still contains the old values which were there at the time of creation of "NOCO" in IW21 .

How to refresh my " internal tables values" used in such that even at the time of modification of the NOCO through IW22 my table values should pick the current screen values and not the values which were there at the time of creation.

Please help.

The code i have written in the exit is as below:-

*************************************************************************************************************

**********************************************************************
********************* Changed vide ******START
**********************************************************************
*****IW21  IW22 also added in filter criteria of notification *************
*******************************************************************************

******The purpose of this modification is that in the execution of IW21 or IW22 or IW24 or IW25 we have to give a check that if the
******notification type is M2 than inside the Transaction screen , if the Breakdown duration comes less than 15 min than there are
******no issues but if the breakdown duration is more than 15 min than the mandatory fields needs to be entered in the analysis tab.
**    The user has to fill up either following mandatory fields in Analysis Data tab.
**
**    A. Object Parts & Damages sub tab
**    Code Group - Object Parts (OTGRP, VIQMFE)
**                          AND
**    Code Group - Problem / Damage (FEGRP, VIQMFE)
**    Or
**    Notification Item Short Text (FETXT, VIQMFE)
**   B. Cause sub tab
**    Code Group # Causes (URGRP, VIQMUR)
**    Or
**    Cause Text (URTXT, VIQMUR)
**   C. Action Taken sub tab
**    Code Group # Activities (MNGRP, VIQMMA)
**    Or
**    Activity Text (MATXT, VIQMMA)
**            Then, allow user to complete notification (NOCO).


 CLEAR : L_VAR , L_COMP_TIME.

 IF ( SY-TCODE EQ 'IW21' OR SY-TCODE EQ 'IW22' OR SY-TCODE EQ 'IW24' OR
      SY-TCODE EQ 'IW25' ).

   IF ( E_VIQMEL-IWERK = '061' ) OR ( E_VIQMEL-IWERK = '062' ).

     IF E_VIQMEL-QMART = 'M2'.

       L_VAR = E_VIQMEL-AUSZT.

       L_COMP_TIME = L_VAR / 60.

       IF L_COMP_TIME < 15.

         EXIT.

       ELSEIF L_COMP_TIME > 15..

*         IF ( T_VIQMFE-OTGRP IS INITIAL AND T_VIQMFE-FEGRP IS INITIAL )  OR  ( T_VIQMFE-FETXT IS INITIAL ) .
*
*           MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
*
*         ENDIF.

         IF T_VIQMFE-OTGRP EQ '' OR T_VIQMFE-FEGRP EQ ''.
           IF T_VIQMFE-FETXT EQ ''.
             MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
           ENDIF.
         ENDIF.

         CLEAR L_TAG.
         IF T_VIQMUR[] IS INITIAL.
           MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
         ELSE.
           LOOP AT T_VIQMUR.
             IF  T_VIQMUR-URGRP IS INITIAL .
               IF T_VIQMUR-URTXT IS INITIAL.
                 L_TAG = 'X'.
               ENDIF.
             ENDIF.
           ENDLOOP.
           IF L_TAG = 'X'.
             MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
           ENDIF.
         ENDIF.

         CLEAR L_TAG.
         IF T_VIQMMA[] IS INITIAL.
           MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
         ELSE.
           LOOP AT T_VIQMMA.
             IF  T_VIQMMA-MNGRP IS INITIAL .
               IF T_VIQMMA-MATXT IS INITIAL.
                 L_TAG = 'X'.
               ENDIF.
             ENDIF.
           ENDLOOP.
           IF L_TAG = 'X'.
             MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
           ENDIF.
         ENDIF.
       ENDIF.

     ENDIF.

   ENDIF.

 ENDIF.

<Added code tags>

Thank you so much in advance..

-Sudhish

Please use the code tags when you're posting any code snippet

Edited by: Suhas Saha on Jul 13, 2011 12:39 PM

1 REPLY 1

Former Member
0 Kudos

Hi, I was thinking just like XVBAP and YVBAP values in the USEREXIT_SAVE_DOCUMENT.

Plz check u have x /y versions or tables like _old/ _new suffixes and then move the value accordingly.

otherwise there may be inconsistency.

Edited by: Prasenjit S. Bist on Jul 13, 2011 3:03 PM