Smartform to BIN format
Hi all,
I have requirement like attach Smartform into Purchase order .
So that i want to convert Smartform to BIN format.
How to do this.
Thanks in advance.
Regards,
Arun.
Hi all,
I have requirement like attach Smartform into Purchase order .
So that i want to convert Smartform to BIN format.
How to do this.
Thanks in advance.
Regards,
Arun.
Similar Messages
-
FTP File need in BIN format not in TEXT to be send in email as attachment
Dear All,
<H3>Currrent Working Scenrio:- Program uploading from the desktop (zip file) in bin and attaching and sendng through mail. Its working fine. Below is the code to upload file from desktop</H3>
data: DATA_TAB TYPE STANDARD TABLE OF T_XLINE,
name(80) type c value 'c:\abc\desktop\abc.zip'.
CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = NAME
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = SIZE
CHANGING
DATA_TAB = DATA_TAB.
<h3>Now Current Requirement is to upload file from ftp and send mail as an attachment.</h3>
Instead of using CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
<h5>Now i am connecting to FTP and taking file from ftp server and downloading it in form of text. But i need file in BIN format to be send as an attachment with this mail. So i converted text file taken from ftp to bin by using 'SCMS_TEXT_TO_BINARY'.</h5>
It is sending the folder name but not the files in the zip folder in ftp. Only 1kb file is sent.
Used to Take file from FTP to server
CALL FUNCTION 'FTP_SERVER_TO_R3'
EXPORTING
HANDLE = W_HDL
FNAME = WRK_FILE
CHARACTER_MODE =
IMPORTING
BLOB_LENGTH =
TABLES
BLOB =
TEXT = IT_DOWNLOAD
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 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.
Used to convert text to bin
CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
EXPORTING
FIRST_LINE = 0
LAST_LINE = 0
APPEND_TO_TABLE = ' '
MIMETYPE = ' '
ENCODING =
IMPORTING
OUTPUT_LENGTH =
TABLES
TEXT_TAB = it_download
BINARY_TAB = data_tab
EXCEPTIONS
FAILED = 1
OTHERS = 2
Edited by: Ravi Grover on Apr 7, 2011 12:04 PMHi!
Check sample programs:
RSFTP002
RSFTP003
There is a Function Module called: FTP_COMMAND. In this FM you should send the command "bin".
Hope it helps.
Esteban -
Convert Smartform in PDF format and send to SAP Workplace
Hi to all.
I need help of somebody expert in SMARTFORM's.
I need to convert a smartform into PDF format and to send as attachement for SAP workplace
of the user.
I developed the next code.
IT is to function and to send the mail for SAP workplace, but it happens that smartform
contains images (logos) and tables, when the user tries to open the file pdf in inbox gives
to error - "An unrecognized token ' q0 ' was found".
I tried to call a smartform only with text and functioned well.
Somebody can help me?
My code:
Begin ***********************************************
REPORT zteste_nsa_send_pdf_sap_office.
DATA: t_print LIKE zeps_fm04 OCCURS 0 WITH HEADER LINE,
v_size TYPE i.
DATA: ls_bil_invoice TYPE lbbil_invoice.
TABLES: nast.
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,
Objects to send mail.
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,
Work Area declarations
wa_objhead TYPE soli_tab,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
wa_doc_chng TYPE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,"To convert from 132 to 255
Variables declarations
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.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFPS_FICHA_VALORIZACAO'
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
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 v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = 'X'
IMPORTING
job_output_info = w_return
TABLES
t_list = t_print
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 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.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
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 EQ 0.
ENDIF.
Convert PDF from 132 to 255.
LOOP AT i_tline.
TRANSLATE i_tline USING '~'.
CONCATENATE wa_buffer i_tline INTO wa_buffer.
ENDLOOP.
TRANSLATE wa_buffer USING '~'.
DO.
i_record = wa_buffer.
APPEND i_record.
SHIFT wa_buffer LEFT BY 255 PLACES.
IF wa_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
SEND MAIL
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR wa_objhead.
Object with PDF.
i_objbin[] = i_record[].
Object with main text of the mail.
i_objtxt = 'Fichas de Valorização e Esquemas Tipo'.
APPEND i_objtxt.
Document information.
wa_doc_chng-obj_name = 'SMART'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'Ficha de Valorização'.
wa_doc_chng-sensitivty = 'F'. "Functional object
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + STRLEN( i_objtxt ).
Pack to main body as RAW.
Obj. to be transported not in binary form
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
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.
Packing as PDF.
Obj. to be transported in binary form
DESCRIBE TABLE i_objbin LINES v_lines_bin.
READ TABLE i_objbin INDEX v_lines_bin.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'SMART'.
CONCATENATE 'Ficha_Valorizacao' '.pdf' INTO i_objpack-obj_descr.
i_objpack-doc_size = ( v_lines_bin - 1 ) * 255 + STRLEN( i_objbin ).
APPEND i_objpack.
e-mail receivers.
CLEAR i_reclist.
i_reclist-receiver = sy-uname.
i_reclist-rec_type = 'B'.
i_reclist-express = 'X'.
APPEND i_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = ' '
TABLES
packing_list = i_objpack
object_header = wa_objhead
contents_bin = 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 EQ 0.
ENDIF.
End *************************************************
Thanks very much to all and Happy New year...
NelsonPlease check this link...
[http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm]
-Muktar -
How to send output of smartform in pdf format as an attachment to email
how to send output of smartform in pdf format as an attachment to email
search before posting further and follow Forum rules
Edited by: Vijay Babu Dudla on Jan 15, 2009 4:50 AMDid u check on sdn?
i dont think so or else there are many posts on this topic and good wikis too.
look at one of these code tutorial wiki
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
So next time do use the search functionality.
кu03B1ятu03B9к
Edited by: kartik tarla on Jan 15, 2009 12:33 PM -
Document Distribution with attached documents coming across in BIN format
Hello all,
I have 3 dist types defined in the system. RML, RMA, and INT
RMA sends to SAP Office and includes a link to the document defined in DMS and seems to work correctly.
RML sends the document to SAP Office as an attachment but the attached documents always is in BIN format and cannot be opened by the application.
INT sends to my external email but has the same problem as above, the attachment is always in a BIN format and cannot be opened.
This works the same with several different applications in DMS, Word, Excel, Text Files, etc.
Can anyone give me an idea what I may be missing in config that is keeping this from working correctly. We are running SAP ECC 6.0
Thanks,
BillHi Bill,
Please check the following customizing in your system:
1) Please check you have maintained suitable length of syntax group for
Windows NT. Please maintain it more than 20.
Please proceed as follows to correct this entry:
Run the tcode SPRO
Implementation Guide for R/3 Customizing (IMG)
Cross-Application Components
Document Management System
Document Distribution
General Settings
Platform-Independent File Names
Maintain file names and file paths across all clients
Syntax group definition
2) Please check the 'File processing' value for distribution type 'INT'.
Please set it as '2'.
Further please check note 355048 and as mentioned your settings in transaction DC30 for the workstation applications.
Best regards,
Christoph -
Hi All,
Can anyone send me the sample code for attaching a SmartForm in PDF Format.
Thanks in advance.
Ulhashi,
check this
http://www.****************/Tutorials/Smartforms/OTF2PDF.htm -
VF01- invoice smartform in PDF format to be sent thro' mail
Hello Gurus,
We have a requirement from our client that we need to trigger a mail of invoice smartform in PDF format on saving in VF01.
Can any body suggest the steps in NACE and also output..
RegardsAs per your post, I understood that,
After saving Invoice , automatically Invoice has to send in PDF format to the respective email id maintained in CMR-Payer master
if yes, this involves ABAP & BASIS ,
ABAP- Program & FOrm routine has to created & assigned in respective output type & type-PDF (Check in NACE- Output type)
for this, you need to maintain the Condition record- VV31 - with medium as "Mail" -
or else,
you can do this manually also, in VF31- you can give a print & save in PDF format- you can send it - but its complete manual process. -
DOWNLOAD SMARTFORM IN TXT FORMAT
NORMALLY WE DOWNLOAD SMARTFORM IN PDF FORMAT BUT I HAVE REQUIREMENT TO DOWNLOAD IN TEXT FORMAT.
PLEASE HELP.
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jul 24, 2008 6:24 PMwhen you generate the spool you can down load that in txt format
Function is used RSPO_DOWNLOAD_SPOOLJOB when you want to do that programatically.
Using the spool number, and provide the path where you want to down load that time mention the name
C:\smart.txt
it will be downloaded . -
Hi Guru's,
Please help me.
I want to display Smartforms in HTML Format.
i.e when I run my Tcode inspite of Print Preview the data should open in HTML Format.
Thanks in Advance.Chk this..
http://help.sap.com/saphelp_nw04/helpdata/EN/59/cd7da407d711d5b66f006094192fe3/content.htm
Re: FM for conversion of graphical display of spool to html
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 11, 2008 9:35 AM -
How to open the incoming payload which is in .BIN format
Dear All,
I have a synchronous scenario(ABAP proxy to HTTP_AAE) where the incoming payload from third party(bank) is coming in the form of .BIN format. But bank is saying we are sending the response as zipped stream, which you can unzip, however, when I am openeing the response in SXMB_MONI its asking to "save as" , its saving in the form of .BIN. I have done the module configuration to unzip the incoming payload in HTTP_AAE adapter as follows.
Please let me know if anyone has faced such kind of issue.
Thanks,
FarhanHi Farhan - Are you sure if the above configuration unzip the response message?
AFAIK - It tries to unzip the request message which you are sending to bank.. but not the one which is coming back from bank..
However try saving the .bin file and .zip in sxmb_moni and see if you can open?
To unzip the response - may be try changing the processing sequence of the modules.. i.e. first give call adapter and then unzip.. i'm not sure if it works.. -
Hi, I have converted different smartforms to pdf format.How to combine pdf?
Hi All,
I have converted different smartforms to pdf format. How to combine all the pdf's into single pdf.
I need all the smartforms to be in single pdf.
Please help me in this regard.
Thanks in advance.Hi Keshu,
Individual pdf should be sent to individual user.
And at last all the pdfs of the smartform should be combined into one.
And admin have the provision to download it .
I mean the requirement is
For example.
For the month of september i will generate Pay Slip to each employee. And each pdf will be send to corresponding employee.
And finally all the pay slips of all the employees will be combined into single PDF and admin will download it and keep it for reference.
So as of now. I have generated individual pdfs and mailed it accordingly.
But how to combine it into one PDF is my question.
Please help me in this regard.
Thanks in advance. -
Displaying a smartform in pdf format using webdynpro
Hi,
I have created a smartform using t.code smartforms. I have created a function module within which i used the function mocule convert_otf which will convert the smartform into binary format. Now how do i proceed in displaying the form using web dynpro.
Plz give me your suggestions.
Thanks in advance.CALL FUNCTION LV_FUNC_MOD_NAME
EXPORTING
CONTROL_PARAMETERS = LS_SSFCTRLOP
OUTPUT_OPTIONS = LS_OUTPUT_OPTIONS
USER_SETTINGS = ' '
RRNUM = IM_RRNUM
IMPORTING
JOB_OUTPUT_INFO = LT_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
ENDIF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = LV_LENGTH
BIN_FILE = LV_XSTRING
TABLES
OTF = LT_RETURN-OTFDATA
LINES = LT_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
ENDIF.
LV_FUNC_MOD_NAME is your smartform function module name.
LV_XSTRING contains the stream of the pdf , send this to the browser using the following code.
LV_FILENAME = 'RebateRequest.pdf'.
LV_CTYPE = 'pdf'.
CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE(
EXPORTING I_FILENAME = LV_FILENAME
I_CONTENT = LV_XSTRING
I_MIME_TYPE = LV_CTYPE
I_INPLACE = ABAP_TRUE
I_IN_NEW_WINDOW = ABAP_TRUE ).
Abhi -
if i need the change the date format according to country how can i do it
( i.e ) I am creating a smartform, the date format i use is normally dd/mm/yyyy
if the same smartform is printed in some other country( using format yyyy/mm/dd or any format)
i want my date format to change based on where it is printed.
In SAPScripts there is a command SET COUNTRY.
Can I use this command for my requirement. If so How?hi check this referred link and do the coding accordinly...please search before you post ..
Country specific date format
and try this C14N_COUNTRY_DATE_DECF_GET too
Edited by: Venkat Appikonda on Jan 28, 2009 12:37 PM -
Is there any function module to convert spool to BIN format
Thanks,
VHi ,
Try this link:
https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-GettingPDFfilefromspooling+list
This is a good example of saving files from splooing list.
May it helps you.
Regards.
DS -
HI Experts,
How do I dispaly my smartforms in PDF format. How do I get Spool ID. where all the changes I have to made. plz describe properly.
Thanks. Alot.
KhanHi
You will get the Spool ID in the Fun module itself (in SE38 program)
in the output paramters <b> DOCUMENT_OUTPUT_INFO =</b> or
<b>JOB_OUTPUT_INFO =</b> take that
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
<b>* DOCUMENT_OUTPUT_INFO =</b>
<b>JOB_OUTPUT_INFO =</b>
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
and pass that spool ID to the fun module
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = spoolid
no_dialog = 'X'
importing
pdf_bytecount = pdf_fsize
tables
pdf = pdf_table
exceptions
others = 0.
Now PDF data is in PDF_TABLE
so download it using GUI_DOWNLOAD and send it to your mail ID
<b>Reward points for useful Answers</b>
Regards
Anji
Maybe you are looking for
-
Hello (hopefully someone can shed some light on my issue) I own as above a MAC PRO (Early 2008) this has a RAID card installed along with two 15k.7 cheetah hdd (320gb) and a spare drive, (which i made a regular drive) a while ago i had to replace the
-
Error shows up in default trace, but nowhere else; how to get more info ?
Our default (java) traces get filled up quickly with the following messages : error 2010-06-29 11:10:13:851 Error during parsing body item ^mt_Order using class com.sap.aii.af.sdk.xi.mo.DefaultItem at ^Klantnaam/ caused by --- java.lang.NullPointe
-
Server side include problem in DW design mode
I am having issues with one computer out of three...Using DW 8 on Mac OS 10.4 Intel.... I have a server-side include set up to contain my navigation (nav.shtml) inside of a DW template, and normally, the editable regions can be worked in and the SSI
-
Create a Procedure that will accept a variable
Hi, I'm new to pl/sql and I'm trying to create a procedure that will accept a variable. I want to use this sql to create restore points that can store the name of each batch job as it runs. The code works fine on it's own, but if I try to create the
-
OK... so this may sound like a very simple question, but I really don't understand how to import a PDF file into a Robohelp X5(winhelp 4) project? - I'm pretty sure that we are using the "classic" version of Robohelp, not the HTML version. Up until n