2006 Feb 01 7:01 AM
Hello folks,
Does anyone have idea about how can we use spooling concept in emailing reports through ABAP code.
Thanks
2006 Feb 01 7:42 AM
Hi,
Submit the report in background using
JOB_OPEN ( Get jobcount )
SUBMIT <program name > to SAP-SPOOL
jobname .... etc
JOB_CLOSE
Then get the spool number using following FM :
BP_JOB_READ ( Pass jobcount & jobname )
Get LISTIDENT from JOB_READ_STEPLIST table.
Then Convert Spool to the format req. for eg.
CONVERT_ABAPSPOOLJOB_2_PDF for pdf conversion.
Check Spool content with FM :
RSPO_RETURN_ABAP_SPOOL_JOB
Then create Body Content, subject etc & send the mail using FM :
SO_NEW_DOCUMENT_ATT_SEND_API1
Then delete the spool using FM :
RSPO_R_RDELETE_SPOOLREQ.
Hope this would solve the problem.
Best regards,
Prashant
2006 Feb 01 7:24 AM
2006 Feb 01 7:33 AM
2006 Feb 01 7:42 AM
Hi,
Submit the report in background using
JOB_OPEN ( Get jobcount )
SUBMIT <program name > to SAP-SPOOL
jobname .... etc
JOB_CLOSE
Then get the spool number using following FM :
BP_JOB_READ ( Pass jobcount & jobname )
Get LISTIDENT from JOB_READ_STEPLIST table.
Then Convert Spool to the format req. for eg.
CONVERT_ABAPSPOOLJOB_2_PDF for pdf conversion.
Check Spool content with FM :
RSPO_RETURN_ABAP_SPOOL_JOB
Then create Body Content, subject etc & send the mail using FM :
SO_NEW_DOCUMENT_ATT_SEND_API1
Then delete the spool using FM :
RSPO_R_RDELETE_SPOOLREQ.
Hope this would solve the problem.
Best regards,
Prashant
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |