Attach a Smartform as a document to an Opportunity
Does anyone know if it is possible to automatically attach a Smartform as document to an Opportunity.
e.g.
I have created an Opportunity and I have printed out the Offer (Smartform) But now I want this Offer to be saved as an attachement (Document tab) to this Opportunity.
I hope there is someone who an help me!
Thanks in advance!
Best regards,
Joost Goudriaan
Couple of points.
Someone with only Pages '09, or early Pages v5 releases, will not be able to open that Pages v5.2.2 document
Pages v5.2.2 saves documents as folders. Right-click on the document, and then choose compress.
The document is now a single file object (filename.pages.zip), and will attach to Mail with no problem
Recipients save from Mail, and double-click to convert back to filename.pages.
Similar Messages
-
Issue in attachment of smartform to VF03
Hi Experts,
I have done research still the issue is not solved.
I have to attach customized smartform in vf03. When the user clicks the print option, it should open the print preview of the smartform. In menu, when I click billing document-->issue output to, it says 'No output has been selected for printing'.
How to do it? Please guide.
Thanks
Purnandpurnand dhingra
Check Nace Settings, did u assign correct program or not ?
just assign standard driver program with your customized and see the results.
based on that you copy standard one to Z , and make the changes again as per your requirement.
Regards,
Bastin.G -
How can I attach j-pegs and other documents to an email unopened and stop each them taking up a whole page of my email ?
In addition to the last poster's suggestion - just so you know, it also depends on the email program the recipient uses as to how they will see any attachments - for instance, when I am using my Yahoo Mail, I am absolutely unable to view any attachment within the browser window - Yahoo forces me to download it; there is no way for me to check it (like a preview) to see if I want to download it or not.
And, FWIW: the window shown in the screenshot does not show on my version of Mail 5.1 (which is the latest for 10.7.2); the only one similar shows when viewing a message received with an attachment, not while sending one. So that must be a different version. -
My wife wrote her resume. Wants to email it as an attachment only. But whenever it is received it comes as an attachment and as an open document in the body of the email. How do we stop the resume from opening in the body of the email?
wyman41 wrote:
She wrote her resume in Word.
I don't have any problem attaching just a MS Word file in Mail. My process is pretty simple....with a message open I click the attach icon (paperclip) at the top of the message, then navigate to where the file is located and select it. I make sure I have the cursor at the bottom of the new message below my signature line. FWIW I use MS Word 2011. -
How to attach ERP smartform to a ERP Quotation generated from CRM 7.0
Hi,
I have this requirement of calling the ERP smartforms in CRM 7.0 where ever applicable.
I don't want to use Transaction Launcher and also creating the same smartform in CRM would be double work.
1. Can we attach a smartform of ERP to LEAD/OPPORTUNITY when we click on the MORE button on toolbar and choose PREVIEW OUTPUT/ TRIGGER OUTPUT. I think in ACTION we can just assign a smartform which is created in CRM system.
Actually this is my client requirement and since my first CRM implementation do't know whether this is a valid point and how to go on.
2. Also on ERP Quotation view page (toolbar) there is no button called MORE to PREVIEW OUTPUT. Can we assign a smartform to ERP Quotation?
If any body can direct me on this issue would be of great help and full points will be given.
Thanks,
JayaHi,
as far as I know there is no standard way of doing this in CRM 7.0.
I imaging it would be possible to call an ERP smartform from CRM by :
- writing an RFC capable function module in ERP that wraps the call of the smartform and returns the generated PDF data.
- writing a function or method in CRM that calls the ERP function module and displays the returned data.
In the lead and opportunity the print preview is done by having a print relevant action in the action profile assigned to the transaction type and I guess for these it should be possible to call a function module by creating an own smart forms method.
But I think this is not possible for an ERP quotation, so you would have to create an own button. In the event handler for this button, one could call the ERP function module and display the result.
Paul -
Attaching multiple smartform to single output type
Hello Experts,
I have 2 different smartforms for invoice....
these two i have to call depending upon the type of customer.
I want to know that is it possible to attach both smartform to single output type ( in this case RD00).
if not..., Please suggest me how i can achieve this.
Thanks,
AmarIf your question is if is it possible to have 2 different SMFs in one single output the answer is yes.
You have to use the control_parameters-no_open and control_parameters-no_close
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMF1''
IMPORTING
fm_name = g_funcion
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc EQ 0.
g_control_param-no_close = 'X'.
CALL FUNCTION g_funcion
EXPORTING
control_parameters = g_control_param
TABLES
g_t_lugares = g_t_lugares2
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5 .
* Smartform Puestos
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMF2''
IMPORTING
fm_name = g_funcion
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.
g_control_param-no_close = ''.
g_control_param-no_open = 'X'.
CALL FUNCTION g_funcion
EXPORTING
control_parameters = g_control_param
i_num_pages = l_tot_pages
i_curr_pages = l_pages_2
TABLES
g_t_puestos = g_t_puestos_ssf
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.
ENDIF. -
How to Attach a Smartform to a BOR method
Hi Friends,
I had a query How to Attach a Smartform to BOR method.To attach a customized Smartform to a Customized BOR Object.Hi,
In the BOR object, create a method say display_SF. Now in the ABAP properties for that method give "OTHER" option.
Now in the BOR object, you can find the program which is used. Inside that program, You need to write the code to fetch the required data (ONLY BASIC REQUIRED DATA WILL BE ENOUGH) and call the smartform by passing all the print parameters and all the required data for that smartform.
Now inside the smartform, with imported required data, you can write all the logic and data fetch etc for the printouts.
The following sysntax can be used to fetch the required data into the method and can use to pass the same while calling the smartform.
SWC_GET_ELEMENT CONTAINER 'Plant' PLANT.
Regards,
Harish -
Function module to find the attachment list for an accounting document?
Is there a function module to find the attachment list for an accounting document? Or which table stores such references?
I know I can find this info from the transaction FB03, but is there a function module to find the attachments for an accounting document? So far I only found the attachments are stored in the table SOOD, and archived documents in table TOA03, but I can't find the table that stores the links between the accounting document and its attachments?
<b><REMOVED BY MODERATOR></b>
Thanks,
Ning
Message was edited by:
Alvaro Tejada GalindoHi,
i_object1-typeid = 'YARSATTA'. "<<< Give your Object id name
i_object1-catid = 'BO'.
i_object1-instid = i_yarsitem-docno. "<<<< Document Number
call method cl_gos_attachment_query=>count_for_object
exporting
is_object = i_object1
ip_arl = space
receiving
rt_stat = i_stat1.
read table i_stat1 into wa_stat1 index 1.
if sy-subrc eq c_0.
move wa_stat1-counter to v_attno1.
endif.
For link you need to check for table SRGBTBREL
and also please check class CL_GOS*
a® -
Exporting smartform into word document
how to export smartform into word document . i tried converting into pdf and then download but it showing run time error that conversion is not possible and also it tells that otf command // missing. is it not possible to export directly to word document instead of pdf.plz give clear description of what to be done exactly with sample codes.
marks will be rewarded.Hi Lavanya,
Converting the output from Spool to Word is possible.
Here is the sample code.
I cut pasted a code from a link i got in the website, see if it helps.
ZSPOOL2WORD
Genera un fichero Word a partir de una orden de spool
MÓDULO : FI *
TIPO : Listado *
TITULO : Generación fichero Word
DESCRIPCION : Genera un fichero Word a partir de una orden de spool
AUTOR: Andres Picazo FECHA: 24/03/2003 *
MODIFICACIONES *
FECHA NOMBRE DESCRIPCION *
REPORT ZSPOOL2WORD
NO STANDARD PAGE HEADING
LINE-COUNT 065
LINE-SIZE 080.
INCLUDE OLE2INCL.
*----TABLAS/ESTRUCTURAS--
*----TABLAS INTERNAS--
DATA I_BUFFER(132) OCCURS 1000000 WITH HEADER LINE.
*----VARIABLES--
*----PARAMETER/SELECT-OPTIONS EN PANTALLA--
SELECTION-SCREEN BEGIN OF BLOCK BLK_PAR WITH FRAME TITLE TEXT-SEL. "Pará
PARAMETERS: P_SPOOL LIKE TSP01-RQIDENT OBLIGATORY.
SELECTION-SCREEN END OF BLOCK BLK_PAR.
SELECTION-SCREEN BEGIN OF BLOCK BLK_WOR WITH FRAME TITLE TEXT-WOR.
PARAMETERS: P_WORD AS CHECKBOX DEFAULT 'X'.
PARAMETERS: P_FWOR LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.DOC'.
PARAMETERS: P_PLAN LIKE RLGRAP-FILENAME
DEFAULT 'D:DATOSAPISMAYORPLANTILLA LIBRO MAYOR.DOC'.
SELECTION-SCREEN END OF BLOCK BLK_WOR.
SELECTION-SCREEN BEGIN OF BLOCK BLK_FIC WITH FRAME TITLE TEXT-FIC.
PARAMETERS: P_CTXT AS CHECKBOX DEFAULT ''.
PARAMETERS: P_FTXT LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.TXT'.
SELECTION-SCREEN END OF BLOCK BLK_FIC.
LOGICA DEL PROGRAMA
INITIALIZATION
INITIALIZATION.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM LEER_SPOOL.
IF NOT P_CTXT IS INITIAL.
PERFORM GRABA_FICHERO.
ENDIF.
IF NOT P_WORD IS INITIAL.
PERFORM LANZA_WORD.
ENDIF.
FORMS ADICIONALES
*& Form LEER_SPOOL
Lee la orden de spool en el buffer
FORM LEER_SPOOL.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = P_SPOOL
FIRST_LINE = 1
LAST_LINE = 9999999
TABLES
BUFFER = I_BUFFER
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error' SY-SUBRC
'al leer la orden de spool' P_SPOOL.
ENDIF.
ENDFORM. " LEER_SPOOL
*& Form GRABA_FICHERO
Graba el contenido del spool a fichero de texto.
FORM GRABA_FICHERO.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = P_FTXT
FILETYPE = 'ASC'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = I_BUFFER
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
OTHERS = 9.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error' SY-SUBRC
'al grabar el fichero' P_FTXT.
ENDIF.
ENDFORM. " GRABA_FICHERO
*& Form LANZA_WORD
Abre la plantilla de Word y pega el contenido del portapapeles.
FORM LANZA_WORD.
DATA: WORDAPP TYPE OLE2_OBJECT,
DOCUMENT TYPE OLE2_OBJECT,
SELECTION TYPE OLE2_OBJECT.
Copia el contenido del buffer en el portapeles
CALL FUNCTION 'CLPB_EXPORT'
TABLES
DATA_TAB = I_BUFFER
EXCEPTIONS
CLPB_ERROR = 1
OTHERS = 2.
Abre Word
CREATE OBJECT WORDAPP 'word.application'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'No se ha podido abrir el Word'.
ENDIF.
Lo pone en visible
SET PROPERTY OF WORDAPP 'Visible' = 1.
Cogemes el objeto documento
CALL METHOD OF WORDAPP 'Documents' = DOCUMENT.
Abrimos el fichero plantilla
IF P_PLAN IS INITIAL.
CALL METHOD OF DOCUMENT 'Add'.
ELSE.
CALL METHOD OF DOCUMENT 'Open' EXPORTING #1 = P_PLAN.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al leer el fichero plantilla'.
ENDIF.
ENDIF.
Coge el objeto selección
CALL METHOD OF WORDAPP 'Selection' = SELECTION.
Pega el contenido del portapapeles
CALL METHOD OF SELECTION 'Paste'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al pegar contenido del portapapeles'.
ENDIF.
Graba el fichero
CALL METHOD OF WORDAPP 'ActiveDocument' = DOCUMENT.
CALL METHOD OF DOCUMENT 'SaveAs' EXPORTING #1 = P_FWOR.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al grabar el nuevo documento'.
ENDIF.
Cierra Word
CALL METHOD OF WORDAPP 'Quit'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al cerrar Word'.
ENDIF.
ENDFORM. " LANZA_WORD
check this also.................
By using FM RSPO_RETURN_ABAP_SPOOLJOB you will be able to get the ASCII text of your Spool, which you can download to your local HD and open with M$ Word.
Check the function module
CALL FUNCTION 'RSPO_DOWNLOAD_SPOOLJOB'
EXPORTING
id = p_spool
fname = p_file.
Give the file extn as .DOC. it will downlaod it as a
Word doc.But I fear you wont get the table formats and
all.
~~Guduri -
Attach music to a word document
how could i attach music to a word document, so when i open this word document i can hear the specific music playing?
and if there is a way, would i be able to email this musical word document?
thank you,The closest I can come to it is if you have an mp3 music file, in Word select Insert>Movie. Select that file.
-
How to attach more than 2 original document in a DIR?
Hello all,
My requirement is that, I need to attachminimum 5 original documents in a Document Info Record (DIR). However, when I attach the more than 2 documents system is showing a n error. More than 2 documents is not possible.
1. Can we attach more than 2 original doc. in a DIR??
2. If Yes, Where I need or do the settings?? (Or) Is it SAP standard???
Regards
PrabuDear Prabu,
please check in transaction DC10 if the flag 'Use KPRO' is set for the used document type. If you use the KPRO storage logic you can add an unlimited number of originals. In case this flag is not set in DC10 then only the former storage types (archive, vault, SAP-SYSTEM) are available and here you have a limit of only 2 original files per document info record.
Best regards,
Christoph -
using office outlook under parallel desktop double click on an Excel attachement does not open the document in Excel.
double-click opens Excel Office 2011 for mac without the document.
It should open the document in Excel 2010 for Windows.In Parralells, choose the file you want to open.
Right Click on it and choose Properties.
In the General Tab you will see "Opens with:"
Click the "Change ... " button.
Then choose Excel 2010. The checkbox below should be set to "Always use ... " -
How can I attach a passcode to a document?
How can I attach a passcode to a document?
What language do you speak?
When was it "The inspector never did open."?
If you have deleted the document what was there to work with?
You create a document then go to:
Inspector > Document > Document > check Require password to open > fill in Password details > Set Password
Then when you go to open the document (after you close it) it will ask you for the password.
Peter -
SmartForm error: Express document "update was terminated" received from aut
Hi friends
we requirement to send PO smartform through Print out as well as through mail.
after creating PO i am getting popup box saying that :
" Express document "update was terminated" received from author "XXXX".
Please help me.
my code as follows:
IF sy-subrc = 0.
CLEAR g_outop.
SELECT SINGLE ldest dimme FROM nach INTO (g_outop-tddest,
g_outop-tdimmed) WHERE knumh EQ knumh.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YNZ_PO'
IMPORTING
fm_name = sf_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION sf_name
EXPORTING
output_options = g_outop
user_settings = 'X'
wa_ynz_po_head = wa_ynz_po_head
control_parameters = w_ctrlop
IMPORTING
job_output_info = w_return
TABLES
t_ynz_po_item = t_ynz_po_item
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
for mail
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YNZ_PO'
IMPORTING
fm_name = sf_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CLEAR g_outop. " Commented by sharma
g_outop-tddest = nast-ldest.
g_outop-tdimmed = nast-dimme.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION sf_name
EXPORTING
output_options = w_compop
user_settings = 'X'
wa_ynz_po_head = wa_ynz_po_head
control_parameters = w_ctrlop
IMPORTING
job_output_info = w_return
TABLES
t_ynz_po_item = t_ynz_po_item
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Convert PDF from 132 to 255.
LOOP AT i_tline.
Replacing space by ~
TRANSLATE i_tline USING ' ~'.
CONCATENATE w_buffer i_tline INTO w_buffer.
ENDLOOP.
Replacing ~ by space
TRANSLATE w_buffer USING '~ '.
DO.
i_record = w_buffer.
Appending 255 characters as a record
APPEND i_record.
SHIFT w_buffer LEFT BY 255 PLACES.
IF w_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR w_objhead.
Object with PDF.
i_objbin[] = i_record[].
DESCRIBE TABLE i_objbin LINES v_lines_bin.
Object with main text of the mail.
i_objtxt = 'Find attached the output of the smart form.'.
APPEND i_objtxt.
i_objtxt = 'Regards,'.
APPEND i_objtxt.
i_objtxt = 'Narasimha'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
Document information.
w_doc_chng-obj_name = 'Smartform'.
w_doc_chng-expiry_dat = sy-datum + 10.
w_doc_chng-obj_descr = 'Smart form output'.
w_doc_chng-sensitivty = 'F'. "Functional object
w_doc_chng-doc_size = v_lines_txt * 255.
Pack to main body as RAW.
Obj. to be transported not in binary form
CLEAR i_objpack-transf_bin.
Start line of object header in transport packet
i_objpack-head_start = 1.
Number of lines of an object header in object packet
i_objpack-head_num = 0.
Start line of object contents in an object packet
i_objpack-body_start = 1.
Number of lines of the object contents in an object packet
i_objpack-body_num = v_lines_txt.
Code for document class
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Packing as PDF.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'Smartform_output' '.pdf'
INTO i_objpack-obj_descr.
i_objpack-doc_size = v_lines_bin * 255.
APPEND i_objpack.
Document information.
CLEAR i_reclist.
e-mail receivers.
i_reclist-receiver = '[email protected]'.
i_reclist-express = 'X'.
i_reclist-rec_type = 'U'. "Internet address
APPEND i_reclist.
Sending mail.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_objpack
object_header = w_objhead
contents_bin = i_objbin
contents_hex = i_objbin
contents_txt = i_objtxt
receivers = i_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.
WRITE:/ 'Error When Sending the File', sy-subrc.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.Hi ashok
thanks for your reply.
i got the error at commit in the below Func module.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_objpack
object_header = w_objhead
contents_bin = i_objbin.
if i remove commit = 'X'. no error but mail is not sending.
please advice. -
Hi,
I am converting a smartform to PDF and then sending it as an attachment to email using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
But I am getting this error. 'Error calling FM <SBCOMS_SEND_REQUEST_CREATE> in <SO_DOCUMENT_SEND_API1> with SY-SUBRC <1>'
I am passing below entries to packaging list table.
Packing list for Email Text
ls_packing_list-head_start = 1.
ls_packing_list-head_num = 1.
ls_packing_list-body_start = 1.
ls_packing_list-doc_type = 'RAW'.
Packing list for PDF
ls_packing_list-transf_bin = 'X'
ls_packing_list-head_start = 1.
ls_packing_list-head_num = 1.
ls_packing_list-body_start = 1.
ls_packing_list-doc_type = 'PDF'.
Please let me know if I am missing anything.
Regards,
NishantHi Nishant,
Please refer my below code last week only i have implemented this logic.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
max_linewidth = 132
importing
bin_filesize = w_bin_filesize
tables
otf = t_otf
lines = t_pdf_tab
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4.
pdf_output[] = t_pdf_tab[].
loop at pdf_output.
translate pdf_output using ' ~'.
concatenate gd_buffer pdf_output into gd_buffer.
endloop.
translate gd_buffer using '~ '.
do.
it_mess_att = gd_buffer.
append it_mess_att.
shift gd_buffer left by 255 places.
if gd_buffer is initial.
exit.
endif.
enddo.
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.
free t_attachment.
t_attachment[] = it_attach[].
clear it_attach[].
refresh it_attach[].
free it_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.
free t_receivers.
clear : email.
select single usrid_long into email from pa0105 where pernr = wa_pernr-pernr
and subty = '0010' and seqnr = ''.
t_receivers-receiver = email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
append t_receivers.
ld_sender_address = 'HRD1'.
ld_sender_address_type = 'B'.
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.
check it and Revert back .
Regards,
Thangam.P
Maybe you are looking for
-
How do i measure frequency?
lets say theres this signal in volts. if you plot the signal it forms a sine graph. is there any way to use labview to determine the frequency of the signal? i've tried to use the "measure frequency vi" but my device is connected to a virtual channel
-
My system gets stuck on gray screen at start-up. I boot as target drive and use disk utility from my laptop to repair the invalid file count. It starts up fine for a few starts, them hangs on gray screen again. Any fixes? Once I've repaired the drive
-
Printer to Airport to D-Link to PC Desktop
I am tring to connect my non-wireless desktop up to my Airport print server. Is this possible. Can I connect my cable modem to the D-Link router then connect both my desktop and the print server, which has a printer attached, to the router and work i
-
I sync all my calendars (iPhone, iPad, and three Macs) with an Exchange server at work. It works fine except for one annoying quirk which only occurs on the iPad. I generally use week view, and almost always, some number of entries are tranparent. I
-
What is going on with Apple? I've just downloaded their Mavericks and my computer is performing so badly, I'm wondering if Mavericks is some sort of diabolical malware! How can I get Mavericks out of my computer?