HI Experts,
I have scenario of adding attachment to the User decision step.
There is an activity (BUS2000126) And when i open the Activity in CRMD_ORDER there is a Questionnaires
tab under which i see the questions and Answer displayed (Radiobutton, checkbox values will be filled by user)
in the white page. And i need to attach this content in the PDF file to the User dicision step in my
workflow which i am triggering for this activity instance/guid.
I have created a step before the User decision step in my workflow to get the content of this file/data which is
available under Questionnaire tab. In the method i am reading the Activity data using CRM_ORDER_READ
and reading the ET_SURVEY into an Internal table.
I see that this internal table field SURVEYID is showing the value same as heading of the content which is
displaying under Questionnaire tab in the Activity.
There is also a field called VALUEXML and has a value :
3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E0A3C737
5727665793E3C726174696E67666163746F723E3C71313E313C2F71313E3C69645F346439343063326332633262323062326531303
I checked the description of this field in the structure CRMT_SURVEY_WRK and found below
Field Component type data type short description
VALUEXML CRM_SVY_DB_SVS_XML RAWSTRING 0 0 CRM Surveys: Survey Values Binary Long Object
I am assuming that my document content is available in VALUEXML field and i did the following.
I called fm SCMS_BINARY_TO_XSTRING passing VALUEXML value into this FM assuming that my VALUEXML is in Binary format.
And then i am calling 'SAP_WAPI_ATTACHMENT_ADD'.
After doing all this i am able to see the value in the container &_ATTACH_OBJECTS&
And i am able see the link in the User decision step with the name i have provided to FM 'SAP_WAPI_ATTACHMENT_ADD'.
(Binding done for &_ATTACH_OBJECTS& between workflow and User decision step )
But, it is giving error while i am trying to open the attachment from both GUI and WEB UI.
In GUI getting the pop_up error: This file does not have a program associated with it for performing this action.
Create an association in the folder options control panel.
And when i click on the Questionnaire link then it opens a New Browser in Mozilla
with the Error:XML Parsing Error: not well-formed
And when i try to open the attachment via IE 6.0, it gives pop-up to open the file with Unknown type.
Please help and guide if i am missing something. I think, i am doing something wrong in the beginning
while reading the file content. Please comment if you are aware of this scenaio.
And i am not 100% sure that, from where i need to read the document content available under Questionnaire
tab of this activity. And this is the first time i am adding attachment in the workflow step.
Please let me know if you need more info.
Thanks,
Chetan.