Add attachment in mail
We have a workflow which triggers on PO creation/change , and sends a mail to the PR creator for which the PO has been created .
We have a new requirement to add an attachment which contains the PO created in PDF form , in the mail sent to the PR.
Can someone let me know how can the attachment be added in the mail .
also , if there is any alternate or standard SAP method to do this .
Thanks
Sheetal
To build the pdf attachment, you need to copy and modify the routine that prints the PO:
For
<b>1. SAPSCRIPT</b>
Pass the TDGETOTF set to X, it is on OPTIONS structure that refers to ITCPO of FM OPEN_FORM, the OTF data is returned in CLOSE_FORM FM
<b>2. SMARTFORM</b>
The smartform's generated FM needs to be called with GETOTF set to X again, it is on the CONTROL_PARAMETERS, the OTF data is received into JOB_OUTPUT_INFO-OTF data.
Once the above is done you need to convert this OTF to PDF, search the ABAP forums for this otherwise I will have to dig through and revert to you.
Good Luck
Ravi
Similar Messages
-
How to add attachment to mail?
When composing a new email or while replaying to an email, how do I add the attachment that could be a picture or a document, spreadsheet or presentation.
In the iOS world, you start in the app that the attachment comes from. If you want to send a picture, open the photo app, find the picture or pictures, tap the output button, and select e mail. If you want to send a doc or spreadsheet, start in the pages, numbers, or whatever app you created the document in.
This is backwards from the windows way, but once you get used to it, works fine. -
Hello guys
i have this AppleScript which works well under macos x.5 but in x.6, Mail send me the mail without the attachment (but the message has the good subject)… do you see what's going wrong? Thank's
Jerome
on open theFiles
repeat with eachItem in theFiles
tell application "Finder"
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"."}
set the target_file to (theFiles) as alias
set FileName to name of target_file
set fileExt to last text item of FileName
set nameWithoutExtension to first text item of FileName
end tell
set theSubject to nameWithoutExtension
set theAddress to "[email protected]"
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:theSubject}
tell newMessage
set visible to true
make new to recipient at end of to recipients with properties {address:theAddress}
tell content
set theAttachment to eachItem
make new attachment with properties {file name:theAttachment} at after the last paragraph
end tell
end tell
send newMessage
end tell
end repeat
end openYou need to set the type when you copy from the list of items. Here's the problem:
set theAttachment to eachItem
Change this to..
set theAttachment to eachItem as alias
Works fine anyway on my 10.6 system. I've noticed sometimes that items pulled from lists can have strange types, so it's probably not a bad idea to be explicit to ensure that you're getting the type you expect to see. -
ADD ATTACHMENT TO AUTO MAIL SENT DURING BIDDER CREATION
HOW TO ADD ATTACHMENT TO AUTO MAIL SENT DURING BIDDER CREATION (CREATE CONTACT PERSON) IN SRM PORTAL..
HOW TO ADD ATTACHMENT TO AUTO MAIL SENT DURING BIDDER CREATION (CREATE CONTACT PERSON) IN SRM PORTAL..
-
Hi,
I have done a script within Automator that does take filtered information in one Excel-file and copy it to another and close it. I choose a name for it and saves it. Could I get it to automatically attach this file inside a mail document in Mail.app and let me send it manually?
I also would like it to automatically uncheck 1904 Date option inside Excel prefs.If you know the name of the workbook, then add this applescript to the workflow, while the file is still open.on run {input, parameters}
tell application "Microsoft Excel"
set the date 1904 of workbook "Sheet1" to not the date 1904 of workbook "Sheet1"
send mail workbook "Sheet1"
end tell
return input
end runSubstitute the name of the workbook for Sheet1
I couldn't get any of the excel actions to pass the name into the Applescript action.
As for emailing, I can't get Excel to pass any of it's action results onto anything but it's own actions. They don't seem to be very well written. Normally, you'd just add a "New Mail Message" action after something and the output from the previous action would be the content for the new mail message.
Due to Microsoft's shortcomings, there doesn't seem to be a way to do that without using the "send mail" function in Excel's Applescript dictionary.
If you need to do more Applescripting of Excel (or Office), see the [VBA to Applescript Transition Guide|http://www.mactech.com/vba-transition-guide>. It is geared towards converting from VBA to Applescript, but it has many examples of how to automate various tasks.
Message was edited by: Barney-15E -
Cannot add attachment to e-mail since updating firefox
when trying to add attachment to yahoo e-mail, no window comes up to allow me to select the attachment. When I click attachment nothing happens.
Can anyone help me, please??? I check'd all possible settings but i can't solve this be my self.
-
Error while Opening PDF attachment from Mail
Hi,
We two Output Types created ZNEU and ZAUF. Two Smartforms are created for the same Output Types. The Issue now is, When ZNEU triggers and send a mail the document is properly decoded and gets opened but for ZAUF it doesn't. It says File damaged.
This is the code we have used for sending mail.
CONSTANTS:
co_pdf(3) TYPE c VALUE 'PDF',
co_raw(3) TYPE c VALUE 'RAW'.
DATA:
it_objbin TYPE STANDARD TABLE OF solisti1,
wa_objbin TYPE solisti1.
DATA:
lv_filesize TYPE i.
DATA:
it_lines TYPE STANDARD TABLE OF tline.
DATA:
wa_mail_body TYPE solisti1,
wa_receipients TYPE somlreci1.
DATA:
document TYPE REF TO cl_document_bcs,
content TYPE solix_tab,
wa_content TYPE solix,
send_request TYPE REF TO cl_bcs,
sender TYPE REF TO if_sender_bcs,
recipient TYPE REF TO if_recipient_bcs,
requested_status TYPE REF TO bcs_rqst,
status_mail TYPE bcs_stml,
bcs_exception TYPE REF TO cx_bcs,
lv_rec TYPE adr6-smtp_addr.
DATA:
wa_attachx TYPE solix,
l_pdf_len TYPE i,
l_con_len TYPE i,
l_pdf_pos TYPE i,
l_con_pos TYPE i.
FIELD-SYMBOLS: <fs_con> TYPE x.
CLASS cl_cam_address_bcs DEFINITION LOAD.
CLASS cl_abap_char_utilities DEFINITION LOAD.
* Get the PDF version of the OTF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = job_output_info-otfdata
lines = it_lines
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.
* Convert the PDF format to the table type required for the attachment.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = it_lines
t_target_tab = it_objbin
EXCEPTIONS
convert_not_possible = 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.
* Convert the data which is in text to binary
l_con_pos = 0.
DESCRIBE FIELD wa_objbin LENGTH l_pdf_len IN BYTE MODE.
DESCRIBE FIELD wa_attachx LENGTH l_con_len IN BYTE MODE.
LOOP AT it_objbin INTO wa_objbin.
ASSIGN wa_objbin TO <fs_con> CASTING.
CHECK sy-subrc EQ 0.
DO l_pdf_len TIMES.
l_pdf_pos = sy-index - 1.
IF l_con_pos = l_con_len.
APPEND wa_attachx TO content.
FREE wa_attachx.
l_con_pos = 0.
ENDIF.
MOVE <fs_con>+l_pdf_pos(1) TO wa_attachx-line+l_con_pos(1).
ADD 1 TO l_con_pos.
ENDDO.
ENDLOOP.
IF l_con_pos > 0.
APPEND wa_attachx TO content.
ENDIF.
TRY .
* -------- create persistent send request ------------------------
send_request = cl_bcs=>create_persistent( ).
* -------- create and set document with attachment ---------------
* create document from internal table with text
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = mail_body_tab
i_subject = email_subject ).
* add attachment to document
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = attachment_name
i_att_content_hex = content.
* add document to send request
CALL METHOD send_request->set_document( document ).
* Set sender
sender = cl_cam_address_bcs=>create_internet_address( sender_id ).
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
* Receipients
LOOP AT receipients_tab INTO wa_receipients .
lv_rec = wa_receipients-receiver.
recipient = cl_cam_address_bcs=>create_internet_address( lv_rec ).
* Add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient.
ENDLOOP.
* Set that you don't need a Return Status E-mail
status_mail = 'N'.
CALL METHOD send_request->set_status_attributes
EXPORTING
i_requested_status = 'N'
i_status_mail = status_mail.
* set send immediately flag
send_request->set_send_immediately( 'X' ).
* Send document
CALL METHOD send_request->send( ).
* COMMIT WORK.
CATCH cx_bcs INTO bcs_exception.
RAISE EXCEPTION bcs_exception.
ENDTRY.
This is in a Class which is been used in the print program for both the Output Types.
Can somebody throw light upon this.
Note: I tried using
but it is not working properly.
Thanks,
Prashanth
Edited by: Prashanth KR on Jan 5, 2010 6:20 AMHi,
Please paste the part of code where you are getting error.
And if you are not clear about where the error is, try searching sdn or google with the error message that you are getting as this issue has been discussed many times earlier.
Check this link.
Error while opening PDF in mail attachment
Hope it helps.
Regards,
Raj -
Is it possible to send xls attach in mail in background ?
is it possible to send xls attach in mail in background ?
i build/copy program to send attach file in xls format ,
its work fine in foreground but do nothing in background ,
What can be the reason?
the section of the sending :
DATA: LD_ERROR TYPE SY-SUBRC,
LD_RECIEVER TYPE SY-SUBRC,
LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
LD_EMAIL LIKE SOMLRECI1-RECEIVER,
LD_FORMAT TYPE SO_OBJ_TP ,
LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
LD_ATTFILENAME TYPE SO_OBJ_DES ,
LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
LD_RECEIVER LIKE SY-SUBRC.
LD_EMAIL = P_EMAIL.
LD_MTITLE = P_MTITLE.
LD_FORMAT = P_FORMAT.
LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
LD_ATTFILENAME = P_FILENAME.
LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
Fill the document data.
W_DOC_DATA-DOC_SIZE = 1.
Populate the subject/generic message attributes
W_DOC_DATA-OBJ_LANGU = SY-LANGU.
W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
W_DOC_DATA-SENSITIVTY = 'F'.
Fill the document data and get size of attachment
CLEAR W_DOC_DATA.
READ TABLE IT_ATTACH INDEX W_CNT.
W_DOC_DATA-DOC_SIZE =
( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
W_DOC_DATA-OBJ_LANGU = SY-LANGU.
W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
W_DOC_DATA-SENSITIVTY = 'F'.
CLEAR T_ATTACHMENT.
REFRESH T_ATTACHMENT.
T_ATTACHMENT[] = PIT_ATTACH[].
Describe the body of the message
CLEAR T_PACKING_LIST.
REFRESH T_PACKING_LIST.
T_PACKING_LIST-TRANSF_BIN = SPACE.
T_PACKING_LIST-HEAD_START = 1.
T_PACKING_LIST-HEAD_NUM = 0.
T_PACKING_LIST-BODY_START = 1.
DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
T_PACKING_LIST-DOC_TYPE = 'RAW'.
APPEND T_PACKING_LIST.
Create attachment notification
T_PACKING_LIST-TRANSF_BIN = 'X'.
T_PACKING_LIST-HEAD_START = 1.
T_PACKING_LIST-HEAD_NUM = 1.
T_PACKING_LIST-BODY_START = 1.
DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
APPEND T_PACKING_LIST.
Add the recipients email address
CLEAR T_RECEIVERS.
REFRESH T_RECEIVERS.
T_RECEIVERS-RECEIVER = LD_EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
T_RECEIVERS-NOTIF_DEL = 'X'.
T_RECEIVERS-NOTIF_NDEL = 'X'.
APPEND T_RECEIVERS.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOC_DATA
PUT_IN_OUTBOX = 'X'
SENDER_ADDRESS = LD_SENDER_ADDRESS
SENDER_ADDRESS_TYPE = LD_SENDER_ADDRESS_TYPE
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL = W_SENT_ALL
TABLES
PACKING_LIST = T_PACKING_LIST
CONTENTS_BIN = T_ATTACHMENT
CONTENTS_TXT = IT_MESSAGE
RECEIVERS = T_RECEIVERS
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.
Populate zerror return code
LD_ERROR = SY-SUBRC.
Populate zreceiver return code
LOOP AT T_RECEIVERS.
LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
ENDLOOP.Try this example, not sure where I got this, but it works.
report zmail_excel.
parameters: p_email type somlreci1-receiver
default '[email protected]'.
data: begin of it001 occurs 0,
bukrs type t001-bukrs,
butxt type t001-butxt,
end of it001.
data: imessage type standard table of solisti1 with header line,
iattach type standard table of solisti1 with header line,
ipacking_list like sopcklsti1 occurs 0 with header line,
ireceivers like somlreci1 occurs 0 with header line,
iattachment like solisti1 occurs 0 with header line.
start-of-selection.
select bukrs butxt into table it001 from t001.
* Populate table with detaisl to be entered into .xls file
perform build_xls_data .
* Populate message body text
clear imessage. refresh imessage.
imessage = 'Please find attached excel file'.
append imessage.
* Send file by email as .xls speadsheet
perform send_email_with_xls tables imessage
iattach
using p_email
'Example Excel Attachment'
'XLS'
'TestFileName'
'CompanyCodes'.
* Form BUILD_XLS_DATA
form build_xls_data .
constants: con_cret type x value '0D', "OK for non Unicode
con_tab type x value '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
* con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
* con_cret type c value cl_abap_char_utilities=>CR_LF.
concatenate 'BUKRS' 'BUTXT'
into iattach separated by con_tab.
concatenate con_cret iattach into iattach.
append iattach.
loop at it001.
concatenate it001-bukrs it001-butxt
into iattach separated by con_tab.
concatenate con_cret iattach into iattach.
append iattach.
endloop.
endform.
* Form SEND_EMAIL_WITH_XLS
form send_email_with_xls tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription.
data: xdocdata like sodocchgi1,
xcnt type i.
* Fill the document data.
xdocdata-doc_size = 1.
* Populate the subject/generic message attributes
xdocdata-obj_langu = sy-langu.
xdocdata-obj_name = 'SAPRPT'.
xdocdata-obj_descr = p_mtitle .
* Fill the document data and get size of attachment
clear xdocdata.
read table iattach index xcnt.
xdocdata-doc_size =
( xcnt - 1 ) * 255 + strlen( iattach ).
xdocdata-obj_langu = sy-langu.
xdocdata-obj_name = 'SAPRPT'.
xdocdata-obj_descr = p_mtitle.
clear iattachment. refresh iattachment.
iattachment[] = pit_attach[].
* Describe the body of the message
clear ipacking_list. refresh ipacking_list.
ipacking_list-transf_bin = space.
ipacking_list-head_start = 1.
ipacking_list-head_num = 0.
ipacking_list-body_start = 1.
describe table imessage lines ipacking_list-body_num.
ipacking_list-doc_type = 'RAW'.
append ipacking_list.
* Create attachment notification
ipacking_list-transf_bin = 'X'.
ipacking_list-head_start = 1.
ipacking_list-head_num = 1.
ipacking_list-body_start = 1.
describe table iattachment lines ipacking_list-body_num.
ipacking_list-doc_type = p_format.
ipacking_list-obj_descr = p_attdescription.
ipacking_list-obj_name = p_filename.
ipacking_list-doc_size = ipacking_list-body_num * 255.
append ipacking_list.
* Add the recipients email address
clear ireceivers. refresh ireceivers.
ireceivers-receiver = p_email.
ireceivers-rec_type = 'U'.
ireceivers-com_type = 'INT'.
ireceivers-notif_del = 'X'.
ireceivers-notif_ndel = 'X'.
append ireceivers.
call function 'SO_DOCUMENT_SEND_API1'
exporting
document_data = xdocdata
put_in_outbox = 'X'
commit_work = 'X'
tables
packing_list = ipacking_list
contents_bin = iattachment
contents_txt = imessage
receivers = ireceivers
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.
endform.
Regards,
Rich Heilman -
Add an e-mail to a calendar event in outlook?
Hi,
If I add an e-mail to a calendar event in Outlook on my PC, I can see the event on my iPhone 4s but not the e-mail attachment? Have i missed setting something up or do I need an App or...?
Any help appreciated!If you click on the person's name, you go to the public profile they have posted. If there is an email address given you can email directly. If not, you cannot email the person directly.
You could post a reply to the persons reply on the communities to note their help. -
Post Author: hteoh
CA Forum: Publishing
I have an BO related issue. I tried to schedule a smtp event in BO to email the report output as Excel. Since this report will go to different users, I unchecked the Use the Job Server's defaults (CHECK BOX). For some reason, I can't check the Add Attachment(CHECK BOX). I received the email but without attachement. Do you know why I can't use attachment. The SMTP event works perfectly if I check Use the Job Server's defaults.Hi!
Use the below code to populate the Sender and receiver mail ids:
DATA GV_SENDER TYPE SWC_OBJECT.
DATA GV_SENDER_ID LIKE SWOTOBJID.
SWC_CONTAINER LT_CONTAINER.
reset data for CTCV
CALL FUNCTION 'CTCV_INIT_USER_DATA'.
Create sender using sender mail address from new table
SWC_CLEAR_CONTAINER LT_CONTAINER.
SWC_CREATE_OBJECT GV_SENDER 'RECIPIENT' SPACE.
SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
ZMAIL-SENDER.
SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'B'.
SWC_CALL_METHOD GV_SENDER 'CreateAddress' LT_CONTAINER.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING SENDER_CREATION_FAILED.
ENDIF.
SWC_OBJECT_TO_PERSISTENT GV_SENDER GV_SENDER_ID.
Similarly you can create the recipient mail id. Pass the GV_SENDER_ID to OPEN_FORM.
Cheers! -
Add text in mail for payment notification RFFOAVIS_FPAYM
Hi All,
We are sending payment notification to vendors via RFF0AVIS_FPAYM program. We are using SAP script form for this.
We want to add text in mail body. I have checked note 1033893. I have created text with name z* in SO10 and assigned in process exit for 00002040. But text is not appearing in mail.
Am i missing some settings ?
Please give suggestions.
Thanks in advance.
Regards,
ChintanHello,
Point 1
Please check up the function module attached to proces 00002040 in FIBF.
Make the changes in the function module.
Please refer:
SAP NOTE 1033893, 836169.
Also see Note 521587.
Regards,
Ravi -
My computer is running slow after Yosemite install -but in the Mail program, when I open an email and then open the attachment -all is good -when I close the attachment the Mail program goes away, and I have to reopen it in my Dock -every time.
I tried this, but no luck. I went to Previous System>Users. There is nothing inside the "Users" folder, so I hit a dead end.
I can find my new e-mails -- those that came in since I re-installed the system -- in my NEW system (which I did to see if I was correctly understanding the advice), by going to Users>Home>Library>Mail>POP account name>Inbox.
Let me add a new question: I am running PhotoShop C3. It opens OK, and I can use it, but when it opens I get this message: "One or more files for Adobe Application Support folder are missing. Please re-run the PhotoShop installer."
I don't like re-installing working programs if I can avoid it, because it always seems to lead to other issues. Any idea what files are missing, and where it/they might be in the Previous System folder?
thanks
Mike -
Add attachment to...
When I use the mail action "Add attachment to..." it gives me the "An error (There is no outgoing message. (-2700)) occured in Add Attachments to Front Message.
The error doesn't occur if I use the "New Mail Message" command. In fact the Add attachment command works on emails created with the New Mail command, but not if I create my own email!
What I want to do is create a workflow that downloads a specific file off the web and adds that file to my email. While it would be simple enough to drag it, I really don't feel like looking up the site every day to get the new data. The workflow I made works great up until the moment it goes to Add the attachment, then it fails.
Any help would be appreciatedSorry to "steal" the thread, but..
Is there any way to ad music files and other things as attachment's or is it just possible with photos? -
How can I add an e-mail address to my existing icloud account? I curently only use one of the three.
Each iCloud account only has a single iCloud account. If you want, you can add up to 3 alias addresses that will receive email in the same iCloud inbox, as explained here: http://support.apple.com/kb/PH2622.
-
Fetch data from table and generate attachment than mail it.
Hello Experts,
From couple of day I am searching on Google for a better database procedure that will help me to get data from tables and generate attachment and mail it but i fail.
My Scenario is:
I have a query that will fetch almost 5000 records from database tables. Each record has almost 75 characters
select a.location_code,
a.item_code,
b.description item_desc,
to_char(a.manufact_date,'ddMonyy')mfg,
to_char((a.manufact_date + nvl(b.expiry_period,0)),'ddMonyy')expr,
to_char((a.manufact_date + nvl(b.qurantine_period,0)),'ddMonyy')qrtn,
round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) days_elapsed,
a.closing_balance_posted quantity
from wms_stock_current_balance_v a, wms_item_setup_mast b
where a.closing_balance > 0
and a.item_code = b.item_code
and a.loc_type in ('RACKING','PICKING','QUICKA','BUNDLED')
and nvl(b.qurantine_period,0) > 0
and round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) <= 0
order by a.item_code, a.location_code;
Sample data of above query is
LOCATION_CODE
ITEM_CODE
ITEM_DESC
MFG
Expiry
Quarantine
Days Elapse
Quantity
13DL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
14DL0
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
134
14DL2
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
160
14DR2
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
20
14LL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17ER2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17GL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17SL0
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
64
18QL0
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
160
19AR5
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
160
19DL1
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
19JR0
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
60
19TL1
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
20GR2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
40
36FL3
000000000000000F0487
CLEAR COOL BLACK 05ML
18-Feb-10
29-Mar-14
2-Jun-13
-124
65
19UR0
000000000000000F0591
COMFORT WHITE 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
1
12SL1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
42
12SR1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
42
14OR1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
8
36EL4
000000000000000F0594
CLEAR HF DECRASE 5M*360
14-Feb-10
14-Feb-11
12-Oct-10
-1088
14
13VL1
000000000000000F0595
CLEAR COM SFT CRE 5*360
8-Feb-10
8-Feb-11
6-Oct-10
-1094
160
14ER0
000000000000000F0595
CLEAR COM SFT CRE 5*360
8-Feb-10
8-Feb-11
6-Oct-10
-1094
105
Database Info
Oracle 10g
Version 10.2.0.1.0Look at the sample code for generating a CSV file that I've just posted in response to a similar question:
Re: How to execute a proc and spool files in a database job
And the use the search button in this forum to find sample code for sending a CLOB as a plain/text e-mail attachment using UTL_SMTP.
Maybe you are looking for
-
I can't get mail to work after complete re-install
Every time I open mail I can click on one message, when I click on the second it hangs and must be force quit. I deleted preferences, mail folder, etc. and reinstalled mail. Problem still exists. I am able to access the account with my iphone and t-b
-
To back up data in Time capsule to external hard drive...
I have Time Capsule 500gb connected with Seagate external USB hard drive. My iMac and Time Capsule are connected wirelessly. I've stored my music data in Time Capsule, and I want to back up this data to Seagate hard drive. First I turned on Time Mach
-
Drag and Drop no longer in iPhoto 11?
Drag and Drop no longer in iPhoto11? I can no longer "drag and drop" selected photos from iPhoto11 onto a desktop album. Before upgrading I could select as many as 200 photos and drag them onto a desktop album. No longer.
-
SQL Developer 2.1 no longer allows to edit another granted schemas
Hello, Just switched from 1.5.5 to 2.1 and going back! In 1.5.5 I was able to logon as me (developer) and edit functions of batch schemas. Guess what! Not any more in 2.1!! Even if my priviliges allows me to do this!! Any ideas how to bypass this pro
-
Hi All, I have a formula column and I want to display this formula column as paramter in the report. Kindly help... Thanks..