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

Similar Messages

  • Smartforms - archive exemple

    Hi expert,
    I want to archive a form ( by smartform ). I know that I need to pass some parameters like that:
      CALL FUNCTION wk_fb
        EXPORTING
          control_parameters = control_parameters
          output_options     = output_options
          user_settings      = 'X'
          archive_index      = archive_index
          archive_index_tab  = archive_index_tab
          archive_parameters = archive_parameters
        IMPORTING
          job_output_info    = job_output_info
          job_output_option  = wa_ssfcresop
        TABLES
          it_tab             = it_tab
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
    Do you have some exemple to fill the following parameters ?
          archive_index      = archive_index
          archive_index_tab  = archive_index_tab
          archive_parameters = archive_parameters
    I don't Know how need to fill it !!
    Tks a lot.

    this document will help you
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0b6bc290-0201-0010-5b87-a0e7c7eb55d0
    XML is a general language where u can define ur own tags and own document structure,
    XSF is an XML based language.
    where the structure is defined according to smartform structure, with tags customised to suit smartform structure.
    In case of multiple forms within one spool job, the following XSF
    output is appended to the last one. This means that several XML tags can occur within one XSF
    stream, which is the only variation from the XML standard.
    -Quote from above mentioned document
    кu03B1ятu03B9к

  • Smartforms - archive

    Hi expert,
    when I print some form (created by smartforms), in the popup with some print information, there's the possibilyte to chose also to archive the document ....
    How it's run ? I tried by i return a error message : "archiving impossible", some idea ???
    tks,
    bye.

    by passing archive parameters in call smartforms.

  • 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

  • Smartform Arhiving

    <b>
    hi friends,
                can any one tell me in detail about the smartform Archiving.
                Plz send any kind of link if possible, thank you.</b>

    Check the below links :
    http://searchsap.techtarget.com/whitepaperPage/0,293857,sid21_gci895212,00.html
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0391493111d182b70000e829fbfe/content.htm
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    Thanks
    Seshu

  • REGARDING SMART FORM....

    HI ALL,
      I have generated one smartform. It was successfully executed but the thing is we need to activate the ARCHIVE BUTTON AFTER GETTING output. How we have activate this Archive button.
    please make it urgent.....
    Regards,
    Vamshi

    Refer the links -
    How To Archive a Smartform
    Activating the 'Archive' and 'print and archive' button in a SmartForm
    archive and print and archive buttons not active
    Regards,
    Amit
    Reward all helpful replies.

  • 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

  • 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

  • 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.

  • 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.

  • 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.

  • 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

  • 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

  • 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...

Maybe you are looking for

  • Error #1009 in my Platform Game! Please Help!!!

    In my basic platform game I have a "hero" that can walk and jump on the "ground." There is also a door to the next scene, which is the next level.The first scene works fine, but "TypeError: Error #1006: value is not a function. at Charles3_fla::MainT

  • HP Laserjet USB Connection Does Not Work with Gigabit Airport Extreme

    I have set up my Airport Extreme Gigabit edition. It works well for wireless internet. BUT, I connected my HP Laserjet 1300 via a working USB cable, and it doesn't print properly at all. This Laserjet uses the HP Universal Drivers in Vista, which sho

  • Need help setting up TC network

    I am a newb to home network setup and have a few questions regarding best setup for my home. I recognize that many of the individual components of my goal have been discussed, but I really need some advice on where to start... My hardware includes: 2

  • Can I swap my upgrade?

    I have a Verizon account that I've had for about 6-7 years. I have two lines on my account - One that is a Tablet (Samsung Galaxy) that is a 2GB/mo data plan (no voice), and the other is an iPhone 4S that has unlimited data and 450 minutes/month. I w

  • Flash CS5.5 .ipa and some older iOS devices.

    Correct me if I'm wrong, but it seems that apps created with Flash CS5.5 will not install on some iOS devices, including iPod Touch 2nd generation.   For example, I see the error message stating that the app was not installed "because it is not compa