on 05-09-2017 5:42 AM
Hi,
I am looking to add the some text as attachment to the workflow container from Z program. And later steps I want to use that text in the email attachment. Could you please advice me on how to do this one?
Thank you,
Praveen.
Hi Praveen,
Maybe this can help:
Please check with this FM:
SAP_WAPI_ATTACHMENT_ADD_REF
SAP_WAPI_GET_ATTACHMENTS
Regards,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thankyou. Yes now able to add the attachment successfully.
if wa_item-rb_reject eq icon_wd_radio_button.
loop at wa_item-decision_text into data(ls_decsion_text).
concatenate l_text ls_decsion_text lc_linefeed into l_text separated by space.
endloop.
* construct attachment header
lv_atthdr-file_type = 'T'.
lv_atthdr-file_name = zcl_sd_sample_order_wf_exit=>c_att_name_reason_for_rej.
lv_atthdr-file_extension = 'TXT'.
lv_atthdr-language = sy-langu.
call function 'SAP_WAPI_ATTACHMENT_ADD'
exporting
workitem_id = wa_item-top_wi_id
att_header = lv_atthdr
att_txt = l_text
document_owner = sy-uname
language = sy-langu
do_commit = ' '
importing
return_code = lv_return_code
att_id = lv_att_id
* TABLES
* MESSAGE_LINES =
* MESSAGE_STRUCT =
.
endif.
Thank you.
If you're approving/rejecting via event, add comments and attachments as event parameters. Then just bind it into your WF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PC,
am not clear on your requirement, how can you add a text as an attachment?
Either you can add text to your email or add an file. Please elaborate the requirement.
Or do you mean that you want to keep a text in a WF container which you will use later in your steps?
Aditya V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Background of the requirement:-
I have a workflow which will have asynchronous dialog steps(not the decision step) for approval. And I will use terminating events to approve / reject the dialog step. So in the dialog step I will call another Z program to take the decision text and approval / rejection from approver. If 'approve' selected then will trigger terminating event to end the current work item and similarly for rejection also.
We need to insert these decision text in the email body at later steps in the workflow.
* We have some reason to create asynchronous dialog step for approval and also do the approve / reject from Z program.
Thank you,
Praveen.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
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.