Archiving Smartforms

Hi  ,
I need a help regarding Archiving Smart Forms.
I was able to archive the original pages, but when I am trying to archive the copies along with the original pages, I am getting an Information message,
saying " OTF end command // missing "  and giving a dump.
Can somebody help me on this.

hi,
use CONVERT_OTF_2_PDF function module  and pass archive_index = tao_dara as importing parameter. after that  archive the PDF file by using the FM CONVERT_OTF_AND_ARCHIVE.
you can also refer to the following link:
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/smartform-will-not-archive-when-outputting-the-otf-file-1445210
i hope it helps.

Similar Messages

  • How to archive smartform output as PDF and store in External server

    Hi,
    I have requirement on archiving smartform output.
    1.need to archive smartform output as PDF  and need to store the PDF  in FileNet server.
    2.These iPDF need to link to SAP transaction FEBA_LOCKBOX at service for object level.
    I know that it can possible through SAP ArchiveLink feature , also aware that i have to enable Archive and Archive print button in the smartform output.
    If any body can give me some solutions it will be a great help.
    Regards,
    Ratheesh BS

    Hi,
    DATA: T_SSFCTRLOP TYPE SSFCTRLOP.   "FOR SMART FORMS
    DATA: T_SSFCRESCL TYPE SSFCRESCL.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'Smart Form Name'
       IMPORTING
         FM_NAME                  = FM_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.
      T_SSFCTRLOP-NO_DIALOG = 'X'.
      T_SSFCTRLOP-GETOTF = 'X'.
      T_SSFCTRLOP-LANGU = 'E'.
      CALL FUNCTION FM_NAME
        EXPORTING
          CONTROL_PARAMETERS = T_SSFCTRLOP
        IMPORTING
          JOB_OUTPUT_INFO    = T_SSFCRESCL
        TABLES
          G_T_PERNR          = G_T_PERNR.  "(Internal Table).
      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 'HR_EFI_SHOW_PDF_FORM'
        EXPORTING
          TOP_EDGE  = 10
          LEFT_EDGE = 15
        TABLES
          OTF_TABLE = T_SSFCRESCL-OTFDATA.

  • Archive Smartform

    Hi Gurus,
    Can anybody explain how can we archive smartforms using ArchiveLink? What parameters to pass in the structure ARCHIVE_INDEX, ARCHIVE_INDEX_TAB and ARCHIVE_PARAMETERS..
    Thanks in advance.
    Best Regards,
    Bushra.

    hi,
    http://help.sap.com/saphelp_47x200/helpdata/en/2e/9396345788c131e10000009b38f83b/frameset.htm
       go through the above link.. u can find the exact  procedure on how to do archiving..
         I have archived purchase order data using this link only...

  • Archive Smartform copies

    Hi,
    Does any one know how to archive smartform copies
    and he field tdarccop .
    When I set it it to X and pass an invoice with copies to the smartform i
    get an OTF // error.

    Hi,
    Please let me know the step by step process to archive the smartform.Can we Archive the smartform to Unix Server ?
    My Requirement is to convert the smartform in to PDF format and write it to unix server.But i am facing some problem as i am getting soem conversion problems.
    Thanking you.
    Prathima.

  • Archive Smartform from BSP

    Hello
    In our scenario we are entering data into a BSP and want to call a smartform and archive the smartform output as PDF on the click of a button. The displaying of the PDF file in the browser works fine. What I cannot get working is for the smartform to automatically archive the output using archive_index and archive_parameters. In ABAP this works fine but I cannot find why the same call in the BSP displays the form but does not archive the displayed data.
    Does anybody have any ideas?
    Thanks
    Harry

    Hello Prabu
    Thanks for your answer. I thought in my question I clearly stated that converting the OTF and displaying the PDF was not the problem. Sorry if it was not clear enough.
    In any case I have found a solution to the problem myself. After receiving the OTF data I copy it into an identical structure of the same type and use one to archive with FM CONVERT_OTF_AND_ARCHIVE and the other is used to display the PDF file in the browser. Surely not "state of the art" but it solves my problem.
    Thanks to all
    Harry

  • Archive Smartform printout into SAP database

    Dear All,
    I am printing a smartform through Z-Program.
    I need to archive this printout.
    Please suggest me the solution.

    Hello,
    Please be noted that archiving documents other than ABAP lists has been
    deactivated through SAP note 725723.
    So, OTF objects should be archived directly from the application.
    The suggestion was that when the application calls the Smartforms
    function module, it asks to prepare the OTF data and give it back to
    the application.
    If you set parameter CONTROL_PARAMETERS-GETOTF = 'X', then OTF data will
    be returned to application and no printing/ archiving will be performed.
    The application can manipulate the returned data. for instance convert
    it to PDF and send as email (usual practice).
    The application can also accumulate the OTF data received from different
    Smartforms and then call the archiving procedure. e.g.
       perform otf_archive in program SAPLSTXBC tables otfdata
                                              using  arc_params
                                                     arc_index.
    It was also suggested that some modifcations to the OTF data before
    appending it to a common table otfdata.
    For instance, if you want to put 3 Smartforms into one archive, the
    nntermediate OTF data returned will be OTF1, OTF2, OTF3. For OTF1
    last line ('//'), for OTF2 you need to delete the first and last line,
    for OTF3 you need to delete the first line only.
    Then you can append them into the one OTFDATA table and do the call
    above to otf_archive.
    Or you can also use the Storage Mode Print and Archive instead of Print Only when print.
    Regards,
    David

  • Archive Smartform Copies - Error - OTF end command // missing in OTF data

    Hi All,
    We are printng invoices and archiving them at the same time.
    When I try to print and archive just the original invoice it works fine
    That is , it prints and archives.
    However when I set the flag SSFCOMPOP-TDARCCOP to 'X'  (Archive Copies as well),
    I get the error OTF end command // missing in OTF data.
    Im guessing that the system tries to archive multiple copies and the End of File Command // at the end of each copy is causing the issue. But I dont know how to go about solving it.
    Regards,
    Nehal.

    Implemented SAP Note 1123505 - OTF-PDF conversion. Archiving several copies

  • Archiving invoice using smartform

    Hi All
    I am trying to archive invoices using smartform.
    In the program I am directly calling the smartform by passing the archiving parameters to the function module of smartform which is determined using CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'.
    I am passing the parameter to the  archive_index and  archive_parameters in CALL FUNCTION lf_fm_name.
    If from the same program I am calling driver program of sap script then the document is getting archived.
    Is there any problem with archiving using smartform.
    Please guide.

    Hello,
    Check this link
    http://sap.ittoolbox.com/groups/technical-functional/sap-abap/archiving-smartforms-in-sap-2653513

  • SMARTFORM Archive

    Hi,
    I need your help to solve a issue with archiving smartform's output.
    (step 1)First i kept TDARMOD = 1, and then called function moudule fm_name to print delivery output.
    If it is successfully printed, then i will have to archive that output.
    (step 2) So now i kept TDARMOD = 2 , and called same function moudule to archive.
    The problem is, output is printed in both cases as i dont want to print in step 2. So only first time (step 1)it has to print.
    Any sugestions would be appreciated.

    hi
    Check below link
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0391493111d182b70000e829fbfe/content.htm
    regards
    vinod

  • How to retrive the archived (in PDF) smartform as a email attachment.

    Hi ,
    I have a requirement where the smartform is archived in PDF mode and I have to retrieve the archived smartfrom and send the mail with PDf attachment.
    I referred the sdn forum for the same and I could some posts posted earlier and quite a few are solved. I implemented the sample code provided by some of the posts and I still get the same error when I try to open the mail/attachment in SOST transaction. But I didnt understand what exactly they did to get away with the error when we try to open the attachment.
    Please help me with the correct code to get this issue solved.
    Thanks a lot in advance.
    Regards,
    Naresh

    Hi Sim,
    The Error says:
    "Adobe reader could not open 'InvoiceDetails_20110228094610.709_X.pdf' because it is either not a supported file or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decorded).
    Below is the sample code that I got from one of the forum postings. I implemented the same and got the same error that the earlier posting was referring. From that step, I didnt know what to do further.
    *// Internal Table Declarations
    DATA : li_toa01 TYPE TABLE OF toa01,
           li_archivobject TYPE TABLE OF docs,
           li_binarchivobject TYPE TABLE OF tbl1024,
           li_objcont TYPE TABLE OF soli,
           li_receivers TYPE TABLE OF soos1.
    *// Work Area Declarations
    DATA : lwa_toa01 TYPE toa01,
           lwa_objcont TYPE soli,
           lwa_receivers TYPE soos1,
           lwa_archivobject TYPE docs,
           lwa_binarchivobject TYPE tbl1024.
    *// Variable Declaration
    DATA : lv_length   TYPE num12,
           lv_binlength TYPE num12,
           lv_buffer TYPE xstring,
           lv_x TYPE i.
    DATA : wa_objbin TYPE solisti1,
           i_objbin TYPE TABLE OF solisti1,
           wa_objtxt TYPE solisti1,
           i_objtxt TYPE TABLE OF solisti1.
    DATA : wa_doc_chng TYPE sodocchgi1,
           w_l1 TYPE i.
    DATA : wa_objpack TYPE sopcklsti1,
           i_objpack TYPE TABLE OF sopcklsti1.
    DATA : wa_reclist TYPE somlreci1,
           i_reclist TYPE TABLE OF somlreci1.
    CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'
              EXPORTING
                archiv_id                      = 'ZF'
                document_type                  = 'PDF'
                archiv_doc_id                  = 'DF88D06227DFAEF1A31D0050568361B1'
    *           ALL_COMPONENTS                 =
    *           SIGNATURE                      = 'X'
    *           COMPID                         = 'data'
              IMPORTING
                length                         = lv_length
                binlength                      = lv_binlength
              TABLES
                archivobject                   = li_archivobject
                binarchivobject                = li_binarchivobject
    *         EXCEPTIONS
    *           ERROR_ARCHIV                   = 1
    *           ERROR_COMMUNICATIONTABLE       = 2
    *           ERROR_KERNEL                   = 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.
    LOOP AT li_binarchivobject INTO lwa_binarchivobject.
      CONCATENATE lv_buffer lwa_binarchivobject-line INTO lv_buffer
      IN BYTE MODE.
    ENDLOOP.
    lv_x = 0.
    DO.
      wa_objbin-line = lv_buffer+lv_x.
      APPEND wa_objbin TO i_objbin.
      lv_x = lv_x + 255.
      IF lv_x GT lv_binlength.
        EXIT.
      ENDIF.
    ENDDO.
    wa_objtxt = 'Test Mail'.
    APPEND wa_objtxt TO i_objtxt.
    CLEAR wa_doc_chng.
    wa_doc_chng-obj_name = 'Invoice Details'.
    wa_doc_chng-obj_descr = 'Invoice Details'.
    DESCRIBE TABLE i_objtxt LINES w_l1.
    READ TABLE i_objtxt INTO wa_objtxt INDEX w_l1.
    wa_doc_chng-doc_size = ( w_l1 - 1 ) * 255 + strlen( wa_objtxt ).
    CLEAR wa_objpack-transf_bin.
    wa_objpack-head_start = 1.
    wa_objpack-head_num = 0.
    wa_objpack-body_start = 1.
    wa_objpack-body_num = w_l1.
    wa_objpack-doc_type = 'PDF'.
    APPEND wa_objpack TO i_objpack.
    CLEAR wa_objpack.
    wa_objpack-transf_bin = 'X'.
    wa_objpack-head_start = 1.
    wa_objpack-head_num = 1.
    wa_objpack-doc_type = 'DAT'.
    wa_objpack-body_num = w_l1 .
    wa_objpack-doc_size = w_l1 * lv_binlength .
    wa_objpack-obj_name = 'TEST'.
    wa_objpack-obj_descr = 'Naresh'.
    APPEND wa_objpack TO i_objpack.
    wa_reclist-receiver =   -->emailaddress given.
    wa_reclist-rec_type = 'U'.
    APPEND wa_reclist TO i_reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data = wa_doc_chng
      put_in_outbox = 'X'
      commit_work = 'X'
    * IMPORTING
    * SENT_TO_ALL =
    * NEW_OBJECT_ID =
    TABLES
      packing_list = i_objpack
    * OBJECT_HEADER =
      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.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to store smartform in the table TOA03 so that it can be archived later.

    Hi Friends,
    i have a very urgent requirement i.e to store the complete smartform in the link table TOA03 so that it can be archived later i.e it can be printed later. At present what i am doing is i am passing the parameters ARC_PARAMS and ARCHIVE_INDEX to the smartform function module, but i could not understand why it is not getting stored. Please suggest immediatly.

    Hi Satyesh,
    have a look at this thread... will it solve your problem?
    Smartform saving
    Regards,
    Naveen

  • Problem while archiving a smartform

    Dear All,
        We have implemented records management and in GMGRANT tcode, we created button and which would create a smartform when we press that. Based on the Archive link settings from OAAD tcode, when ever we try to archive that smartform, it would trigger event 'ASSIGNED', we did type linkage for this even and assign a custom function module. There we designed to add this smartform as an element to Grant record. Its working perfectly in Production till yesterday. Suddently, its not working now, and when I checked the event trace, this event is not getting triggered. Would you let me know the possible reasons for this??
    Thanks and regards,
    Chandra.

    Dear All,
        We have implemented records management and in GMGRANT tcode, we created button and which would create a smartform when we press that. Based on the Archive link settings from OAAD tcode, when ever we try to archive that smartform, it would trigger event 'ASSIGNED', we did type linkage for this even and assign a custom function module. There we designed to add this smartform as an element to Grant record. Its working perfectly in Production till yesterday. Suddently, its not working now, and when I checked the event trace, this event is not getting triggered. Would you let me know the possible reasons for this??
    Thanks and regards,
    Chandra.

  • Smartform archiving

    I have a problem archiving the output from a smartform. Within the printing program, the function that calls the smartform needs to be called 3 times. The reasoning behind this is related to grouping information on different sheets.  Every time the smartform is called, the following parameters are passed:
    (first call)
    control_parameters-no_open=' '
    control_parameters-no_close='X'
    (second call)
    control_parameters-no_open='X'
    control_parameters-no_close='X'
    (third call)
    control_parameters-no_open='X'
    control_parameters-no_close=' '
    This is all needed for the way in which we show the data. The rest is done as usual. In every call to the smartform, I pass the  parameters:
    archive_index
    archive_parameters
    Note that before passing the above parameters, I set the following, in order to request archiving:
    output_options-tdarmod = nast-tdarmod.
    In conclusion, when I call the smartform once, the archiving works well. However,  when I call it more than once, no archiving takes place.  An interesting point to note is that from transaction vf02  (Change Billing Document)  the above behaviour occur (no archiving). However, if I use transaction vf31 (output from billing) I am able to archive all three calls to the smartform. Any ideas? Thanks.
    Alvaro

    Peter,
    Thanks for your message. The problem regarding from where the output was triggered was fixed.  I have another question though. We need to make several calls to the smartform function. As of now, it creates an archive for every call to the function. We would like to have it create only one archive, independently of the number of function calls.  Thanks again.
    Regards,
    Alvaro

  • Archiving a smartform

    Hi,
    I try to archive the smartform ZSSFFAKT01 by passing the following parameters to FM. When I have a look at Transaction OMA1 I get an error in the outgoing documents section saying: Content-Repository does not exist.
    Any ideas, what's going wrong here?
    Peter
    REPORT  ZZSF.
    * Standard Tabelle der Formular-Zeilen
    TYPES: BEGIN OF ZJ01_TY_ZL1,
             LFDNR    LIKE ZJFRZ-LFDNR,
             SEITE    LIKE SY-DATAR,
             DRUCK    LIKE ZJFRZ-DRUCK,
             STUFE    LIKE ZJFRZ-STUFE,
             ZEILE    LIKE ZJFRZT-ZEILE,
           END OF ZJ01_TY_ZL1.
    TYPES: ZJ01_TY_ZL TYPE STANDARD TABLE OF ZJ01_TY_ZL1 WITH KEY LFDNR.
      DATA: l_form   TYPE tdsfname,
            l_head   LIKE zjrg_struc,
            g_arch_params TYPE arc_params,
            g_control_parameters TYPE ssfctrlop,
            g_output_options TYPE ssfcompop,
            lt_zl    TYPE zj01_ty_zl,
            l_out_params TYPE pri_params.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname                 = 'ZJSFFAKT01'
    *       VARIANT                  = ' '
    *       DIRECT_CALL              = ' '
          IMPORTING
            fm_name                  = l_form
    *     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.
    g_arch_params-sap_object = 'DRAW'.
    g_arch_params-ar_object = 'ZJ'.
    g_arch_params-archiv_id = 'T1'.
    g_arch_params-doc_type = 'OTF'.
    g_arch_params-info = 'XXX'.
    g_arch_params-printer = 'ARCH'.
    g_arch_params-protokoll = 'IX_OLEU1'.
    g_arch_params-version = '0045'.
    g_output_options-tdarmod = '2'.
    g_arch_params-arctext = 'Test Zaske'.
    l_head-titey = '98786'.
    l_head-prjnr = '99.0000.9'.
            CALL FUNCTION l_form
          EXPORTING
            archive_parameters = g_arch_params
            control_parameters = g_control_parameters
            output_options     = g_output_options
            user_settings      = ' '
            head               = l_head
          TABLES
            body               = lt_zl.
        COMMIT WORK.
    *    ENDDO.

    Peter,
    Thanks for your message. The problem regarding from where the output was triggered was fixed.  I have another question though. We need to make several calls to the smartform function. As of now, it creates an archive for every call to the function. We would like to have it create only one archive, independently of the number of function calls.  Thanks again.
    Regards,
    Alvaro

  • Smartforms creating a single spool but getting multiple archives

    My print program is calling a Smartform multiple times and is using the CONTROL_PARAMETERS NO_OPEN and NO_CLOSE  to successfully get a single spool entry.  My problem is that I am getting an archive document every time I call the Smartform.  I have also adjusted the TDNEWID from 'X' to space, but with no success.
    Are there certain settings in ARCHIVE_INDEX and/or ARCHIVE_PARAMETERS which ensure that all pages of my Smartform are combined into a single archive document just like they get combined in the spool?  Is there some other way to do this?  Help!

    As it turned out, Pritha's suggestion was a good one.  I finally got it to work.  Here are more details.
    I allow the print program to call the Smartform many times for each page, and using the NO_OPEN and NO_CLOSE as needed so that all pages for each document are combined into the document.  In my case, I get one huge output spool which contains all the documents.
    I save all the data passed to each Smartform call into an internal table.
    Once the printing phase is done, I perform another phase to create the archives as follows.
    Loop thru the internal table and re-adjust the NO_OPEN and NO_CLOSE to indicate which pages I want to be combined into each archive document.  In my case, I want all the pages for each document combined into an archive (one archive per document).  Loop yet again thru the internal table and call the Smartform for each entry in the table.  Be sure the GETOTF flag is set to "X".  This is very important.  The form will not be printed this time, however the OTF data for the form will get returned to the print program in the SSFCRESC1-OTFDATA structure.
    Everytime I encounter a NO_CLOSE value of Space in my loop, I perform OTF_ARCHIVE in program SAPLSTXBC to create an archive document from the OTF data in the structure.
    In this way, I can create archives that contain whatever amount of documents that I want.

Maybe you are looking for

  • Setting up WRT 45G with an in office network. .

    Internet modem is in network room a floor below.  I want to set up access to wireles for my floor.  My computer access to internet is via wall line.  How do I set this up so I can have the router on my flor.

  • CO-PA postings

    Hi Experts! I have an exisgting  interface for posting Incoming Invoice.  I get the data from Legacy through XI interface. Legacy side i have File adapter and R/3 side ABAP Proxies. This interface uses BAPI_INCOMINGINVOICE_CREATE function call. But,

  • Daisy Chain Firewire Drives

    I have a FW 800 drive connected to my Mac Mini. I am trying to daisy chain a FW 400 drive to the FW 800 drive but the 400 drive won't mount. I have a cable that allows me to plug the FW400 directly into the FW 800 port on the computer and it mounts f

  • Using TimeMachine with one Mac and two HDD

    Hi I was wondering if the following can be done with out loosing data and with out confusing TimeMachine: Using one mac and with time machine going back and forth between 2 external HDD ? in order to have 2 TimeMachine HDD (one at home and one on the

  • EJBGen 1.21 released

    EJBGen is an EJB 2.0 code generator based on Javadoc. This new version has a bunch of enhancements, all documented at http://beust.com/cedric/ejbgen In a nutshell: 1.21 - Changed @cmr-field syntax: no arguments needed - Added bands example - Bug: bad