Problems sending documents with "send to"
I have a several problem to send documents via File -> Send To -> Mail recipient
When I click send , ). the application will appear to hang and Outlook crash doesnt start.
No process instable found in windows task manager.
The only solution is "kill" Explorer process and Run > New task> Explorer, or disconnect current user.
Thank you for help
A.M.
Windows XP Professional SP3
Microsoft Outlook 2003 Standard Edition SP3
Oracle Connector for Outlook rel. 10.1.3.04.80907 (i've try also the last version)
Hi,
Check out the following commands under Content Management -> User Interface -> Commands:
MSOL_send_as_attachment_Applet
MSOL_send_as_attachment_Vbs
MSOL_send_as_link_Applet
MSOL_send_as_link_Vbs
they allow you to attach the resource to an Outlook mail Item either by using an applet or an activex control.
You have to add it to the right Command Group in order to see it on the menu.
Best regards,
Avishai Zamir
Similar Messages
-
Can't send documents with Web Intelligence anymore
Post Author: jbaers
CA Forum: Migration to XI R2
Hi everybody,
I'm implementing BO XI R2 SP2. The installation is OK, but when I import the repository from BO 6.5, I cannot send any document with Web Intelligence. I found the following message in the log files :
assert failure: (.\wireob.cpp:667). (false : Error: Wrong number of parameters in URL ).
Can somebody help me?
Thanks.
Regards,
JBAERSPost Author: TAZ
CA Forum: Migration to XI R2
The error is just an assert that gets thrown into our log files but likely has nothing to do with the issue. I'd suspect either import wizard workflow or maybe permissions? You will likely need to verify the workflow with BO-support and/or trace some of the processes to see where the problem is occurring.
Did you migrate security?
Tim -
Problem polling Inbox with Sender Mail adapter
Hi,
I have a funny problem with Sender Mail adapter (IMAP Protocol)
It was working fine previously.
Now, when I poll the Inbox, 2 things happen. After re-activation:
1. If there is a new mail in the Inbox, the Communication channel marks the mail as read, but still keeps reading the same mail into XI.
2. If there are no new mails in the Inbox, it reads the already read mails in the Inbox one by one. So all old mails start entering XI.
This problem exists only with the Inbox. It works fine with other folders for the same mail ID.
Any inputs as to why this is happening?
Regards,
Puloma.Hi,
We re-started the server and problem was solved. But we don't know why the Adapter Engine was behaving erratically.
Regards,
Puloma. -
Is there any way to send Attachements with Sender file adapter
Hi,
I am Using File to Proxy communication model. Is there any way I can use file attachments with Sender file adapter with communication protocol "FTP". Please on suggest this.
Regards,
Daniel.LAHi,
I think there is no Option with FTP Protocol to send the files as Attachments.
Try this
http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
Regards
Seshagiri -
Locking problem - unique documents with external numbers
Hello,
I have following problem:
In external system documents are generated with unique numbers. When they come to SAP (via RFC calls) corresponding documents in SAP are created with internal SAP numbering (the external document number is saved in "Ref. Doc No." field).
Recently we had a situation when the external documents were posted twice (with two different internal SAP numbers). There is a check if the document with "Ref. Doc No." already exists in database table but it doesn't work when double posting is performed in very short period of time (the document from first posting is not yet written in DB while the second posting checks if it is already there - in result the second posting is also performed).
I thought about using ENQUEUE/DEQUEUE mechanism but it seems to work only on records which are already in DB table.
Do you have any idea what "lock mechanism" could be used in this case?Boinjour,
You said :
"I thought about using ENQUEUE/DEQUEUE mechanism but it seems to work only on records which are already in DB table."
My point of view is that you can lock an entry that is not already existing in the DB.
Example : in the transaction code se11 try to create a LOCK OBJECT named eztest. During this creation and before saving, open an other sap session and try to create the same object. You will have an error message because a lock already exist.
The entry is locked but does not exist in DB.
"Do you have any idea what "lock mechanism" could be used in this case?"
Create a specific lock object with Lock parameter = a sap field to will correspond to the external number.
==> It will generate 2 function modules (ENQUEUE and DEQUEUE).
In the abap that is integrating incoming data :
add a CALL to the "ENQUEUE" function module ===> try to lock an entry
If the lock was OK (return code of enqueue function module is 0)
Then you continue
Else.
The entry that you are trying to lock is already locked.
ENDIF.
Cordialement,
Chaouki.
It is easy to test :
Cordialement,
Chaouki. -
Problem creating document with function ISH_N2_MEDICAL_DOCUMENT
Hello,
first of all, creating a document with correct data works. But our customer wants the documents also to be created if the name of the responsible employee is wrong or not existing.
Can this be done in some way? Because when i try to use the function "ISH_N2_MEDICAL_DOCUMENT" i get the message "message employee NAME is not employee responsible" and the document is not created.
regards
DanielDear Daniel,
basically you cannot create a medical document without an existing employee responsible (business partner). Depending on your system configuration the EmR may to be assigned to the documenting ou.
So how you can deal with that restriction?
a) use a dummy bp for these onces which doesn't exists. You can check BP by the IS-H BAPI for Business partners.
b) create the BP on the fly before creating the document.
Regards,
Axel -
Problem veryfing document with more than one signature element ...
hello everyone,
Sorry for my english. I've got a short question (but interesting).
I know how to write simple application which correctly sign and verify xml document (dsig and xades).
When I sign the same xml document for a few times it looks like this:
<data>
<Signature 1 />
<Signature 2 />
<Signature 3 />
</data>
But only last signature element I can verify correctly. I use Transform.ENVELOPED, and haven't got any ideas what I do wrong. Maybe I have to remove all signature elements before sign next ? Maybe I have to remove other signature elements before verify right ?
Best regards, kkTake a look at business area and groupings in they payment program settings...
I am not sure what version you are on but the following link for 4.7 should provide some valuable information...
http://help.sap.com/saphelp_47x200/helpdata/en/01/a9be64455711d182b40000e829fbfe/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/01/a9be64455711d182b40000e829fbfe/frameset.htm
Grouping Open Items and Individual Payments
Wherever possible, the payment program will always group items together for payment.
The payment program can only group together open items for payment if the open items in an account have the same:
1. Currency
2. Payment method in the item
3. Bank in the item
4. Contents of the grouping fields (if a grouping key is specified in the customer or vendor master record)
You can also pay open items from different company codes together, as well as customer and vendor line items.
Items in an account are not grouped together if you:
1. Make payments separately per business area. This procedure entails separate payments being created per business area.
2. Want to make individual payments
Items in which a payment method is specified are not grouped with items in which no payment method is specified.
You define the required grouping key in the IMG for Financial Accounting under Accounts Receivable and Accounts Payable -> Business Transactions -> Outgoing Payments -> Automatic Outgoing Payments -> Payment Method/Bank Selection for Payment Program -> Define Payment Groupings.
In our system, if the business area is the same, there will be one ZP document with one line with a posting key of 25. Otherwise there will be many individual 25 posting key lines with. -
Send documents with distribution type INT error
Getting error in the FM CVV4_GENERATE_RMA has been determined for the generation and
error occurred in function module <SO_ATTACHMENT_INSERT_API1>
while document distribution with originals as attachment (does not work) .
Thanks.Hi again,
due to some other similar issues I can also suggest you the following measurments for testing:
Please try switching back to using SAPHTTP instead by creating the following entry in the SDOKPROF table:
NAME: USEHTTPPLG
VALUE: OFF
Leave all the remaining fields blank. Save your changes. Please also use the program RSHTTP05 to regenerate SAPHTTP and SAPHTTPA, and ensure you have the latest version of these programs as per the note 164203.
Further notes 1382813, 1163992 and 946660 helped to solve such behavior for other systems.
Best regards,
Christoph -
System error when send file with Sender File Adapter
Hi all,
I have configured a "File To ABAP Proxy" scenario. After configuring, i executed a "Test Configuration" in Integration Directory and it's all OK. But this file unable to reach into ABAP Proxy Target. In the Runtime WorkBench\Message Monitoring, I get an error message in below:
Engine: Adapter Engine
Status: *System Error *
Start: 15.08.2008 14:04:01
End: 15.08.2008 14:19:01
Sender Service: BS_XI_SERVER
Interface Servic: urn://FILE_TO_PROXY
MI_EMPLOYEE_OB
In this case, I don't know why my Sender File Adapter is error and why status is "System Error" and why it can't reach into Target System. Can it concern a role user?
( For more clearly: I configured the source file and the path correctly. And i used the xml file with the content and the document name correctly. In general, the Sender Adapter File don't convert the sender file and its content is same as the Payload in the "Test Configuration", i think it is all OK.)
Could anyone please help me to resolve this problem, anyone can explain this error, how can i resolve this error?
Thanks a lot in advance,
Vinh VoHi Chirag,
1.I source structure is very simple as below:
<ns0:MT_MATERIAL xmlns:ns0="urn://FILE_TO_PROXY">
<MATERIAL>
<WERKS>1000</WERKS>
<MATNR>MAT00001</MATNR>
<MAKTX>Chemical Material</MAKTX>
</MATERIAL>
</ns0:MT_MATERIAL>
2. the Communication Channel Monitoring in Runtim WorkBench\Adapter Engine is OK for my Sender File Communication Channel, it's in Blue Light.
However, i don't know what's FCC?
Thanks and best regards,
Vinh Vo -
Problems opening documents with Adobe Reader XI
I tried to open a file from my email account. I got a message from Adobe Reader XI that it could not open ecause it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded. I get this message with some documents which I have been able to open in the past and now I can't. I do not have Microsoft Office on my computer. I have Microsoft Word Starter 2010. I am a home user and this program works well as my Word software. I have downloaded a trial of Adobe Acrobat Pro XI and that hasn't solved my problem. Can anyone help me?
If you don't have Word but want to view Word docs, you can download and install the MS Word Viewer from http://www.microsoft.com/en-us/download/details.aspx?id=4.
In fact, istalling it may clear up the file association problem all on it's own. -
Problem routing documents with Content Organizer Timer Job
Hi,
We have a farm that has two front-end servers with SharePoint Server 2010 Standard and one back-end with SQL Server 2008 R2. We are using a multiple site collections with the record center template to route documents in different document libraries. The farm
has SP1 and cumulative update of December 2012.
The problem is that the Content Organizer Job cannot route documents in a one of the sites, and reports the error in the log: “Routing Engine: Rule 'Move_Document' incorrectly specified the target folder /sites/Energy/DocumentLibrary was not found”. This is
happening only in one of the front-ends, because, if the other front-end runs the job for this specific site, the problem doesn't replicate.
We try to restart the two front-ends, and restart the SharePoint Timer 2010 service, but none of the solutions corrects the problem.
Thanks for your helpDo you have NLB in use and are you using Kerberos authentication? My gut feel is that you might have issues where one WFE is trying to work with the other one but is failing to authenticate for some reason.
Try logging onto each box and browsing to the sites given as the timer service user identity, see if you can browse to the site. -
Problem: Word document with Thai font to PDF
I have a MS Office 2007 Word document (.doc) that contains both English and Thai language. I need to convert this document to PDF with Acrobat 9 Pro. However, after going through the conversion process from the ribbon within MS Word, all of the Thai language in the Word document becomes garbled nonsense in the Acrobat PDF file.
1. How can I successfully create a PDF file from a Word file that includes Thai language?
2. If I have a PDF file that contains Thai language, how can I convert it to a MS Word file?
Hope someone can help. I'm sure the answer must be quite easy, but I cannot find it anywhere.
I forgot to mention that this is all running on Windows Vista / Pentium 4D 3.0 GHz / 2Gb RAM.3 days has passed and no answers, it's either unclear what i'm asking or it's a comlicated issue.
-
Problem attach document with the FileUpload UI.
I am trying to attach a document to a CRM Notification from application Web Dynpro for ABAP, I have build a FM that includes the method
cl_crm_documents=>create_with_file
When I test the FM from SE37 transaction, I am able to attach a file from a local disk succesfully. But If I call this FM from Web Dynpro, trying to do the same operation, document cannot attach to notification and Method returns the following error: Error loading file (Class of message CRM_DOCUMENTS and number 100).
Thanks in advance.
FUNCTION z_crm_anexar_docs_inc.
""Interfase local
*" IMPORTING
*" VALUE(GUID) TYPE CRMT_OBJECT_GUID
*" VALUE(FILENAME) TYPE SDOK_FILNM
*" VALUE(PATH) TYPE SDOK_CHTRD OPTIONAL
*" VALUE(DESCRIPTION) TYPE STRING
DATA: ls_bor TYPE sibflporb,
lv_loio TYPE skwf_io,
lv_phio TYPE skwf_io,
lv_error TYPE skwf_error.
MOVE: 'BUS2000116' TO ls_bor-typeid, "aqui le pasamos el tipo de objeto que estemos tratando
'BO' TO ls_bor-catid,
guid TO ls_bor-instid.
DATA: wa_result_tab TYPE string.
DATA: result_tab TYPE STANDARD TABLE OF string.
DATA: lin TYPE i.
DATA: long_nombre TYPE i.
DATA: long_total TYPE i.
DATA: desplazamiento TYPE i.
DATA: filename_aux TYPE skwf_descr.
SPLIT filename AT '' INTO TABLE result_tab.
DESCRIBE TABLE result_tab LINES lin.
READ TABLE result_tab INDEX lin INTO wa_result_tab.
IF sy-subrc EQ 0.
long_total = STRLEN( filename ).
long_nombre = STRLEN( wa_result_tab ).
desplazamiento = long_total - long_nombre.
path = filename(desplazamiento).
filename = wa_result_tab.
filename_aux = wa_result_tab.
ENDIF.
aqui le pasamos el guid del documento sap crm que estemos tratando
CALL METHOD cl_crm_documents=>create_with_file
EXPORTING
aqui le pasamos el nombre del fichero que queremos anexar
file_name = filename
'c:' "aqui le pasamos la ruta del fichero que queremos anexar
directory = path
business_object = ls_bor
IMPORTING
loio = lv_loio
phio = lv_phio
error = lv_error.
aqui llamamos a este método porque de lo contrario el sistema crea el anexo con el nombre que
le da la gana y no con el que hemos indicado en el punto anterior. por eso renombramos el fichero
CALL METHOD cl_crm_documents=>rename_object
EXPORTING
is_io = lv_loio
iv_name = filename_aux.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
IMPORTING
RETURN =
ENDFUNCTION.
Call from WDA.
CALL FUNCTION 'Z_CRM_ANEXAR_DOCS_INC'
EXPORTING
guid = guid_jarcode
guid = stru_importing-guid
filename = stru_importing-filename
PATH =
description = stru_importing-description.
ENDMETHOD.
Thanks in advance.Hi,
you can use below steps,
1. Create attribute file_content of type xstring and bind it to data attribute of FileUpload UI .
2.Put the button Upload next to your FileUpload UI element and write action upload.
3. in action, read the attribute file_content and pass it to below code
Convert XString to String
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
input = file_content
encoding = 'UTF-8'
replacement = '?'
ignore_cerr = abap_true
RECEIVING
conv = loc_conv.
*Read the file contents
TRY.
CALL METHOD loc_conv->read
IMPORTING
data = file_content_string
CATCH cx_sy_conversion_codepage.
*-- Should ignore errors in code conversions
CATCH cx_sy_codepage_converter_init.
*-- Should ignore errors in code conversions
CATCH cx_parameter_invalid_type.
CATCH cx_parameter_invalid_range.
ENDTRY.
4. After that u may want to put the contents into internal table so use
SPLIT file_content string AT crlf INTO TABLE itstring_tab.
5. At last, fill the internal table
loop AT it_string_tab INTO wa_string.
CHECK sy-tabix GT 1 . "skip the first line
SPLIT wa_string AT ',' INTO .....
endloop.
here in my code i have splitted the contents at comma as i had .csv file . so based on file type u can split it and fill internal table.
hope this will help you.
Regards,
Chandra
(Award points if Helpful) -
Sending mail with 2 attachments
Hi All,
I have a requirement where I have to send a mail with 2 attachments. Both attachments should be excel sheets.
Iam using the function module
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = gd_sent_all
TABLES
packing_list = it_packing_list
contents_txt = it_message
contents_bin = it_attachment
receivers = it_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.
I don't know where to pass another attachment.
How can it be done?
Kindly help me.
Regards,
KrithikaHi,
Try this code.
you have to populate both packing_list and contents_bin internal tables before passing to the fm SO_NEW_DOCUMENT_ATT_SEND_API1
FORM CONVERT_OTF_TO_PDF TABLES OTFTAB STRUCTURE OTF.
CLEAR: SOOD, W_LINES, CONTENT_IN, CONTENT_OUT.
REFRESH: CONTENT_IN, CONTENT_OUT.
DESCRIBE TABLE OTFTAB LINES W_LINES.
SOOD-OBJLEN = W_LINES.
REFRESH: CONTENT_IN, CONTENT_OUT.
CLEAR: CONTENT_IN, CONTENT_OUT.
CONTENT_IN[] = OTFTAB[].
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'HPLJ5SI'
* FUNCPARA =
LEN_IN = SOOD-OBJLEN
* IMPORTING
* LEN_OUT =
TABLES
CONTENT_IN = CONTENT_IN
CONTENT_OUT = CONTENT_OUT
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2.
REFRESH OBJBIN. CLEAR OBJBIN.
IF GV_SUMMARY <> 'X'.
OBJBIN[] = CONTENT_OUT[].
ELSE.
REFRESH CONTENT_OUT.
CLEAR CONTENT_OUT.
ENDIF.
REFRESH: CONTENT_IN, OBJPACK.
CLEAR: CONTENT_IN, OBJPACK.
DOC_CHNG-OBJ_NAME = TEXT-003.
IF SY-SYSID NE 'S4P'.
IF DOC_CHNG-OBJ_DESCR IS INITIAL.
DOC_CHNG-OBJ_DESCR = TEXT-004.
ELSE.
IF GV_SUMMARY = 'X'.
DOC_CHNG-OBJ_DESCR = TEXT-012.
ENDIF.
ENDIF.
ENDIF.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
* Fill the fields of the packing_list for the main document:
CLEAR OBJPACK.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'XLS'.
OBJPACK-OBJ_NAME = 'Attachment'.
OBJPACK-OBJ_DESCR = C_PAYER.
READ TABLE OBJBIN INDEX TAB_LINES.
DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
OBJPACK-DOC_SIZE = DOC_SIZE.
APPEND OBJPACK.
CLEAR OBJPACK.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'XLS'.
OBJPACK-OBJ_NAME = 'Attachment'.
OBJPACK-OBJ_DESCR = C_PAYER.
READ TABLE OBJBIN INDEX TAB_LINES.
DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
OBJPACK-DOC_SIZE = DOC_SIZE.
APPEND OBJPACK.
REFRESH RECLIST.
CLEAR RECLIST.
** get E-mail address
IF NOT P_EMAIL IS INITIAL.
RECIPIENT_INT-ADDRESS = P_EMAIL.
ENDIF.
RECLIST-RECEIVER = RECIPIENT_INT.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
* SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
* FOR SENDING DOCUMENTS WITH ATTACHMENTS
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL = SENT_TO_ALL
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
Regards,
Sailaja. -
Problem sending .pdf with email in ECC 6.0
hi there,
we are upgrading from r/3 4.6.c to ECC 6.0.
i have the following problem: in many z-ababs we convert spool-files to pdf-files and send them with function SO_NEW_DOCUMENT_ATT_SEND_API1 via email.
well, this is working okay, BUT: the ending '.pdf' is missing in the filename:
in R/3 4.6.c it looks like the following:
zfl_reporting.pdf
Now it looks like this:
zfl_reporting
So the file is not recognized as pdf-file. You have to add a .pdf manually to open it.
We can't do this as we send the pdf-files thousands of times to our customers.
Any ideas ?
reg, Martinhi
Posted below is the sample code..
find the bolded ones...
REPORT ZMAIL_PDF NO STANDARD PAGE HEADING.
Data for mailing purpose
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
Spool table
TABLES : TSP01.
Data required for creating spool
DATA: MSTR_PRINT_PARMS LIKE PRI_PARAMS VALUE 'LP01',
MC_VALID(1),
MI_BYTECOUNT TYPE I,
MI_LENGTH TYPE I,
MI_RQIDENT LIKE TSP01-RQIDENT,
REP LIKE PRI_PARAMS-PLIST.
Internal table for capturing data into PDF format
DATA: MTAB_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE.
File name
DATA : MC_FILENAME LIKE RLGRAP-FILENAME.
SELECTION SCREEN
PARAMETERS : P_REPID LIKE SY-REPID,
P_LINSZ LIKE SY-LINSZ DEFAULT 132,
P_PAART LIKE SY-PAART DEFAULT 'X_65_132'.
START-OF-SELECTION.
<b> CONCATENATE 'C:\'
P_REPID
'.PDF'
INTO MC_FILENAME.</b>
MOVE SY-REPID TO REP.
Get print parameters
PERFORM GET_PRINT_PARAMS.
Send output of the required program to Spool
SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS MSTR_PRINT_PARMS
VIA SELECTION-SCREEN AND RETURN.
Get the the spool number that is just created
PERFORM GET_SPOOL_NUMBER USING SY-REPID SY-UNAME
CHANGING MI_RQIDENT.
Convert Spool to PDF & download the same
PERFORM SPOOL_2_PDF.
Upload downloaded PDF file for mailing
PERFORM UPLOAD_PDF_FILE.
Send mail with PDF attachment
PERFORM SEND_MAIL.
FORM get_spool_number *
Get the most recent spool created by user/report *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid
f_uname
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = sy-repid
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
*& Form send_mail
text
--> p1 text
<-- p2 text
form send_mail.
Creation of the document to be sent
DOC_CHNG-OBJ_NAME = 'TEST'.
DOC_CHNG-OBJ_DESCR = 'TEST MAIL WITH PDF ATTACHMENT'. "mail subject
OBJTXT = 'Test mail with PDF attachment'.
APPEND OBJTXT.
CLEAR OBJTXT.
APPEND OBJTXT.
APPEND OBJTXT.
OBJTXT = 'Please double click the attachment to verify'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'Sample PDF attachement'. "
APPEND OBJHEAD.
Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
<b> OBJPACK-DOC_TYPE = 'PDF'.</b>
OBJPACK-OBJ_NAME = 'TEST'.
OBJPACK-OBJ_DESCR = 'Test.PDF'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
For sending mail to Internet Address
RECLIST-RECEIVER = '[email protected].
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE :/ 'MAIL SENT....'.
WHEN 1.
WRITE :/ 'TOO MANY RECEIVERS'.
WHEN 2.
WRITE :/ 'DOCUMENT NOT SENT'.
WHEN 4.
WRITE :/ 'NO SEND AUTHORIZATION'.
WHEN OTHERS.
WRITE :/ 'ERROR OCCURED WHILE SENDING MAIL'.
ENDCASE.
endform. " send_mail
*& Form GET_PRINT_PARAMS
FORM GET_PRINT_PARAMS.
call function 'GET_PRINT_PARAMETERS'
exporting destination = 'LP01'
copies = 1
list_name = rep
list_text = 'LIST ..... TO SAP-SPOOL'
immediately = 'X'
release = 'X'
new_list_id = 'X'
expiration = 1
line_size = 132
line_count = 65
layout = 'X_PAPER'
sap_cover_page = 'X'
cover_page = 'X'
receiver = sy-uname
department = 'System'
no_dialog = 'X'
importing out_parameters = mstr_print_parms
valid = mc_valid.
ENDFORM. " GET_PRINT_PARAMS
*& Form SPOOL_2_PDF
FORM SPOOL_2_PDF.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
call function 'WS_DOWNLOAD'
exporting
bin_filesize = mi_bytecount
<b> filename = mc_filename</b>
filetype = 'BIN'
tables
data_tab = mtab_pdf
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. " SPOOL_2_PDF
*& Form UPLOAD_PDF_FILE
FORM UPLOAD_PDF_FILE.
call function 'WS_UPLOAD'
exporting
<b> filename = mc_filename</b>
filetype = 'BIN'
tables
data_tab = OBJBIN
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. " UPLOAD_PDF_FILE
**reward if helpful
regards,
madhumitha
Maybe you are looking for
-
IMac trouble opening certain programs
problem is: i will try to open certain programs, they will quickly appear in the dock, and then the icon will fade away without ever opening the program. this particular problem began a little over a year ago when i upgraded to tiger. i was running p
-
IPod Info for those who need it
Just thought I'd give some help to those who need it. - For those who are having trouble with their ipods accepting some videos and not others, try shortening the names of the video files. As long as the video files are in the proper format, this sho
-
In exit EXIT_SAPLKD01_001 populate custom segment of idoc ext. cremas05
Hi, I am using EXIT_SAPLKD01_001 where I need to populate 2 custom segments for idoc extension cremas05. I have created a function module separately where I have populated the 2 structures that is of same type as the segment structure. In the exit
-
Interafce utilization report in lms 3.1
Hi I have installed LMS 3.1 at ine of our customer. when we are extracting interface utilization report(HUM interface report) It gives me the graphs which are in format of packets/second or value in % . Customer want a simple report which will give h
-
Closing open Goods Receipt PO's
Hi All, We want to close the open GRPO. Is there any way like DTW or else to close them in mass because we have around 5000 open GRPO's. Please reply as soon as possible. Regards, Abhishek