on 05-02-2016 9:00 PM
Hi Experts,
Hope you are doing well. I have this issue in MDG-M(BRF Plus) workflows, Please help me.
Details:When approver clicks standard REJECT Button, it gives this following error message.
"Create a Note and specify a reason for rejection the change request - Display Help".
Similarly we need same functionality for new buttons given below which are added to New Approval step.
Reject to Predecessor.
Reject to Requestor.
I added these 2 buttons,but I could not able to provide error message similar to REJECT button.
Please help me.
Thanks,
Balaji.T.
Dear Balaji,
I found the solution and its working fine .
CALL METHOD cl_mdg_bs_bp_fru=>get_instance
EXPORTING
iv_model_name = 'BP'
iv_classname = 'CL_USMD_CONV_SOM_GOV_API'
RECEIVING
ro_so_gov_api = lo_mo_conv1.
lv_note_created = lo_mo_conv1->mv_note_created
and check ur button action in lo_mo_conv1->mv_crequest_action
and if ur reject button action is called or pressed on UI then and mv_note_created is initial then show error message..
Above code you need to write in CHECK_ENTITY BADI.
Thanks
Sachin Kapoor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balaji,
Did you get any solution of your query related to New Reject Button as I am facing the same issue.
Please let me know if you found any solution.
Thanks
Sachin Kapoor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have done that several times via a modification. This is not recommended but very easy. The class/method to be modified dependents on your MDG and SAP Basis version but most likely its CL_USMD_CR_MASTER in method if_fpm_guibb_form~process_event around line 440 and 457.
You need to add your custom action to the IF statement and in the case statement you add your custom action as well to add the message.
Before you do the changes you should check in debugger if this is the right class/method. If not search for the correct class which is used in your scenario.
As said: This is NOT recommended because it is a modification. I would rather try to use standard buttons and adjust the process template accordingly.
Best regards
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steffen,
You are Great. I had same solution, but as you told, it is not Recommended.
I need little elaboration about your point "try to use standard buttons and adjust the process template accordingly."
You mean, I need to copy the workflow template to Z template and do necessary changes ??
Please spare some more time to elaborate the above point. I am beginner to MDG, but can tweak.
Thanks,
Balaji.T.
Hi Balaji,
As told above, please create a custom implementation for BADI USMD_RULE_SERVICE and in CHECK_ENTITY method try code like below: Could have a try !
DATA: lo_fpm TYPE REF TO if_fpm,
lt_read_queue TYPE if_fpm=>ty_t_event_queue,
ls_read_queue LIKE LINE OF lt_read_queue.
DATA: lt_messages TYPE usmd_t_message.
DATA: lr_ref TYPE REF TO if_usmd_crequest_api,
ls_crequest TYPE usmd_s_crequest,
lt_note TYPE usmd_t_crequest_note,
lt_attach TYPE usmd_t_crequest_attachment.
lo_fpm = cl_fpm=>get_instance( ).
IF lo_fpm IS BOUND.
lo_fpm->read_event_queue(
IMPORTING
et_event_queue = lt_read_queue
).
" Read for the Action(ID) assigned to your Reject button
"Ex: Here R1 is the action assigned to a button.
READ TABLE lt_read_queue INTO ls_read_queue WITH KEY id = 'R1'
state = 'COMPLETED'.
IF sy-subrc = 0.
cl_usmd_crequest_api=>get_instance(
EXPORTING
iv_crequest = id_crequest
iv_model_name = 'MM' " Data Model
IMPORTING
et_message = lt_messages " Messages
re_inst_crequest_api = lr_ref " Change Request API Interface
).
lr_ref->read_crequest(
IMPORTING
es_crequest = ls_crequest " Change Request
et_note = lt_note " Change Request Note
et_attachment = lt_attach " Change request Attachment
et_message = lt_messages " Messages
).
""Put your Code here
""Read lt_note and check for entered note and based on that fill outbound parameter ET_MESSAGE
ENDIF.
ENDIF.
Hi Balaji,
Try reading the FPM Event through FPM instance in CHECK_ENTITY method and read the CR note details using MDG API class CL_USMD_CREQUEST_API method READ_CREQUEST and validate it.
Move it to Master Data Governance forum instead of Master Data Management
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.