BAR CODES in smartforms - conversion problems to PDF

Hello,
I have a problem. Have a look at the following points and see what I have done:
1. I generated several different system bar codes using SM73
2. I added those system bar codes to a smartformstyle
3. and built a smartform using smartformstyle of system-bar codes.
4. then I made some examples of bar codes in the smartform as text.
5. next I sent this smartform via email as an pdf attachment using smartform mail functionality.
6. shocking - all bar codes in the pdf-file are not readable. You can see that there is a barcode placed, but all barcodes looks like the same.
Has somebody got a idea on what is going on here?
I already had a look at OSS Notes 430887 and 645158.
Greetings
daniel

Hi,
Please can you have a look at Sap OSS Note 197177.
Regards,
Sudheer.

Similar Messages

  • Generate bar codes in smartforms

    Hi,
    I wonder to know how can I add bar codes to a smartform. Bar codes should be generated in a automatic sequence and its number should be printed too.
    Thanks a lot,
    Nuno Moreira

    Hi Gregor,
    Let me try to explain better.
    1. I'm using the bar code in smartforms and I'm able to generate the bar code graphic. But I want to print the bar code graphic and the bar code number, so what I was asking is if there is some way to associate automatically the number with bar code graphic, instead of write the number again with a regular font format, because like this is very difficult to format properlly the graphic with the associated number.
    2. What I want to do is, print daily several letters identified with a bar code, so it'll be nice if the system could generate a automatic sequence of number to convert in bar code graphics.
    I hope you could understand my doubts.
    Thanks again,
    Nuno Moreira

  • To print bar code in smartforms.

    Hi,
             I want to print bar code in smartforms. how to do that one.
      Thanks ,
      sanjukta

    Hi,
    There's another way of doing it. Here we go... You can generate an ITF file for your data from any third party softwares.
    Once you have the ITF file, this is what you have got to do.
    <b>Uploading label file to SAPscript</b>
    1. Use the standard text editor (Transaction SO10) to upload the print file to SAPscript.
    2. Create a new standard text with any name. In the text editor load the created print file
    (.ITF file) with the function "Text->Upload" and select "ASCII" as a format. Store the ITF
    print file as a standard text.
    3. Include the standard text in your SAPScript.
    4. <b>Set up Device Type </b>Generally, a special device type (a variant of the device type ASCIIPRI) must be used for the correct printout of the layout set on a label printer. SAP supplies these device types on the ftp server sapservX and delivers them in the standard SAP system. The device type ASCIIPRI can normally be used for the basic test of procedure with other label printers.
    5. <b>Define your output Device</b> As the last step, an output device (printer) must be set up in the R/3 with Transaction SPAD. The special device type or ASCIIPRI is assigned to this output device (printer). The application program must now use this output device to print the labels. The label printer connects itself to the R/3 via one of the standard available connection types in SAP R/3 (local print on the application server/removed print via lpd server/removed print via Windows PC and SAPlpd/frontend print). Your thermal printer must be connected to one of the available output channels for print output.
    6. What is the Barcode Symbology you are using? Upload method doesn't support EAN.UCC 128. But still there is workaround.
    Feel free to revert back.
    --Ragu

  • Bar code in Smartforms

    Hi experts
    can u plz explain me how to bring bar code in to smartform like invoice  credit notes
    step by step procedure
    regards
    Siri

    Hai Sireesha
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Details information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research -
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes.
    - Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.
    Now you have a barcode printed - what next?
    Well there are two options, depending on your business requirements:
    - You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
    - Another solution is to use SAPConsole transactions
    or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor.
    These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.
    Barcode Standard
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Thanks & regards
    Sreenivasulu P

  • Can I print Bar Code Text autoamatically under the bar code  in smartform.

    Hi All,
    Currently I am printing the Bar Code for MARA-EANNR value .My requirement is to print the MARA-EANNR value under the bar code .Currently I am hardcoding and it is working fine.I want to know is there any possible way I can print the value of MARA-EANNR under the bar code with out hard coding.
    Thnaks,
    Suresh.

    Hi,
    B1 - BARCODE CHARACTER FORMAT
    A1- DEFAULT CHARACTER FORMAT.
    In smart form define a template with two rows,
    in first row u pass barcode value( mat no ) with barcode character fomat.
    <B1>&MATNO&</>
    in second row define  barcode value(mat no ) in ordinary charcter format.
    <A1>&MATNO&</>
    Rgds
    Siva
    Edited by: siva prasad on Sep 1, 2009 1:53 PM

  • How to add a bar code to each page in dynamic pdf

    I am using adobe livecycle to create dynamic form. I have a requirement where I need to add BarCode field to alternate pages in pdf document. The pages can grow dynamically when pdf loads.

    This forum is for questions about forms created with Acrobat. There is a LiveCycle Designer forum here: LiveCycle Designer

  • Bar Codes in Smartforms

    Hi All
    How can i print barcodes in my smartform ? do we have any functional modules to generate a barcode for a particular value ( for ex: PO NUmber )
    thanks in Advance

    Hi,
    check the links
    barcode printing in smartforms
    Re: About printing barcode in SAP system using SmartForm
    Regards,
    anirban

  • Adding bar codes to printer device for smartforms pdf conversion?

    Hello friends,
    I would like to send a smartform as a pdf to an email recipient. The smartform shows some bar codes. The send process workes fine. But the bar codes doesn't appear on the pdf correctly. Therefore I would like to add bar codes to the printer device type in transaction SE73.
    Does somebody know the device type for smartforms pdf conversion? Or how can I add bar codes to smartforms pdf conversion process?
    greetings
    daniel

    Hello Denial,
    Try these links, this might solve ur problem
    http://www.tec-it.com//documentation/TBarCodeSAPLPD_EN.htm
    http://www.mecsw.com/info/appnote/app_024.html
    if you need any more information send me at [email protected]
    Thanks & Best Regards
    Ankur Jain

  • PDF Conversion problem

    Hi ABAPers
    While sending smartform as a mail attachment(PDF Format) i am facing problem.
    While opening the PDF attachment in SOST (T-code), It shows a error pop up.(I.e., Conversion Problem in PDF). Some pages are getting opened as a blank page and some are not getting opened.
    What may be the prolem.
    Please help Me out ............
    But it works properly in IDES version.
    In IDES i have ADOBE 5.0 Version, In Live server it is ADOBE 6.0 ,7.0.

    Hi,
    Thanks for your feedback
    There is no problem in the coding , is there any thing we have to do in configuration level regarding PDF ?????
    *& Report  ZVNPAML
    REPORT  zvnpaml.
    TABLES: somlrec90.
    DATA: it_zvnpa  TYPE TABLE OF zvnpa,
          it_zvnpa1 TYPE TABLE OF zvnpa,
          wa_zvnpa  TYPE zvnpa,
          it_head   TYPE TABLE OF zvnpa,
          it_head1  TYPE TABLE OF zvnpa,
          wa_head   TYPE zvnpa,
          wa_head1  TYPE zvnpa,
          fmname    TYPE rs38l_fnam,
          tot       TYPE zvnpa-wrshb,
          otfout    TYPE ssfcrescl,
         outopt   type SSFCRESOP,
          pdftab    TYPE TABLE OF tline WITH HEADER LINE,
          datab     TYPE TABLE OF itcoo WITH HEADER LINE,
          conpar    TYPE ssfctrlop,
          mailrec   TYPE swotobjid,
          outopt    TYPE ssfcompop,
          jobopt    TYPE ssfcresop,
          jobout    TYPE ssfcrescl,
          w_return  TYPE ssfcrescl,
          it_otf    TYPE itcoo OCCURS 0 WITH HEADER LINE,
          binsz     LIKE sood-objlen,
          i_tline   TYPE TABLE OF tline WITH HEADER LINE,
          wa_buffer TYPE string,"To convert from 132 to 255
          i_record  LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA: wa_doc_data   TYPE sodocchgi1,
          it_pack       TYPE TABLE OF sopcklsti1,
          wa_pack       TYPE sopcklsti1,
          it_mailhead   TYPE TABLE OF solisti1,   " OCCURS 1 WITH HEADER LINE,
          wa_mailhead   TYPE solisti1,
          it_mailbody   TYPE TABLE OF solisti1,      "  OCCURS 0 WITH HEADER LINE,
          wa_mailbody   TYPE solisti1,
          it_receiverid TYPE TABLE OF somlrec90,  " OCCURS 10 WITH HEADER LINE.
          wa_receiverid TYPE somlrec90,
          it_attach     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
         wa_attach     TYPE solisti1,
          lncnt         TYPE i.
    DATA: lv_spool TYPE tsp01-rqident,
          wa_line  TYPE tsp01-rqident,
          it_pdf_output TYPE TABLE OF tline.
    SELECTION-SCREEN BEGIN OF BLOCK vendor WITH FRAME TITLE text-w03.
    *PARAMETERS: pa_lifnr TYPE lfa1-lifnr,
               pa_bukrs TYPE zvnpa-bukrs,
    PARAMETERS:     pa_augdt TYPE zvnpa-augdt.
    SELECT-OPTIONS: pa_mail FOR somlrec90-receiver NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK vendor.
    SELECT * FROM zvnpa INTO CORRESPONDING FIELDS OF TABLE it_zvnpa1
                        WHERE augdt =  pa_augdt
                        AND   bukrs =  '2000'
                        AND   flag  <> 'X'.
                                                 konto = pa_lifnr AND
                                                 bukrs = pa_bukrs AND
    IF it_zvnpa1 IS NOT INITIAL.
      SORT it_zvnpa1 BY konto.
      LOOP AT it_zvnpa1 INTO wa_zvnpa.
        APPEND wa_zvnpa TO it_zvnpa.
        CLEAR: wa_zvnpa.
        AT END OF konto.
          SORT it_zvnpa BY ttref augbl wrshb shkzg.
    *it_head[] = it_zvnpa[].
          LOOP AT it_zvnpa INTO wa_zvnpa WHERE shkzg = 'S'.
            APPEND wa_zvnpa TO it_head1.
            CLEAR: wa_zvnpa.
          ENDLOOP.
    *delete adjacent duplicates from it_head comparing ttref.
          SORT it_head1 BY ttref augbl wrshb shkzg.
           LOOP AT it_head1 INTO wa_head1.
            tot = tot + wa_head1-wrshb.
            wa_head = wa_head1.
            AT END OF ttref.
              wa_head-wrshb = tot.
              APPEND wa_head TO it_head.
              CLEAR: wa_head,tot.
            ENDAT.
            CLEAR: wa_head1.
          ENDLOOP.
          SORT it_head BY ttref augbl wrshb shkzg.
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
              formname = 'ZVNPASF'
            IMPORTING
              fm_name  = fmname.
          conpar-no_dialog = 'X'.
          conpar-getotf    = 'X'.
          outopt-tddest    = 'LOCL'.
          outopt-urlcall   = fmname.
          outopt-tdnoprev  = 'X'.
         outopt-tdnewid   = 'X'.
          CALL FUNCTION fmname
           EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
              control_parameters         = conpar
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
              output_options             = outopt
              user_settings              = ' '
            IMPORTING
      DOCUMENT_OUTPUT_INFO       =
              job_output_info            = w_return
      JOB_OUTPUT_OPTIONS         =
            TABLES
              it_zvnpa                   = it_zvnpa
              it_head                    = it_head.
         READ TABLE w_return-spoolids INTO wa_line INDEX 1.
         IF sy-subrc = 0.
           lv_spool = wa_line.
           CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
               src_spoolid              = lv_spool
               no_dialog                = ' '
               dst_device               = 'LOCL'
             TABLES
               pdf                      = it_pdf_output
             EXCEPTIONS
               err_no_otf_spooljob      = 1
               err_no_spooljob          = 2
               err_no_permission        = 3
               err_conv_not_possible    = 4
               err_bad_dstdevice        = 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.
          it_otf[] = w_return-otfdata[].
          IF it_otf[] IS NOT INITIAL.
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                format        = 'PDF'
                max_linewidth = 132
              IMPORTING
                bin_filesize  = binsz
              TABLES
                otf           = it_otf
                lines         = i_tline.
            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.
          ENDIF.
          IF i_record[] IS NOT INITIAL.
            it_attach[] = i_record[].
           CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
            EXPORTING
              LINE_WIDTH_SRC                    = '132'
              LINE_WIDTH_DST                    = '255'
              TRANSFER_BIN                      = ' '
             TABLES
               content_in                        = i_tline[]
               content_out                       = IT_ATTACH[]
            EXCEPTIONS
              ERR_LINE_WIDTH_SRC_TOO_LONG       = 1
              ERR_LINE_WIDTH_DST_TOO_LONG       = 2
              ERR_CONV_FAILED                   = 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.
           it_attach[] = w_return-otfdata[].
           IF it_pdf_output[] IS NOT INITIAL.
             it_attach[] = it_pdf_output[].
            wa_mailbody-line = 'Dear Sir / Madam,'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Please be informed that we have remitted the payment towards your outstanding bills as per the attachment:'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Best Regards,'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Mary. G '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Finance department'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Intimate Fashions (I) Pvt Ltd'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Please do not print this email unless it is absolutely necessary.  Become environment friendly.'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'E-MAIL DISCLAIMER.'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'If you are not the addressee of this mail, please delete this. Intimate Fashions does not accept any liability on the improper usage of this mail. It may also be legally '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'privileged. Internet communications cannot be guaranteed to be timely, secure or virus free'.
            APPEND wa_mailbody TO it_mailbody.
            DESCRIBE  TABLE it_mailbody LINES lncnt.
            wa_doc_data-obj_descr  = 'Remittance details - Brunet'.
            wa_doc_data-expiry_dat = sy-datum + 10.
            wa_doc_data-obj_name   = 'TRIAL'.
            wa_doc_data-sensitivty = 'F'.
            wa_doc_data-doc_size   = lncnt * 255.
            CLEAR wa_pack.
            CLEAR wa_pack-transf_bin.
            wa_pack-doc_type   = 'RAW'.
             wa_pack-transf_bin = ' '.
            wa_pack-head_start = 1.
            wa_pack-head_num   = 0.
            wa_pack-body_start = 1.
            wa_pack-body_num   = lncnt.
             wa_pack-doc_size   = lncnt * 255.
            APPEND wa_pack TO it_pack.
            CLEAR: lncnt,wa_pack.
            DESCRIBE  TABLE it_attach LINES lncnt.
            wa_pack-transf_bin = 'X'.
            wa_pack-head_start = 1.
            wa_pack-head_num   = 1.
            wa_pack-body_start = 1.
            wa_pack-body_num   = lncnt.
            wa_pack-doc_type   = 'PDF'.
            wa_pack-obj_name   = 'VNPA'.
            CONCATENATE 'Vendor Payment Advice' '.PDF' INTO wa_pack-obj_descr.
             wa_pack-obj_descr  = 'Vendor Payment Advice'.
            READ TABLE it_attach INDEX lncnt.      "INTO WA_ATTACH
             wa_pack-doc_size   = ( lncnt - 1 ) * 255 + STRLEN( it_attach ).
            wa_pack-doc_size   = lncnt * 255.
            APPEND wa_pack TO it_pack.
            CLEAR: lncnt,wa_pack.
            wa_mailhead = 'Vendor Payment Advice'.
            APPEND wa_mailhead TO it_mailhead.
            CLEAR: wa_mailhead.
            LOOP AT pa_mail.
              wa_receiverid-receiver = pa_mail-low.
              wa_receiverid-rec_type = 'U'.
              APPEND wa_receiverid TO it_receiverid.
              CLEAR:wa_receiverid.
            ENDLOOP.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           CLEAR:wa_receiverid,lncnt.
            CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
              EXPORTING
                document_data                    = wa_doc_data
                put_in_outbox                    = 'X'
                commit_work                      = 'X'
           IMPORTING
              SENT_TO_ALL                      =
              NEW_OBJECT_ID                    =
              TABLES
                packing_list                     = it_pack
                object_header                    = it_mailhead
                contents_bin                     = it_attach[]
                contents_txt                     = it_mailbody
                 CONTENTS_HEX                     = it_attach
              OBJECT_PARA                      =
              OBJECT_PARB                      =
                receivers                        = it_receiverid
             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.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              LOOP AT it_zvnpa INTO wa_zvnpa.
                wa_zvnpa-flag = 'X'.
                MODIFY it_zvnpa FROM wa_zvnpa TRANSPORTING flag.
              ENDLOOP.
              MODIFY zvnpa FROM TABLE it_zvnpa.
            ENDIF.
          ENDIF.
          CLEAR: wa_zvnpa,it_zvnpa,it_otf,it_otf[],w_return,lncnt,
                 wa_doc_data,
                 wa_head,it_head,it_head1,
                 i_record,i_record[],
                 i_tline,i_tline[],
                 it_pack,
                 wa_pack,
                 it_mailhead,
                 wa_mailhead,
                 it_mailbody,
                 wa_mailbody,
                 it_receiverid,
                 wa_receiverid,
                 it_attach.
        ENDAT.
      ENDLOOP.
    ENDIF.

  • How to find bar codes and mails to send clients in smartforms

    HI friends,
        How to find bar codes in smartforms and also how to send mail to the client. I have developed one object in smartforms, but i don't know how to send maill to the client. Pls help me........................
    Thanks in Advance.
    Saradhi.

    Hi!
    Here is the code to send the Smartform to mail as PDF attachment.
    *& Report ZTEST_PDF_MAIL
    REPORT ZTEST_PDF_MAIL.
    Internal Table declarations
    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.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZTEST'
    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'
    IMPORTING
    JOB_OUTPUT_INFO = W_RETURN
    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
    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.
    ENDIF.
    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.
    Attachment
    REFRESH: I_RECLIST,
    I_OBJTXT,
    I_OBJBIN,
    I_OBJPACK.
    CLEAR WA_OBJHEAD.
    I_OBJBIN[] = I_RECORD[].
    Create Message Body Title and Description
    I_OBJTXT = 'test with pdf-Attachment!'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    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.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'smart'.
    I_OBJPACK-OBJ_DESCR = 'test'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = '[email protected]'.
    I_RECLIST-REC_TYPE = 'U'.
    APPEND I_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    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 <> 0.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.
    If you want to send some text as Body of the Mail then follow this once
    when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
    1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
    2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
    I_OBJPACK-TRANSF_BIN = ' '.
    I_OBJPACK-HEAD_START = 000000000000001.
    I_OBJPACK-HEAD_NUM = 000000000000001.
    I_OBJPACK-BODY_START = 000000000000002
    I_OBJPACK-BODY_NUM = 000000000000010.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    append I_OBJPACK-.
    by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    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.
    Regards
    Tamá

  • To print 3 different bar codes on the same page in SMARTFORMS

    Hi,
    I want to print three different bar codes (HU) per page instead of one in Smartforms. I need to change the print program but I don't know where?
    can you help me plz

    Hi,
    To display Bar Codes in smartforms you need to create charecter format in smartsyles:
    Example :
    Charecter Format :BC
    Description : Bar Code
    Bar code Name : C128A
    And next insert two text node in the tempalte
    1. &value1& type BC for dispalying barcode lines
    2. &value1& type any for dispalying values for the barcode.
    This way you can display the values in form of barcodes.
    Regards,
    Dep

  • How to print BAR code in SMART Form

    Hi All,
    I have the requirement to print BAR CODE in Smartforms.
    For this, I create a character format with Bar code in style forms and create a text element in Smart form and associate bar code character format with this text element.
    Now when I look the print preview for the data, then it shows me data in bar code format but not in right format i.e. its shows me all the similar block in bar code.
    If you look the bar code in SAP script, its always show you bar code with similar block, but in SMART FORM it will show you exact bar code; as in SAP Script, bar code is generated at printer end and in SMARTFORM bar code is generated as graphic in SAP and then sent to printer for print.
    PLease let me know, why in SMARTFORM its not showing BAR CODE in correct format in print preview.
    Thanks
    Piyush Mathur

    Hi,
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    reward if useful
    regards,
    ANJI

  • Convert smartform output in to PDF using CONVERT_OTF function  how to do it

    Hi Anil , and  Hi All
             I am trying to display smartforms output in java webdynpro
             for that i have got the following code in sdn.
               can anybody please clarify these doubts in the  below code
               1) What are the mandatory input and output parameters
                   I have to pass here in this code to my application
               2) please check my previous post also in this regards please
       . Please reply at the very earliest. Check the below code
    Convert smartform output in to PDF using CONVERT_OTF function module and you can write pdf using parameter 'binfile' of this function in WebDynpro using the following code:
    It is copied from my prg. I hope you understand it.
    public void onActionGetQuote(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionGetQuote(ServerEvent)
    wdThis.wdGetOppt_QwriterCustController().executeZquote_Writer_Input();
    String fileName = wdContext.currentZquote_Writer_InputElement().getOrder().toString().trim() + System.currentTimeMillis() + ".pdf";
    String pdfOutput = new String(wdContext.currentOutputElement().getBinfile());
    if (pdfOutput != null)
    try
    String pdfResoucePath = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), fileName);
    FileOutputStream fileOutputStream = new FileOutputStream(new File(pdfResoucePath));
    PrintStream ps = new PrintStream(fileOutputStream);
    ps.print(pdfOutput);
    ps.close();
    //Display the PDF to the browser
    String fileURL = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getDeployableObjectPart(), fileName);
    IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(fileURL, "Pdf Browser", false);
    window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
    window.removeWindowFeature(WDWindowFeature.MENU_BAR);
    window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
    window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
    window.open();
    // To collect all the file created in the server by user
    quoteFiles.add(quoteFiles.size(), pdfResoucePath);
    } catch (Exception e)
    throw new WDRuntimeException(e);
    //@@end

    Hi
        ABAPers prepared a BAPI function module which calls Smart form , how can i execute it from java Webdynpro, so that I can display the smart form in Webdynpro. Pleas reply at the very earliest.  Every answer will be rewarded.
    regards
    jalandhar

  • Generate bar codes in mail forms

    Hi,
    I know how to insert Bar codes in smartforms, but I need to print the bar codes in Mail Forms, is that possible?
    Thanks a lot,
    Nuno Moreira

    Hi Gregor,
    What I need to do is:
    I have several mail forms treated as a standard response in ICWC. We are using the e-mail view (in ICWC) mainly to print the forms, via smartforms or in “online” mode without smartforms.
    So, at the moment, I have two questions:
    1) If I use a smartform to print the mail form, even if I create the form in plain text and create the bar code into mail form, when I print the “number” it is not converted in a bar code;
    2) If I generate the bar code in a mail form and I try to print it in ICWC e-mail view the number is not printed as a bar code too;
    Thanks a lot for your help and interest,
    Best Regards,
    Nuno

  • Bar code (escaping 3 label and printing 4th one)

    Dear All,
    i m printing bar-code from bar code printer (zebra)..problem is that printing is fine but is escaping 3 label then printing 4th one.can any tell me how to do page format so that it can't escape any label.Right noe i m using DINA4..plz suggest me..
    Thanx

    closed

Maybe you are looking for