SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
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.

Más contenido relacionado

La actualidad más candente

SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdfSAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdfsubbulokam
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantAnkit Sharma
 
Version management of abap programs
Version management of abap programsVersion management of abap programs
Version management of abap programsicatalysts buddy
 
S4 HANA Business Partner Configuration@Ganesh Tarlana
S4 HANA Business Partner Configuration@Ganesh TarlanaS4 HANA Business Partner Configuration@Ganesh Tarlana
S4 HANA Business Partner Configuration@Ganesh TarlanaGanesh Tarlana
 
SAP SD interview questions
SAP SD interview questions SAP SD interview questions
SAP SD interview questions IT LearnMore
 
12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshootingkratos1979
 
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+Ashish Saxena
 
Business partner-2
Business  partner-2Business  partner-2
Business partner-2abc
 
ALV with Integrated Data Access
ALV with Integrated Data AccessALV with Integrated Data Access
ALV with Integrated Data AccessRadosław Gref
 
Sap Change And Transport Management
Sap Change And Transport ManagementSap Change And Transport Management
Sap Change And Transport ManagementRavi Jain
 
Dialog Programming Overview
Dialog Programming OverviewDialog Programming Overview
Dialog Programming Overviewsapdocs. info
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantAnkit Sharma
 
Automatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mailAutomatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mailSURESH BABU MUCHINTHALA
 
Sap workflow adminsitration
Sap workflow adminsitrationSap workflow adminsitration
Sap workflow adminsitrationArghadip Kar
 
Purchase order release in fiori
Purchase order release in fioriPurchase order release in fiori
Purchase order release in fioriNguyen Hai
 
Sap transport procedures and best practices
Sap transport procedures and best practicesSap transport procedures and best practices
Sap transport procedures and best practicesMILUDW
 

La actualidad más candente (20)

SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdfSAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
SAP S_4HANA Migration Cockpit - Migrate your Data to SAP S_4HANA.pdf
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
Version management of abap programs
Version management of abap programsVersion management of abap programs
Version management of abap programs
 
S4 HANA Business Partner Configuration@Ganesh Tarlana
S4 HANA Business Partner Configuration@Ganesh TarlanaS4 HANA Business Partner Configuration@Ganesh Tarlana
S4 HANA Business Partner Configuration@Ganesh Tarlana
 
SAP SD interview questions
SAP SD interview questions SAP SD interview questions
SAP SD interview questions
 
12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting
 
Sap abap
Sap abapSap abap
Sap abap
 
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
Guide to Configure Custom SD Output Types in S/4HANA Using BRF+
 
Business partner-2
Business  partner-2Business  partner-2
Business partner-2
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
ALV with Integrated Data Access
ALV with Integrated Data AccessALV with Integrated Data Access
ALV with Integrated Data Access
 
Sap Change And Transport Management
Sap Change And Transport ManagementSap Change And Transport Management
Sap Change And Transport Management
 
Dialog Programming Overview
Dialog Programming OverviewDialog Programming Overview
Dialog Programming Overview
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
 
OGSD 7.0 Release Overview
OGSD 7.0 Release OverviewOGSD 7.0 Release Overview
OGSD 7.0 Release Overview
 
Automatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mailAutomatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mail
 
Sap workflow adminsitration
Sap workflow adminsitrationSap workflow adminsitration
Sap workflow adminsitration
 
Purchase order release in fiori
Purchase order release in fioriPurchase order release in fiori
Purchase order release in fiori
 
Sap transport procedures and best practices
Sap transport procedures and best practicesSap transport procedures and best practices
Sap transport procedures and best practices
 

Destacado

Nintex attachment workflow
Nintex attachment workflowNintex attachment workflow
Nintex attachment workflowAlan Richards
 
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...WHR Corporate
 
Driving Business Value with Enterprise Social
Driving Business Value with Enterprise SocialDriving Business Value with Enterprise Social
Driving Business Value with Enterprise SocialCreative Sharepoint
 
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years ExpAnanda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years ExpAnand Uppara
 
SAP Business Workflow - Best Practices
SAP Business Workflow - Best PracticesSAP Business Workflow - Best Practices
SAP Business Workflow - Best PracticesWarren Eiserman
 
Powerful and Quick Workflow Automation Solutions with Nintex
Powerful and Quick Workflow Automation Solutions with NintexPowerful and Quick Workflow Automation Solutions with Nintex
Powerful and Quick Workflow Automation Solutions with NintexNetwoven Inc.
 
Workflow Part1 1
Workflow Part1 1Workflow Part1 1
Workflow Part1 1evil66_in
 
Workflow
WorkflowWorkflow
Workflowisa0418
 
KPI for HR Manager - Sample of KPIs for HR
KPI for HR Manager - Sample of KPIs for HRKPI for HR Manager - Sample of KPIs for HR
KPI for HR Manager - Sample of KPIs for HRYodhia Antariksa
 
She Did Not Consider Her Destiny
She Did Not Consider Her DestinyShe Did Not Consider Her Destiny
She Did Not Consider Her DestinyDave Stewart
 

Destacado (14)

Nintex attachment workflow
Nintex attachment workflowNintex attachment workflow
Nintex attachment workflow
 
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
Tre passi per un buon revenue: analizzare, promuovere, fidelizzare - GP Dati ...
 
Driving Business Value with Enterprise Social
Driving Business Value with Enterprise SocialDriving Business Value with Enterprise Social
Driving Business Value with Enterprise Social
 
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years ExpAnanda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
Ananda_SAP_HRABAP_WDP_Workflow with 4+ Years Exp
 
About work flow
About work flowAbout work flow
About work flow
 
SAP Business Workflow - Best Practices
SAP Business Workflow - Best PracticesSAP Business Workflow - Best Practices
SAP Business Workflow - Best Practices
 
SAP workflow classics
SAP workflow classicsSAP workflow classics
SAP workflow classics
 
Sap workflow training
Sap workflow trainingSap workflow training
Sap workflow training
 
Powerful and Quick Workflow Automation Solutions with Nintex
Powerful and Quick Workflow Automation Solutions with NintexPowerful and Quick Workflow Automation Solutions with Nintex
Powerful and Quick Workflow Automation Solutions with Nintex
 
Workflow Part1 1
Workflow Part1 1Workflow Part1 1
Workflow Part1 1
 
Business workflow
Business workflowBusiness workflow
Business workflow
 
Workflow
WorkflowWorkflow
Workflow
 
KPI for HR Manager - Sample of KPIs for HR
KPI for HR Manager - Sample of KPIs for HRKPI for HR Manager - Sample of KPIs for HR
KPI for HR Manager - Sample of KPIs for HR
 
She Did Not Consider Her Destiny
She Did Not Consider Her DestinyShe Did Not Consider Her Destiny
She Did Not Consider Her Destiny
 

Similar a Creating attachments to work items or to user decisions in workflows

Dynamic variant creation
Dynamic variant creationDynamic variant creation
Dynamic variant creationyoung moon woo
 
Trigger bi process chain from ecc
Trigger bi process chain from eccTrigger bi process chain from ecc
Trigger bi process chain from eccObaid shaikh
 
_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdfssuserfe1f82
 
Hr structural auths
Hr   structural authsHr   structural auths
Hr structural authshkodali
 
Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6bluechxi
 
Management Cockpit (SEM-CPM-MC) Step by Step Creation
Management Cockpit (SEM-CPM-MC) Step by Step CreationManagement Cockpit (SEM-CPM-MC) Step by Step Creation
Management Cockpit (SEM-CPM-MC) Step by Step CreationRahul Desai
 
SAP Quickviewer
SAP QuickviewerSAP Quickviewer
SAP Quickviewerotchmarz
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bwRajat Agrawal
 
Let start with GUIXT
Let start with GUIXTLet start with GUIXT
Let start with GUIXTKang YAyan
 
Bpc 10.0 NW Mass User Management tool
Bpc 10.0 NW Mass User Management toolBpc 10.0 NW Mass User Management tool
Bpc 10.0 NW Mass User Management toolShanmugam Veerichetty
 
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Srinivas Dukka
 
Rda step by step
Rda   step by stepRda   step by step
Rda step by stepPhani Kumar
 
Variables in sap bi
Variables in sap biVariables in sap bi
Variables in sap bishabari76
 
Sap success factors quick guide
Sap success factors quick guideSap success factors quick guide
Sap success factors quick guideSushil Rathi
 
How to improve user experience via roles
How to improve user experience via rolesHow to improve user experience via roles
How to improve user experience via rolesSiva Pradeep Bolisetti
 
How to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionHow to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionValko Arbalov
 

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

Dynamic variant creation
Dynamic variant creationDynamic variant creation
Dynamic variant creation
 
Trigger bi process chain from ecc
Trigger bi process chain from eccTrigger bi process chain from ecc
Trigger bi process chain from ecc
 
_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf
 
Hr structural auths
Hr   structural authsHr   structural auths
Hr structural auths
 
Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6
 
Management Cockpit (SEM-CPM-MC) Step by Step Creation
Management Cockpit (SEM-CPM-MC) Step by Step CreationManagement Cockpit (SEM-CPM-MC) Step by Step Creation
Management Cockpit (SEM-CPM-MC) Step by Step Creation
 
SAP Quickviewer
SAP QuickviewerSAP Quickviewer
SAP Quickviewer
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bw
 
Let start with GUIXT
Let start with GUIXTLet start with GUIXT
Let start with GUIXT
 
Bpc 10.0 NW Mass User Management tool
Bpc 10.0 NW Mass User Management toolBpc 10.0 NW Mass User Management tool
Bpc 10.0 NW Mass User Management tool
 
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
 
Rda step by step
Rda   step by stepRda   step by step
Rda step by step
 
Lsmw
LsmwLsmw
Lsmw
 
Variables in sap bi
Variables in sap biVariables in sap bi
Variables in sap bi
 
How to assign sap business planning and consolidation authorizations via the ...
How to assign sap business planning and consolidation authorizations via the ...How to assign sap business planning and consolidation authorizations via the ...
How to assign sap business planning and consolidation authorizations via the ...
 
How to Implement Fiori Central Hub 1610
How to Implement Fiori Central Hub 1610How to Implement Fiori Central Hub 1610
How to Implement Fiori Central Hub 1610
 
Sap success factors quick guide
Sap success factors quick guideSap success factors quick guide
Sap success factors quick guide
 
How to improve user experience via roles
How to improve user experience via rolesHow to improve user experience via roles
How to improve user experience via roles
 
Query
QueryQuery
Query
 
How to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionHow to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selection
 

Último

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Último (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

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.