To mail a output list
hai tell me how can we mail an output list or take printouts of output of a report.
Here is a sample program which does the same.
report zrich_0003 .
data: list type table of abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
start-of-selection.
Write the list
do 100 times.
write:/ sy-index, at 30 sy-index, at 50 sy-index.
enddo.
Save the list
call function 'SAVE_LIST'
tables
listobject = list
exceptions
list_index_invalid = 1
others = 2.
Convert to HTML
call function 'WWW_LIST_TO_HTML'
tables
html = htmllines.
perform build_text_message.
perform build_receivers.
perform send_mail_nodialog..
Form BUILD_TEXT_MESSAGE
form build_text_message.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
endform.
Form BUILD_RECEIVERS
form build_receivers.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
endform.
Form SEND_MAIL_NODIALOG
form send_mail_nodialog.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform.
Code Formatted by: Alvaro Tejada Galindo on Jan 11, 2008 3:06 PM
Similar Messages
-
Function Module to send output list to mail.
Hi,
Could anyone let me know the function module to send output list to mail.
Regards,
RameshHi,
Please try with following sample code
Sending mail with attachment
This program will allowed you to send email with attachment.
First, specify the attachment file from your local hardisk and execute.
Next, specify the sender email address and click the send button.
report YUP_MAIL.
data method1 like sy-ucomm.
data g_user like soudnamei1.
data g_user_data like soudatai1.
data g_owner like soud-usrnam.
data g_receipients like soos1 occurs 0 with header line.
data g_document like sood4 .
data g_header like sood2.
data g_folmam like sofm2.
data g_objcnt like soli occurs 0 with header line.
data g_objhead like soli occurs 0 with header line.
data g_objpara like selc occurs 0 with header line.
data g_objparb like soop1 occurs 0 with header line.
data g_attachments like sood5 occurs 0 with header line.
data g_references like soxrl occurs 0 with header line.
data g_authority like sofa-usracc.
data g_ref_document like sood4.
data g_new_parent like soodk.
data: begin of g_files occurs 10 ,
text(4096) type c,
end of g_files.
data : fold_number(12) type c,
fold_yr(2) type c,
fold_type(3) type c.
parameters ws_file(4096) type c default 'c:\debugger.txt'.
Can me any file fromyour pc ....either xls or word or ppt etc ...
g_user-sapname = sy-uname.
call function 'SO_USER_READ_API1'
exporting
user = g_user
PREPARE_FOR_FOLDER_ACCESS = ' '
importing
user_data = g_user_data
EXCEPTIONS
USER_NOT_EXIST = 1
PARAMETER_ERROR = 2
X_ERROR = 3
OTHERS = 4
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
fold_type = g_user_data-outboxfol+0(3).
fold_yr = g_user_data-outboxfol+3(2).
fold_number = g_user_data-outboxfol+5(12).
clear g_files.
refresh : g_objcnt,
g_objhead,
g_objpara,
g_objparb,
g_receipients,
g_attachments,
g_references,
g_files.
method1 = 'SAVE'.
g_document-foltp = fold_type.
g_document-folyr = fold_yr.
g_document-folno = fold_number.
g_document-objtp = g_user_data-object_typ.
*g_document-OBJYR = '27'.
*g_document-OBJNO = '000000002365'.
*g_document-OBJNAM = 'MESSAGE'.
g_document-objdes = 'sap-img.com testing by program'.
g_document-folrg = 'O'.
*g_document-okcode = 'CHNG'.
g_document-objlen = '0'.
g_document-file_ext = 'TXT'.
g_header-objdes = 'sap-img.com testing by program'.
g_header-file_ext = 'TXT'.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = sy-uname
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
FOLMEM_DATA =
RECEIVE_DATA =
File from the pc to send...
method1 = 'ATTCREATEFROMPC'.
g_files-text = ws_file.
append g_files.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
method1 = 'SEND'.
g_receipients-recnam = 'MK085'.
g_receipients-recesc = 'B'.
g_receipients-sndex = 'X'.
append g_receipients.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header.
*-- End of Program
Thanks,
-Pramod -
Encodings stuck in FMLECmd /s output list
Hi,
I am running FMLE Command Line using FMLECmd.exe tool from several machines, all Windows 7 x64, all FMLE 3.2 latest.
It is very often happening that some encodings get stuck in the FMLECmd.exe /s output list, see screenshot.
This processes are NOT running, there is not FMLE process running, they are just stuck there.
The only way I found to remove them is to run a profile with that name, and stop form FMLECmd.exe, very long and annoying.
Rebooting machine does not help.
It looks like this list is saver per user in the machine, if I log in with another user in the machine, I don't have the same output.
Any hint on how to clean the output?
Is this saved on the Windows registry?
Thanks,
NicolaHi,
Take a look at programs RSWUWFML2 and SWN_SELSEN. These programs are sending mails based on open workitems and also have the option for sending a link to the executable workitem in the SAP Business Workplace. The technique behind these executable links is what you need I guess.
Regards,
Joost -
Syncing IPhone and Macbook Mail To Do List
Does anyone have a way to sync IPhone and Mail To Do List?
unless you delete your to dos then once checked they will still appear in the to do list alongside the incomplete ones.
one work around is to create smart mailboxes, one for your completed to dos, and one for your the others. to create a smart mailbox, go to mailbox>create smart mailbox, then for the rule, select to dos and then select to dos are complete, to dos are incomplete. once these smart mailboxes are created you can then view your to dos with less cluter.
hope this helps -
T.code FBL5N: a problem with the print of the output list
Hi All,
with reference to the t.code FBL5N, I have a problem with the print of the output list of the report.
When I execute the print, I obtain one customer for each page printed.
I wonder if is possible to obtain more customers for each page printed.
Could anyone help me?
Thanks
Gandalf
Edited by: Umberto Gandalf on Dec 21, 2008 10:36 PMHi,
Though personally i havent tried this option, check the same
Go to Menu: Settings >> Switch List
This will make the value displayed in ALV format and then try taking print outs.
Regards,
Sridevi -
How to select the output list check boxes
Hi ABAP gurus,
I am developing the on report, it display the output list, in that output list first column is Check box,
here i created the 3 Pushbuttons on application tool bar, one pushbutton is SELECT ALL, 2nd one is DESELECT ALL , 3rd one is CREDIT NOT CREATE,
here when i click on the Select all button it will select all the check boxs and click on the credit not button it will create credit memos for all the customers, if i select the one or more than one check boxs, it will not working means (Credit note will not be created for that paricular customer)
plz tell me answer, if u know the any example programs related to this program plz send me.Hi,
refer this sample code.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'F2'.
PERFORM selection.
WHEN 'SELECTALL'.
PERFORM selectall.
WHEN 'DESELECTAL'.
PERFORM deselectall.
ENDCASE. " CASE SY-UCOMM
*& Form selection *
Selecting records of basic list and display flight information *
No parameters transferred *
FORM selection .
DO w_lines TIMES.
READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox
fs_spfli-carrid INTO fs_spfli-carrid
fs_spfli-connid INTO fs_spfli-connid
w_mark INTO w_mark.
IF sy-subrc EQ 0.
IF w_checkbox EQ 'X' AND w_mark NE '*'.
w_mark = '*'.
MODIFY CURRENT LINE FIELD VALUE w_mark
FIELD FORMAT w_checkbox INPUT OFF.
SELECT carrid " Airline Code
connid " Flight Connection Number
fldate " Flight date
seatsmax " Maximum capacity
seatsocc " Occupied seats
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE t_sflight
WHERE carrid EQ fs_spfli-carrid AND connid EQ fs_spfli-connid.
IF sy-subrc EQ 0.
LOOP AT t_sflight INTO fs_sflight.
WRITE :/2 fs_sflight-carrid,
10 fs_sflight-fldate,
25 fs_sflight-seatsmax,
45 fs_sflight-seatsocc.
ENDLOOP. " LOOP AT T_SFLIGHT INTO....
ULINE.
CLEAR t_sflight.
ELSE.
MESSAGE text-001 TYPE 'S'.
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF W_CHECKBOX EQ 'X' AND .....
ENDIF. " IF SY-SUBRC EQ 0
ADD 1 TO w_lineno.
CLEAR w_checkbox.
ENDDO. " DO W_LINES TIMES
w_lineno = 3.
ENDFORM. " Selection -
Regarding editable space in the output list
hi experts,
i am developing a simple report in which i have to show the output like this...
write:/04'A.K.Basu VP Commercial.',115'Prepared By-' ________________.
here what i want that after "<b>prepared by</b>" the user can write his name in the <b>output list.</b>..means the space after 'prepared by' i want to make it editable so that when i transfer it to the excel sheet the user name will come..............plz help me...tell us also how did u solved this gr8 problem
Sameer -
Submit report to get output list
Hi friends,
I have one requirement to take output list of a transaction in one internal table.
As the transaction is very much interactive , that perticular internal table gets populated somewhere in the middle of the standard program...later on that table undergoes further processing to cope up with he interaction...
using SUBMIT report , we can export it to memory
and using FM 'LIST_FROM_MEMORY' we can get it back as following.
list_tab contains data in two fields RFCSIZE and RFCRECORD in numbers only...
Submit report_name with SELECTION-TABLE SELTAB
exporting list to Memory and return.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
BUT , Can we get the same output list (i.e before interaction) in one internal table...
thanksHi,
You can check whether the list is exported in between before the submit.
Supposed it is exported before the interaction den you can import it ..Just check the value is fetched and stored in a temporary table.
Is it a csutom program or standard SAP one..?
Hope this helps.
Regards,
Navin. -
How to send mail to distribution list ?
Hi Everybody,
Pls let me know how to send mail to distributed list???
Thanks & Regards,
raju<b></b>Hi ,
Use Function Module 'SO_NEW_DOCUMENT_SEND_API1'.
U need to pass Distribution list to Receiver and 'C' to receiver type refer the below code for clarification.
Determine the Distribution List.
gv_rec_list-receiver = gv_distribution.
gv_rec_list-rec_type = 'C'.
APPEND gv_rec_list.
Check if Distribution List is deleted.
SELECT SINGLE objnam
FROM soid
INTO lc_objnam
WHERE objnam = gv_rec_list AND
dlitp = lc_dli.
IF sy-subrc = 0.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = gv_doc_data
document_type = 'RAW'
put_in_outbox = 'X'
TABLES
object_content = gv_obj_cont
receivers = gv_rec_list
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4.
CASE sy-subrc.
WHEN '1'.
message i001(as) with 'TOO MANY RECEIVERS'.
EXIT.
WHEN '2'.
message i001(as) with 'DOCUMENT NOT SENT'.
EXIT.
WHEN '3'.
message i001(as) with 'DOCUMENT TYPE DOES NOT EXIST'.
EXIT.
WHEN '4'.
message i001(as) with 'OPERATION NO AUTHORIZATION'.
EXIT.
ENDCASE.
Hope this might have helped you.
Thanks,
Prashanth -
GUI Bug Outlook 2013 while sorting E-Mail in the list view in the main window
Hello,
I found a bug in Outlook 2013 - following occures: in main window, when I sort the list view with e-mails by "sent to" or by "received from" and when I delete one mail from this list, the view is not correct, because after the deleted
E-Mail disapears when I go with my mouse Cursor over other e-mails in the list Outlook 2013 shows all mails from the top of the list (beginning in alphabetical or reverse alphabetical order) as I move with mouse over neighbour mails from the corrected view
instead of the same view with only that one item deleted. The scroll element right has the right Position, but after clicking on the arrow up or arrow down within this element it jumps to the start. This has worked in my Outlook 2010 well, and this is very
unpleasant because I can not work well everytime sorting my mails right again after I deleted one. This seems to be only the case if I sort my mails by Name, not if sorted by size or received/sent date, then list view works well. I use Windows 7 Ultimate x64
and Office 2013 x32, on HP6910 with ATI graphics Card. Whole System works fine since years. Is there any log file I can submit? Is my description clear? Please help , thanks.
regards
Bogusz Schubert
PIMPEX Bogusz Schubert
Vohwinkeler Str. 58
42329 Wuppertal
Tel +49 202 4299 2270
Fax +49 202 4299 2271I made a screenshot of this: after deleting email from a Partner starting with letter "D" Outlook jumped back to the top of the list starting with "1" - you clearly see the wrong Position of the scroll element right and false broken view of the mails
at my mouse Cursor
Picture is under the Domain mt.i24.cc slash outlook2013guibug1.jpg
any help will be much appreciated -
Add button to QA33 ALV output list
Hi, SAP experts:
I need to add a custom button to the ALV output list display in QA33 transaction.
I´ve only found the BAdi ALV_SWITCH_GRID_LIST, but it doesn´t fit my requirements at all.
Any idea?
Thank you very much!Hi,
Please check if this explanation helps you,
Custom Butoon in REUSE_ALV_GRID_DISPLAY_LVC
Regards
Ram -
What are all the ways that can add fields in the output list of FBL3N transaction?
Hello dear experts,
There is this transaction FBL3N, which you might be aware of. Now, the requirement is to add 4 new fields in the output list of the standard program.
The fields are:
NAME1 KNA1
LOKKT BSEG
USNAM BKPF
TXT50 SKA1 -> SKAT
Please tell me how to do this apart from implementing the note 310886. What are the other ways?I agree, start reading 984305 - Line item: Definition of special fields (T021S)
Then for non BSEG/BKPF fields, better use BAdI FI_ITEMS_CH_DATA (1323512) and not the good old BTE 1650, the BAdI will be called once with the full internal table with special fields already filled, when the BTE will be executed for each and every record without special fields, so harder to optimize, and may require access to BKPF/BSEG for missing fields.
Regards,
Raymond
PS: Did you use search tool, there are already many discussions/threads on this subject. -
A week ago, the Mail app wouldn't display any messages. After restarting the phone, it still would not display any messages, it would just quit. Then eventually it opened with messages displayed. But then Mail notifications disappeared, and is not even listed in the Notification Center. How can Mail be "re-listed"?
I checked some other discussions and doing a reset by holding the power and home button helped the Mail app to appear in the Notifications list again
-
How to add new fields on output list of ME5A(Purchase Requisitions)
Hi Friends,
I have to do a task to add a new field ABC Indicator (MARC-MAABC) on the output list of ME5A. IS there any standard way to to this or do I have to copy ME5A to ZME5A and do? Please advice.
Apprecaite your suggestions ont his thread.
Thanks,
HarryHi,
Already there are some ENHANCEMENT spots are available in the program RM06BA00.. check if you can use them to add your logic to get the new field... -
Change layout of Adhoc query output list for Custom infotype
Hi All,
The fields in the Infoset query output on a custom infotype are aligned with the fields u2018payment typeu2019 and u2018amountu2019 appearing repeatedly(in columns) as declared in the Infotype and the output will be a long horizontal list.
Instead, the requirement is that the output list should show vertically so that If I choose u2018Payment Typeu2019 and u2018Amountu2019 as output fields, it will show a long vertical list as in the case of a standard infotype (IT0008).
Also, this way enables user to use Payment Type as a selection criteria so as to just pulling the needed payment type. When we use IT0008 in the infoset it works fine but in custom IT it does not work.
Any pointers/suggestions on how we can achieve this would be helpful.Hi yu liang,
You can find vendor list having Vendor No. & without showing total liability for every vendor.
after executing the report,
1.You need to select "change layout (ctrl+F8)",
a small window comes, it has two part -> column content & hidden fields.
then u select "Vendor" from hidden field & move it to column content.
2. at column content there is a column named "Total". u need to remove check for your column name "amount".
now select "copy" button or enter. u will find the req. report.
u can save it also by ur name.
hope its helpful to u.......
plz, reward points as a way of thanks if helpful...
Maybe you are looking for
-
(newbie) Question about replacing .class files and web.xml file
I'm new to servlets and I have two quick questions... Do I absolutely need a web.xml file to define all my servlets, or can I simply place .class files into the WEB-INF directory and expect them to run? If my application server (for example Tomcat) i
-
Conversion error removes entered values in the form
I have like 10 blocks of data in my jsf page. In my 7th block my date field gives a conversion error, then some of the fields entered above 7th block are removed and some of them after 7th block. why this happens??
-
Hello colleagues, Probably you many know there is Max Query Count setting in MII. Does any of you experience performance concerns by dealing with large number of query count? or does any of you have a recommendation for how to set max query count, e
-
Problem with FM gui_upload
Hello I use fonction GUI_UPLOAD with the following parameters: CALL FUNCTION 'GUI_UPLOAD' EXPORTING filename = w_nomfic filetype = 'ASC' has_field_separator = 'X' dat_mod
-
How to install iPhoto & iMovie without disk?
I have a late 2010 Macbook Air that I was recently given from a friend I didn't do any reformatting of the hard drive as there wasn't much on it, but I noticed that iPhoto and iMovie are missing (it's not under applications). I'm wondering whether it