Printing Smartform for a series of data

hello People,
i am stuck up in a situation which sums up like this
i am having a range of check numbers for which the details of checks have to be printed.
the req is all the check between the range has to be printed in that many pages and printer should be assigned once only
that is for 10 checks smartform should have 10 pages.
the code i have designed is mentioned below
it is working fine in terms of execution, the only problem is that
only the last check in the range is showing in the preview.
all other are bieng overwritten.
in the debugger i can see the values for all checks being assigned.
<u><i><b>the thing is i want the first time the loop execute it should print check in first page
the next time the loop executes it should print check in second page
and so on till the tenth.</b></i>.</u>
<b>few points i wud lik to mention :
its not the standard check format, so dont think in dat direction,
the whole content including the main and secondary window is changing not just the table in main window</b>
please help
here is the code i devised
upper = upper.
lower = lower.
itab = itab.
  select chect
    from payr
    into table itab
   where HBKID EQ BANK
     AND CHECT between lower and upper.
break-point.
DATA: l_char18  TYPE char18,
      l_p       TYPE p DECIMALS 2.
loop at itab into wa_itab.
SELECT SINGLE zbukr
       hbkid
       hktid
       rzawe
       chect
       lifnr
       kunnr
       ubhkt
       vblnr
       zaldt
       waers
       rwbtr
       pridt
       zanre
       znme1
  FROM payr
  INTO wa_payr
WHERE chect EQ wa_itab-chect
   and hbkid eq bank.
IF sy-subrc EQ 0.
  SELECT SINGLE lifnr
         adrnr
    FROM lfa1
    INTO wa_lfa1
   WHERE lifnr EQ wa_payr-lifnr.
  SELECT SINGLE addrnumber
                date_from
                nation
                name1
                name2
                name4
                city1
                post_code1
                po_box_loc
                street
                tel_number
                region
           FROM adrc
           INTO wa_adrc
          WHERE addrnumber EQ wa_lfa1-adrnr.
  SELECT bukrs
         belnr
         gjahr
         buzei
         augbl
         shkzg
         mwskz
         dmbtr
         qbshb
    FROM bseg
    INTO TABLE it_bseg
   WHERE augbl EQ wa_payr-vblnr
     AND shkzg = 'H'.
  IF sy-subrc EQ 0.
    SELECT bukrs
           belnr
           gjahr
           xblnr
      FROM bkpf
      INTO TABLE it_bkpf
      FOR ALL ENTRIES IN it_bseg
     WHERE belnr = it_bseg-belnr.
    LOOP AT it_bseg INTO wa_bseg.
      READ TABLE it_bkpf INTO wa_bkpf
      WITH KEY  belnr = wa_bseg-belnr.
      wa_disp-billno = wa_bkpf-xblnr.
     wa_disp-amount = wa_bseg-dmbtr.
      l_char18 = wa_bseg-dmbtr.
      SHIFT l_char18 LEFT DELETING LEADING space.
      wa_disp-amount = l_char18.
      l_p = wa_disp-amount.
      CLEAR wa_disp-amount.
      wa_disp-amount = l_p.
      CLEAR l_p.
      SHIFT wa_disp-amount LEFT DELETING LEADING space.
     wa_disp-tdsamt = wa_bseg-qbshb.
      l_char18 = wa_bseg-qbshb.
      SHIFT l_char18 LEFT DELETING LEADING space.
      wa_disp-tdsamt = l_char18.
      l_p = wa_disp-tdsamt.
      CLEAR wa_disp-tdsamt.
      wa_disp-tdsamt = l_p.
      CLEAR l_p.
      SHIFT wa_disp-tdsamt LEFT DELETING LEADING space.
      APPEND wa_disp TO it_disp.
      CLEAR wa_disp.
    ENDLOOP.
  ENDIF.
ELSE.
  MESSAGE 'Entered Cheque No is Incorrect' TYPE 'E' RAISING exc1.
ENDIF.
endloop.
help people
thanks & regards
Nitin

hi Nitin
just give a try with this .
create one loop and for that give your int_tab which holds the records of all the checks say 10 checks.
also create one program lines wherein you l set the flag to 1 whenever the itab count increases if not then set the flag  to 0.
now inside the main window create one command node and check the go to new page checkbox and give your second(or next page) name , and in the conditions tab keep the flag = 1.
the extra work you need to do is you have to create one next page with all the same windows which will triggers for evry new line item.
hope it may be helpful to you.
plz reward points if helpful
Regards
Zarina

Similar Messages

  • Printing smartform for multiple customers

    Hi Experts,
    can anybody send me the code for printing the smartform for multiple customers, i need print the customer data by pagewise means in selection screes if user enter multiple customers ,i need to print by each customer, if customer 1 is different from customer 2 need to start in new page .
    pls guide........
    thanks in advance.

    Hi,
    You can handle it in your form by checking the customer.
    Write code in your main window there you check the present customer with previous one. if not equal then trigger the next page
    Regards
    SHiva

  • Print smartforms for service order with printer, not a spool in CRM WebUI

    Dear Experts!
    We have a long list of different print forms for a service order. We would love to have a list of these forms appearing when clicking on "Print" button to choose from.
    We have made appropriate settings in SPRO (CRM -> Basic Functions -> Actions -> Actions in Transaction -> Change Actions and Conditions -> Define Action Profiles and Actions & Define Conditions). Option "Print Immediately" is set, and the Output Device is set to local printer. So now we have the following results:
    - When clicking "Print Preview", a window appears where one of the possible forms may be selected to be shown as PDF.
    - When clicking "Print", one of the forms is being moved to spool. So, you may only enter the spool in GUI and send the document to printer.
    There is only one help topic about printing, that says:
    Prerequisites
    Actions are displayed on the Print pushbutton if the following criteria are met:
    -The print action is set as relevant for the toolbar
    - A print smart form is defined as the processing type
    - The action is set to Execute immediately
    - The action is inactive, that is, it is set to be executed manually
    Please, give us a hint on how to make customizing to send document right to the printer.

    Hi Alex,
    This Business Add-In (PRINTER_DETERM_PPF) is used in the Actions (CRM-BF-ACI) component. It enables you to determine a printer more flexibly than the standard Customizing activity allows you to. For example, if you want to print an e-mail confirmation from a local printer in your office, and not from the usual printer for your entire department, you can use this add-in to do so.
    Get back to me for a more info.
    Hope this helps.
    Cheers, Satish

  • Printing SMARTFORMS

    Hello Experts,
    I am developing new SMARTFROM.
    Requirement: On entering the Personnel number(s) on the selection it should print SMARTFORM. for one entry there are two page. so for 2 entries it should show 4 pages. It should work like mass printing.
    Error: currently it is working for single entry. but when i entered multiple enteries on selection-screen in print-preview i can see only 2 pages for first. for viewing second entry i need to comback to Printer specification page.
    how do i achieve if i enter 2 entries on selection-screen in print preview it should show 4 pages.
    ie. for 1st entry two page and for 2nd entry last two page.
    Regards
    Saurabh

    check the following code, the control parameters need to be changed accordingly.
    LOOP AT it_acct.
        AT NEW kunnr.
          READ TABLE it_acct INDEX sy-tabix.
          READ TABLE it_kna1 WITH KEY kunnr = it_acct-kunnr.
          READ TABLE  it_adrc WITH KEY addrnumber = it_kna1-adrnr.
          IF sy-subrc = 0.
            wa_adrc = it_adrc.
            READ TABLE it_landx WITH KEY land1 = it_adrc-country.
            IF sy-subrc = 0.
              l_landx = it_landx-landx.
            ENDIF.
          ENDIF.
          CALL FUNCTION 'ZSDG_COMPANY_ADDRESS'
            EXPORTING
              i_bukrs     = it_acct-bukrs
            IMPORTING
              o_comp_addr = g_comp.
          REFRESH it_acct1.
          IF g_over = 'X'.
            r_duedt-sign = 'I'.
            r_duedt-option = 'LE'.
            r_duedt-low = date.
            APPEND r_duedt.
          ENDIF.
          LOOP AT it_acct WHERE kunnr = it_acct-kunnr AND duedt IN r_duedt.
            MOVE-CORRESPONDING it_acct TO it_acct1 .
            APPEND it_acct1.
            CLEAR: it_acct,it_acct1.
          ENDLOOP.
          c_nofopr = c_nofopr + 1.
    *        t_control_parameters-DEVICE = 'LP01'.
          t_control_parameters-no_dialog = 'X'.
          t_control_parameters-preview = 'X'.
          IF c_nop <> 1.
            CASE c_nofopr.
              WHEN 1.
                t_control_parameters-no_open = ' '.
                t_control_parameters-no_close = 'X'.
              WHEN c_nop.
                t_control_parameters-no_open = 'X'.
                t_control_parameters-no_close = ' '.
              WHEN OTHERS.
                t_control_parameters-no_open = 'X'.
                t_control_parameters-no_close = 'X'.
            ENDCASE.
          ENDIF.
          IF doct = 'X'.
            doc = 'X'.
          ELSE.
            doc = 'Y'.
          ENDIF.
          CALL FUNCTION lf_fm_name
            EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
         control_parameters         = t_control_parameters
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
              g_comp                     = g_comp
              wa_adrc                    = wa_adrc
              landx                      = l_landx
              p_seldate                  = date
              waers                      = waers
              doc                        = doc
              intrvl1 = intrvl1
              intrvl2 = intrvl2
              intrvl3 = intrvl3
              intrvl4 = intrvl4
              g_over = g_over
             TABLES
              it_acct                    = it_acct1
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    * 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.
        ENDAT.
      ENDLOOP.

  • How to avoid the repeated Print window, for range printing in a smartform

    Hi
    I developed one smartform for the single/multiple Outbond deleviry.  When I execute the query with same range then print window opened and after click print button Document priented. But when I try to execute the query with range suppose 0001 to 0003 then Print window opened and click the print the 0001 doc and again click print button for 0002 and so on.
    I would like to , how we take a print on single click print button.
    pls help me it's urget.
    Thanks in advance
    Tapovardhan

    Thanks Ravi
    But after adding code this error comes.
    Field "PRINT_PARAMS-NO_DIALOG" is unknown. It is neither in one of the
    specified tables nor defined by a "DATA" statement. "DATA" statement.
    For define the PRINT_PARAMS what would be the type.
    Our code is given below.
    REPORT  ZTESTPCLDI.
    tables :  likp.
    select-options : s_vbeln for likp-vbeln.
    data : itab_likp type standard table of likp with header line.
    DATA : FORM_NAME TYPE RS38L_FNAM.
    data : print_params type SSFCTRLOP.
    start-of-selection.
    select  * from likp into table itab_likp
    where vbeln in s_vbeln.
    end-of-selection.
    loop at itab_likp.
    if sy-tabix <> 1.
    print_params-no_dialog = space.
    else.
    print_params-no_dialog = 'X'.
    endif.
    CALL FUNCTION '/1BCDWB/SF00000045'
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        wa_likp                    = itab_likp
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5.
       NEw-PAGE.
       endloop.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    regards,

  • Contents of a custom print program for a custom smartform

    Hi...
    Can you please tell me if we are writing a custom print program from scratch for a custom smartform for which there is no standard form available what are all the things that need to be coded in the print program..
    My doubts on this are if we are configuring this form for output types of PO purchase order for mediums 1,2, 5 and 6 does any extra coding need to be done in the print program that is related to these mediums or is it just a configuration issue..
    Apart from data retrieval part and call the function modules to send the data to smartforms what are the other things that we need to code in a custom smartform..  Anything that we need to code related to printing issues..
    It would be great if someone can post a custom print program for any output type valid for mediums 1, 2, 5 and 6.
    Also my last doubt is do we need to do anything in SE11 in designing a smartform and in what context do we need it...
    Thanks and appreciate your help... Surely will reward for all the helpful answers..
    Thanks again..
    Kanthi..

    Hi,
    yes you need to create your own print program. You need to catch printing information and to send data to your smartforms.
    To send data to your smartforms you need to use structure describe in the data dictionnary.
    This is a peace of code for sending information to a smartform that will be print used an external program (Esker)
      DATA: it_data       LIKE TABLE OF zssf_bl WITH HEADER LINE,
            w_formname TYPE tdsfname ,
            w_fm_name  TYPE rs38l_fnam ,
            is_output  TYPE ssfcompop ,
            is_control TYPE ssfctrlop ,
            is_job_out TYPE ssfcresop .
    *  Récupère le nom du module fonction.
      MOVE 'Z_BL_STT' TO w_formname.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = w_formname
        IMPORTING
          fm_name                  = w_fm_name
        EXCEPTIONS
          OTHERS                   = 3.
    * Prépare les paramètres d'impression.
      is_output-xsfcmode   = 'X'.
      is_output-xsf        = 'X'.
      is_output-xsfoutmode = 'S'.
      is_output-xsfoutdev  = 'DOCL'.
      is_output-xsfformat  = 'X'.
      is_output-tdnoprev   = 'X'.
      is_output-tdnoprint  = ' '.
      is_output-tddest     = 'DOCL'.
      is_output-tdprinter  = 'PLAIN'.
      is_output-tdnewid    = 'X'.
      is_output-tdimmed    = 'X'.
      is_output-tddelete   = 'X'.
      is_control-no_dialog = 'X'.
      is_control-preview   = ' '.
      is_control-no_open   = 'X'.
      is_control-no_close  = ' '.
    * Prepare le formulaire
      CALL FUNCTION 'SSF_OPEN'
        EXPORTING
          user_settings      = ' '
          output_options     = is_output
          control_parameters = is_control
        IMPORTING
          job_output_options = is_job_out
        EXCEPTIONS
          OTHERS             = 5.
    * Appels du formulaire.
      CALL FUNCTION w_fm_name
        EXPORTING
          control_parameters = is_control
          output_options     = is_output
          is_bl              = zbl_soustrait
        TABLES
          it_data            = it_data
        EXCEPTIONS
          OTHERS             = 5.
    You need to catch information from the NAST table maybe
    Rgd
    Frédéric

  • Steps involved to Configure a Smartform for printing TO Item

    Hi,
    I want to develop a Smartform to print TO for each Item.
    Currently it is being done using SAP Script.
    I checked the Configuration in OMLV and assigned my print program Z****** .
    This thing here is I don't see any values passed to my program like TO Number, Whse Number etc when called through LT31.
    Where as I assign the standard program RLVSDR40 and debug it all the details are being passed to this program.
    I am not sure if I am missing any configuration.
    Please help me to figure out the issue and let me know all the steps involved in configuring the Smartforms to print Transfer Orders.
    Thanks in Advance.
    MK.

    Hi Murali,
    The SAP delivers the solution to print the TO item by SAPScript, but we can do it by Smartform as well, as in
    You need to create a project for the enhancement MWMD0001, because EXIT_RLVSDR40_001 will fulfill your purpose of doing it the other ways i.e. via Smart from.
    For this you have to use CMOD transaction to create the project for the above said enhancement.
    Note: If you do this way any configuration done via OMNU wont't be considered.
    Then after in teh import parameters you have a table XRLDRI, which contains both the warehouse number and the transfer order number, the same can be passed on to the designed Smartform to fulfill your purpose.
    Sample Code, you can refer to:
    *local variable declaration.
       DATA: l_wa_fm_name            TYPE rs38l_fnam.
    * Local Field Symbols
       FIELD-SYMBOLS : <l_fs_rldri> TYPE rldri.
    * Local Constant declaration
       CONSTANTS : lc_fmname TYPE tdsfname   VALUE 'XYXYXYXY',  "Smartform name, here designated by 'XYXYXYXY'
                   lc_chk      TYPE rldrudruck VALUE 'X'.
    *Moving Transfer Order Print :Item level data into corresponding work area.
       LOOP AT xrldri ASSIGNING <l_fs_rldri>.
    * Determine smartform function module
         CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
             formname           = lc_fmname
           IMPORTING
             fm_name            = l_wa_fm_name
           EXCEPTIONS
             no_form            = 1
             no_function_module = 2
             OTHERS             = 3.
        IF sy-subrc = 0.
    * Call the function module of the smartform
           CALL FUNCTION l_wa_fm_name
             EXPORTING
               user_settings    = lc_chk
               tanum            = <l_fs_rldri>-tanum
               lgnum            = <l_fs_rldri>-lgnum
             EXCEPTIONS
               formatting_error = 1
               internal_error   = 2
               send_error       = 3
               user_canceled    = 4
               OTHERS           = 5.
           IF sy-subrc = 0.
           ENDIF.
         ENDIF.
       ENDLOOP."LOOP AT xrldri ASSIGNING <l_fs_rldri>. 
    Please validate the same at your end and let me know in case you require any further inputs from my end.
    BR/Thanks
    Pranav Agrawal

  • SmartForms Printing Error for Japanese Characters

    Hi,
    I have an issue with Printing Japanese Characters in the SmartForm. 
    When I Print Preview the smartform I can see the characters in Japanese but when I Print the actual smartform in the printer, all I get is some junk characters like # and !.
    I have the following setting in the smartform.
       Multi-Byte functionality enabled
       Character set used is Shift JIS
       Smartform created in language EN
       Translate to All Languages set to true
       No restriction on Language Control
       Smartstyles used has JPMINCHO fonts only
       Default Para is JPMINCHO
       Characters formatting has explicit JPMINCHO as font
       Login language is JA
       Printer is Local Printer with device type JPSAPWIN
    When I debug the Smartform function module, the OTF Data Table (within the function) shows characters in Japanese (with codepage 8000) but then I look at the actual spool as a result of processing the function, it comes up as garbled.
    Interestingly, I have exactly the same settings on another test smartform to print just 2 columns and it works well.
    Not sure where I am going wrong.
    Appreciate help on this issue.
    Many Thanks
    Krishnan

    hi,
    has anyone solved this problem? even i m facing the problem. me restating the problem as below:
    in VF02 transaction, for billing document we are trying to print smartform. Our logon languagae is EN and the Output Type langugae is EN. In spool, we are getting the CORRECT format ie the texts that are maintained in Japanese are showing as Japanese characters while the whole smartform is in English format.
    Our requirement is to PRINT (from printer) the texts that are maintained in Japanese should get printed in Japanese format. I know that this is problem with printer settings. The printer is printing perfectly fine as other documents in Japanese characters so its ensured that printer is enabled for Japanese.
    I suppose some kind of setting needs to be done at SAP end so that printer recognises double-byte character set of Japanese.
    Waiting for confirmation/ solution.
    Thanks
    Debs

  • Standard SMARTFORM  for Check Printing/ Payment Advice

    Hi All,
      I have one important question...
    Standard <b>Script</b> Check Print Program =  <b>RFFOUS_C</b>
    Standart Script Layout Name  = F110_PRENUM_CHCK
                                &  F110_D_AVIS
    We have to modify it as per client requirment.
        But I want to know the <b>Standard SMARTFORM & Standard Smartform driver Program for CHECH printing & payment advice ?????????????</b>
    Is there no Smartform for check printing or if exist then please guide me?????????????????

    hi umesh,
    1)anyone can help me,while extending idoc,i added one segment to idoc by extending debmas.that segment has two fields.while populating data to idoc,i am getting problem like VSV0001.exit is not allowing me to write the code.
    plz anyone can help me on this issue.if you did't understand this problem plz tell me how to extend the idoc.more concentration on while populating the data in to idoc.like which function module i have to use.in customer master idoc.debmas.i am new to this environment.plz help me.like complet work till completion of task.
    2)and my next assignment is in smartforms.plz let me know .i was created the screen.according to that screen.i have to make print program.plz tell me how to give the text elements.
    like we have given in scripts, page window and then F9 to give the text elements.and make the program.like that any one can tell me clearly.how to make the complete smartforms programs.
    plz this requirement is very very urgent,plz could you send it for my [email protected]
    advance thanks for your help.
    thansk&regards,
    radhiks.

  • Using standard PO Printing Program for Smartforms

    Hi Experts,
    I am some hiccups coding my print program for a PO Smartform that am currently working on.The requirement was to use the standard print program to trigger my Smartform PO. I have read alot of threads on this, but am still clueless.
    Some says to comment out the functions like "OPEN_FORM" ,"WRITE_FORM" and having your block of codes inside the "NEU_" routine.
    But I noticed, there are even some conditions and logic checking before the "write_form" is called and sometimes the table entries are also cleared. In this kind of situation, how should I be passing the table data to the Smartform function module?By copying the contents to an internal table? And there are many include programs which currently the standard program has, should I be using all that too?
    Appreciate your input and advice on this.
    Thanks very much.

    Hi Neesha,
    Can you check this once
    [Migrating Forms|http://help.sap.com/saphelp_nw04/helpdata/en/9d/9599386185c064e10000009b38f8cf/content.htm]
    Regards,
    Madhu.
    Edited by: madhurao123 on Dec 21, 2011 9:18 AM

  • Smartform print program for order confirmation

    Hi experts.
    I am looking for a smartform print program for order confirmation.
    The order confirmation in standard is a script with the name RVADOR01 and I tried to copy and change but I don't know which to eliminate and whcih to keep it.
    If any body written the program already please provide me or provide the link to check.
    Thanks in advance
    Sai

    this is the processing form.
    form processing.
      data: lf_fm_name            type rs38l_fnam.
      data: ls_control_param      type ssfctrlop.
      data: ls_composer_param     type ssfcompop.
      data: ls_recipient          type swotobjid.
      data: ls_sender             type swotobjid.
      data: lf_formname           type tdsfname.
      data: ls_addr_key           like addr_key.
      data: document_output_info type  ssfcrespd,
            job_output_info type ssfcrescl,
            job_output_options type ssfcresop.
      perform get_data.
      check retcode = 0.
      perform set_print_param using      addr_key
                                changing ls_control_param
                                         ls_composer_param
                                         ls_recipient
                                         ls_sender
                                         retcode.
    *Get the Smart Form name.
      if not tnapr-sform is initial.
        lf_formname = tnapr-sform.
      else.
        message e001(/smb40/ssfcomposer).
      endif.
    determine smartform function module for invoice
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname           = lf_formname
        importing
          fm_name            = lf_fm_name
        exceptions
          no_form            = 1
          no_function_module = 2
          others             = 3.
      if sy-subrc <> 0.
      error handling
        retcode = sy-subrc.
        if sy-subrc = 1.
          message e001(/smb40/ssfcomposer).
        endif.
        if sy-subrc = 2.
          message e002(/smb40/ssfcomposer) with lf_formname.
        endif.
        perform protocol_update.
      endif.
      call function lf_fm_name
        exporting
          archive_index        = toa_dara
          archive_parameters   = arc_params
          control_parameters   = ls_control_param
          mail_recipient       = ls_recipient
          mail_sender          = ls_sender
          output_options       = ls_composer_param
          user_settings        = ' '
          is_nast              = nast
          is_vbdka             = vbdka
          is_addres            = addr_key
        importing
          document_output_info = document_output_info
          job_output_info      = job_output_info
          job_output_options   = job_output_options
        tables
          it_vbdpa             = tvbdpa    "Item information
          it_vbdpau            = tvbdpau   "Subitem numbers
          it_vedpa             = tkomservp  "Contract Item Validity
          it_vedka             = tkomservh  "Contract Header Validity
          it_vedpn             = tkomservpn "Contract Item Cancellation Data
          it_vedkn             = tkomservhn "Contract Header Cancellation DA
        exceptions
          formatting_error     = 1
          internal_error       = 2
          send_error           = 3
          user_canceled        = 4
          others               = 5.
      if sy-subrc <> 0.
        retcode = sy-subrc.
        perform protocol_update.
    get SmartForm protocoll and store it in the NAST protocoll
        perform add_smfrm_prot.
      endif.
    endform.                    "processing

  • Printing Smartform with Table data from PrintProgram

    Hi,
      Can any one explain the steps involved in printing the Smartform with the data from the Print Program table. How to fit table in the Smartform i.e, while designing the Smartforms layout for the table.
    Thanks & Regards

    Hi,
       As  data is coming from the print program in the table. Do the following procedure
    1. In the form interface ---> Declare the internal table as same structure as in the print program. for ex: you r passing MARA table data then declare it as itab type table of mara.
    2. In the window you want to create the table, right click > create> table.
    3. Go to data tab give the internal table name and work area .
    4. Now go to General tab-->Details.
    5. Declare the line types.
    6. Right click on header/main area/footer -->create table line.
    7. Now give the line type which you want to use.
    8. In the displayed columns>right click> create text node.
    9. In the text node &mara-matnr&.
    Procedure to create line type:
    1. Double click on table
    2. Go to table tab --> details
    3. Give the table width (width you want to display on the screen should be less than or equal to the window width).
    4. Line type --> Divide this into no of column you want to have in header/item.
    Note: total length of all columns should be equal to the table width.
    5.save.
    Br,
    Laxmi

  • How to write print program for smartforms

    Hi all
    I need to develop new smartform and its print program.
    But Im not experience in writing print program for smartform.
    Ive gone through the simple print program sample that use only one table as input and one table for output.
    But my smartforms require few tables for input and output.
    How should I define the Data?
    Can anyone guide me on how to write it.
    Thanks & Regards
    az

    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    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
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    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.
    Reward points...

  • Smartform Printing Problem for double sided printing

    Hi Techies,
    I have created a smartform for invoice printing, using double side printing.
    The requirement is that in the front page, page number has to be printed and at the back side static text is to be printed. So if my line items exceed to two pages. Than in printing, it is getting priinted as "Page 1 of 4" for the 1st invoice items page and "Page 3 of 4" for the second items page. But the client is asking it to be printed as "Page 1 of 2" & "Page 2 of 2" respectively.
    Currently I am using Page&SFSY-PAGE& of &SFSY-FORMPAGES&.
    Can anyone guide me how to achieve this requirement.
    Thanks & Regards,
    Vinit.

    Hi vinit,
    better u declare your own variable . and check with sfsy , the footer window must be final window
    data : lv_page type sfsy-page,
             lv_tot_page type sfsy-page.
    if sfsy-formpages > 2.
    lv_tot_page = sfsy-page / 2.
    if sfsy-page >2
    lv_page = sfsy-page - 1.
    else.
    lv_page = sfsy-page.
    endif.
    else .
    lv_page = sfsy-page.
    lv_tot_page = sfsy-formpages.
    endif

  • Standard print program for fi invoice smartform printing

    Hi friend,
    Is there any standard print program available for printing FI related invoice .
    I want print program for printing smartforms.
    I want to know any method for searching the standard print program for printing smartform in Fi module.
    Thanks & Regards,
    Sathish

    Hi,
    FI related Forms will be configure in SPRO.
    Goto SPRO and FI related applivcation.
    There you will find the related forms and programs.

Maybe you are looking for

  • HT2513 My iCalendar wont open after a OS 10.8.2 update failed to install.

    I noticed there was an update for OS10.8.2 so I ran it. The computer needed a restart so I did it but aftwerwards it gave me an error message saying update failed. I restarted and it loaded the OX but the update didnt load and the iMac no longer show

  • Skype on Windows 8.1 running very slow

    Good day I have a problem here Since I have installed my Windows 8.1, integrated Skype works so slowly My video calls are worse than ever I usually get videos, both sending and receving at a medium fps of 10 My system requirements are more than enoug

  • How to find out how many times an album has been burned to cd

    how to find out how many times an album has been burned to cd

  • IDOCtoFile error...

    Hi, I have a  scenario where i am collecting two Idocs and also have included RFC... in the scenario. I have used fork to collect the IDocs ... and acc to some logic the IDocs have to be sent to the destination. Though i have defined interfave determ

  • Quick season pass question

    If I have already purchased half a season of a show and I would like the rest of the episodes...would I be able to purchase the season pass and it'll just charge me the difference of the season pass to what I already spent? Or would it charge me the