cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro abap to workflow attachments

Former Member
0 Kudos

Hi gurus,

I have opened same meaasge in workflow forum also since I was not sure which will be more helpful.

I added the attachment to workflow using the following code from my webdynpro abap application:

DATA: lv_xstring TYPE xstring,

att_id TYPE swr_att_id,

ls_msg_ln TYPE TABLE OF swr_messag,

ls_msg_str TYPE TABLE OF swr_mstruc,

lv_objkey TYPE swr_att_doc_id,

ls_header TYPE swr_att_header.

lv_xstring = lv_file.

ls_header-file_type = 'B'.

ls_header-file_name = 'Attachment'.

ls_header-language = sy-langu.

CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'

EXPORTING

workitem_id = lv_wi_id

att_header = ls_header

att_bin = lv_xstring

do_commit = 'X'

IMPORTING

return_code = rc

att_id = att_id

TABLES

message_lines = ls_msg_ln

message_struct = ls_msg_str .

I see the attachments in the workitem but am unable to open the attachment.

Another question is how can I show the same documents in another webdynpro application as attachments.

Thanks,

ST

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

used the standard webdynpro component WDK_POWL_WF_DETAIL and it has whatever was needed for attachments.

Thanks,

St