Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

getting spool request using the jobname and program as input

Former Member
0 Kudos

Hi all

   

am new to abap please help me  to resolve this issue

am developing the report to fetch the spool request no and convert the spool request to pdf format and send as a mail which are available in the set

i want to know  how to get the spool request from job name and program as input in report please help in this issue

15 REPLIES 15

jitendra_it
Active Contributor
0 Kudos

Hi Ashoke,

See the point 3 in below link.

http://wiki.sdn.sap.com/wiki/display/ABAP/PDF+Downlaod+By+Creating+Spool+Request

Many Thanks,

Jitendra soni

0 Kudos

Hi jitendra

Thanks for giving the above link . am able to convert the spool request to PDF and able to download it to the local PC can u help me how to send the particular PDF to mails which are maintained in the sets(gs01)

please help regarding this one .................. 

thanks and regards

Ashok

0 Kudos

Hi Ashoke,

Refer the standard program BCS_EXAMPLE_8  for converting the spool into PDF and sending it to any

email address.

Many Thanks,

Jitendra

0 Kudos

Hi Jitendra soni,

I am able to execute the program but could not able to receive the mail can you let me know where I need to check whether the mail is sent out from SAP?

Thanks,

Ashok

0 Kudos

You can check in SOST transaction.. Take help from your basis guy for error analysis.

Many Thanks,

Jitendra

0 Kudos

Hi Jitendra,

                    Now am able to get the test mail as a attachment by running the above program and the transaction respectively.

can u help me how to create a set using the table ADR6 and the field should be SMTP_ADDR.

i had tried to create using the above mentioned table and field am getting the meesage like

"you cannot create the set because the field is  >24 character long ".

(SMTP_ADDR character type is  string and its length is 241)

please give me the suggestion  for this.

Thanks ,

ASHOK

0 Kudos

ashok kumar wrote:


"you cannot create the set because the field is  >24 character long ".

(SMTP_ADDR character type is  string and its length is 241)

It is clear from above message that one can not create a set with field lenght greater than 24 chars.

If you want to maintain email ids then u can go for z table else u can diretly fetch from ADR6 table.

Many Thanks,

Jitendra Soni

0 Kudos

Hi jitendar,

           

                   weather it is possible to create a set for maintaining the mail id based on the company code or by based on the user ids

0 Kudos

Hi Jitendra

                         if yes let me now how to create the set using these thing .

Thanks and regards

Ashok Kumar.

0 Kudos

Hi Ashok,

I dont have much idea about SETs. I have worked only on Basic SETs,  which does not support above requirement.

Many Thanks,

Jitendra

0 Kudos

Hi Jitendra ,

              

                    thank for ur discussion it help me to solve my issue .

Thanks

Ashok

0 Kudos

Hi Jitendra ,

             

                    Am able to send the PDF to the required mails

but my problem is that am not able to send the mail s with attachments and with body i.e am able to send the mail either with body or attachment with PDF attachment but i need to send the mail with attachment as well as with body can u help me regarding this .

hope for the best.

Thanks

Ashok

0 Kudos

Hi Ashok,

If u r using classes for mail sending(like in BCS_EXAMPLE_8 ) then use text1 for body of email.

text1 = 'Body of Email'.

document = cl_document_bcs=>create_document(

                        i_type    = 'RAW'

                        i_text    = text1

                        i_length  = '21'

                        i_subject = 'Subject of Email' ).

Many Thanks,

Jitendra

raymond_giuseppi
Active Contributor
0 Kudos

Direct from database

- From job name and program name, you can find the job step in table TBTCP fields JOBNAME,

PROGNAME

- For old version, you get the spool id in table TBTCP field LISTIDENT (only one)

- For recent version, you get the spool id in table TBTC_SPOOLID (every one)

Using FM

Call BP_JOB_SELECT and then BP_JOB_READ

Regards,

Raymond

VijayCR
Active Contributor
0 Kudos

Hello Ashok,

We can get it from TBTCP-List ID by giving the JOb name also you can fetch the Job Names based on the Process .

Suppose Your doing it for Payment Advice.

1) F110-(RUnon)-* So u can get it from the TBTCP.

Thanks ,

Vijay.