How to send a pdf file via http call
Hi Experts,
Please try to think on how you would send a file like a pdf file via the http call. You might need to convert the pdf in a character string which can be sent via http. The character string then might need to get converted back into a pdf and saved in a file. Read through the Archive Link API guide to see how they send the body of a file.
Please it is urgent......
Thanks
Basu
so you want to push the PDF file over http to external system.
where is pdf file stored.
for examle if its in the clients desktop, you can use gui_upload to upload to internal tabble (type BIN) then use FM SCMS_BINARY_TO_XSTRING to conver the binary table to type string.
then use cl_http_client class to push the file to the destination.
Similar Messages
-
How to send a PDF file of 50 MBs?
how to send a PDF file of 50 MBs?
Or use the free Workspaces service at https://workspaces.acrobat.com/
Upload the file, publish or share it, then send the download link via email. -
How to send a PDF file as a FAX from Oracle Reports 6i
Hi
I want to know how to send a PDF file as a FAX from Oracle Reports 6i. Or please post any sample code in reports that sends PDF document as FAX
Help need immediately.
Thanks in advance. my email id is
[email protected]
Arun
nullhello,
there is no native support for directly faxing a report. you could e.g. use a fax-software that has a printer-driver that supports this.
regards,
the oracle reports team -
Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks
That is a function of the recipient's e-mail software understanding what your software sent. If it doesn't it will always show as an icon or attachment. It is also a function of both your internet provider and their internet provider accepting messages of that size, and a function of their download attachment settings in their e-mail program. There is no way to guarantee it will appear inline in the attachment. The best you can do is attach with Windows Friendly format. To do that, use the attach toolbar icon that looks like a paperclip, (View menu -> Customize toolbar if invisible) on Mac OS X Mail when composing the message. A checkbox appears in the file dialog box's bottom to make it Windows friendly when you navigate to pick the PDF file. That makes it as universally compatible as possible. It still may not appear inline, but at least you are less likely to be incompatible.
-
How to send the PDF file to FAX will the nast table updates
Hi all,
How to send the PDF file to FAX. Will the nast table updates ( which fields updates ).
Need is once fax is send for that delivery, again it should not fax again. Will the nast table helps to check the sent fax.
Please give me sutable suggessions....Have you checked Forums » Community Discussions » Code Snippets
I believe there were some examples on converting/sending PDF.
Or check FM 'SO_DOCUMENT_SEND_API1' and documentation for it. -
How to send the pdf file....
How to send the pdf file which is an outpu of smart form to sap users.
How to delete the pdf file as soon as it was sent.Have you checked Forums » Community Discussions » Code Snippets
I believe there were some examples on converting/sending PDF.
Or check FM 'SO_DOCUMENT_SEND_API1' and documentation for it. -
How can I send a PDF file via my yahoo or google email programs?
I just downloaded some photos from a friend's camera, & I want to send copies via email. I created a PDF file, but can't figure out how to email the file out (it only offers to send via Windows Mail-which I don't have). Do I need to create a different kind of file for the pix, or do I just need to send one at a time?
== This happened ==
Not sure how often
== I tried to attach the PDF file to an email to send via yahooUse the free Adobe Reader for iPhone -> https://itunes.apple.com/us/app/adobe-reader/id469337564?mt=8.
Clinton -
How To send a PDF file to mail
Hi Friends,
I am having a file (D:\file.pdf) in ' D ' directory . Now I want to send this pdf to perticular mail id ([email protected]). I tried so many examples but i am not able to solve this problem so please help to solve this one.
I tried SO_NEW_DOCUMENT_SEND_API1 function modules and all but i am not getting please send small sample code .
Thanks and Regards,
Phani.go through this report=>
: Report ZSAPTALK :
: Author SAPdev.co.uk :
: Description : :
: Send mail message to SAP mail inbox. :
: Please visit www.sapdev.co.uk for further info :
REPORT ZSAPMAIL NO STANDARD PAGE HEADING.
TABLES: DRAD,
QINF,
DRAW,
SOUC,
SOFD,
DRAP.
DATA: P_RETURN_CODE LIKE SY-SUBRC.
data: d_username LIKE DRAP-PRNAM.
mail declarations
DATA : BEGIN OF NEW_OBJECT_ID. " the newly created email object
INCLUDE STRUCTURE SOODK.
DATA : END OF NEW_OBJECT_ID.
DATA : BEGIN OF FOLDER_ID. " the folder id of the outbox
INCLUDE STRUCTURE SOODK.
DATA : END OF FOLDER_ID.
DATA : BEGIN OF REC_TAB OCCURS 5. " the table which will contain the
INCLUDE STRUCTURE SOOS1. " information on the destination
DATA : END OF REC_TAB.
DATA : BEGIN OF OBJECT_HD_CHANGE. " the table which contains the
INCLUDE STRUCTURE SOOD1. " info for the object we will be
DATA : END OF OBJECT_HD_CHANGE. " creating
DATA : OBJECT_TYPE LIKE SOOD-OBJTP. " the type of object
DATA : BEGIN OF OBJHEAD OCCURS 5. " the header of the object
INCLUDE STRUCTURE SOLI.
DATA : END OF OBJHEAD.
DATA : BEGIN OF OBJCONT OCCURS 0. " the contents of the object
INCLUDE STRUCTURE SOLI. " i.e. the text etc
DATA : END OF OBJCONT.
DATA : BEGIN OF OBJPARA OCCURS 5. " formatting options
INCLUDE STRUCTURE SELC.
DATA : END OF OBJPARA.
DATA : BEGIN OF OBJPARB OCCURS 5. " formatting options
INCLUDE STRUCTURE SOOP1.
DATA : END OF OBJPARB.
DATA : BEGIN OF T_MAIL_TEXT OCCURS 0, "Message table for messages to
STRING(255), "user via mailbox
END OF T_MAIL_TEXT.
Parameter: p_uname like sy-uname.
**START-OF-SELECTION
START-OF-SELECTION.
d_username = p_uname.
PERFORM POPULATE_EMAIL_TEXT.
PERFORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
PERFORM CREATE_AND_SEND_MAIL_OBJECT.
FORM POPULATE_EMAIL_TEXT *
Inserts text for email message *
FORM POPULATE_EMAIL_TEXT.
CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
APPEND T_MAIL_TEXT.
APPEND T_MAIL_TEXT.
adds failed list on to end of success list.
T_MAIL_TEXT-STRING = 'Test email message line 1'.
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = 'Test email message line 1'.
APPEND T_MAIL_TEXT.
CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = 'Header1 Header2 Header3'.
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = '----
APPEND T_MAIL_TEXT.
ENDFORM.
*& Form SETUP_TRX_&_RTX_MAILBOXES
Ensure that the mailboxes of the sender (INTMGR) are set up OK
FORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
get the user no of the sender in order to add the mail to the
user name's outbox for future reference
SELECT SINGLE * FROM SOUC
WHERE SAPNAM = SY-UNAME. "SAP name of a SAPoffice user
IF SY-SUBRC NE 0.
"Error finding the SAPoffice user info for the user
MESSAGE E064(ZR53) WITH SY-UNAME.
P_RETURN_CODE = 1.
EXIT.
ENDIF.
*Get the outbox No for the sender from the user No where the folder
" type is an outbox
SELECT * FROM SOFD WHERE OWNTP = SOUC-USRTP "Owner type from ID
AND OWNYR = SOUC-USRYR "Owner year from the ID
AND OWNNO = SOUC-USRNO "Owner number from the I
AND FOLRG = 'O'."Output box
ENDSELECT.
IF SY-SUBRC NE 0.
" Error getting folder information for the user
MESSAGE E065(ZR53) WITH SY-UNAME.
P_RETURN_CODE = 1.
EXIT.
ENDIF.
ENDFORM. " SETUP_TRX_&_RTX_MAILBOXES
*& Form CREATE_AND_SEND_MAIL_OBJECT
FORM CREATE_AND_SEND_MAIL_OBJECT.
FOLDER_ID-OBJTP = SOFD-FOLTP. " the folder type ( usually FOL )
FOLDER_ID-OBJYR = SOFD-FOLYR. " the folder year ( usually 22 )
FOLDER_ID-OBJNO = SOFD-FOLNO. " the folder no.
OBJECT_TYPE = 'RAW'. " the type of object being added
build up the object information for creating the object
OBJECT_HD_CHANGE-OBJLA = SY-LANGU. " the language of the email
OBJECT_HD_CHANGE-OBJNAM = 'PS to DM Interface'. " the object name
mail subject 'Mass Linking of QA, pass/fail'
MOVE TEXT-002 TO OBJECT_HD_CHANGE-OBJDES.
OBJECT_HD_CHANGE-DLDAT = SY-DATUM. " the date of the email
OBJECT_HD_CHANGE-DLTIM = SY-UZEIT. " the time of the email
OBJECT_HD_CHANGE-OBJPRI = '1'. " the priority ( highest )
OBJECT_HD_CHANGE-OBJSNS = 'F'. " the object sensitivity
F is functional, C - company sensitive
object_hd_change-skips = ' '. " Skip first screen
object_hd_change-acnam = 'SM35'. " Batch imput transaction
object_hd_change-vmtyp = 'T'. " Transaction type
add the text lines into the contents of the email
CLEAR OBJCONT.
REFRESH OBJCONT.
free objcont. " added this to delete the mail contents records
LOOP AT T_MAIL_TEXT.
OBJCONT-LINE = T_MAIL_TEXT-STRING.
APPEND OBJCONT.
ENDLOOP.
CLEAR OBJCONT.
build up the table of receivers for the email
REC_TAB-RCDAT = SY-DATUM. " the date to send the email
REC_TAB-RCTIM = SY-UZEIT. " the time to send the email
the SAP username of the person who will receive the email
REC_TAB-RECNAM = D_USERNAME.
the user type of the person who will send the email ( USR )
REC_TAB-SNDTP = SOUC-USRTP.
the user year of the person who will send the email ( 22 )
REC_TAB-SNDYR = SOUC-USRYR.
the user number of the person who will send the email
REC_TAB-SNDNO = SOUC-USRNO.
the sap username of the person who will send the email
REC_TAB-SNDNAM = SY-UNAME.
get the user info for the receiver of the document
SELECT SINGLE * FROM SOUC WHERE SAPNAM = D_USERNAME.
IF SY-SUBRC NE 0.
WRITE : / TEXT-001, D_USERNAME. "usnam.
EXIT.
ENDIF.
the user number of the person who will receive the email ( USR )
REC_TAB-RECNO = SOUC-USRNO.
the user type of the person who will receive the email ( USR )
REC_TAB-RECTP = SOUC-USRTP.
the user year of the person who will receive the email ( USR )
REC_TAB-RECYR = SOUC-USRYR.
the priority of the email ( highest )
REC_TAB-SNDPRI = '1'.
check for delivery on the email
REC_TAB-DELIVER = 'X'.
send express so recipient knows there is a problem
REC_TAB-SNDEX = 'X'.
check for a return receipt
REC_TAB-READ = 'X'.
the sap username of the person receiving the email
REC_TAB-ADR_NAME = D_USERNAME. "usnam.
add this receiver to the internal table
APPEND REC_TAB.
CLEAR REC_TAB.
call the function to create the object in the outbox of the sender
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
FOLDER_ID = FOLDER_ID
OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
OBJECT_TYPE = OBJECT_TYPE
OWNER = SY-UNAME
IMPORTING
OBJECT_ID = NEW_OBJECT_ID
TABLES
OBJCONT = OBJCONT
OBJHEAD = OBJHEAD
OBJPARA = OBJPARA
OBJPARB = OBJPARB
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
DL_NAME_EXIST = 4
FOLDER_NOT_EXIST = 5
FOLDER_NO_AUTHORIZATION = 6
OBJECT_TYPE_NOT_EXIST = 7
OPERATION_NO_AUTHORIZATION = 8
OWNER_NOT_EXIST = 9
PARAMETER_ERROR = 10
SUBSTITUTE_NOT_ACTIVE = 11
SUBSTITUTE_NOT_DEFINED = 12
SYSTEM_FAILURE = 13
X_ERROR = 14
OTHERS = 15.
IF SY-SUBRC NE 0.
MESSAGE A063(ZR53) WITH SY-SUBRC.
EXIT.
ENDIF.
call the function to send the already created email to the receivers
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
FOLDER_ID = FOLDER_ID
OBJECT_ID = NEW_OBJECT_ID
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
TABLES
RECEIVERS = REC_TAB
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC EQ 0.
MESSAGE I035(ZR53) WITH NEW_OBJECT_ID D_USERNAME. "usnam.
ELSE.
MESSAGE I036(ZR53) WITH D_USERNAME." sy-subrc.
ENDIF.
ENDFORM. " CREATE_AND_SEND_MAIL_OBJECT
Also, check links....
http://help.sap.com/saphelp_nw04s/helpdata/en/38/71f865c2c9a94ab1dce95792187c16/content.htm
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm -
How to send a pdf file to Archiving server
hi
i got a requirement that a smart form is generated in pdf format after that we ll send it to Archiving Server . Plz help me out
Thanks & Regards
KrishnaOr use the free Workspaces service at https://workspaces.acrobat.com/
Upload the file, publish or share it, then send the download link via email. -
How to send command to device via HTTP
Hy everyone,
i have installed olite on a number of wince device.
If i try to send command to the device when connected with the desktop computer on wich the mobile server is installed everything goes well.
My devices are connected by wifi to the lan of my company and i would like to send command via HTTP.
I tried to change the settings on the mobile server setting the Network Protocol to HTTP and setting the ip of the device but it does not work.
Does anyone know how to solve the problem?
David.Hi Ravi,
yes the command is queued but anything happens.
I tried to wait for long time but the command never succeed to execute.
If i try to send again the command from the Command History windows the command fails.
David. -
How to resolve damaged PDF file (via GUI_DOWNLOAD)
Dear forumers,
I am having problems with the GUI_DOWNLOAD method for downloading PDF files to the presentation server.
The SY-SUBRC code is 0, and the PDF file gets downloaded and saved in the presentation server.
However, opening any PDF files would be unsuccessful due to the error message that the file is damaged.
Text files on the other hand, are fine.
What could be wrong here, and how can I resolve this issue?
Appreciate any inputs here at all.
Many thanks.
P/S:
I had earlier tried this with GUI_DOWNLOAD FM, but with the same results as well - the issue still persists.
Attached here is the screenshot of the error message when opening a PDF file.Codes extract:-
*& Form download_all_attachments
* Download all attachments
FORM download_all_attachments .
DATA: lv_obj TYPE swotobjid-objkey.
DATA: lv_instid TYPE sibfboriid.
DATA: lv_classname TYPE bapibds01-classname.
DATA: lv_fol_id TYPE soodk.
DATA: lv_doc_id TYPE soodk.
DATA: lv_filename TYPE string.
DATA: lv_path TYPE string.
DATA: lv_fullpath TYPE string.
DATA: lv_path_tmp TYPE string.
DATA: lv_result TYPE i.
DATA: lv_sapusr_dir TYPE sdok_chtrd.
DATA: lv_directory TYPE string.
DATA: lwa_srgbtbrel TYPE srgbtbrel.
DATA: lwa_conn TYPE bdn_con.
DATA: lwa_errormsg TYPE iwerrormsg.
DATA: lt_srgbtbrel TYPE STANDARD TABLE OF srgbtbrel.
DATA: lt_conn TYPE STANDARD TABLE OF bdn_con.
DATA: lt_conn_tmp TYPE STANDARD TABLE OF bdn_con.
DATA: lt_objcont TYPE STANDARD TABLE OF soli.
FIELD-SYMBOLS: <lwa_final> TYPE zfidocattach.
CONSTANTS: lc_attach_field TYPE slis_fieldname VALUE 'ATTACH'.
CONSTANTS: lc_temp_path TYPE string VALUE 'C:\temp'.
CONSTANTS: lc_separate(1) TYPE c VALUE ';'.
CONSTANTS: lc_period(1) TYPE c VALUE '.'.
LOOP AT gt_final ASSIGNING <lwa_final>.
CLEAR: lv_obj, lv_instid, lv_classname,
lt_srgbtbrel, lt_conn, lwa_srgbtbrel.
CONCATENATE <lwa_final>-bukrs <lwa_final>-belnr <lwa_final>-gjahr
INTO lv_obj.
lv_instid = lv_obj.
SELECT *
FROM srgbtbrel
INTO TABLE lt_srgbtbrel
WHERE reltype = lc_attachment_rel
AND instid_a = lv_instid
AND catid_a = lc_borobj_ctgy.
SORT lt_srgbtbrel BY typeid_a.
DELETE ADJACENT DUPLICATES FROM lt_srgbtbrel
COMPARING typeid_a.
LOOP AT lt_srgbtbrel INTO lwa_srgbtbrel.
CLEAR lt_conn_tmp.
lv_classname = lwa_srgbtbrel-typeid_a.
CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
EXPORTING
classname = lv_classname
objkey = lv_obj
client = sy-mandt
TABLES
gos_connections = lt_conn_tmp
EXCEPTIONS
no_objects_found = 1
internal_error = 2
internal_gos_error = 3
OTHERS = 4.
APPEND LINES OF lt_conn_tmp TO lt_conn.
CLEAR: lwa_srgbtbrel, lv_classname.
ENDLOOP.
LOOP AT lt_conn INTO lwa_conn.
MOVE lwa_conn-loio_id TO lv_fol_id .
MOVE lwa_conn-loio_id+17(25) TO lv_doc_id .
CALL FUNCTION 'SO_OBJECT_READ'
EXPORTING
folder_id = lv_fol_id
object_id = lv_doc_id
TABLES
objcont = lt_objcont.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
IMPORTING
sapworkdir = lv_sapusr_dir
error_msg = lwa_errormsg.
IF sy-subrc = 0.
lv_directory = lv_sapusr_dir.
ELSE.
lv_directory = lc_temp_path.
ENDIF.
CONDENSE lv_directory.
* Filename format:
* Company code;YYMM(posting Date);Document number;Attach File name.ext
CONCATENATE <lwa_final>-bukrs lc_separate
<lwa_final>-budat(4) <lwa_final>-budat+4(2) lc_separate
<lwa_final>-belnr lc_separate
lwa_conn-descript lc_period lwa_conn-docuclass
INTO lv_filename.
IF lv_path IS INITIAL.
* Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
default_extension = 'ASC'
default_file_name = lv_filename
initial_directory = lv_directory
CHANGING
filename = lv_filename
path = lv_path
fullpath = lv_fullpath
user_action = lv_result.
IF sy-subrc <> 0 OR
lv_result <> cl_gui_frontend_services=>action_ok.
EXIT.
ENDIF.
CHECK lv_result EQ '0'.
ELSE.
CLEAR: lv_path_tmp, lv_fullpath.
lv_path_tmp = lv_path.
CONCATENATE lv_path_tmp lv_filename
INTO lv_fullpath.
ENDIF.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
* bin_filesize =
filename = lv_fullpath
filetype = 'ASC'
* APPEND = SPACE
* write_field_separator = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
CHANGING
data_tab = lt_objcont
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* CALL FUNCTION 'GUI_DOWNLOAD'
* EXPORTING
* filename = lv_fullpath
* filetype = 'ASC'
** append = 'X'
* write_field_separator = 'X'
** confirm_overwrite = 'X'
* TABLES
* data_tab = lt_objcont
* EXCEPTIONS
* file_open_error = 1
* file_write_error = 2
* OTHERS = 3.
CLEAR lwa_conn.
ENDLOOP.
ENDLOOP.
ENDFORM. " download_all_attachments -
How to send an XML file via HTTP_POST
I have an ABAP program that creates an XML file and I need to somehow post this XML file to a webserver and read the HTTP Response that it sends back. I see that there is a function module called HTTP_POST but I've never used it before. I also see that there are a number of ABAP Objects related to HTTP. Has anyone done this before.
I'm on SAP 4.7 (6.20)
Thank you,I went to www.fedex.com and exported their SSL cert. I then imported it into SAP via STRUST. However, I still get the same http_communication_error. The XML needs to be posted to this address: 'https://gatewaybeta.fedex.com:443/GatewayDC'
Here is my code:
Note: wf_string contains the XML
CALL METHOD cl_http_client=>create
EXPORTING
host = 'https://gatewaybeta.fedex.com'
service = '443'
scheme = '2'
proxy_host = wf_proxy
proxy_service = wf_port
IMPORTING
client = http_client.
http_client->propertytype_logon_popup = http_client->co_disabled.
wf_user = '' .
wf_password = '' .
proxy server authentication
CALL METHOD http_client->authenticate
EXPORTING
proxy_authentication = 'X'
username = wf_user
password = wf_password.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_method'
value = 'POST'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~server_protocol'
value = 'HTTP/1.1'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = '~request_uri'
value = 'https://gatewaybeta.fedex.com:443/GatewayDC'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'Content-Type'
value = 'text/xml; charset=utf-8'.
CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'Content-Length'
value = txlen.
*CALL METHOD http_client->request->set_header_field
EXPORTING
name = 'SOAPAction'
value = 'https://gatewaybeta.fedex.com:443/GatewayDC'
CALL METHOD http_client->request->set_cdata
EXPORTING
data = wf_string
offset = 0
length = rlength.
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
CLEAR wf_string1 .
wf_string1 = http_client->response->get_cdata( ). -
How to send a pdf/tiff file to spool
Hi all,
can anyone tell me how to send a pdf file to spool.
There will be forms attached to activity(the forms can be pdf/tiff format).
Thank You,
VichuThose forms(PDF or TIFF) are the attachments for the t-code crm_orders. I need to send those forms to the spool.
I have a code to create a spool request for list output.
SUBMIT (L_PROG)
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS LS_PARAMS
AND RETURN.
but for the pdf to spool i dont know how to proceed.......... in what are the way we can do......... can anyone provide me the code......... so that it will be more helpful.... -
How do I change my email address when sending a PDF file:
How do I change my email address (correct it) when sending a PDF file?
You'll need to add the email address you want to use to Reader... If you're not prompted to do so when clicking the Submit button, you can do it via Edit - Preferences - Email Accounts.
-
How to send converted PDF from OTF via email
Hi Experts,
Greetings! How can I send the PDF file from FM 'CONVERT_OTF' via email?
I was stuck on this code:
*--- Convert OTF data to pdf
CLEAR: i_otf, i_pdf.
i_otf[] = gs_ssfcrescl-otfdata.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = i_otf
lines = i_pdf
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
CHECK sy-subrc = 0 AND NOT i_pdf[] IS INITIAL.
Thanks in advance for the help.Hi
DATA:
I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
DATA:
W_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
W_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
W_BUFFER TYPE STRING.
DATA:
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = ' '---------> smartform
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION '/1BCDWB/SF00000482'
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
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
ERR_BAD_OTF = 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.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE W_BUFFER I_TLINE INTO W_BUFFER.
ENDLOOP.
TRANSLATE W_BUFFER USING '~'.
DO.
I_RECORD = W_BUFFER.
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.
I_OBJBIN[] = I_RECORD[].
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
I_OBJTXT = 'Find attached the output of the smartform.'.
APPEND I_OBJTXT.
I_OBJTXT = 'Regards,'.
APPEND I_OBJTXT.
I_OBJTXT = 'Sravanthi'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
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'.
W_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
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.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = ' '.---------->email id
I_RECLIST-EXPRESS = 'X'.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
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
CONTENTS_BIN = I_OBJBIN
OBJECT_HEADER = W_OBJHEAD
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 NE 0.
WRITE:/ 'Error When Sending the File', sy-subrc.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
After excuting this program check the status of the email in the SOST transaction
Regards,
sravanthi
Maybe you are looking for
-
Moving from PC to MAc, but want to keep all the old iTunes settings! Help!
I did this just fine, from PC to MacBook. But one problem I'm having is that my new iTunes library on the Mac is completely devoid of my old iTunes settings on my pc - my song ratings, my playlists, all the songs I've had checked and unchecked, date
-
I tried doing this using my gmail email account, but there I get the msg that Firefox crashed. I use SE Aware, Spybot and Malware for securing my pc. After using each of these to do a computer scan my pc still crashes giving me that msg that my Silve
-
Gnome3: Cannot set laptop lid close action
I've checked the lid closing sensor with watch /proc/acpi/button/lid/LID/state and the status changes without problems, but i can't set the lid closing action in gnome-tweak-tool or under power options. The laptop suspends only when an external monit
-
Jquery Selector in Apex 4.1
Hi everybody, I've just upgraded to apex 4.1 from 4.0.1 and my dynamic actions selecting jquery class selector type (.my_class) now just selects the first element of that class instead of all the elements of class, my_class. It was working smoothly i
-
Urgent: sending jar files
hii i have created an applet that uses a JTree to display employee hierarchy data..i have compiled all the necessary class file in file called Hm.jar now i have written an html page with the tag <applet code="Hmain.class" archive="classes12.jar ,Hm.j