Creating Attachment from Spool File or PO object instance
Praveen Johri
pjohri at csc.com
Fri Dec 17 04:10:43 EST 2004
Jeroen,
i have certain issues...
1) i can retrieve the spool using FM RSPO_RETURN_SPOOLJOB in an internal
table.
2)As u said'create a document from the spool lines and store it in the SOFM
folders.'
How am i going to that..if u can provide some code example,
3) Ok, i understand we need to have an instance of message object, but why
i need to attach it to business object and finally how i am going to send
it as workitem attachment.
I have no clue to perform this operation, neither any
documentation.....your help is appreciated.
Is there any other way by which after having my data in internal table i
can send it as attachment.
Thanks in advance
Have Fun
Praveen Johri
SAP Practice
Extn : 2597
Ph : 91-0120-2582323
Fax : 91-0120-2582322
Computer Science Corporation India Ltd.
-
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
"Van der Burg,
Jeroen JA To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
SITI-ITABEE" cc:
<jeroen.vanderbu Subject: RE: Creating Attachment from Spool File or PO object instance
rg
@shell.com>
Sent by:
sap-wug-bounces
12/16/2004 10:16
PM
Please respond
to "SAP Workflow
Users' Group"
Praveen,
Not sure about existing documentation (searched hard for it- could not find
it when I needed it in the past). What you can do is read the spool, create
a document from the spool lines and store it in the SOFM folders. Then
instantiate a message object around it and attach it to your business
object using the relevant bapi. Don't try this if you do not understand
what I am rambling on about.
Some code to help you on your way:
* Create correspondence object
CALL FUNCTION 'SWC_OBJECT_CREATE'
EXPORTING
OBJTYPE = 'MESSAGE'
OBJKEY = DOCUMENT_INFO-DOC_ID
IMPORTING
OBJECT = MESSAGE
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
LOGSYS_NOT_FOUND = 2
OBJTYPE_NOT_RELEASED = 3
OTHERS = 4.
* swc_object_to_persistent message DOCUMENT_INFO-DOC_ID.
* Attach correspondence to employee
Rel_objects-OBJKEY_A = '00008177'. "employee number
Rel_objects-OBJTYPE_A = 'BUS1065'. "employee object
Rel_objects-OBJKEY_B = DOCUMENT_INFO-DOC_ID.
Rel_objects-OBJTYPE_B = 'MESSAGE'.
Rel_objects-RELATION = 'ATTA'.
append Rel_objects.
CALL FUNCTION 'BAPI_REL_CREATERELATION'
EXPORTING
OBJECTS = Rel_objects
IMPORTING
RETURN = return.
* TABLES
* RELATIONATTRIBUTES =
.
Regards,
Jeroen
-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On Behalf
Of Praveen Johri
Sent: 16 December 2004 16:18
To: SAP Workflow Users' Group
Subject: Creating Attachment from Spool File or PO object instance
Can anybody point me towards some documentation about how to create
attachments and what are the various ways of doing it.??
Thanks & Regards
Praveen Johri
SAP Practice
Extn : 2597
Ph : 91-0120-2582323
Fax : 91-0120-2582322
Computer Science Corporation India Ltd.
-
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug
More information about the SAP-WUG
mailing list