Application Development and Automation 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: 
Read only

Spool Setting for page format

Former Member
0 Likes
2,209

Hi all,

My requirement is to schedule a standar program (RFITEMAP) in background, and a mail should trigger with the output in .txt format, which is working fine.

But all data are not getting displayed only Page 1 to 20 is displayed in the mail .txt. when i go and check the spool sp01, all data is displayed.

Kindly advice how to display all data in the mail attachement .


Regards,
Rahul

Hi all,

My requirement is to schedule a standar program (RFITEMAP) in background, and a mail should trigger with the output in .txt format, which is working fine.

But all data are not getting displayed only Page 1 to 20 is displayed in the mail .txt. when i go and check the spool sp01, all data is displayed.

Kindly advice how to display all data in the mail attachement .


Regards,
Rahul

8 REPLIES 8
Read only

Clemenss
Active Contributor
0 Likes
1,658

Submit standar program (RFITEMAP) exporting list to memory.

GET_LIST_FROM_MEMORY

Convert to text or html

mail by CL_BCS.

Regards,

Clemens

Read only

Former Member
0 Likes
1,658

Hi ,

But i am using a standard program, just assigned that program and created a variant and schedule in backgroun through T-Code: SM36.

Now how can i create code in standard program.

Regards,

Rahul.

Read only

former_member213851
Active Contributor
0 Likes
1,658

Hi Rohini,

May be you can try using FM SO_DOCUMENT_SEND_API1 .It works prfectly for all size and types of  attatchments.

Best Regards,

Sachin

Read only

Former Member
0 Likes
1,658

Refer this piece.

DATA list_tab TYPE TABLE OF abaplist.   

SUBMIT your_report EXPORTING LIST TO MEMORY  AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'  

         TABLES      listobject = list_tab   

         EXCEPTIONS      not_found  = 1     

                                   OTHERS     = 2.   

DATA string_tab TYPE list_string_table.  "use table type appropriate for attachment 

DATA ascii_tab TYPE soli_tab.   

CALL FUNCTION 'LIST_TO_ASCI'  TABLES    

listasci                 = ascii_tab    

listobject               = list_tab.   

DATA go_email_doc TYPE REF TO cl_document_bcs.

    go_email_doc = cl_document_bcs=>create_document(               i_type = 'TXT'   

                                                                                                  i_text    = text

                                                                                                                        ).

    go_email_doc->add_attachment( i_attachment_type = 'TXT'   

                                                    i_attachment_subject = 'My Attachment'    

                                                    i_att_content_text = ascii_tab ). 

CALL METHOD send_request->set_document( document ).

Check report BCS_EXAMPLE_5 if you want help with BCS.

Thanks,

Shambu

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,658

Well, this is an ABAP forum, so it's easy to assume that some kind of a programming solution is expected.

I can only guess that email distribution is through the 'Spool list recipient' in SM36 and that your system is set up to send such emails with TXT attachments (HTML may also be used to preserve formatting). If so, then I also can only guess that perhaps by accident in the print options (either in the job or in the defaults for the user ID) it was set to print only pages 1 through 20. Otherwise such effect would be highly unusual.

Check if this happens with other reports / users. But in SP01 actually only the first 10 pages are displayed, I believe.

Read only

DavidLY
Product and Topic Expert
Product and Topic Expert
0 Likes
1,658

Hello,

Check SAP note 329537.

Regards,

David

Read only

Former Member
0 Likes
1,658

Hi David,

My issue is ressolved because of this Note. I was stucked with this issue for such a long day.

Thank You very much.

Regards,

Shegar.

Read only

lcl1964
Explorer
0 Likes
1,658

Thanks a lot! It solved my issue.

Regards, Lucia