on 2014 Mar 10 12:02 PM
Hi Experts,
I have a requirement of adding PO attachments to Work item using workflow class/method.
PO attachments I'm getting using Table: TOA03 after passing object_id as PO and sap_object as 'BUS2012'. Then I pass this info to FM: ARCHIVOBJECT_GET_TABLE.
How to pass this as attachment to Workflow and it should display as same file type.
P.S: Couldn't find solution to this using Class, Methods
Regards,
Shailendra
Request clarification before answering.
Hi,
Here you go. Follow below steps:
1) Create a method in your custom class and do following steps. Call this method from workflow activity step. But add this activity step before the user decision/activity step where you want to display attachments. Also pass _WORKITEM.WORKITEMID number from workflow container to your method via binding. This workitemid will be passed to SAP_WAPI_ATTACHMENT_ADD. So that all the attachments get stored in _ATTACH_OBJECTS standard workflow container and later on you can you _ATTACH_OBJECT via binding in your user decision step for displaying them to users.
2) now after execution of this method/activity step,you will get all your attachments in _ATTACH_OBJECT workflow container which you can then use to display to users via binding.
Regards,
Ibrahim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ibrahim.
Everything you said worked precisely for my requirement.
Just I used below logic to convert BIN table to xstring
LOOP AT lint_binarchobj INTO wa_raw."DOC_BINARY into raw.
ASSIGN wa_raw-line TO <fs_converter> CASTING.
CONCATENATE wf_xstring <fs_converter> INTO wf_xstring IN BYTE MODE.
ENDLOOP.
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.