SlideShare a Scribd company logo
6
Most read
8
Most read
9
Most read
Creating Attachments to Work Items or to User Decisions in Workflows 
Applies to: 
Product release ECC 6.0. For more information, visit the Business Process Modeling homepage. 
Summary 
This document gives a brief idea about attaching a document to the work item or to the user decision step. 
Author: Ramakanth Reddy 
Company: IBM INDIA Pvt Ltd 
Created on: 11 November 2008 
Author Bio 
Ramakanth Reddy is an engineering graduate with a rich experience of 4 years in SAP. He has extensively worked in ABAP, ABAP HR, XI, and WORKFLOW. He is currently working for IBM India Pvt. Ltd. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 1
Creating Attachments to Work Items or to User Decisions in Workflows 
Table of Contents 
Business Requirement........................................................................................................................................3 
Creating Adobe Form Output as an Attachment to Work Item.......................................................................3 
Related Content................................................................................................................................................19 
Disclaimer and Liability Notice..........................................................................................................................20 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 2
Creating Attachments to Work Items or to User Decisions in Workflows 
Business Requirement 
Now a days, sending documents like WORD, PDF or any document from the system as an attachment has become a typical requirement in workflow, technically speaking sending an attachment to work item or to User decision. This document explains how to create documents like WORD, PDF as an attachment to the workitem or to user decision step. 
• 
Creating an attachment of online documents like output of the adobe forms or sap scripts or smart forms. 
• 
Creating an attachment of offline documents like PC files. 
Creating Adobe Form Output as an Attachment to Work Item 
In this Example, a program ‘YTESTWF’ has been developed, which calls Adobe form function module to display the output of the form. The below screen shot shows the source code of the program ‘YTESTWF’. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 3
Creating Attachments to Work Items or to User Decisions in Workflows 
Selection Screen for the above program ‘YTESTWF’:– 
When the program ‘YTESTWF’ is executed we would able to view the Adobe form output, for reference find the below screen. 
Now, based on the requirement this adobe form needs to be sent as an attachment to workitem or to user decision step in workflow. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 4
Creating Attachments to Work Items or to User Decisions in Workflows 
Go through the below steps to achieve the attachment to the workitem: - 
1) 
The output content of the Adobe forms is of the type FP_FORMOUTPUT. This type has many options associated to the structure ‘FPFORMOUTPUT’ which is defined in the program, in our case we are using PDF format as our content, Please find the below screen shots for your reference : - 
2) 
The above all options are in XSTRING format, Now take the option FPFORMOUTPUT-PDF and convert the XSTRING to BINARY format and find the size the document by using the below Function Module, please find the below screen shot- 
3) 
To create an attachment we need two inputs from program 
1) Size of the document (ZVAR1) 
2) Content, this should be in the Binary format. Now we have both the required data 
(IT_SOLIX_TAB). 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 5
Creating Attachments to Work Items or to User Decisions in Workflows 
4) 
Source code of Program YTESTWF which will pass the required information to workflow, Please find the below screen shot- 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 6
Creating Attachments to Work Items or to User Decisions in Workflows 
5) 
Create a Business object ‘ZHOMORG’ with method ‘ATTCHDOC’ and it should be in background mode, Please check the below screen shots it will help you to create the business object 
Key Field used here is Username. 
Method ATTCHDOC is used to create an attachment to the workitem. 
The Import / export Parameters of the ATTCHDOC is as shown below. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 7
Creating Attachments to Work Items or to User Decisions in Workflows 
Source code for Method ATTCHDOC: - SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 8
Creating Attachments to Work Items or to User Decisions in Workflows 
In the above method, we have called the Function Module ‘SAP_WAPI_ATTACHMENT_ADD’ to create an attachment to workitem. We need to pass the XSTRING data to the above function module. Before doing this use the function module SCMS_BINARY_TO_XSTRING to convert from BINARY format to XSTRING format. Now pass the WORKITEM ID, Header and XSTRING variables to the Function Module it will give the Attachment ID as an output. Now create an instance to SOFM. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 9
Creating Attachments to Work Items or to User Decisions in Workflows 
Design workflow: -- 
Container Elements – Need to create container elements which we are getting from program YTESTWF. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 10
Creating Attachments to Work Items or to User Decisions in Workflows 
Task Create Attachment, please go through the below screenshots – 
Binding from workflow to task SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 11
Creating Attachments to Work Items or to User Decisions in Workflows 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 12
Creating Attachments to Work Items or to User Decisions in Workflows 
Binding from task to method: - 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 13
Creating Attachments to Work Items or to User Decisions in Workflows 
Now activate the program, workflow & Business Object and execute the Program YTESTWF. 
Go to Transaction SWI1 - > execute, Please find the below screen shot - 
Once you execute, you will find the below screen shot – 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 14
Creating Attachments to Work Items or to User Decisions in Workflows 
Double click on the workitem 425127, you will get the below screen: - 
In the above Screen shot, you will find the Button Attach with document icon. Please observe it. If you click on that button, you will get the popup screen and form document as shown below. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 15
Creating Attachments to Work Items or to User Decisions in Workflows 
If you want to send this to user decision, please add user decision step after the create attachment task, please find the screen shot- 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 16
Creating Attachments to Work Items or to User Decisions in Workflows 
Binding from workflow container to user decision is – 
After adding the user decision to the workflow, activate and execute the program YTESTWF. You will find the user decision step at in your box as shown below. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 17
Creating Attachments to Work Items or to User Decisions in Workflows 
Click on the office Document: Form, you will get the document as shown below. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 18
Creating Attachments to Work Items or to User Decisions in Workflows 
Related Content 
Forums 
Workflow http://www.sap-img.com/workflow/sap-workflow.htm 
Download 
Business Workflow http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf 
For more information, visit the Business Process Modeling homepage. 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 19
Creating Attachments to Work Items or to User Decisions in Workflows 
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 
© 2008 SAP AG 20 
Disclaimer and Liability Notice 
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. 
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. 
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

More Related Content

What's hot (20)

PPT
Step by step lsmw tutorial
raonivaz
 
PDF
How to extend an outbound i doc
rupesh chouhan
 
DOCX
Edit idoc , reprocess and test idoc
lakshmi rajkumar
 
PPTX
Functional specification of sap
Saptechies
 
PPTX
Sap s4 ccm concept for sales and purchasing
Venkat Mannam
 
PPTX
Sap User Exit for Functional Consultant
Ankit Sharma
 
PDF
Output determination
Srinivasulu Algaskhanpet
 
PPTX
SAP Adobe forms
Jugul Crasta
 
PDF
Dip profiles-documentation
Rodrigo Olivares Collao
 
PPTX
Sap Purchase Order Workflow
Arghadip Kar
 
PDF
Data archiving in sales and distribution (sd)
Piyush Bose
 
PDF
Intercompany config
Jamal Abro email: [email protected]
 
PDF
SAP PM Master Data Training Guide
sapdocs. info
 
PDF
Table maintenance generator and its modifications
scribid.download
 
DOCX
Workbench and customising request
lakshmi rajkumar
 
DOCX
Inter company STO
sfaiz418
 
PDF
Ganesh TAXINN cofig_doc
Ganesh Tarlana
 
PDF
S4 HANA Business Partner Configuration@Ganesh Tarlana
Ganesh Tarlana
 
DOC
Badi document
hamisha_malik
 
PDF
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
Ashish Saxena
 
Step by step lsmw tutorial
raonivaz
 
How to extend an outbound i doc
rupesh chouhan
 
Edit idoc , reprocess and test idoc
lakshmi rajkumar
 
Functional specification of sap
Saptechies
 
Sap s4 ccm concept for sales and purchasing
Venkat Mannam
 
Sap User Exit for Functional Consultant
Ankit Sharma
 
Output determination
Srinivasulu Algaskhanpet
 
SAP Adobe forms
Jugul Crasta
 
Dip profiles-documentation
Rodrigo Olivares Collao
 
Sap Purchase Order Workflow
Arghadip Kar
 
Data archiving in sales and distribution (sd)
Piyush Bose
 
SAP PM Master Data Training Guide
sapdocs. info
 
Table maintenance generator and its modifications
scribid.download
 
Workbench and customising request
lakshmi rajkumar
 
Inter company STO
sfaiz418
 
Ganesh TAXINN cofig_doc
Ganesh Tarlana
 
S4 HANA Business Partner Configuration@Ganesh Tarlana
Ganesh Tarlana
 
Badi document
hamisha_malik
 
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
Ashish Saxena
 

Viewers also liked (15)

PDF
Nintex attachment workflow
Alan Richards
 
PDF
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
WHR Corporate
 
PPTX
Driving Business Value with Enterprise Social
Creative Sharepoint
 
DOC
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
Anand Uppara
 
PPT
About work flow
Narender Singh
 
PDF
SAP Business Workflow - Best Practices
Warren Eiserman
 
PPT
SAP workflow classics
Norikkon, LLC.
 
PDF
Sap workflow training
itprofessionals network
 
PPTX
SAP workflow events
Norikkon, LLC.
 
PDF
Powerful and Quick Workflow Automation Solutions with Nintex
Netwoven Inc.
 
PDF
Workflow Part1 1
evil66_in
 
PPT
Business workflow
Kranthi Kumar
 
PPTX
Workflow
isa0418
 
PPT
KPI for HR Manager - Sample of KPIs for HR
Yodhia Antariksa
 
PDF
She Did Not Consider Her Destiny
Dave Stewart
 
Nintex attachment workflow
Alan Richards
 
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
WHR Corporate
 
Driving Business Value with Enterprise Social
Creative Sharepoint
 
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
Anand Uppara
 
About work flow
Narender Singh
 
SAP Business Workflow - Best Practices
Warren Eiserman
 
SAP workflow classics
Norikkon, LLC.
 
Sap workflow training
itprofessionals network
 
SAP workflow events
Norikkon, LLC.
 
Powerful and Quick Workflow Automation Solutions with Nintex
Netwoven Inc.
 
Workflow Part1 1
evil66_in
 
Business workflow
Kranthi Kumar
 
Workflow
isa0418
 
KPI for HR Manager - Sample of KPIs for HR
Yodhia Antariksa
 
She Did Not Consider Her Destiny
Dave Stewart
 
Ad

Similar to Creating attachments to work items or to user decisions in workflows (20)

PDF
Dynamic variant creation
young moon woo
 
PDF
Trigger bi process chain from ecc
Obaid shaikh
 
PDF
_Using Selective Deletion in Process Chains.pdf
ssuserfe1f82
 
PDF
Hr structural auths
hkodali
 
PDF
Sap query creation and transport procedure in ecc6
bluechxi
 
PDF
Management Cockpit (SEM-CPM-MC) Step by Step Creation
Rahul Desai
 
PDF
SAP Quickviewer
otchmarz
 
PDF
Creating new unit of measure in sap bw
Rajat Agrawal
 
PDF
Let start with GUIXT
Kang YAyan
 
PDF
Bpc 10.0 NW Mass User Management tool
Shanmugam Veerichetty
 
PDF
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Srinivas Dukka
 
PDF
Rda step by step
Phani Kumar
 
PDF
Lsmw
SyedAbbas229
 
PDF
Variables in sap bi
shabari76
 
PDF
How to assign sap business planning and consolidation authorizations via the ...
Anywhere Gondodza SAP.GRC.FI.B.COM.ACC.HONS (MSU)
 
PPTX
How to Implement Fiori Central Hub 1610
StraVis Enterprize Solutions
 
PDF
Sap success factors quick guide
Sushil Rathi
 
PPT
How to improve user experience via roles
Siva Pradeep Bolisetti
 
PDF
Query
Maria Felipe
 
PDF
How to write a routine for 0 calday in infopackage selection
Valko Arbalov
 
Dynamic variant creation
young moon woo
 
Trigger bi process chain from ecc
Obaid shaikh
 
_Using Selective Deletion in Process Chains.pdf
ssuserfe1f82
 
Hr structural auths
hkodali
 
Sap query creation and transport procedure in ecc6
bluechxi
 
Management Cockpit (SEM-CPM-MC) Step by Step Creation
Rahul Desai
 
SAP Quickviewer
otchmarz
 
Creating new unit of measure in sap bw
Rajat Agrawal
 
Let start with GUIXT
Kang YAyan
 
Bpc 10.0 NW Mass User Management tool
Shanmugam Veerichetty
 
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Srinivas Dukka
 
Rda step by step
Phani Kumar
 
Variables in sap bi
shabari76
 
How to assign sap business planning and consolidation authorizations via the ...
Anywhere Gondodza SAP.GRC.FI.B.COM.ACC.HONS (MSU)
 
How to Implement Fiori Central Hub 1610
StraVis Enterprize Solutions
 
Sap success factors quick guide
Sushil Rathi
 
How to improve user experience via roles
Siva Pradeep Bolisetti
 
How to write a routine for 0 calday in infopackage selection
Valko Arbalov
 
Ad

Recently uploaded (20)

PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 

Creating attachments to work items or to user decisions in workflows

  • 1. Creating Attachments to Work Items or to User Decisions in Workflows Applies to: Product release ECC 6.0. For more information, visit the Business Process Modeling homepage. Summary This document gives a brief idea about attaching a document to the work item or to the user decision step. Author: Ramakanth Reddy Company: IBM INDIA Pvt Ltd Created on: 11 November 2008 Author Bio Ramakanth Reddy is an engineering graduate with a rich experience of 4 years in SAP. He has extensively worked in ABAP, ABAP HR, XI, and WORKFLOW. He is currently working for IBM India Pvt. Ltd. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 1
  • 2. Creating Attachments to Work Items or to User Decisions in Workflows Table of Contents Business Requirement........................................................................................................................................3 Creating Adobe Form Output as an Attachment to Work Item.......................................................................3 Related Content................................................................................................................................................19 Disclaimer and Liability Notice..........................................................................................................................20 SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 2
  • 3. Creating Attachments to Work Items or to User Decisions in Workflows Business Requirement Now a days, sending documents like WORD, PDF or any document from the system as an attachment has become a typical requirement in workflow, technically speaking sending an attachment to work item or to User decision. This document explains how to create documents like WORD, PDF as an attachment to the workitem or to user decision step. • Creating an attachment of online documents like output of the adobe forms or sap scripts or smart forms. • Creating an attachment of offline documents like PC files. Creating Adobe Form Output as an Attachment to Work Item In this Example, a program ‘YTESTWF’ has been developed, which calls Adobe form function module to display the output of the form. The below screen shot shows the source code of the program ‘YTESTWF’. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 3
  • 4. Creating Attachments to Work Items or to User Decisions in Workflows Selection Screen for the above program ‘YTESTWF’:– When the program ‘YTESTWF’ is executed we would able to view the Adobe form output, for reference find the below screen. Now, based on the requirement this adobe form needs to be sent as an attachment to workitem or to user decision step in workflow. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 4
  • 5. Creating Attachments to Work Items or to User Decisions in Workflows Go through the below steps to achieve the attachment to the workitem: - 1) The output content of the Adobe forms is of the type FP_FORMOUTPUT. This type has many options associated to the structure ‘FPFORMOUTPUT’ which is defined in the program, in our case we are using PDF format as our content, Please find the below screen shots for your reference : - 2) The above all options are in XSTRING format, Now take the option FPFORMOUTPUT-PDF and convert the XSTRING to BINARY format and find the size the document by using the below Function Module, please find the below screen shot- 3) To create an attachment we need two inputs from program 1) Size of the document (ZVAR1) 2) Content, this should be in the Binary format. Now we have both the required data (IT_SOLIX_TAB). SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 5
  • 6. Creating Attachments to Work Items or to User Decisions in Workflows 4) Source code of Program YTESTWF which will pass the required information to workflow, Please find the below screen shot- SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 6
  • 7. Creating Attachments to Work Items or to User Decisions in Workflows 5) Create a Business object ‘ZHOMORG’ with method ‘ATTCHDOC’ and it should be in background mode, Please check the below screen shots it will help you to create the business object Key Field used here is Username. Method ATTCHDOC is used to create an attachment to the workitem. The Import / export Parameters of the ATTCHDOC is as shown below. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 7
  • 8. Creating Attachments to Work Items or to User Decisions in Workflows Source code for Method ATTCHDOC: - SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 8
  • 9. Creating Attachments to Work Items or to User Decisions in Workflows In the above method, we have called the Function Module ‘SAP_WAPI_ATTACHMENT_ADD’ to create an attachment to workitem. We need to pass the XSTRING data to the above function module. Before doing this use the function module SCMS_BINARY_TO_XSTRING to convert from BINARY format to XSTRING format. Now pass the WORKITEM ID, Header and XSTRING variables to the Function Module it will give the Attachment ID as an output. Now create an instance to SOFM. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 9
  • 10. Creating Attachments to Work Items or to User Decisions in Workflows Design workflow: -- Container Elements – Need to create container elements which we are getting from program YTESTWF. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 10
  • 11. Creating Attachments to Work Items or to User Decisions in Workflows Task Create Attachment, please go through the below screenshots – Binding from workflow to task SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 11
  • 12. Creating Attachments to Work Items or to User Decisions in Workflows SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 12
  • 13. Creating Attachments to Work Items or to User Decisions in Workflows Binding from task to method: - SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 13
  • 14. Creating Attachments to Work Items or to User Decisions in Workflows Now activate the program, workflow & Business Object and execute the Program YTESTWF. Go to Transaction SWI1 - > execute, Please find the below screen shot - Once you execute, you will find the below screen shot – SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 14
  • 15. Creating Attachments to Work Items or to User Decisions in Workflows Double click on the workitem 425127, you will get the below screen: - In the above Screen shot, you will find the Button Attach with document icon. Please observe it. If you click on that button, you will get the popup screen and form document as shown below. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 15
  • 16. Creating Attachments to Work Items or to User Decisions in Workflows If you want to send this to user decision, please add user decision step after the create attachment task, please find the screen shot- SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 16
  • 17. Creating Attachments to Work Items or to User Decisions in Workflows Binding from workflow container to user decision is – After adding the user decision to the workflow, activate and execute the program YTESTWF. You will find the user decision step at in your box as shown below. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 17
  • 18. Creating Attachments to Work Items or to User Decisions in Workflows Click on the office Document: Form, you will get the document as shown below. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 18
  • 19. Creating Attachments to Work Items or to User Decisions in Workflows Related Content Forums Workflow http://www.sap-img.com/workflow/sap-workflow.htm Download Business Workflow http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf For more information, visit the Business Process Modeling homepage. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 19
  • 20. Creating Attachments to Work Items or to User Decisions in Workflows SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 20 Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.