Urgent pls: Automatic mailing of Reports thru BDC recording
Hi Gurus..
Please guide me for the possibility of creating a Z program which should call the T. Code, supply parameters for execution & sending output by email.I
need to execute 3 processes thru a single a program ..
1. get the distribution list
2. call the respective Tcode
3. running the background job for saving the variant & passing it.
Do I need to do recording thru BDC for each of them?
How can i do so in this manner..kindly guide me..
Pls experts need urgent help in this..
Thanks..
Himayan
Hi,
If the transaction codes you are referrring are associated to report programs, do as below:
1. Submit required program with addition Exporting list to Memory.
2. Read the list to an internal table
3. Use the data to send as mail attachments.
Check code samples in the below thread should you require the info:
[Sending External mails with attachments|Re: events]
Kind Regards
Eswar
Similar Messages
-
LSMW- line items thru bdc recording
I m creating a lsmw thru bdc recodring for me21.
the prob is ...how to upload the line items ? if i do in general it will only upload one line item for order....help me in solving this.Hi
When you do the recording in LSMW then if the options for multiple line items are available in ME21 then you can do the same with the LSMW recording also.
All you have to do is map the line items fields of the SAP structure to the line items of your upload source structure.
The Source Structure has to be defined as HEADER structure and the LINE item strucuture at the next level.
Then in the HEADER structure in the Source Field steps ,Name the first field as Record Identiifer and for the properties of the field give the value for Identifying Field Content as 'HEADER'.
Similarily for the LINE structure in the Source Field steps ,Name the first field as Record Identiifer and for the properties of the field give the value for Identifying Field Content as 'LINE'.
This would allow you to identify the HEADER and LINE for the files to be uploaded.
Please check this link also
Conversion - Doc with multiple line items - LSMW
Hope this is clear and is helpful. -
Automatically mailing a report....
hi buddies
I'm sending a report via outlook to some clients, although I've opened the report in outlook as a PDF attachment but I need to do some more things in this context:
1-- It shouldn't open outlook for me to press the SEND button to send the mail to a client. It should automatically send the mail to the address I specify in "DESNAME" parameter.
2-- Can I specify more than one email addresses separated with commas in DESNAME parameter?
3-- Can I change the subject of mail ? coz it displays a default Subject like "Report from report builder" which is not suitable.You can do this by using OLE2. Below is the procedure which i am using to generate mails with attachments. If you are using outlook the you can use it. Pass 3 parameters to this procedure
1. Subject
2. File to be attached address and name. I am running report and saving pdf on local drive. attaching that file with mail and deleting file at end using host command
3. Message
You can also pass receiving address by adding new paramater
PROCEDURE Email(p_subject in varchar2,p_filename in varchar2,msg in varchar2)
IS
/*declaration of the Outlook Object Variables*/
application ole2.OBJ_TYPE;
hMailItem ole2.OBJ_TYPE;
hRecipients ole2.OBJ_TYPE;
recipient ole2.OBJ_TYPE;
/*declaration of the argument list*/
args OLE2.LIST_TYPE;
msg_attch OLE2.OBJ_TYPE;
attachment OLE2.OBJ_TYPE;
des VARCHAR2(80) := 'FILE_NAME';
attch VARCHAR2(80) := p_filename;
ven_add varchar2(50);
tm varchar2(100);
begin
/*create the Application Instance*/
application:=ole2.create_obj('Outlook.Application');
args:=ole2.create_arglist;
ole2.add_arg(args,0);
hMailItem:=ole2.invoke_obj(application,'CreateItem',args);
ole2.destroy_arglist(args);
msg_attch := OLE2.GET_OBJ_PROPERTY(hMailItem,'Attachments');
/* Attach the 1st file */
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,attch);
attachment := OLE2.INVOKE_OBJ(msg_attch,'Add',args);
ole2.destroy_arglist(args);
OLE2.SET_PROPERTY(attachment,'name',des);
OLE2.SET_PROPERTY(attachment,'position',1);
OLE2.SET_PROPERTY(attachment,'type',1);
OLE2.SET_PROPERTY(attachment,'source',Attch);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,Attch);
OLE2.INVOKE(attachment,'ReadFromFile',args);
OLE2.DESTROY_ARGLIST(args);
/*Get the Recipients property of the MailItem object:
Returns a Recipients collection that represents all the Recipients for the Outlook item*/
args:=ole2.create_arglist;
hRecipients:=ole2.get_obj_property(hMailItem,'Recipients',args);
ole2.destroy_arglist(args);
/*Use the Add method to create a recipients Instance and add it to the Recipients collection*/
args:=ole2.create_arglist;
--ole2.add_arg(args,p_recipient);
ole2.add_arg(args,"receiving(to) email address");-- you can add more than 1. Can use loop for this purpose
recipient:=ole2.invoke_obj(hRecipients,'Add',args);
/* put the property Type of the recipient Instance to value needed (0=Originator,1=To,2=CC,3=BCC)*/
ole2.set_property(recipient,'Type',1);
ole2.destroy_arglist(args);
------------------------ven add
--Use the Add method to create a recipients Instance and add it to the Recipients collection-
args:=ole2.create_arglist;
ole2.add_arg(args,'other address'); ---add another address if required
recipient:=ole2.invoke_obj(hRecipients,'Add',args);
-- put the property Type of the recipient Instance to value needed (0=Originator,1=To,2=CC,3=BCC)-
ole2.set_property(recipient,'Type',1);
ole2.destroy_arglist(args);
-----------------------------CC email address
args:=ole2.create_arglist;
ole2.add_arg(args,'cc email address');
recipient:=ole2.invoke_obj(hRecipients,'Add',args);
/* put the property Type of the recipient Instance to value needed (0=Originator,1=To,2=CC,3=BCC)*/
ole2.set_property(recipient,'Type',2);
ole2.destroy_arglist(args);
/*Resolve the Recipients collection*/
args:=ole2.create_arglist;
ole2.invoke(hRecipients,'ResolveAll',args);
/*set the Subject and Body properties*/
ole2.set_property(hMailItem,'Subject',p_subject);
ole2.set_property(hMailItem,'Body',msg);
/*Save the mail*/
ole2.invoke(hMailItem,'Save',args);
ole2.destroy_arglist(args);
/*Send the mail*/
args:=ole2.create_arglist;
ole2.invoke(hMailItem,'Send',args);
ole2.destroy_arglist(args);
/*Release all your Instances*/
release_obj(application);
release_obj(hRecipients);
release_obj(recipient);
release_obj(hMailItem);
release_obj(msg_attch);
EXCEPTION
WHEN OTHERS THEN
message('Un-able to send Email ');
Raise;
end; -
Need urgent help on mailing lable report in group above style
Hi
I need to prepare a report on reports 6i in mailing lable style based on group above style (multiple levels) e.g. yellow page directory. can anybody help me.
rgdsHi,
That's something I also had to do.
Ad here's how this works.
Suppose you have:
Select ...
from ...
where ...
order by name;
Yet in your data model, in your group the fields appear, let's say, in the following order:
date
name
So, Reports will sort within the group first by date.
The answer is that your fields should appear in the data model in the order you wish to have them sorted. Thus, in the example, you should have:
name
date
Frankly, I don't really like the way it works. Yet, it's just that simple.
Hope this will help,
BD. -
Hi All,
I added the mailserver part in the rwbuilder.conf file.This is how it looks
<pluginParam name="mailServer">smtp.xxx.com</pluginParam>
The smtp server of our company is working fine.
Now when i am sending mail frm report builder i am getting the error.
Pls tell me .....
Do i have to configure any other file?
Should the smtp server be running in my local machine?WHAT IS THE SOLUTION ...FOR THIS PROBLEM?
Please someone give me some guidance..
regards,
ashokHi,
Pls give some idea ......
your reply will be greatly appreciated.
regards,
ashok -
Information Broadcasting ( Automatically execute a report and e-mail it)
Hi,
Can BEx Automatically execute a report and e-mail it. The requirement is to Execute a Report periodically and send the report in <b>EXCEL SHEET</b> format to the given e-mail ID.
I have tried configuring it in HTML format.... but I need it EXCEL format.
Waiting for help from the SDN community...
Thanks in Advance.....Hi,
You can send the workbook automatically when you schedule thru information broadcaster.
But you have to install precalculation server for distributing workbook..
Have a look at OSS note 760775 ..
Hope it helps..
Regards,
Siva. -
FUNCTION MODULE FOR AUTOMATIC MAIL GENERATION
Hello,
I want to generate an automatic mail of a scheduled report on everyday basis.
the output spool req of scheduled report in generated n saved inside the system.
Could you please help me in generating automatic mail through that saved spool request?
Regards,
Krutikahi,
use:
DATA: lv_filesize TYPE i,
lv_buffer TYPE string,
lv_attachment TYPE i,
lv_testo TYPE i.
DATA: li_pdfdata TYPE STANDARD TABLE OF tline,
li_mess_att TYPE STANDARD TABLE OF solisti1,
li_mtab_pdf TYPE STANDARD TABLE OF tline,
li_objpack TYPE STANDARD TABLE OF sopcklsti1,
li_objtxt TYPE STANDARD TABLE OF solisti1,
li_objbin TYPE STANDARD TABLE OF solisti1,
li_reclist TYPE STANDARD TABLE OF somlreci1,
li_objhead TYPE soli_tab.
DATA: lwa_pdfdata TYPE tline,
lwa_objpack TYPE sopcklsti1,
lwa_mess_att TYPE solisti1,
lwa_objtxt TYPE solisti1,
lwa_objbin TYPE solisti1,
lwa_reclist TYPE somlreci1,
lwa_doc_chng TYPE sodocchgi1.
CONSTANTS: lc_u TYPE char1 VALUE 'U',
lc_0 TYPE char1 VALUE '0',
lc_1 TYPE char1 VALUE '1',
lc_pdf TYPE char3 VALUE 'PDF',
lc_raw TYPE char3 VALUE 'RAW',
lc_ordform TYPE char15 VALUE 'ZORDCONFIRM_01',
lc_attachment TYPE char10 VALUE 'ATTACHMENT'.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = lc_pdf
max_linewidth = 132
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = pv_otfdata
lines = li_pdfdata
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT li_pdfdata INTO lwa_pdfdata.
TRANSLATE lwa_pdfdata USING ' ~'.
CONCATENATE lv_buffer lwa_pdfdata INTO lv_buffer.
CLEAR lwa_pdfdata.
ENDLOOP.
TRANSLATE lv_buffer USING '~ '.
DO.
lwa_mess_att = lv_buffer.
APPEND lwa_mess_att TO li_mess_att.
CLEAR lwa_mess_att.
SHIFT lv_buffer LEFT BY 255 PLACES.
IF lv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Object with PDF.
REFRESH li_objbin.
li_objbin[] = li_mess_att[].
DESCRIBE TABLE li_objbin LINES lv_attachment.
Object with main text of the mail.
lwa_objtxt = space.
APPEND lwa_objtxt TO li_objtxt.
CLEAR lwa_objtxt.
DESCRIBE TABLE li_objtxt LINES lv_testo.
Create the document which is to be sent
lwa_doc_chng-obj_name = text-008.
lwa_doc_chng-obj_descr = text-008.
lwa_doc_chng-sensitivty = lc_0.
lwa_doc_chng-obj_prio = lc_1.
lwa_doc_chng-doc_size = lv_testo * 225.
Pack to main body.
CLEAR lwa_objpack-transf_bin.
header
lwa_objpack-head_start = 1.
The document needs no header (head_num = 0)
lwa_objpack-head_num = 0.
body
lwa_objpack-body_start = 1.
lwa_objpack-body_num = lv_testo.
lwa_objpack-doc_type = lc_raw.
APPEND lwa_objpack TO li_objpack.
CLEAR lwa_objpack.
Create the attachment.
Fill the fields of the packing_list for the attachment:
lwa_objpack-transf_bin = gc_x .
header
lwa_objpack-head_start = 1.
lwa_objpack-head_num = 1.
body
lwa_objpack-body_start = 1.
lwa_objpack-body_num = lv_attachment.
lwa_objpack-doc_type = lc_pdf.
lwa_objpack-obj_name = lc_attachment.
lwa_objpack-obj_descr = text-008.
lwa_objpack-doc_size = lv_attachment * 255.
APPEND lwa_objpack TO li_objpack.
CLEAR lwa_objpack.
lwa_reclist-receiver = pv_emailid.
lwa_reclist-rec_type = lc_u.
lwa_reclist-notif_del = gc_x.
lwa_reclist-notif_ndel = gc_x.
APPEND lwa_reclist TO li_reclist.
IF li_reclist IS NOT INITIAL.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = gc_x
TABLES
packing_list = li_objpack
object_header = li_objhead
contents_bin = li_objbin
contents_txt = li_objtxt
receivers = li_reclist
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 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF. -
Output--- automatic mail is not firing to sold to party.
Dear Gurus,
My client requirement is to sent mail to sold party when saving a sales order.
For this I creted a new output type with following assignments
In General data tab:acess sequence assigned and Access to conditions is checked
In Default values tab: Dispatch time(send immadiately), transmission medium(External send), partner function(Sp
),Communication strategy(CS01) assigned.
In Time tab: no information given
In Storage system tab :Storage mode(print and archive),Document type(SDOORDER) info given.
In Print tab: print parameters(sales org) assigned.
In mail tab: nothing assigned.
In sort order tab:nothing assigned
In mail title and texts: En and DE languages are assigned.
in processing routines: program and form routine is assgned.
in partner functions: External send+ SP is maintained.
and in condtion record maintained in VV11 tcode with details
Partner function and in communication assigned printer and selected check box print immadiately and release after out.
But automatic mail is not firing when saving the sales order, but in change sales order in menu bar selected sales document and issue output to and selected print then mail is firing to the sold to party, pls tell me where i had done the mistake.
Rgrads,
kishore.
Edited by: kishore gopala on Sep 13, 2008 1:42 PMCheck whether you have maintained the email address in the customer master of Sold to party in the General Data>Address Tab> Under Communication Area??
In the SCOT Transaction, check under SMTP (SMTP Mail Server)-->under INT (Internet) --> an '*' asterisk has been maintained or not.
Check the status of the email output in the Sales Order, is it showing with a green traffic light???
If it is showing with a green traffic light you can manually see the status of the mail mesages in Transaction SOST.(by executing, by putting the Sender Id)
If they have not gone you will be able to see them queued up there.
Select the individual messages and press execute button. By doing this email outputs will be released.
Hope this helps you.
Caution: One word of caution is that SCOT is a very critical transaction. And if you are working on a live server, do not play with it as it controls the entire SAPconnect Administration Nodes.
Hope this helps.
Regards,
Vivek -
Problem in Automatic mail generation after shipment creation in vt01
Hi All,
In VT01 Automatic mail generation to customer whenver a new shipment is created & in from address user mail adderess is mentioned but in my requirements i have to mention different mail id in user mail address.
how can i do this?
please give me ur suggestions.
ThanxHi...
When user close the shipment ,then he gets a mail on his id automatically generated from sap system.
he want this mail should come to the mail id of his colleague.
Pls reply asap.
Thanx
Vj -
I have a MacBook Pro 13.3 OS- MAC OS X LION.
Whenever I am staring the computer, it says You need to restart your computer by pressing the power button.
I did this number of times and everytime it freezes to the same screen.Solution needed urgently pls.
Thank you for any help in this regard that comes fast.The details of the kernel-panic report is as follows-
Interval Since Last Panic Report: 1458653 sec
Panics Since Last Report: 6
Anonymous UUID: 70BA6A**************************************************
Sun Sep 16 23:00:13 2012
panic(cpu 0 caller 0xffffff80002c4794): Kernel trap at 0xffffff8000290560, type 14=page fault, registers:
CR0: 0x0000000080010033, CR2: 0x0000000000800028, CR3: 0x000000000a509005, CR4: 0x00000000001606e0
RAX: 0x0000000000000001, RBX: 0x0000000000820000, RCX: 0xffffff801122dc40, RDX: 0x0000000000020501
RSP: 0xffffff80ef3d3da0, RBP: 0xffffff80ef3d3dc0, RSI: 0x000000002b1d78b6, RDI: 0xffffff800342d280
R8: 0xffffff80ef3d3f08, R9: 0xffffff80ef3d3ef8, R10: 0x000000010d901000, R11: 0x0000000000000206
R12: 0xffffff800342d280, R13: 0x0000000000000000, R14: 0xffffff8011cd6500, R15: 0x0000000000800000
RFL: 0x0000000000010206, RIP: 0xffffff8000290560, CS: 0x0000000000000008, SS: 0x0000000000000000
CR2: 0x0000000000800028, Error code: 0x0000000000000000, Faulting CPU: 0x0
Backtrace (CPU 0), Frame : Return Address
0xffffff80ef3d3a50 : 0xffffff8000220792
0xffffff80ef3d3ad0 : 0xffffff80002c4794
0xffffff80ef3d3c80 : 0xffffff80002da55d
0xffffff80ef3d3ca0 : 0xffffff8000290560
0xffffff80ef3d3dc0 : 0xffffff800026c9c3
0xffffff80ef3d3f40 : 0xffffff80002c3fbb
0xffffff80ef3d3fb0 : 0xffffff80002da481
BSD process name corresponding to current thread: fsck_hfs
Mac OS version:
11E2620
Kernel version:
Darwin Kernel Version 11.4.2: Wed May 30 20:13:51 PDT 2012; root:xnu-1699.31.2~1/RELEASE_X86_64
Kernel UUID: 25EC645A-8793-3201-8D0A-23EA280EC755
System model name: MacBookPro9,2 (Mac-6F01561E16C75D06)
System uptime in nanoseconds: 4850001132
last loaded kext at 1796984176: com.apple.driver.BroadcomUSBBluetoothHCIController 4.0.7f2 (addr 0xffffff7f80e16000, size 57344)
loaded kexts:
com.apple.driver.BroadcomUSBBluetoothHCIController 4.0.7f2
com.apple.driver.AppleUSBTCButtons 227.6
com.apple.driver.AppleUSBTCKeyEventDriver 227.6
com.apple.driver.AppleUSBTCKeyboard 227.6
com.apple.driver.AppleIRController 312
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 33
com.apple.iokit.SCSITaskUserClient 3.2.1
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCISerialATAPI 2.0.3
com.apple.iokit.IOAHCIBlockStorage 2.0.4
com.apple.driver.AppleFWOHCI 4.8.9
com.apple.driver.AirPort.Brcm4331 560.7.21
com.apple.driver.AppleSDXC 1.2.2
com.apple.driver.AppleUSBHub 5.0.8
com.apple.iokit.AppleBCM5701Ethernet 3.2.4b8
com.apple.driver.AppleEFINVRAM 1.6.1
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleAHCIPort 2.3.0
com.apple.driver.AppleUSBEHCI 5.0.7
com.apple.driver.AppleUSBXHCI 1.0.7
com.apple.driver.AppleACPIButtons 1.5
com.apple.driver.AppleRTC 1.5
com.apple.driver.AppleHPET 1.7
com.apple.driver.AppleSMBIOS 1.9
com.apple.driver.AppleACPIEC 1.5
com.apple.driver.AppleAPIC 1.6
com.apple.driver.AppleIntelCPUPowerManagementClient 195.0.0
com.apple.nke.applicationfirewall 3.2.30
com.apple.security.quarantine 1.3
com.apple.security.TMSafetyNet 8
com.apple.driver.AppleIntelCPUPowerManagement 195.0.0
com.apple.driver.AppleUSBBluetoothHCIController 4.0.7f2
com.apple.iokit.IOBluetoothFamily 4.0.7f2
com.apple.driver.AppleFileSystemDriver 13
com.apple.driver.AppleUSBMultitouch 230.5
com.apple.driver.AppleThunderboltDPInAdapter 1.8.4
com.apple.driver.AppleThunderboltDPAdapterFamily 1.8.4
com.apple.driver.AppleThunderboltPCIDownAdapter 1.2.5
com.apple.iokit.IOUSBHIDDriver 5.0.0
com.apple.driver.AppleUSBMergeNub 5.0.7
com.apple.driver.AppleUSBComposite 5.0.0
com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.2.1
com.apple.iokit.IOBDStorageFamily 1.7
com.apple.iokit.IODVDStorageFamily 1.7.1
com.apple.iokit.IOCDStorageFamily 1.7.1
com.apple.driver.AppleThunderboltNHI 1.6.0
com.apple.iokit.IOThunderboltFamily 2.0.3
com.apple.iokit.IOSCSIArchitectureModelFamily 3.2.1
com.apple.iokit.IOFireWireFamily 4.4.5
com.apple.iokit.IO80211Family 420.3
com.apple.iokit.IOEthernetAVBController 1.0.1b1
com.apple.iokit.IONetworkingFamily 2.1
com.apple.iokit.IOUSBUserClient 5.0.0
com.apple.iokit.IOAHCIFamily 2.0.8
com.apple.iokit.IOUSBFamily 5.0.8
com.apple.driver.AppleEFIRuntime 1.6.1
com.apple.iokit.IOHIDFamily 1.7.1
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 177.5
com.apple.kext.AppleMatch 1.0.0d1
com.apple.driver.DiskImages 331.7
com.apple.iokit.IOStorageFamily 1.7.2
com.apple.driver.AppleKeyStore 28.18
com.apple.driver.AppleACPIPlatform 1.5
com.apple.iokit.IOPCIFamily 2.7
com.apple.iokit.IOACPIFamily 1.4 -
I have created a Library database. In this database i have created a over due report for the books which are over dued. I want to e-mail that report automatically to the user and manager of Library when the bokk is over dued. How can i e-mail my report from oracle portal.
These are a few links that I remember: http://technet.oracle.com:89/ubb/Forum81/HTML/000450.html http://technet.oracle.com:89/ubb/Forum70/HTML/000268.html http://technet.oracle.com:89/ubb/Forum70/HTML/000725.html
To find more links on this topic just search for "mail" in this forum and also on portal forum.
Thanx,
Chetan. -
How to get a summarized mail traffic report in exchange 2013
Hi all
How to calculate the exchange 2013 SMTP mail traffic in terms of hour,day,month,top senders,largest message and top recipients list . Same time we would like to have those summarized mail traffic report for all the mailbox servers in the form of graphical
view as well as in a csv file ?
Please all of us share your thoughts and possibilities .
Regards
S.Nithyanandham
Thanks S.NithyanandhamYou may calculate hourly email traffic using "Message Tracking Logs and Log Parser".
I would like to refer you on this well explained article that will assist you step-wise to implement in your working environment : http://exchangeserverpro.com/calculate-hourly-email-traffic-using-message-tracking-log-parser/
Moreover, if you wish to achieve this goal automatically, you may also consider on this automated application (http://www.exchangereports.net/) that provides a deep-view of email traffic report in real time at
granular level. -
Routine in Bex - urgent pls.
I have 2 columns A and B in the report:
A B C
1234 1234 1234
5903 0 5903
0 3287 3287
I want to get the column C.
So, the condition for the column C would be :
if A<>0 and B <>0 then A
else if A==0 then B
else if B==0 then A
I heared that this can be done by routines . I need the code to do this . Also let me know where to put the code.
This is urgent pls.
VaishaliHi,
No need to write coding.....directly u can get these by unsing formula as told in the above forum....there u get all these conditions in Boolean operators. so just make use of them..
Thanks & Regards -
P.O automatic mail genration pdf to word/text.
Hi everyone,
this is regarding the automatic mail generation in smartforms. Its like when you process the smartforms the mails are automatically shooted to the address maintained for eg usually to the vendors. So what I need is incase I proces my smartforms the mail shouldnt be in the pdf format but in normal text format.
I dont want to take that pdf convert to word/text by external sofware and attch it to the mail. I want it to be automatic.
Plz suggest the possible ways of doing it. Thanks to all in advance.
Rgds,
Anuc.*& Report ZCS_IRN
report zpo_spool no standard page heading line-size 260.
Table Declaration *******************************
tables : zptreg,zpoinb,dd07t,nase.
Data Declaration ********************************
type-pools: slis.
data : report_id like sy-repid.
data : ws_title type lvc_title value 'Reprint PT Inbound Register'.
data : i_layout type slis_layout_alv.
data : i_fieldcat type slis_t_fieldcat_alv.
data : lf_fm_name type rs38l_fnam.
data : ls_control_param type ssfctrlop.
data : ls_composer_param type ssfcompop.
data : ls_recipient type swotobjid.
data : ls_sender type swotobjid.
data : control_parameters type ssfctrlop.
data : output_options type ssfcompop.
Internal Table Declaration *******************************
data: begin of itab occurs 0,
chk,
indno type zptreg-indno,
dtype type zptreg-dtype,
ernam type zptreg-ernam,
erzet type zptreg-erzet,
aedat type zptreg-aedat,
traid type zptreg-traid,
traty type zptreg-traty,
vehnum type zptreg-vehnum,
bolnr type zptreg-bolnr,
lrdat type zptreg-lrdat,
lrdelv type zptreg-lrdelv,
lrtime type zptreg-lrtime,
datia type zptreg-datia,
uhria type zptreg-uhria,
lifnr type zptreg-lifnr,
werks type zptreg-werks,
anzpk type zptreg-anzpk,
btgew type zptreg-btgew,
gewei type zptreg-gewei,
ntgew type zptreg-ntgew,
idtxt type zptreg-idtxt,
waybl type zptreg-waybl,
dpack type zptreg-dpack,
ebeln type zpoinb-ebeln,
vbeln type zpoinb-vbeln,
menge type eket-menge,
wemng type eket-wemng,
wemng1 type eket-wemng,
chaln type zptreg-chaln,
paymt type zptreg-paymt,
zchquan type zptreg-zchquan,
rdesc(60) type c,
trdesc(60) type c,
tydesc(60) type c,
pdesc(60) type c,
name1 type lfa1-name1,
end of itab.
data : itab1 like itab occurs 0 with header line.
data : itab2 like itab occurs 0 with header line.
data: begin of ieket occurs 0,
ebeln type eket-ebeln,
ebelp type eket-ebelp,
menge type eket-menge,
wemng type eket-wemng,
end of ieket.
data : ieket1 like ieket occurs 0 with header line.
data : ieket2 like ieket occurs 0 with header line.
data : flag type c.
Selection Screen *******************************
selection-screen : begin of block b1 with frame title text-001.
select-options : x_indno for zptreg-indno matchcode object zindnohelp2.
select-options : x_aedat for zptreg-aedat.
select-options : x_werks for zptreg-werks .
select-options : x_lrdat for zptreg-lrdat.
select-options : x_lifnr for zptreg-lifnr no intervals no-extension.
select-options : x_ebeln for zpoinb-ebeln no intervals no-extension.
select-options : x_bolnr for zptreg-bolnr no intervals no-extension.
select-options : x_traid for zptreg-traid no intervals no-extension.
selection-screen : end of block b1.
Start of Selection *****************************
start-of-selection.
set pf-status 'STATUS'.
perform get_data.
perform display_data.
*& Form get_data
form get_data .
select * from zptreg into corresponding fields of table itab1
where indno in x_indno
and aedat in x_aedat
and werks in x_werks
and lrdat in x_lrdat
and lifnr in x_lifnr
and bolnr in x_bolnr
and traid in x_traid.
if sy-subrc ne 0.
message i001(zmsg).
stop.
endif.
select * from zpoinb into corresponding fields of table itab
for all entries in itab1
where indno = itab1-indno
and ebeln in x_ebeln.
if sy-subrc ne 0.
message i001(zmsg).
stop.
endif.
loop at itab.
at new indno.
flag = 1.
endat.
if flag = 1.
read table itab1 with key indno = itab-indno.
move itab1-traid to itab-traid.
move itab1-lifnr to itab-lifnr.
move itab1-traty to itab-traty.
move itab1-bolnr to itab-bolnr.
move itab1-traid to itab-traid.
move itab1-werks to itab-werks.
move itab1-vehnum to itab-vehnum.
move itab1-lifnr to itab-lifnr.
move itab1-btgew to itab-btgew.
move itab1-gewei to itab-gewei.
move itab1-ntgew to itab-ntgew.
move itab1-idtxt to itab-idtxt.
move itab1-waybl to itab-waybl.
move itab1-anzpk to itab-anzpk.
move itab1-aedat to itab-aedat.
move itab1-dpack to itab-dpack.
move itab1-erzet to itab-erzet.
move itab1-ernam to itab-ernam.
move itab1-zchquan to itab-zchquan.
move itab1-paymt to itab-paymt.
move itab1-chaln to itab-chaln.
move itab1-lrdat to itab-lrdat.
move itab1-lrdelv to itab-lrdelv.
move itab1-lrtime to itab-lrtime.
move itab1-datia to itab-datia.
move itab1-uhria to itab-uhria.
clear flag.
endif.
modify itab.
endloop.
delete itab where indno not in x_indno.
select * from eket into corresponding fields of table ieket for all entries in itab
where ebeln = itab-ebeln.
loop at ieket.
move ieket-ebeln to ieket1-ebeln.
move ieket-menge to ieket1-menge.
collect ieket1.
endloop.
loop at ieket.
move ieket-ebeln to ieket2-ebeln.
move ieket-wemng to ieket2-wemng.
collect ieket2.
endloop.
loop at itab.
read table ieket1 with key ebeln = itab-ebeln.
move ieket1-menge to itab-menge.
read table ieket2 with key ebeln = itab-ebeln.
move ieket2-wemng to itab-wemng.
itab-wemng1 = itab-menge - itab-wemng.
select ddtext from dd07t into itab-rdesc where domvalue_l = itab-idtxt and domname = 'ZIDTXT'.
endselect.
select ddtext from dd07t into itab-trdesc where domvalue_l = itab-traid and domname = 'ZTRAID'.
endselect.
select ddtext from dd07t into itab-tydesc where domvalue_l = itab-traty and domname = 'ZTRATY'.
endselect.
select ddtext from dd07t into itab-pdesc where domvalue_l = itab-paymt and domname = 'ZPAYMT'.
endselect.
select name1 from lfa1 into itab-name1 where lifnr = itab-lifnr.
endselect.
modify itab.
clear itab.
endloop.
if itab[] is initial.
message i001(zmsg).
stop.
endif.
endform. " get_data
*& Form display_data
form display_data .
report_id = sy-repid.
perform f1000_layout_init changing i_layout.
perform f2000_fieldcat_init changing i_fieldcat.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = report_id
i_callback_pf_status_set = 'STATUS'
i_callback_user_command = 'USER_COMMAND'
I_STRUCTURE_NAME =
is_layout = i_layout
it_fieldcat = i_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
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. " display_data
*& Form f1000_layout_init
form f1000_layout_init using i_layout type slis_layout_alv.
clear i_layout.
i_layout-colwidth_optimize = 'X'.
i_layout-edit = ''.
i_layout-box_fieldname = 'CHK'.
endform. " F1000_Layout_Init
*& Form f2000_fieldcat_init
form f2000_fieldcat_init changing i_fieldcat type slis_t_fieldcat_alv.
data: line_fieldcat type slis_fieldcat_alv.
clear line_fieldcat.
line_fieldcat-fieldname = 'CHK'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_l = 'Checkbox'.
line_fieldcat-checkbox = 'X'. " Display this field as a checkbox
line_fieldcat-outputlen = '8'.
line_fieldcat-edit = 'X'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'INDNO'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' PT Register No '.
line_fieldcat-outputlen = '15'.
line_fieldcat-hotspot = 'X' .
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'AEDAT'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Creation Date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'TRDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Transporter Name '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'TYDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Transport Type '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'VEHNUM'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Vehicle Number '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'BOLNR'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' L .R Number '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'NAME1'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Vendor / Supplier'.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'WERKS'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Site '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'EBELN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Purchasing Document '.
line_fieldcat-outputlen = '15'.
line_fieldcat-hotspot = 'X' .
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'WEMNG1'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Still To Be Delivered '.
line_fieldcat-outputlen = '20'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'VBELN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Sales Document '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ANZPK'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'No.of Packages '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'DPACK'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Damaged Packages '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'BTGEW'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Total Weight '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'GEWEI'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Weight Unit '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'NTGEW'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Net Weight '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'RDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Remarks '.
line_fieldcat-outputlen = '60'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'WAYBL'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Weigh Bill Number '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ERNAM'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Created By '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ERZET'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Created At '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'LRDAT'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'L.R Date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'LRDELV'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'L.R Delivery Date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'LRTIME'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'L.R Time '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'DATIA'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_l = 'Appointments: From date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'UHRIA'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_l = 'Appointments: Time from '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'CHALN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Challan No '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'PDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Payment method '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ZCHQUAN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Challan Quantity '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
endform. "f2000_fieldcat_init
*& Form user_command
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
data: wa_job_output_info type ssfcrescl.
data wa_spoolids type tsfspoolid.
data wa_spoolnum type rspoid.
data: objpack like sopcklsti1 occurs 2 with header line,
objhead1 like solisti1 occurs 1 with header line,
objbin like solisti1 occurs 10 with header line,
objtxt like solisti1 occurs 10 with header line,
reclist like somlreci1 occurs 5 with header line,
doc_chng like sodocchgi1,
tab_lines like sy-tabix.
data : wa_itab like itab.
data : line type c.
case r_ucomm.
when 'SAVE'.
clear line.
refresh itab2.
read table itab index rs_selfield-tabindex.
loop at itab where chk ne space.
move-corresponding itab to itab2.
collect itab2.
endloop.
describe table itab2 lines line.
if line ge 2.
message 'Please Select Only Document for Print Output ' type 'E'.
endif.
set parameter id : 'ZIN' field itab-indno.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZPTREG_NEW'
importing
fm_name = lf_fm_name.
if sy-subrc <> 0.
endif.
control_parameters-no_dialog = 'X'.
control_parameters-preview = 'X'.
output_options-tddest = 'LOCL'.
output_options-tdcopies = '2'.
call function lf_fm_name
exporting
control_parameters = ls_control_param
output_options = ls_composer_param
mail_recipient = ls_recipient
mail_sender = ls_sender
user_settings = 'X'
p_indno = itab-indno
importing
DOCUMENT_OUTPUT_INFO =
job_output_info = wa_job_output_info
JOB_OUTPUT_OPTIONS =
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
endif.
move wa_job_output_info-spoolids[] to wa_spoolids[].
read table wa_spoolids into wa_spoolnum index 1.
if sy-subrc = 0.
data :id like tsp01-rqident.
move wa_spoolnum to id.
endif. .
*loop at wa_spoolids INTO wa_spoolnum .
write : id.
*endloop.
data i_soli like soli occurs 0 with header line.
call function 'RSPO_RETURN_SPOOLJOB'
exporting
rqident = id
desired_type = 'OTF'
tables
buffer = i_soli
exceptions
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
others = 8.
data content_bin type solix_tab.
data objhead type soli_tab.
data i_soli_tab type soli_tab.
data boolean type sx_boolean.
data length type so_obj_len.
loop at i_soli.
append i_soli to i_soli_tab[].
endloop.
call function 'SX_OBJECT_CONVERT_OTF_RAW'
exporting
format_src = 'OTF'
format_dst = 'RAW'
changing
transfer_bin = boolean
content_txt = i_soli_tab
content_bin = content_bin
objhead = objhead
len = length
exceptions
err_conv_failed = 1
others = 2.
endcase.
*describe table objbin lines tab_lines.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = '100'. "tab_lines.
* objpack-doc_type = c_asc.
objpack-doc_type = 'DOC'.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'ATTACH'. "p_attach.
"Name of Attachment
objpack-doc_size = tab_lines * 255.
append objpack..
reclist-receiver = '[email protected]'.
reclist-rec_type = 'U'.
append reclist.
objbin[] = i_soli_tab[].
call function 'SO_RAW_TO_RTF'
tables
objcont_old = objbin
objcont_new = objbin
exceptions
others = 0.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
tables
packing_list = objpack
object_header = objhead1
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
endform. "user_command
Message was edited by:
anu c -
Automatically email Discoverer Reports
Can someone please tell me how I can automatically email some schedule reports in Discoverer.
We are using discoverer version 10.1.2 with Oracle Apps 12i.
Every month we run some schedule reports we want to automatically email these reports to some users.It's not possible if referring to the Plus or Viewer version.
In fact, Viewer is the version for mailing reports only.
The only alternative is to use the command line interface in Disco Desktop (the client / server version) and a scheduler (either purchased or using Windows freebie) and have the reports run via THAT scheduler and then email the results from that scheduler.
Not the slickest method ...
Russ
Maybe you are looking for
-
How do you get the apple remote to STOP always launching iTunes????
After upgrading to Snow Leopard, I have discovered a few annoyances. The biggest one is that the Apple remote is always launching iTunes when I use it. Even when the Finder is not the target app. I have my entire Star Trek collection on a firewire dr
-
Snort on solaris 10...
Hi, I know this probally isnt the place to post a new discussion about Snort but I tried on snorts site and im getting no answers. I'm trying to setup a Snort IDS machine, my question is I've noticed how open Solaris 10 is with a default installation
-
Hi all! Just started with an amazing oracle feature STREAMS! Can't you spent 10 minutes and help me to find the solution to my errors. I have a two-node bidirectional replication. If insert at rep1 i see changes at rep2, but when i insert into rep2 n
-
Help? Please.. I got OracleAS 10g Installed but I can't get Discoverer
I installed OracleAS 10g and I got things running but I can't get Discoverer Server to go to the database and get reports. I get the ORA-12154 could not resolve service name. I put in my login and password and database connection string when I get th
-
SQL Developer 4.0 Build MAIN-12.84 column width in data grid
A while ago I posted a thread about being unable to adjust the column width to "compress" everything on the screen to make the data more easily viewable. I just installed the latest build, and while it works slightly better, it still does not seem t