Issues with SAP_WAPI_ATTACHMENT_ADD
Sample, Rick
Rick.Sample at graybar.com
Thu Nov 18 12:52:46 EST 2010
Hi Wugger's
I posted on SDN but thought I would ask you folks before I throw in the towel.
I want to create an attachment, set to the WF using SAP_WAPI_ATTACHMENT_ADD.
(Or other WAPI. I do not know these very well)
Simple code. Create BOR obj, set as attachment on the Wf. This code short dumps with Message X.
I got SAP_WAPI_ATTACHMENT_ADD working with a PDF in other project but can do a simple attachment.
============================================================
CALL FUNCTION 'SWC_OBJECT_CREATE'
EXPORTING
objtype = 'BUS2032'
objkey = '0300056134'
IMPORTING
object = o_bus2032
EXCEPTIONS
objtype_not_found = 1
logsys_not_found = 2
objtype_not_released = 3.
l_att_header-file_type = 'B'.
l_att_header-file_name = '0300056134'.
l_att_header-file_extension = 'OBJ'.
l_att_header-language = sy-langu.
* Remove enqueue
CALL METHOD cl_swf_run_wim_factory=>suppress_enqueue
EXPORTING
im_wiid = l_wfid.
CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
EXPORTING
workitem_id = l_wfid
att_header = l_att_header
* att_txt = o_bus2032
att_bin = o_bus2032
IMPORTING
return_code = l_return_code
att_id = l_att_id.
* Recreate enqueue
CALL METHOD cl_swf_run_wim_factory=>reactivate_enqueue
EXPORTING
im_wiid = l_wfid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20101118/f253696e/attachment.htm
More information about the SAP-WUG
mailing list