Creating Attachment from Spool File or PO object instance

Praveen Johri pjohri at csc.com
Fri Dec 17 05:57:49 EST 2004





Jeroen,

I think i was not able to phrase my question properly, i needed to know if
i need to send the spool to SAP INBOX there are two ways i can use the FM u
have mentioned or RS_SEND_MAIL_FOR_SPOOLLIST, through ABAP code or if i use
Worklfow then writing a method and coding these FMs in it. There is one
more way like i can create a compressed table of data after fetching spool
and send it as attachment using SO_DOCUMENT_SEND_API1.

But, what if i want to send this information as an attachment using
sedtaskdescription or as workitem attachment. It is just not about
achieving the requirement
but i need to understand how we can manipulate the attachment sending via
BOR programming or workflow programming using objects and all that stuff.
I referred in my initial mail also that i was not able to find any proper
documentation which gives me any examples that how to useSOFM methods to
get the attachment in workflow and then to attach with SENDTASKDESCRIPTION
and send it.

I think now i am able to make a clear statement that i need to learn
attachment sending by attaching the desired document in background via
workflow as workitem or office document.

Thanks for ur help and patience for reading such long mail.

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/17/2004 04:04                                                                                                 
                      PM                                                                                                               
                      Please respond                                                                                                   
                      to "SAP Workflow                                                                                                 
                      Users' Group"                                                                                                    
                                                                                                                                       




Oh, ok. If I can rephrase your original question to: 'How do I send out a
spool result as an attachment to an email' function module
RSPO_SPOOLJOB_TO_OFFICE should cover your requirement.


Regards,


Jeroen



-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On Behalf
Of Praveen Johri
Sent: 17 December 2004 10:11
To: SAP Workflow Users' Group
Subject: RE: Creating Attachment from Spool File or PO object instance






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


_______________________________________________
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