on 05-23-2011 7:36 PM
Hi,
I have requirement like this.
User will create and add the attachements in PO. Once PO is created, I need to get the attachment to approver user decision object and attachement link.
Is this possible?
Thanks
Ashu
Hi Ashu,
What kind of attachment is this?
For example if it is a smart form and it will getting populated based on purchase order number, then in the workflow you can convert the smart form as PDF and attach it to the work item.
Or its just a PDF or other documents,where its getting stored? If you can able to read the attachment from the SAP system, then you can add the attachment to the work item.
Have a look at the function module SAP_WAPI_ADD_ATTACHMENT. If you are passing the work item ID and attachement to this FM it will add the attachment.
Thanks,
Viji.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashu,
You can view attachments in your PO display transaction ME23n. Select line item and click on button which has attachment icon. This will take you to the document display screen. You can also check your attachments through CV03n transaction. This is document display tcode in DMS. If it's configured correctly then you need to give the document no which has the attachment and click on display.
Regards,
Saud
Hello Ashu !
If any documents needs to be attached to the user decision step, create a background task prior to the user decision step. This back ground should use the function module u201CSAP_WAPI_ATTACHMENT_ADDu201D.
To attach PDF, use the function module SCMS_BINARY_TO_XSTRING to convert binary format to XSTRING format.Pass the work item id,XSTRING variables and header to the function module SAP_WAPI_ATTACHMENT_ADD
Whether it is PDF or document attachment, the attachments will be be collected in the &_ATTACH_OBJECTS&.Pass this task container to workflow container in turn to user decision step through binding.
Regards,
S.Suresh
Hi,
I need to get the attachments from PO ( services for object) and show for view for approver ( in user decision screen) in objects and atachments. I need to get them automatically in user decision screen. If i want to add in workflow process, then i can use FM to attach but here my requirement is to get directly from PO.
Thanks
Ashu
Hi Ashu,
The attachements from the services and objects will not be automattiaclled added as a attachment to the work item.
Once the workflow is triggered, you have to add the attachment to the work item using method.
You can get the attachment details from the table SRGBTBREL and field INSTID_B.
After this, you have to call the Fm SO_OBJECT_GET_CONTENT to get the condents and FM SCMS_BINARY_TO_XSTRING' to get the data in XSTRING format.
Finally you have to call the FM 'SAP_WAPI_ATTACHMENT_ADD' to add the attachement to work item.
Thanks,
Viji.
Thanks for the reply.
I could able to see the entries in table SRGBTBREL and also in FM SO_OBJECT_GET_CONTENT.
But what i need to pass to FM SCMS_BINARY_TO_XSTRING as it is asking for first line and last line.
Also, I dont have FM SAP_WAPI_ATTACHMENT_ADD but I have FM SAP_WAPI_ATTACHMENT_ADD_REF in my system.
Please comment.
Thanks
Ashu
Hi Viji,
I see your comments/response in most of the workflow related queries.
You have replied to my workflow related to queries before and Thanks for your help.
Once again i need your help.
I have different 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.
Hi Chetan,
It is very nice that you have approached SCN and believing in members to resolve your issue, but to clear you some thing, which you are already aware of it that " You could have posted your issue as a separate thread right.. then there might be a possibility to get more replies....... I am sorry if you missed this small thing
Regards
Pavan
Edited by: Pavan Bhamidipati on May 27, 2011 11:02 AM
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.