on 2024 Jun 21 12:23 PM
Hi all,
I have a workflow with a USER DECISION STEP where i am passing Firm Informartion (firm name, Address etc) and i want this information to be reflected on the 'DECRIPTION" side and then also have attachments which i have on a table that i want to be passed on the "OBJECTS ATTACHMENTS" Side. The agent should be able to Accept or Reject this information after reviewing it.
I am having problems Attaching the documents on the "OBJECTS ATTACHMENTS" side was using function module: SAP_WAPI_ATTACHMENT_ADD within a method which i call inside the task, but when i do that it messes up with the generic user decision method as i can't call them both.....only one method can be call within "Basic Data" Tab of the Task
any thoughts how i can do this ??
Request clarification before answering.
HI, you could add the attachments using an exit class (example CL_SWH_T_DECISION_EXIT) in the step / activity. Use event C_EVTTYP_AFTER_CREATE (example see below). There is also a BADI for attachments in enhancement spot WF_OBJECT_ATTACHMENT, provided with S/4HANA Cloud 1805 and S/4HANA On Premise 1809. An example implementation can be found in the class is: "CL_SWF_RUN_ATTACH_BADI_SAMPLE".
*How do the program exits work?
*To change alternatives of the user decision at runtime dynamically (for each *work item), you can define an ABAP class here that supports interface *IF_SWF_IFS_WORKITEM_EXIT.
*At runtime, method IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED is called multiple *times. Here you can define source code that is run for different time points *of the work item processing.
*To delete or change the alternatives, your code must be run at the time *point SWFCO_EVENT_BEFORE_DECISION.
*Example: Class CL_SWH_T_DECISION_EXIT from workflow definition WS77400143 "WF_Verify141"
Method IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED.
data lt_decialts type IF_WAPI_WORKITEM_CONTEXT=>swrtdecialts.
if im_event_name = IF_SWF_IFS_DECISION_EXIT~C_EVTTYP_BEFORE_DECISION.
call method IM_WORKITEM_CONTEXT->get_decision_alts
importing et_decialts = lt_decialts.
* --- hide alternative 0001 and 0002 ---
delete lt_decialts where altkey <> '0003'.
call method IM_WORKITEM_CONTEXT->set_decision_alts
exporting it_decialts = lt_decialts.
endif.
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.