on 12-21-2014 7:47 AM
Dear All,
I need to have an custom check in PM notification based on user status. I couldn't find any Badi fo the same and user exit is available for that. But if I use the userexit, then it will not check while updating and it will check once it got saved. Can anyone suggest Badi for PM notifications?
Thanks in advance.
Regards,
Nellaiappan N.P.
Here is the code to be put in QQMA0014 (include ZXQQMU20).
DATA : I_USTAT LIKE ALM_ME_USER_STATUS_CHANGES OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'ALM_ME_READ_USER_STATUS'
EXPORTING
OBJECT_NO = I_VIQMEL-OBJNR
TABLES
USER_STATUS = I_USTAT.
IF I_USTAT-USER_STATUS_CODE = 'CLSD'.
IF I_VIQMEL-AUSBS IS INITIAL.
MESSAGE: 'Fill ''Malfunct.end'' fields before setting ''CLSD'' status.'
TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.
ENDIF.
This code does exactly that, what we discussed. Presently only one field is mentioned here. (You can extend the Ifs for other fields and hence the respective error messages). As per this syntax, if the user status is set to 'CLSD' the following error is thrown.
So it has been checked that user status is captured at runtime and used in user-exit. Hope it addresses your need.
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nellaiappan,
You need to explain your requirement in detail, so that members would share their expertise in terms of User-exit Or BADI. All my such requirements were addressed through 'Save' user-exits (when I am not particular about the error message to be exactly on spot.)
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sir,
My requirement is,
My client wants to make some field as mandatory in PM Notifications where as that mandatory should be active only when particular user status is active. If I use User exit, then I can fetch the value form the table only so the user can save the notification without entering the fields at first time. At second time, if they go inside the same notification then only mandatory check will work.
But my client wants to activate the check at the time of choosing user status and save the notification at first time itself. Hence I search Badi but none will be suitable for my requirement.
Regards,
Nellaiappan N.P
I understand this way. You have set a user status say INPR (in process). At this instance itself, few fields should become mandatory. This seems to be possible with User-exit also. You need to capture the runtime user status. Is this your requirement? If so which are the fields you want to make mandatory?
User | Count |
---|---|
103 | |
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.