on 01-08-2015 2:26 PM
Hi,
We have implemented Approve request Application in Fiori , in launchpad when Approver is rejecting the request he is giving some rejection comments .which we can see is getting stored as an attachment in R3 System,now we want to read this rejected reason from attachment and pass it to a simple variable which workflow team has created for storing rejection comments.
Kindly advice how we can read rejected reason and pass it to simple variable of workflow.
Regards,
Trilochan
Hi Prem,
Thanks for the reply,As we can see comments entred in fiori is coming as an attachment in workflow but we want to pass it into a simple container variable for that we have created a variable in Workflow now we want to pass value from Fiori reject box to this Container variable but we don't know how to achieve this for Approve request Application.
Regards,
Trilochan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trilochan,
Did it help?
Regards,
Masa / SAP Technology RIG
Hi Trilochan,
What are you trying to achieve by customizing the approve / reject button currently?
Are you currently providing a pop up feature for user in standard system when they approve/reject PR?
If so, you can change the logic to point to the standard Text (08 for PR).
For example, in case of PR, if you add an entry under MM->Purchasing->PR->Text for PR->Define Text type, (the code should be 08 here) the same will appear in your SAP PR Item Text screen. Fiori will automatically fetch the data entered in this screen. If you try to approve/reject a PR from Fiori, the comments added by user will be stored over here. If somebody put any comment, the higher / next level user can see this as a note when they open this PR. (Extra icon will appear).
So, better to configure 08 text type for PR and use the same.
If you are using some logic currently for standard ECC, the same can point to the new text.
In case of PO, the code is 18.
Thanks,
Prem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Masa,
what i can see:
Code used
begin_method zprovide_rejection_reason changing container.
DATA : ev_rej_reason_text TYPE char100,
ev_name TYPE bapiaddr3-firstname.
CALL FUNCTION 'ZMM_GET_REJECTION_REASON' " Get the Rejection Reason
IMPORTING
ev_text = ev_rej_reason_text.
DATA : lv_address TYPE bapiaddr3,
lv_username TYPE bapibname-bapibname,
lit_return TYPE TABLE OF bapiret2.
MOVE sy-uname TO lv_username.
CALL FUNCTION 'BAPI_USER_GET_DETAIL' " Get the user details
EXPORTING
username = lv_username
IMPORTING
address = lv_address
TABLES
return = lit_return.
IF lv_address-firstname IS NOT INITIAL AND lv_address-lastname IS NOT INITIAL.
CONCATENATE lv_address-firstname lv_address-lastname INTO ev_name SEPARATED BY space.
ENDIF.
swc_set_element container 'EV_REJ_REASON_TEXT' ev_rej_reason_text.
swc_set_element container 'EV_NAME' ev_name.
end_method.
* Begin of change by VRANA on 01/08/2014
BEGIN_METHOD ZGETDETAIL CHANGING CONTAINER.
DATA:
VENDOR TYPE KNA1-KUNNR,
MATERIAL TYPE MARA-MATNR,
QUANTITY TYPE MARA-BRGEW.
select single MATNR MENGE LIFNR from eban
into (MATERIAL,QUANTITY,VENDOR)
where BANFN = object-key-number and
BNFPO = object-key-item.
IF sy-subrc eq 0.
SWC_SET_ELEMENT CONTAINER 'Vendor' VENDOR.
SWC_SET_ELEMENT CONTAINER 'Material' MATERIAL.
SWC_SET_ELEMENT CONTAINER 'Quantity' QUANTITY.
ENDIF.
END_METHOD.
Function module code used above:
FUNCTION ZMM_GET_REJECTION_REASON.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" EXPORTING
*" REFERENCE(EV_TEXT) TYPE CHAR100
*"----------------------------------------------------------------------
CALL SCREEN '0100'
STARTING AT 5 9
ENDING AT 120 11.
move gv_rej_reason_text to ev_text.
ENDFUNCTION.
Regards,
Trilochan
Hi Trilochan,
You can reference help.sap.com.
Regards,
Masa
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.