on 03-26-2015 3:40 PM
Hello All,
I have a requirement where in i have to add custom fields in a custom additional tab through CMOD Project.
I have implemented the same.
Now, i have to make certain fields mandatory here. I have implemented a logic to make the screen custom fields in the additional custom tab mandatory by using the following code in PBO section.
IF VIQMEL-ZZFAULT_SOURCE EQ 'TSR' .
LOOP AT SCREEN.
IF SCREEN-NAME = 'QMEL-ZZAUDIT_NUM'.
SCREEN-REQUIRED = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Now , this logic works only when we go to this tab. However if we don't enter this tab and try to save the notification, the custom mandatory fields do not act as mandatory and saves the notification.
Kindly suggest.
I want these fields to act mandatory through out the transaction.
Hello Kunal,
Even standard fields marked mandatory through configuration settings (OIAL), have this problem, Their mandatory feature works only when user enters the tab. As Paul rightly said we need to use user-exit QQMA0014 or IWOC0002 for this. User-Exit QQMA0014 triggers when the Notification is Saved, whereas the other exit triggers when there is a change of Status. For your Application QQMA0014 is best suited. Put these following lines in the include ZXQQMU20 of this exit, and your problem is solved.
IF I_VIQMEL-ZZAUDIT_NUM IS INITIAL.
MESSAGE 'Filling Audit Number field is mandatory' TYPE 'E' DISPLAY LIKE 'I '.
ENDIF.
This will eliminate the need for any code in PBO.
Related post:
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The PBO will not be executed unless the tab is activated. An option would be to also add the mandatory checking into exit QQMA0014. Then you can prevent notification being saved unless the fields contain a value.
-Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.