Price in smartforms

I have a smartform in vf03(bills), i need the price, and sometimes i have kg and boxes, i prefer to obtein it instead of calculate, but in the internal table of the conditions, i have the price but not the positions
of the item, is there any solution that i can use?
Thanks in advance.

Are you using copy of LB_BIL_INVOICE smartform ..?
You can get the price conditions at the item level as well if you have a look at structure LBBIL_IT_PRICE in the LB_BIL_INVOICE.
You dont need to calculate price manually using database tables. Everything is there in that smartform.

Similar Messages

  • Unit Price Calculation on Smartform

    Hi Friends,
       I am in a need to calculate and print unit price in Smartform, I am not supposed to make any changes in Driver Program. Here, the fields FKIMG(total quantity) and NETWR(Total amount) are selected from table VBRP and stored in an internal table itab. now this itab is passed to smartform tables interface. So my itab only have 2 fields FKIMG and NETWR.  I need to calculate Unit Price = NETWR / FKIMG.
    The out put required is like this,
      Total Qty       Unit Price      Amount
      20                 100                2000
      05                  300               1500
      08                  200               1600
    How to do this in smartform--- please help me.
    Regards,
    Ajoy

    Hi Ajoy..
    In case of SMARTFORMS we can add the Logic using PROGRAM LINES Node.
    Steps:
    1. Create a <b>variable</b> in the Global data Tab in Global Definitions of Smartform.
        Eg:  V_UNITPR TYPE VBRP-NETWR
    2. Create a <b>Program lines</b> node above the Text node where the Unit price has to be displayed.
        Input Parameters: VBRP-NETWR  and   VBRP-FKIMG
        Output Parameters: V_UNITPR.
        Code:
                     V_UNITPR = VBRP-NETWR  /   VBRP-FKIMG.
    3. Check the Program lines node and Display the Field V_UNITPR.
    <b>Reward if Helpful.</b>

  • Some text in my smartform is not aligned or one space below

    Hello Experts,
    I am currently modifying a smartform wherein some of the text is
    one space below its correct alignment. For example:
    Particulars      Quantity     Price
                       50         
    Enervon Prime                 1,000
    The 50 must be aligned with the particular and price. When I checked the
    form, it doesnt have anyspace and the variable is inserted immediately. No spaces
    or indentions whatsoever. Help would be greatly appreciated guys as this is very urgent.
    Thank you and take care!

    Hi Kishan,
    Thank you for your reply. What do you mean check the length of the
    variable? And Also, what about for others that instead of displaying
    one space below, it shows one space above? like:
                 5000
    Enervon                1,000
    The quantity 5000 must be in line with Enervon and 1,000. Thank you again!

  • Printing error in smartform

    Hii ,
    I designed a smartform for purchase order,if the form has 10 materials in it the taxes are also printing individually for each material...for example if 10 materials in that form has cess,bed,ecess ,the taxes are printing individually for each material.But the taxes should be printed single time for all materials.can anyone help me regrding this.
    Thanks & Regards,
    Venkat AKella.

    Hi venkat I think u want to display all the taxes for each material in line item  right???
    Do like this in Driver program....
    For each taxe amount u need to append the final table,,,Then it will show for each material all the taxes will come...let me know if u hav any queries
      LOOP AT it_ekpo INTO wa_ekpo.
    READ TABLE it_t685t INTO wa_t685t WITH KEY kschl = wa_konv-kschl
                                                             spras = 'E'
                                                             kvewe = 'A'
                                                             kappl = 'M'.
          IF  sy-subrc EQ 0.
           CONCATENATE wa_item-basic_pr wa_t685t-vtext INTO v_word SEPARATED BY '-'.
           CONCATENATE v_word '%' INTO v_word.
            MOVE 'BASIC PRICE' TO wa_item-mat_desc.
           MOVE v_word to wa_item-mat_desc.
          ENDIF.
          APPEND wa_item TO it_item.
          CLEAR wa_item.
        ENDIF.
        READ TABLE it_konv INTO wa_konv WITH KEY kposn = wa_ekpo-ebelp
                                                 kschl = 'D101'.
        IF sy-subrc EQ 0.
          MOVE  wa_konv-kbetr TO wa_item-basic_pr.
          CONDENSE wa_item-basic_pr NO-GAPS.
          MOVE   wa_konv-kwert TO wa_item-basic_pr_val.
          CONDENSE wa_item-basic_pr_val NO-GAPS.
          lv_var1 = lv_var1 + wa_item-basic_pr_val.
          READ TABLE it_t685t INTO wa_t685t WITH KEY kschl = wa_konv-kschl
                                                            spras = 'E'
                                                            kvewe = 'A'
                                                            kappl = 'M'.
          IF  sy-subrc EQ 0.
           CONCATENATE wa_item-basic_pr wa_t685t-vtext INTO v_word SEPARATED BY '-'.
             CONCATENATE v_word '%' INTO v_word.
           MOVE v_word to wa_item-mat_desc.
            MOVE 'BASIC PRICE' TO wa_item-mat_desc.
          ENDIF.
          APPEND wa_item TO it_item.
          CLEAR wa_item.
        ENDIF.
    endloop.

  • It's very urgent i need help in smartforms

    I need your help for smartforms. I created a smartforms in SD for getting quotations. My problem is that when I run da report it is not executing & if i run smartforms it is giving error in da functional module as - In program "/1BCDWB/SAPLSF00000003 ", the following syntax error occurred:
    "The data object "I_HEADER" does not have a component called "BNAME"."
    and more over i need a code for my my user tht when i execute this form before displaying print or printpreview i should give a popup window asking da user whether to display item code or not then i should get da print or printpreview. when the user needs item code he can print as well if he don't it should not display. this da code i return in se38 editor. In smartforms i wrote code for getting company address etc. I did not write anything in initialization.
    source code
    *& Application      :  Sales & Distribution (SD)
    *& Description      :  This report will Print Sales Order Confirmation Using Smartform
    *& Transaction Code :
    *& Area Menu Code   :  ZSD
    *& Layout           :  ZSDORDERCONF
    *& Dev.Complited On :
    REPORT  ZSDR0004.
    INCLUDE: ZSDI0003.
          S U B R O U T I N E S                                         *
    FORM ENTRY USING RETURN_CODE TYPE I
                     US_SCREEN TYPE C.
      CLEAR RETCODE.
      XSCREEN = US_SCREEN.
      PERFORM PROCESSING.
      IF RETCODE NE 0.
        RETURN_CODE = 1.
      ELSE.
        RETURN_CODE = 0.
      ENDIF.
    ENDFORM.                    "ENTRY
          FORM PROCESSING                                               *
    FORM PROCESSING.
      PERFORM GET_DATA.
      CHECK RETCODE = 0.
      PERFORM PRINT_DATA.
      CHECK RETCODE = 0.
    ENDFORM.                    "PROCESSING
          FORM CHECK_REPEAT                                             *
          A text is printed, if it is a repeat print for the document.  *
    FORM CHECK_REPEAT.
      CLEAR REPEAT.
      SELECT * INTO *NAST FROM NAST WHERE KAPPL = NAST-KAPPL
                                    AND   OBJKY = NAST-OBJKY
                                    AND   KSCHL = NAST-KSCHL
                                    AND   SPRAS = NAST-SPRAS
                                    AND   PARNR = NAST-PARNR
                                    AND   PARVW = NAST-PARVW
                                    AND   NACHA BETWEEN '1' AND '4'.
        CHECK *NAST-VSTAT = '1'.
        REPEAT = 'X'.
        EXIT.
      ENDSELECT.
    ENDFORM.                    "CHECK_REPEAT
          FORM GET_DATA                                                 *
          General provision of data for the form                        *
    FORM GET_DATA.
      DATA: US_VEDA_VBELN     LIKE VEDA-VBELN.
      DATA: US_VEDA_POSNR_LOW LIKE VEDA-VPOSN.
      DATA: DA_MESS LIKE VBFS OCCURS 0 WITH HEADER LINE.
      DATA: DA_SUBRC LIKE SY-SUBRC,
            DA_DRAGR LIKE TVAG-DRAGR.
      DATA: DA_GANF(1) TYPE C,      "Print flag for billing correction
            DA_LANF(1) TYPE C.      "Print flag for billing correction
      CALL FUNCTION 'RV_PRICE_PRINT_GET_MODE'
        IMPORTING
          E_PRINT_MODE = PRICE_PRINT_MODE.
      IF PRICE_PRINT_MODE EQ CHARA.
        CALL FUNCTION 'RV_PRICE_PRINT_REFRESH'
          TABLES
            TKOMV = TKOMV.
      ENDIF.
      CLEAR KOMK.
      CLEAR KOMP.
      VBCO3-MANDT = SY-MANDT.
      VBCO3-SPRAS = NAST-SPRAS.
      VBCO3-VBELN = NAST-OBJKY.
      VBCO3-KUNDE = NAST-PARNR.
      VBCO3-PARVW = NAST-PARVW.
      CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
        EXPORTING
          COMWA                       = VBCO3
        IMPORTING
          KOPF                        = VBDKA
        TABLES
          POS                         = TVBDPA
          MESS                        = DA_MESS
        EXCEPTIONS
          FEHLER_BEI_DATENBESCHAFFUNG = 1.
      IF SY-SUBRC NE 0.
        PERFORM PROTOCOL_UPDATE.
        RETCODE = 1.
        EXIT.
      ELSE.
        LOOP AT DA_MESS.
          SY-MSGID = DA_MESS-MSGID.
          SY-MSGNO = DA_MESS-MSGNO.
          SY-MSGTY = DA_MESS-MSGTY.
          SY-MSGV1 = DA_MESS-MSGV1.
          SY-MSGV2 = DA_MESS-MSGV2.
          SY-MSGV3 = DA_MESS-MSGV3.
          SY-MSGV4 = DA_MESS-MSGV4.
          PERFORM PROTOCOL_UPDATE.
        ENDLOOP.
      ENDIF.
    *Get Header Data In I_HEADER Table.
      SELECT VBAKVBELN VBAKAUDAT VBAKKUNNR VBAKWAERK
             VBAKVKORG VBAKANGDT VBAKBNDDT VBAKVBTYP
             VBAKKNUMV VBAKKALSM VBAKNETWR VBAKVKBUR
             VBAKBNAME VBKDBSTKD VBKDBSTDK VBKDINCO1
             VBKDINCO2 VBKDZTERM
             INTO CORRESPONDING FIELDS OF TABLE I_HEADER
             FROM VBAK
             JOIN VBKD ON VBKDVBELN = VBAKVBELN
             WHERE VBAK~VBELN = VBCO3-VBELN.
    **Get Address Number For Company
      IF NOT I_HEADER[] IS INITIAL.
        READ TABLE I_HEADER INDEX 1.
        SELECT SINGLE BUKRS ADRNR INTO (COMPCD, ADDCOMP)
             FROM TVKO
             WHERE VKORG = I_HEADER-VKORG.
      ENDIF.
    fill address key --> necessary for emails
      ADDR_KEY-ADDRNUMBER = VBDKA-ADRNR.
      ADDR_KEY-PERSNUMBER = VBDKA-ADRNP.
      ADDR_KEY-ADDR_TYPE  = VBDKA-ADDRESS_TYPE.
    Fetch servicecontract-data and notice-data for head and position.
      US_VEDA_VBELN     = VBDKA-VBELN.
      US_VEDA_POSNR_LOW = POSNR_LOW.
      CALL FUNCTION 'SD_VEDA_GET_PRINT_DATA'
        EXPORTING
          I_DOCUMENT_NUMBER = US_VEDA_VBELN
          I_LANGUAGE        = SY-LANGU
          I_POSNR_LOW       = US_VEDA_POSNR_LOW
        TABLES
          PRINT_DATA_POS    = TKOMSERVP
          PRINT_DATA_HEAD   = TKOMSERVH
          PRINT_NOTICE_POS  = TKOMSERVPN
          PRINT_NOTICE_HEAD = TKOMSERVHN.
      PERFORM GET_CONTROLL_DATA.
      PERFORM SENDER.
      PERFORM CHECK_REPEAT.
      LOOP AT TVBDPA.
        VBDPA = TVBDPA.
        IF VBDPA-DRAGR EQ SPACE.           "Print rejected item?
          IF VBDPA-POSNR_NEU NE SPACE.     "Item
            PERFORM GET_ITEM_SERIALS.
            PERFORM GET_ITEM_CHARACTERISTICS.
            PERFORM GET_ITEM_BILLING_SCHEDULES.
            PERFORM GET_ITEM_PRICES.
            PERFORM GET_ITEM_ADDIS.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "GET_DATA
          FORM GET_ITEM_BILLING_SCHEDULES                               *
          In this routine the billing schedules are fetched from the    *
          database.                                                     *
    FORM GET_ITEM_BILLING_SCHEDULES.
      REFRESH TFPLTDR.
      CHECK NOT VBDPA-FPLNR IS INITIAL.
      CALL FUNCTION 'BILLING_SCHED_PRINTVIEW_READ'
        EXPORTING
          I_FPLNR    = VBDPA-FPLNR
          I_LANGUAGE = NAST-SPRAS
          I_VBELN    = VBDKA-VBELN
        TABLES
          ZFPLTDR    = TFPLTDR.
    ENDFORM.                    "GET_ITEM_BILLING_SCHEDULES
    *&      FORM  GET_ITEM_ADDIS
          Additionals data are fetched from database
    FORM GET_ITEM_ADDIS.
      CLEAR: TADDI_PRINT.
      CALL FUNCTION 'WTAD_ADDIS_IN_SO_PRINT'
           EXPORTING
                FI_VBELN              = VBDKA-VBELN
                FI_POSNR              = VBDPA-POSNR
              FI_LANGUAGE           = SY-LANGU
           TABLES
                FET_ADDIS_IN_SO_PRINT = TADDI_PRINT
           EXCEPTIONS
                ADDIS_NOT_ACTIVE      = 1
                NO_ADDIS_FOR_SO_ITEM  = 2
                OTHERS                = 3.
    ENDFORM.                               " GET_ITEM_ADDIS
          FORM GET_ITEM_CHARACTERISTICS                                 *
          In this routine the configuration data item is fetched from   *
          the database.                                                 *
    FORM GET_ITEM_CHARACTERISTICS.
      DATA DA_T_CABN LIKE CABN OCCURS 10 WITH HEADER LINE.
      DATA: BEGIN OF DA_KEY,
              MANDT LIKE CABN-MANDT,
              ATINN LIKE CABN-ATINN,
            END   OF DA_KEY.
      REFRESH TKOMCON.
      CHECK NOT VBDPA-CUOBJ IS INITIAL AND
                VBDPA-ATTYP NE VAR_TYP.
      CALL FUNCTION 'VC_I_GET_CONFIGURATION'
        EXPORTING
          INSTANCE      = VBDPA-CUOBJ
          LANGUAGE      = NAST-SPRAS
          PRINT_SALES   = CHARX
        TABLES
          CONFIGURATION = TKOMCON
        EXCEPTIONS
          OTHERS        = 4.
      RANGES : DA_IN_CABN FOR DA_T_CABN-ATINN.
    Beschreibung der Merkmale wegen Objektmerkmalen auf sdcom-vkond holen
      CLEAR DA_IN_CABN. REFRESH DA_IN_CABN.
      LOOP AT TKOMCON.
        DA_IN_CABN-OPTION = 'EQ'.
        DA_IN_CABN-SIGN   = 'I'.
        DA_IN_CABN-LOW    = TKOMCON-ATINN.
        APPEND DA_IN_CABN.
      ENDLOOP.
      CLEAR DA_T_CABN. REFRESH DA_T_CABN.
      CALL FUNCTION 'CLSE_SELECT_CABN'
       EXPORTING
            KEY_DATE                     = SY-DATUM
            BYPASSING_BUFFER             = ' '
            WITH_PREPARED_PATTERN        = ' '
            I_AENNR                      = ' '
       IMPORTING
            AMBIGUOUS_OBJ_CHARACTERISTIC =
         TABLES
              IN_CABN                      = DA_IN_CABN
              T_CABN                       = DA_T_CABN
         EXCEPTIONS
              NO_ENTRY_FOUND               = 1
              OTHERS                       = 2.
    Preisfindungsmerkmale / Merkmale auf VCSD_UPDATE herausnehmen
      SORT DA_T_CABN.
      LOOP AT TKOMCON.
        DA_KEY-MANDT = SY-MANDT.
        DA_KEY-ATINN = TKOMCON-ATINN.
        READ TABLE DA_T_CABN WITH KEY DA_KEY BINARY SEARCH.
        IF SY-SUBRC <> 0 OR
           ( ( DA_T_CABN-ATTAB = 'SDCOM' AND
              DA_T_CABN-ATFEL = 'VKOND'       ) OR
            ( DA_T_CABN-ATTAB = 'VCSD_UPDATE' ) ) .
          DELETE TKOMCON.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "GET_ITEM_CHARACTERISTICS
          FORM GET_ITEM_PRICES                                          *
          In this routine the price data for the item is fetched from   *
          the database.                                                 *
    FORM GET_ITEM_PRICES.
      CLEAR: KOMP,
             TKOMV.
      IF KOMK-KNUMV NE VBDKA-KNUMV OR
         KOMK-KNUMV IS INITIAL.
        CLEAR KOMK.
        KOMK-MANDT = SY-MANDT.
        KOMK-KALSM = VBDKA-KALSM.
        KOMK-KAPPL = PR_KAPPL.
        KOMK-WAERK = VBDKA-WAERK.
        KOMK-KNUMV = VBDKA-KNUMV.
        KOMK-KNUMA = VBDKA-KNUMA.
        KOMK-VBTYP = VBDKA-VBTYP.
        KOMK-LAND1 = VBDKA-LAND1.
        KOMK-VKORG = VBDKA-VKORG.
        KOMK-VTWEG = VBDKA-VTWEG.
        KOMK-SPART = VBDKA-SPART.
        KOMK-BUKRS = VBDKA-BUKRS_VF.
        KOMK-HWAER = VBDKA-WAERS.
        KOMK-PRSDT = VBDKA-ERDAT.
        KOMK-KURST = VBDKA-KURST.
        KOMK-KURRF = VBDKA-KURRF.
        KOMK-KURRF_DAT = VBDKA-KURRF_DAT.
      ENDIF.
      KOMP-KPOSN = VBDPA-POSNR.
      KOMP-KURSK = VBDPA-KURSK.
      KOMP-KURSK_DAT = VBDPA-KURSK_DAT.
      if vbdka-vbtyp ca 'HKNOT6'.
        if vbdpa-shkzg ca ' A'.
          komp-shkzg = 'X'.
        endif.
      else.
        if vbdpa-shkzg ca 'BX'.
          komp-shkzg = 'X'.
        endif.
      endif.
      IF PRICE_PRINT_MODE EQ CHARA.
        CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
          EXPORTING
            COMM_HEAD_I = KOMK
            COMM_ITEM_I = KOMP
            LANGUAGE    = NAST-SPRAS
          IMPORTING
            COMM_HEAD_E = KOMK
            COMM_ITEM_E = KOMP
          TABLES
            TKOMV       = TKOMV
            TKOMVD      = TKOMVD.
      ELSE.
        CALL FUNCTION 'RV_PRICE_PRINT_ITEM_BUFFER'
          EXPORTING
            COMM_HEAD_I = KOMK
            COMM_ITEM_I = KOMP
            LANGUAGE    = NAST-SPRAS
          IMPORTING
            COMM_HEAD_E = KOMK
            COMM_ITEM_E = KOMP
          TABLES
            TKOMV       = TKOMV
            TKOMVD      = TKOMVD.
      ENDIF.
    ENDFORM.                    "GET_ITEM_PRICES
          FORM GET_HEADER_PRICES                                        *
          In this routine the price data for the header is fetched from *
          the database.                                                 *
    FORM GET_HEADER_PRICES.
      LOOP AT TVBDPA.
        CALL FUNCTION 'SD_TAX_CODE_MAINTAIN'
          EXPORTING
            KEY_KNUMV           = VBDKA-KNUMV
            KEY_KPOSN           = TVBDPA-POSNR
            I_APPLICATION       = ' '
            I_PRICING_PROCEDURE = VBDKA-KALSM
          TABLES
            XKOMV               = TKOMV.
      ENDLOOP.
      IF PRICE_PRINT_MODE EQ CHARA.
        CALL FUNCTION 'RV_PRICE_PRINT_HEAD'
          EXPORTING
            COMM_HEAD_I = KOMK
            LANGUAGE    = NAST-SPRAS
          IMPORTING
            COMM_HEAD_E = KOMK
          TABLES
            TKOMV       = TKOMV
            TKOMVD      = TKOMVD.
      ELSE.
        CALL FUNCTION 'RV_PRICE_PRINT_HEAD_BUFFER'
          EXPORTING
            COMM_HEAD_I = KOMK
            LANGUAGE    = NAST-SPRAS
          IMPORTING
            COMM_HEAD_E = KOMK
          TABLES
            TKOMV       = TKOMV
            TKOMVD      = TKOMVD.
      ENDIF.
    ENDFORM.                    "GET_HEADER_PRICES
          FORM PRINT_DATA                                               *
          Print Quotation                                               *
    FORM PRINT_DATA.
      DATA: ls_control       TYPE ssfctrlop.
      data: OUTPUT_OPTIONS TYPE  SSFCOMPOP,cf_retcode type sy-subrc.
      DATA: ls_print_data_to_read TYPE lbbil_print_data_to_read.
      DATA: ls_addr_key           LIKE addr_key.
      DATA: ls_dlv-land           LIKE vbrk-land1.
      DATA: ls_job_info           TYPE ssfcrescl.
      DATA: ls_control_param      TYPE ssfctrlop.
      DATA: ls_composer_param     TYPE ssfcompop.
      DATA: ls_recipient          TYPE swotobjid.
      DATA: ls_sender             TYPE swotobjid.
      DATA: NAST_ANZAL LIKE NAST-ANZAL.      "Number of outputs (Orig. + Cop.)
      DATA: NAST_TDARMOD LIKE NAST-TDARMOD.  "Archiving only one time
      DATA: ls_bil_invoice TYPE lbbil_invoice.
      SELECT SINGLE SFORM INTO LF_FORMNAME
            FROM TNAPR
            WHERE KSCHL = NAST-KSCHL
            AND   NACHA = NAST-NACHA.
    *IF NAST-KSCHL = 'ZORD'.
      lf_formname = 'ZSDORDERCONF'.
    *ELSEIF NAST-KSCHL = 'ZOR1'.
      lf_formname = 'ZSDORDERCONF'.
    *ELSEIF NAST-KSCHL = 'ZOR2'.
      lf_formname = 'ZCSORDERCONF'.
      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.
      ENDIF.
      READ TABLE I_HEADER INDEX 1.
    ls_controL-no_dialog = 'X'.
    if sy-ucomm = 'VIEW'.
    LS_CONTROL-PREVIEW = 'X'.
    endif.
      CALL FUNCTION LF_FM_NAME
        EXPORTING
          control_parameters = ls_control
          OUTPUT_OPTIONS     = OUTPUT_OPTIONS
          SO_VBELN           = I_HEADER-VBELN
          SO_AUDAT           = I_HEADER-AUDAT
          SO_REPEAT          = REPEAT
          SO_TYPE            = I_HEADER-VBTYP
          SO_CADD            = ADDCOMP
          SO_CCODE           = COMPCD
        TABLES
          I_HEADER           = I_HEADER
          TKOMV              = TKOMV
          I_ITEM             = TVBDPA
          I_XDATA            = I_XDATA
        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.
    ENDFORM.                    "PRINT_DATA
          FORM PROTOCOL_UPDATE                                          *
          The messages are collected for the processing protocol.       *
    FORM PROTOCOL_UPDATE.
      CHECK XSCREEN = SPACE.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          MSG_ARBGB = SYST-MSGID
          MSG_NR    = SYST-MSGNO
          MSG_TY    = SYST-MSGTY
          MSG_V1    = SYST-MSGV1
          MSG_V2    = SYST-MSGV2
          MSG_V3    = SYST-MSGV3
          MSG_V4    = SYST-MSGV4
        EXCEPTIONS
          OTHERS    = 1.
    ENDFORM.                    "PROTOCOL_UPDATE
          FORM SENDER                                                   *
          This routine determines the address of the sender (Table VKO) *
    FORM SENDER.
      SELECT SINGLE * FROM TVKO  WHERE VKORG = VBDKA-VKORG.
      IF SY-SUBRC NE 0.
        SYST-MSGID = 'VN'.
        SYST-MSGNO = '203'.
        SYST-MSGTY = 'E'.
        SYST-MSGV1 = 'TVKO'.
        SYST-MSGV2 = SYST-SUBRC.
        PERFORM PROTOCOL_UPDATE.
        EXIT.
      ENDIF.
      CLEAR GV_FB_ADDR_GET_SELECTION.
      GV_FB_ADDR_GET_SELECTION-ADDRNUMBER = TVKO-ADRNR.         "SADR40A
      CALL FUNCTION 'ADDR_GET'
        EXPORTING
          ADDRESS_SELECTION = GV_FB_ADDR_GET_SELECTION
          ADDRESS_GROUP     = 'CA01'
        IMPORTING
          SADR              = SADR
        EXCEPTIONS
          OTHERS            = 01.
      IF SY-SUBRC NE 0.
        CLEAR SADR.
      ENDIF.                                                    "SADR40A
      VBDKA-SLAND = SADR-LAND1.
      IF SY-SUBRC NE 0.
        SYST-MSGID = 'VN'.
        SYST-MSGNO = '203'.
        SYST-MSGTY = 'E'.
        SYST-MSGV1 = 'SADR'.
        SYST-MSGV2 = SYST-SUBRC.
        PERFORM PROTOCOL_UPDATE.
      ENDIF.
    SELECT SINGLE * FROM TVBUR  WHERE VKBUR = VBDKA-VKBUR.
    IF SY-SUBRC NE 0.
       SYST-MSGID = 'VN'.
       SYST-MSGNO = '203'.
       SYST-MSGTY = 'E'.
       SYST-MSGV1 = 'TVBUR'.
       SYST-MSGV2 = SYST-SUBRC.
       PERFORM PROTOCOL_UPDATE.
    ENDIF.
    ENDFORM.                    "SENDER
    *&      Form  GET_ITEM_SERIALS
          This routine give back the serialnumbers of salesdocument      *
          position. The numbers are processed as print-lines in the      *
          table KOMSER_PRINT.                                            *
    -->  US_VBELN  Salesdocument
    -->  US_POSNR  Position of the salesdocument
    FORM GET_ITEM_SERIALS.
      DATA: KEY_DATA LIKE RSEROB,
            SERNOS LIKE RSEROB OCCURS 0 WITH HEADER LINE.
      KEY_DATA-TASER = 'SER02'.
      KEY_DATA-SDAUFNR = VBDKA-VBELN.
      KEY_DATA-POSNR = VBDPA-POSNR.
      IF KEY_DATA-SDAUFNR IS INITIAL AND NOT
         KEY_DATA-POSNR IS INITIAL.
    beim Anlegen ist Belegnummer leer - deshalb Dummy-Belegnummer
        KEY_DATA-SDAUFNR = CHAR$.
      ENDIF.
    Read the Serialnumbers of a Position.
      REFRESH: TKOMSER,
               TKOMSER_PRINT.
      CALL FUNCTION 'GET_SERNOS_OF_DOCUMENT'
        EXPORTING
          KEY_DATA            = KEY_DATA
        TABLES
          SERNOS              = SERNOS
        EXCEPTIONS
          KEY_PARAMETER_ERROR = 1
          NO_SUPPORTED_ACCESS = 2
          NO_DATA_FOUND       = 3
          OTHERS              = 4.
      IF SY-SUBRC NE 0 AND
         SY-SUBRC NE 3.
        PERFORM PROTOCOL_UPDATE.
      ENDIF.
      CHECK SY-SUBRC EQ 0.
    Serialnummern übergeben
      TKOMSER-VBELN = SERNOS-SDAUFNR.
      TKOMSER-POSNR = SERNOS-POSNR.
      LOOP AT SERNOS.
        TKOMSER-SERNR = SERNOS-SERNR.
        APPEND TKOMSER.
      ENDLOOP.
    Process the stringtable for Printing.
    CALL FUNCTION 'PROCESS_SERIALS_FOR_PRINT'
          EXPORTING
               I_BOUNDARY_LEFT             = '(_'
               I_BOUNDARY_RIGHT            = '_)'
               I_SEP_CHAR_STRINGS          = ',_'
               I_SEP_CHAR_INTERVAL         = '_-_'
               I_USE_INTERVAL              = 'X'
               I_BOUNDARY_METHOD           = 'C'
               I_LINE_LENGTH               = 50
               I_NO_ZERO                   = 'X'
               I_ALPHABET                  = SY-ABCDE
               I_DIGITS                    = '0123456789'
               I_SPECIAL_CHARS             = '-'
               I_WITH_SECOND_DIGIT         = ' '
          TABLES
               SERIALS                     = TKOMSER
               SERIALS_PRINT               = TKOMSER_PRINT
          EXCEPTIONS
               BOUNDARY_MISSING            = 01
               INTERVAL_SEPARATION_MISSING = 02
               LENGTH_TO_SMALL             = 03
               INTERNAL_ERROR              = 04
               WRONG_METHOD                = 05
               WRONG_SERIAL                = 06
               TWO_EQUAL_SERIALS           = 07
               SERIAL_WITH_WRONG_CHAR      = 08
               SERIAL_SEPARATION_MISSING   = 09.
    IF SY-SUBRC NE 0.
       PERFORM PROTOCOL_UPDATE.
    ENDIF.
    ENDFORM.                               " GET_ITEM_SERIALS
    *eject
    *&      Form  GET_CONTROLL_DATA
          Checks if servicedata for the header exists.                   *
          Checks if servicedata for the position exists.                 *
          Checks if noticedata for the header exists.                    *
          Checks if noticedata for the position exists.                  *
    FORM GET_CONTROLL_DATA.
      DATA: LINES TYPE I.
    Exists servicedata for the header?
      DESCRIBE TABLE TKOMSERVH LINES LINES.
      IF LINES GT 0.
        STEU-VDKEX = 'X'.
      ENDIF.
    Exists servicedata for the position?
      DESCRIBE TABLE TKOMSERVP LINES LINES.
      IF LINES GT 0.
        STEU-VDPEX = 'X'.
      ENDIF.
    Exists noticedata for the header?
      DESCRIBE TABLE TKOMSERVHN LINES LINES.
      IF LINES GT 0.
        STEU-KBKEX = 'X'.
      ENDIF.
    Exists noticedata for the position?
      DESCRIBE TABLE TKOMSERVPN LINES LINES.
      IF LINES GT 0.
        STEU-KBPEX = 'X'.
      ENDIF.
    ENDFORM.                               " GET_CONTROLL_DATA
    *eject
    *&      Form  get_fax_land
          text
         -->P_NAST_TLAND  text
    form get_fax_land using   p_nast_land like nast-tland.
      DATA  L_land    like nast-tland .
      clear L_land.
      IF NOT addr_key-addrnumber IS INITIAL.
        CALL FUNCTION 'WFMC_FAXNUMBER_FOR_ADDRESS'
          EXPORTING
            adrnr          = addr_key-addrnumber
          IMPORTING
            tland          = L_land
          EXCEPTIONS
            addr_not_exist = 1
            OTHERS         = 2.
        IF sy-subrc = 0 AND NOT L_land IS INITIAL.
          p_nast_land = L_land.
        ENDIF.
      ENDIF.
    endform.                    " get_fax_land
    *&      Form  get_data1
          text
         -->P_LS_PRINT_DATA_TO_READ  text
         <--P_LS_ADDR_KEY  text
         <--P_LS_DLV_LAND  text
         <--P_LS_BIL_INVOICE  text
         <--P_CF_RETCODE  text
    FORM get_data1
         USING    IS_PRINT_DATA_TO_READ TYPE LBBIL_PRINT_DATA_TO_READ
         CHANGING CS_ADDR_KEY           LIKE ADDR_KEY
                  CS_DLV-LAND           LIKE VBRK-LAND1
                  CS_BIL_INVOICE        TYPE LBBIL_INVOICE
                  CF_RETCODE.
      IF NAST-OBJKY+10 NE SPACE.
        NAST-OBJKY = NAST-OBJKY+16(10).
      ELSE.
        NAST-OBJKY = NAST-OBJKY.
      ENDIF.
    read print data
    CALL FUNCTION 'LB_BIL_INV_OUTP_READ_PRTDATA'
       EXPORTING
         IF_BIL_NUMBER         = NAST-OBJKY
         IF_PARVW              = NAST-PARVW
         IF_PARNR              = NAST-PARNR
         IF_LANGUAGE           = NAST-SPRAS
         IS_PRINT_DATA_TO_READ = IS_PRINT_DATA_TO_READ
       IMPORTING
         ES_BIL_INVOICE        = CS_BIL_INVOICE
       EXCEPTIONS
         RECORDS_NOT_FOUND     = 1
         RECORDS_NOT_REQUESTED = 2
         OTHERS                = 3.
    IF SY-SUBRC <> 0.
    error handling
       CF_RETCODE = SY-SUBRC.
       PERFORM PROTOCOL_UPDATE.
    ENDIF.
    get nast partner adress for communication strategy
      PERFORM GET_ADDR_KEY USING    CS_BIL_INVOICE-HD_ADR
                           CHANGING CS_ADDR_KEY.
    get delivery land
      PERFORM GET_DLV-LAND USING    CS_BIL_INVOICE-HD_GEN
                           CHANGING CS_DLV-LAND.
    ENDFORM.                                                    " get_data1
    *&      Form  GET_ADDR_KEY
          text
         -->P_CS_BIL_INVOICE_HD_ADR  text
         <--P_CS_ADDR_KEY  text
    FORM GET_ADDR_KEY   USING    IT_HD_ADR   TYPE LBBIL_INVOICE-HD_ADR
                      CHANGING CS_ADDR_KEY LIKE ADDR_KEY.
      FIELD-SYMBOLS -ADDRESS_TYPE.
      ENDIF.
    ENDFORM.                    " GET_ADDR_KEY
    *&      Form  GET_DLV-LAND
          text
         -->P_CS_BIL_INVOICE_HD_GEN  text
         <--P_CS_DLV_LAND  text
    FORM GET_DLV-LAND USING    IT_HD_GEN   TYPE LBBIL_INVOICE-HD_GEN
                      CHANGING CS_DLV-LAND LIKE VBRK-LAND1.
      CS_DLV-LAND = IT_HD_GEN-DLV_LAND.
    ENDFORM.                    " GET_DLV-LAND
    *&      Form  set_print_data_to_read
          text
         -->P_LF_FORMNAME  text
         <--P_LS_PRINT_DATA_TO_READ  text
         <--P_CF_RETCODE  text
    FORM set_print_data_to_read   USING    IF_FORMNAME LIKE TNAPR-SFORM
             CHANGING CS_PRINT_DATA_TO_READ TYPE LBBIL_PRINT_DATA_TO_READ
                      CF_RETCODE.
      FIELD-SYMBOLS:  TYPE XFELD.
      DATA: LT_FIELDLIST TYPE TSFFIELDS.
    set print data requirements
      DO.
        ASSIGN COMPONENT SY-INDEX OF STRUCTURE
                         CS_PRINT_DATA_TO_READ TO  = 'X'.
      ENDDO.
      CALL FUNCTION 'SSF_FIELD_LIST'
        EXPORTING
          FORMNAME                = IF_FORMNAME
        VARIANT                 = ' '
        IMPORTING
          FIELDLIST               = LT_FIELDLIST
       EXCEPTIONS
         NO_FORM                  = 1
         NO_FUNCTION_MODULE       = 2
         OTHERS                   = 3.
      IF SY-SUBRC <> 0.
    error handling
        CF_RETCODE = SY-SUBRC.
        PERFORM PROTOCOL_UPDATE.
      ENDIF.
    ENDFORM.                    " set_print_data_to_read
    *&      Form  set_print_param
          text
         -->P_LS_ADDR_KEY  text
         -->P_LS_DLV_LAND  text
         <--P_LS_CONTROL_PARAM  text
         <--P_LS_COMPOSER_PARAM  text
         <--P_LS_RECIPIENT  text
         <--P_LS_SENDER  text
         <--P_CF_RETCODE  text
    FORM set_print_param   using IS_ADDR_KEY LIKE ADDR_KEY
                                  IS_DLV-LAND LIKE VBRK-LAND1
                         CHANGING CS_CONTROL_PARAM TYPE SSFCTRLOP
                                  CS_COMPOSER_PARAM TYPE SSFCOMPOP
                                  CS_RECIPIENT TYPE  SWOTOBJID
                                  CS_SENDER TYPE  SWOTOBJID
                                  CF_RETCODE TYPE SY-SUBRC.
      DATA: LS_ITCPO     TYPE ITCPO.
      DATA: LF_REPID     TYPE SY-REPID.
      DATA: LF_DEVICE    TYPE TDDEVICE.
      DATA: LS_RECIPIENT TYPE SWOTOBJID.
      DATA: LS_SENDER    TYPE SWOTOBJID.
      LF_REPID = SY-REPID.
      CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
        EXPORTING
          PI_NAST       = NAST
          PI_COUNTRY    = IS_DLV-LAND
          PI_ADDR_KEY   = IS_ADDR_KEY
          PI_REPID      = LF_REPID
          PI_SCREEN     = XSCREEN
        IMPORTING
          PE_RETURNCODE = CF_RETCODE
          PE_ITCPO      = LS_ITCPO
          PE_DEVICE     = LF_DEVICE
          PE_RECIPIENT  = CS_RECIPIENT
          PE_SENDER     = CS_SENDER.
      IF CF_RETCODE = 0.
        MOVE-CORRESPONDING LS_ITCPO TO CS_COMPOSER_PARAM.
      CS_CONTROL_PARAM-NO_OPEN
      CS_CONTROL_PARAM-NO_CLOSE
        CS_CONTROL_PARAM-DEVICE      = LF_DEVICE.
        CS_CONTROL_PARAM-NO_DIALOG   = 'X'.
        CS_CONTROL_PARAM-PREVIEW     = XSCREEN.
        CS_CONTROL_PARAM-GETOTF      = LS_ITCPO-TDGETOTF.
        CS_CONTROL_PARAM-LANGU       = NAST-SPRAS.
      CS_CONTROL_PARAM-REPLANGU1
      CS_CONTROL_PARAM-REPLANGU2
      CS_CONTROL_PARAM-REPLANGU3
      CS_CONTROL_PARAM-STARTPAGE
      ENDIF.
    ENDFORM.                    " set_print_param
    *&      Form  add_smfrm_prot
          text
    -->  p1        text
    <--  p2        text
    FORM add_smfrm_prot .
      DATA: LT_ERRORTAB             TYPE TSFERROR.
    DATA: LF_MSGNR                TYPE SY-MSGNO.
      FIELD-SYMBOLS:   TYPE LINE OF TSFERROR.
    get smart form protocoll
      CALL FUNCTION 'SSF_READ_ERRORS'
        IMPORTING
          ERRORTAB = LT_ERRORTAB.
    add smartform protocoll to nast protocoll
      LOOP AT LT_ERRORTAB ASSIGNING .
      CLEAR LF_MSGNR.
      LF_MSGNR = <FS_ERRORTAB>-ERRNUMBER.
        CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
             EXPORTING
                  MSG_ARBGB = -MSGID
                MSG_NR    = LF_MSGNR
                  MSG_NR    = -MSGV4
             EXCEPTIONS
                  OTHERS    = 1.
      ENDLOOP.
    ENDFORM.                    " add_smfrm_prot
    *&      Form  protocol_update_spool
          text
         -->P_1115   text
         -->P_LS_SPOOLID  text
         -->P_SPACE  text
         -->P_SPACE  text
         -->P_SPACE  text
    FORM protocol_update_spool  USING    SYST_MSGNO
                                         P_LS_SPOOLID
                                         P_SPACE1
                                         P_SPACE2
                                         P_SPACE3.
      syst-msgid = 'VN'.
      syst-msgno = syst_msgno.
      syst-msgv1 = p_ls_spoolid.
      CONDENSE syst-msgv1.
      CHECK xscreen = space.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb = syst-msgid
          msg_nr    = syst-msgno
          msg_ty    = syst-msgty
          msg_v1    = syst-msgv1
          msg_v2    = p_space1
          msg_v3    = p_space2
          msg_v4    = p_space3
        EXCEPTIONS
          OTHERS    = 1.
    ENDFORM.                    " protocol_update_spool
    This is Include ZSDI0003
    *&  Include           ZSDI0003
    TABLES: KOMK,                          "Communicationarea for conditions
            KOMP,                          "Communicationarea for conditions
            KOMVD,                         "Communicationarea for conditions
            VBCO3,                         "Communicationarea for view
            VBDKA,                         "Headerview
            VBDPA,                         "Itemview
            VBDPAU,                        "Subitemnumbers
            CONF_OUT,                      "Configuration data
            SADR,                          "Addresses
            TVAG,                          "Reason for rejection
            VEDKA,                         "Servicecontract head data
            VEDPA,                         "Servicecontract position data
            VEDKN,                         "Servicecontract head notice data
            VEDPN,                         "Servicecontract pos. notice data
            RISERLS,                       "Serialnumbers
            KOMSER,                        "Serialnumbers for print
            TVBUR,                         "Sales office
            TVKO,                          "Sales organisation
            ADRS,                          "Communicationarea for Address
            FPLTDR,                        "billing schedules
            WTAD_ADDIS_IN_SO_PRINT,        "additional
            WTAD_BUYING_PRINT_EXTRA_TEXT,  "texts belonging to additional
            VBAK,                          "Sales Document Header
            VBAP,                          "Sales Document Item
            VBPA,                          "Sales Document: Partner
            T001,                          "Company codes
            MAST,                          "Material to BOM Link
            STKO.                          "BOM Header
    INCLUDE RVADTABL.
    INCLUDE RVDIREKT.
    INCLUDE VEDADATA.
    data for access to central address maintenance
    INCLUDE SDZAVDAT.
    TYPE-POOLS: ADDI.
    DATA PRICE_PRINT_MODE(1) TYPE C.       "Print-mode
    DATA: RETCODE   LIKE SY-SUBRC.         "Returncode
    DATA: REPEAT(1) TYPE C.
    DATA: XSCREEN(1) TYPE C.               "Output on printer or screen
    DATA: BEGIN OF STEU,                   "Controldata for output
            VDKEX(1) TYPE C,
            VDPEX(1) TYPE C,
            KBKEX(1) TYPE C,
            KBPEX(1) TYPE C,
      

    1) you shouldn't have to do anything with the properties file written for a specific Locale.
    2) check this out: http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html
    3) BIG5 is BIG5 everywhere.
    4) don't know about this one
    5,6,7) If you have Windows 98 Chinese Edition, you can probably switch back and forth between English and Chinese -- just put the Chinese characters in a string much like the normal characters. Otherwise, you'll have to enter the Unicode char.
    V.V.

  • Displaying line item details in smartform

    Hi,
    I need to display tax details of each line item in a smartform in the given format. Tax details should get displayed only if it present. Please tell me how to do this.
    for ex:
    item     description     qty         price   
    10       ytfytfyf             20          30
    VAT:2%
    Service Tax: 3%
    20        rwedw             30         10
    VAT:3%
    service tax:4%
    Thanks.

    hi,
    Under the loop node after displaying
    item description qty price
    10 ytfytfyf 20 30
    create another loop node of table tax information under the main loop with condition that is having same field in common... then create text elements  to display the following data
    VAT:2%
    Service Tax: 3%
    regards
    padma

  • Dynamic style selection in smartform depending on language

    Hi
    Today I assign a style to a smartform statically in form attributes. I don't assign styles to any subnodes.
    Is it possible to make the assignment of style to the smartform dynamically at runtime?
    (If you can suggest a completely other solution for my problem, that will also be very much appreciated).
    Reason: I have a requirement to translate a lot of smartform (maybe 100+) from English to Chinese, Japanese, Korean, Russian etc.
    I'm in a Unicode environment and the translation itself seems to work quit simple.
    But there seems to be a major problem about the font.
    In our smartforms we use smartstyles with 2 fonts helve and times.
    So far we have just translated a few smartforms to Chinese with SE63. We have also translated some material texts and addresses and we have defined a test printer with CNSAPWIN.
    Test prints now shows that we can print all the Chinese texts, but all the texts and numbers that is not translated into Chinese (i.e. quantity, price, net value etc.) is printed with a bigger font size.
    Now this is a know problem discussed in more forum threads and OSS nodes, and the solution seems to be, to change the style to use special Chinese fonts and adjust the font size.
    We have tested this at it seems to solve the problem. But all the threads and notes discussing this issue is talking about "the English smartform" and u201Cthe Chinese smartform" and so on. This is not very smart.
    If we follow this strategy and creates a form for each special language (special from our perspective), we will need 5 different versions of every smartform and the time needed for future maintenance will increase dramatically.
    A much better solution would be to have one smartform that is translated with SE63 and only make 5 different styles to handle the different fonts etc. This solution requires however that we can assign the styles to the smartforms dynamically at runtime.
    Yours sincerely / Med venlig hilsen / 此致敬礼 / Mit freundlichen Grüßen / Pozdrawiam
    Thomas Madsen Nielsen

    Hi!
    In SAPScript there is an option for this, using the STYLE keyword. However I don't know will it work in Smartforms or not.
    If it is not working, I think you have to different character and paragraph formats within 1 smartstyle for each language.
    About the STYLE keyword:
    Changing the Style: STYLE Locate the document in its SAP Library structure
    The STYLE control command allows you to change the style within a text. The new style is in force until another STYLE command is issued. If you specify * as the name of the style, then the system reverts to the default paragraph of the original style or form.
    Syntax:
    /: STYLE style
    /: STYLE *
    A style set with this command has no effect in a text included with INCLUDE. The system takes the paragraph and character formats from the calling text. To use the style set with STYLE in the INCLUDE text as well, you must add DOMINANT to the command.
    Note
    If the INCLUDE text has a style assigned to it, in both cases, the system always takes the paragraph and character formats from the directly assigned style.
    Regards
    Tamá

  • Dynamic box in smartforms

    hello gurus,
    i have to populate  dynamic boxes this is the scenario  any ideas...i mean how can i put this in smartform way...
    I
    f gift order <> 1
    Determine how many VALUES we have based on ship_charge, subtotal, promotion_amt and order_total.Think the max is 4
    Based on this count this determines the number of boxes
    This count will also determine which values are output
    Need to consider if promotion amount is negative then need to put negative sign before '£' sign
    Else.
    No boxes/prices are shown
    Endif.

    HI ,
    Use tables .
    right Click->create->tabels
    In data tab  , in loop to
    give the name of the internal table  and work area
    as  :  it_ekpo  into   is_ekpo
    In tables tab click details button
    Under line type 1 specify the size for each row of the table.
    The toal size of all the columns should not exceed the total window width .
    In the same line as details u can see the lines  and boxes .  using that u can fill the borders of the cell with lines .  Click on the cell and select the appropriate  line . When u display the line will be displayed as the border of the cell .
    Save chek activate
    Right click on main area and click tabline.
    Under line type specify the line type created in table .
    Then in each cell right click and create text  . and put variable as
    &is_abc-ebeln&.
    Regards

  • How to do column calculation in smartforms using table

    Hi,
    In Smartform Table..I created main area ( as TABLE) having  columns 
    POSNR(CELL7),   MATNR(CELL8),  FKIMG(CELL9),  VRKME(CELL10),  UPRICE(CELL11),  NETWR(CELL12)....
    Here UPRICE--- Calculate this field as Unit price = Amount / Billed Qty.
    For this....I created a Flow Logic at CELL11
    CELL11(Right click)
    CREATE---FLOW LOGIC -
    PROGRAM LINE
    Provided code:
    UPRICE = WA-NETWR / WA-FKIMG.
    Its showing the run time error
    Reference field WA-NETWR unknown in form
    what i have to do now for calculating UPRICE in this case...
    <offer removed by moderator>
    Thanks
    Lohit
    Edited by: Thomas Zloch on Jan 11, 2011 11:36 AM

    retreived the five column ( POSNR MATNR FKIMG VRKME NETWR )  values by providing code in GLOBAL SETTINGS -- INITIALISATION (TAB)
    SELECT POSNR MATNR FKIMG VRKME NETWR  INTO CORRESPONDING FIELDS OF TABLE
       ITAB FROM VBRP WHERE VBELN EQ PVBELN.
    And in  MAIN AREA-----Table -
    DATA (Tab) provided
    Loop
    Internal Table   ITAB  TO  WA.
    Created Text at each cell as
    WA-POSNR(for Cell 7),
    WA-MATNR (for Cell 8),
    WA-FKIMG(for CELL9),
    WA-VRKME(for Cell 10),
    UPRICE(for Cell 11),
    WA-NETWR(for Cell 12)

  • Smartforms, Output device WA_EKPO-NETPR not defined., ME9F

    Hi
    I am creating a form of purchase order, I am trying to have the price printed, but I have the following message when I try to print:
    Output device WA_EKPO-NETPR not defined.
    Message no. SSFCOMPOSER011
    Diagnosis
    The output device specified is not known in the SAP System. Valid output devices are maintained in spool administration.
    System Response
    The system issues an error message.
    Procedure
    Choose an output device from the possible entries help on the printer dialog box.
    Procedure for System Administration
    Check the output devices defined in spool administration.
    thanks

    hi, i guess you havent defined your printer (i.e) output type.
    if you use driver program then when you call your sf just insert the below code.
    also please check your reference field
    NETPR in > global declaration >Currency / Quant. Fields and select either currency or quantity.
      call function 'SSF_FUNCTION_MODULE_NAME'
              exporting
                formname                 = f_sf_formname
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
              importing
                fm_name                  =  f_sf_fmname
             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.
    st_control_parameters-no_dialog = 'X'.
    st_control_parameters-preview = 'X'.
    st_output_options-tddest = 'WINDEFAULT'.
    and also please check your smartform -> form attributes -> output tab page format and also check output format.
    regards,
    koolspy.

  • Hi frinds ,how to calculate the  totals in smartforms

    1)how to calculate the  totals in smartforms .

    Hi,
        To calculate totals and sub totals in sap scripts you can use subroutines.
    Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
    /: DEFINE &TOT_PRICE&
    /: PERFORM F_GET_PRICE IN PROGRAM /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
    Then write the variable where ever you want it to be printed (mostly it will be in footer window)
    Then create subroutine pool program and you have to write the code.
    FORM F_GET_PRICE tables int_cond structure itcsy
    outt_cond structure itcsy. data : value type kbert.
    statics value1 type kbert.
    Read int_cond table index 1.
    value = int_cond-value.
    value1 = value1 + value.
    Read outt_cond table index 1.
    outt_cond-value = value1.
    Modify outt_cond index 1.
    ENDFORM.
    regards..

  • Problem in Passing the select-options data in smartforms

    Dear ABAPers,
    I have developed new layout for Delivery Chellan using smartforms.
    using parameters i am getting document no, corresponding all details getting print.
    but the client wants to use multiple document no.
    in function module also i am passing only one import parameter (i.e. doc.no).
    my requirement is how to pass multiple data in smartfroms.
    Thanks & Regards,
    Ashok

    Dear ABAPers,
    Here i give my code Please check it out and tell me where i am going wrong.
    *& Report  ZMM_DC_FORM                                                 *
    REPORT  ZMM_DC_FORM                            .
           Data Declaration
    tables : mseg,
             mkpf,
             ekpo,
             ekko,
             objk,
             mbew,
             ser03,
             twlad,
             makt,
             adrc.
    data : begin of struct_mblnr,
           mblnr type mblnr,
           end of struct_mblnr.
    data : it_mblnr like table of struct_mblnr with header line.
    data : begin of i_struct,
           mblnr like mseg-mblnr,
           mjahr like mseg-mjahr,
           matnr like mseg-matnr,
           erfmg like mseg-erfmg,
           werks like mseg-werks,
           lgort like mseg-lgort,
           ebeln like mseg-ebeln,
           ebelp like mseg-ebelp,
           umwrk like mseg-umwrk,
           end of i_struct.
    data : begin of bednr_struct,
           matnr type ekpo-matnr,
           bednr type ekpo-bednr,
           end of bednr_struct.
    data : begin of price_struct,
           matnr type mseg-matnr,
           verpr type mbew-verpr,
           stprs type mbew-stprs,
           end of price_struct.
    data : begin of serial_struct,
           matnr like objk-matnr,
           sernr like objk-sernr,
           end of serial_struct.
    data : begin of fi_struct,
           matnr type mseg-matnr,
           maktx type makt-maktx,
           bednr type ekpo-bednr,
           erfmg type mseg-erfmg,
           verpr type mbew-verpr,
           val_p type mbew-verpr,
           end of fi_struct.
    data : it_tab like table of i_struct with header line.
    data : it_add1 type table of adrc with header line,
           it_add2 type table of adrc with header line.
    data : it_bednr like table of bednr_struct with header line.
    data : it_price like table of price_struct with header line.
    data : it_ser type table of ZMM_DC_SERIAL with header line.
    data : it_final like table of fi_struct with header line.
    data : s_date like mkpf-budat.
    data : s_ebeln like ekpo-ebeln.
    DATA : FM_NAME TYPE RS38L_FNAM.
            Selection Screen Variables
    selection-screen : begin of block b1 with frame title text-001.
    select-options : s_mblnr for mseg-mblnr.
    parameters : s_mjahr type mseg-mjahr.
    selection-screen : end of block b1.
              Start of Selection
    start-of-selection.
    select mblnr from mseg into table it_mblnr where mblnr ge s_mblnr-low
                                     and   mblnr le s_mblnr-high.
    delete adjacent Duplicates  from it_mblnr.
    *loop at it_mblnr.
    *write : it_mblnr-mblnr.
    *endloop.
    loop at it_mblnr.
    select mblnr
           mjahr
           matnr
           erfmg
           werks
           lgort
           ebeln
           ebelp
           umwrk from mseg into table it_tab where mblnr = it_mblnr-mblnr
                                           and   mjahr = s_mjahr
                                           and   xauto <> 'X'.
    read table it_tab index 1.
    *code for PO Number
    s_ebeln = it_tab-ebeln.
    *code for Supplying plant address
    select single adrnr from twlad into twlad-adrnr where werks = it_tab-werks
                                                    and   lgort = it_tab-lgort.
    select single * from adrc into it_add1 where addrnumber = twlad-adrnr.
    clear twlad-adrnr.
    *code for receiving plant address
    select single lgort from ekpo into ekpo-lgort where ebeln = it_tab-ebeln
                                                  and   ebelp = it_tab-ebelp.
    select single adrnr from twlad into twlad-adrnr where werks = it_tab-umwrk
                                                    and   lgort = ekpo-lgort.
    select single * from adrc into it_add2 where addrnumber = twlad-adrnr.
    clear : twlad-adrnr,
            ekpo-lgort.
    *code for the Material Document Date
    select single budat from mkpf into s_date where mblnr = it_mblnr-mblnr
                                                  and   mjahr = s_mjahr.
    loop at it_tab.
    it_final-matnr = it_tab-matnr.
    it_final-erfmg = it_tab-erfmg.
    *Code for Material Description
    select single maktx from makt into makt-maktx where matnr = it_tab-matnr.
    it_final-maktx = makt-maktx.
    clear makt-maktx.
    *Code for Service order Number
    select single matnr
                  bednr from ekpo into it_bednr where ebeln = it_tab-ebeln
                                         and   ebelp = it_tab-ebelp
                                         and   matnr = it_tab-matnr.
    it_final-bednr = it_bednr-bednr.
    *Code for Price for the Material
    select single matnr
                  verpr
                  stprs from mbew into it_price where matnr = it_tab-matnr
                                                and   bwkey = it_tab-werks.
    if it_price-verpr <> 0.
    it_final-verpr = it_price-verpr.
    else.
    it_final-verpr = it_price-stprs.
    endif.
    it_final-val_p = it_final-erfmg * it_price-stprs.
    append it_final.
    clear it_final.
    endloop.
    *Code for Serial Number
    select single obknr from ser03 into ser03-obknr where mblnr = it_mblnr-mblnr
                                                    and   vorgang = 'MMSL'.
    select matnr
           sernr from objk into table it_ser where obknr = ser03-obknr.
    clear ser03-obknr.
    *Calling Function Module for Smartform
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZMM_DC_FORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    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.
    CALL FUNCTION FM_NAME
    EXPORTING
    L_MBLNR = it_mblnr-mblnr
    L_DATE = S_DATE
    L_EBELN = S_EBELN
    IT_ADD1 = IT_ADD1
    IT_ADD2 = IT_ADD2
    TABLES
    IT_FINAL = IT_FINAL
    IT_SER = IT_SER.
    endloop.
    Please help me to solve this problem.It is very urgent.
    Thanks & Regards,
    Ashok.

  • SRM PO CHANGE SMARTFORM

    Hi friends,
    I’m developing a SRM Purchase Order CHANGE smartform.  The form should only print those line items that got changed (quantity or price or new line item added to PO). Can anyone tell me how to pass only changed datas to smartform. I’m assuming that I’ve copy the std. Form BBP_PO. I will award points to any useful answers
    Thanks a lot.
    -Nash

    Hi John,
    As Narendra said that we can get it from CDPOS and as well as CDHDR also.
    I have done this type of Form long back, I'll send the code & change naming conventions according to that logic. This helps u a lot really.
    -----TO FETCH I OR U REGARDING PO(for chg column)--
        SELECT * INTO TABLE I_CDHDR FROM CDHDR WHERE
                           OBJECTID = W_DATA2-EBELN .
        DESCRIBE TABLE I_CDHDR LINES V_COUNT.
        READ TABLE I_CDHDR INDEX V_COUNT INTO W_CDHDR.
        IF W_CDHDR-CHANGE_IND = 'U'.
          MOVE W_CDHDR-CHANGENR TO V_CHANGE_NR.
          CONCATENATE W_CDHDR-MANDANT W_DATA2-EBELN W_DATA2-EBELP
               INTO GV_TABKEY.
          SELECT SINGLE VALUE_OLD INTO V_OLD FROM CDPOS
                     WHERE OBJECTID = W_DATA2-EBELN AND
                           CHANGENR = V_CHANGE_NR AND
                           TABKEY   = GV_TABKEY AND
                           FNAME    = 'MENGE'.
          SELECT SINGLE VALUE_OLD INTO V_OLD1 FROM CDPOS
                          WHERE OBJECTID = W_DATA2-EBELN AND
                                CHANGENR = V_CHANGE_NR AND
                                TABKEY   = GV_TABKEY AND
                                FNAME    = 'NETWR'.
        ENDIF.
    ------ WHEN PO IS CHANGE ,TO FILL CHG COLMN DETAILS------------------*
        IF V_OLD IS NOT INITIAL OR V_OLD1 IS NOT INITIAL.
          W_TY_SODATA_TAB1-CHNGIND = 'cur'.
          APPEND W_TY_SODATA_TAB1 TO I_SODATA.
          MOVE V_OLD TO W_TY_SODATA_TAB1-MENGE.
          MOVE V_OLD1 TO W_TY_SODATA_TAB1-NETWR.
          W_TY_SODATA_TAB1-CHNGIND = 'prev'.
        ELSE.
          W_TY_SODATA_TAB1-CHNGIND = 'n/a'.
        ENDIF.
        APPEND W_TY_SODATA_TAB1 TO I_SODATA.
        CLEAR: V_OLD, V_OLD1.
        CLEAR: W_TY_SODATA_TAB1.
      ENDIF.
    ENDLOOP.
    LOOP AT I_DATA3 INTO W_DATA3.
      READ TABLE I_SODATA INTO W_SODATA WITH KEY
                           MATNR = W_DATA3-MATNR
                           EBELN = W_DATA3-EBELN
                           EBELP = W_DATA3-EBELP
                           CHNGIND = 'prev'.
      IF SY-SUBRC = 0.
        W_DATA3-MENGE = W_DATA3-MENGE.
        W_DATA3-NETWR = W_DATA3-NETWR.
      ENDIF.
      APPEND W_DATA3 TO I_DATA4.
      CLEAR: W_DATA3.
    ENDLOOP.
    <b><i>if u want the full code let me know I'll send.</i></b>
    Thanks,

  • Discount Amount Problem in PO Smartform

    Hi Experts,
    I'm Working on a po smartform.I need to display quantity, rate, discount & netvalue
    in line items.I'm using 2 internal tables.when displaying discount amount only first
    line item of discount amount is getting repeated sll the time, while rest of the line items are displaying fine.I'm a newbie to smartform.Can Some body send me a piece of sample code to display the discount amount correctly & Also the net value should be dislayed by deducting gross price from discount.
    I'm using ekko, ekpo , konv tables.Any HElp would be appreciated.
    Regards
    Ravi S.

    Hi
    while fetching data from KONV you might not be passing the EKPO-EBELP field to KONV-KPOSN field along with EKKO-KNUMV to KONV-KNUMV
    and KSCHL field for discount
    check this and see
    regards
    Anji

  • Need information on SMARTFORMS

    hi i m looking for some information on SMARTFORMS.
    why it is needed?
    what is difference between smartforms and sapscripting?
    if someone could send some docs. how to work on smartforms it will begreat

    Hi,
    Here I am sending the full information about smartforms. Reward if helpful.
    SAP Smart Forms (BC-SRV-SCR)
    Purpose
    You use SAP Smart Forms to create and maintain forms for mass printing in SAP Systems. As output medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the generated XML output).
    In addition to the tool, SAP delivers a selection of forms for central business processes. This includes forms in Customer Relationship Management (CRM) as well as in the applications SD, FI, and HR of the R/3 Release.
    SAP Smart Forms offer the following advantages:
    •     Creating and maintaining forms requiring half the time
    •     Adapting forms without any programming knowledge due to entirely graphical user interface
    •     Web Publishing using the generated XML output
      The SAP Smart Forms replace the SAPscript forms. SAPscript forms will also be supported in the future; you can use them without making any changes for years to come. You can use SAPscript texts in the Smart Forms. Migration of SAPscript forms into Smart Forms is supported.
    Features
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics. To make changes, use Drag&Drop, Copy&Paste, and select different attributes. These actions do not include writing of coding lines or using a Script language.
    For Web publishing, the system provides a generated XML output of the processed form.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    General Concepts on Form Printing
    Form printing covers creating and maintaining a form for mass printing in SAP Systems. This includes design and layout of the form as well as form logic.
    The layout determines the page structure, that is the number of differently structured pages and the positions of the output areas on these pages. Within the output areas, you use tables, paragraphs, paragraph formats and character formats to structure and format texts and data.
    The form logic controls the dynamic formatting of the form. It allows you to display variable fields, to display texts only if a certain condition is true (for first dunning, use this text, for second dunning another), or to repeatedly process invoice items within a table.
    Forms can be:
    •     Order confirmations
    •     Invoices
    •     Account statements
    •     Checks
    •     Salary statements
    •     Delivery notes
    •     Customs forms
    •     Industry-specific forms, such as quality forms in automobile manufacturing
    The concepts on form printing presented below are independent of any tool. As of mySAP.com release 4.6C use the SAP Smart Forms [Extern] in SAP Systems.
    This documentation does not cover document output and control on printers. Description of the process ends with transferring a processed file to the output management, which in the R/3 System is the spool.
    Structure of a Form
    Definition
    A form consists of pages, output areas, addresses, graphics (such as company logo), and data or text contents. Within an output area, you can use static or dynamic tables to display data or texts in lines, columns, or cells. To further structure and format text and data, use paragraphs with the paragraph and character formats.
    SAP calls output areas "windows". You can position windows freely on a page (see also Pages of a Form [Seite 8] and Main Windows and Subwindows [Seite 8]).
    Example of a Form Structure
    We use a simple invoice. For certain customers, we display their flight bookings with prices in a table in a window. The invoice also contains other windows for the company logo, the sender address, the customer address, company-specific data (clerk, customer number, reference, date, and so on), bank data, and pagination.
    The first page displays the customer letter, followed by a table containing the flight bookings of that customer. The output length of the table depends on the number of booking items (dynamic table). The table header contains the column headings, the table footer contains the total. If the space on the first page is not sufficient to take all items, the table continues on the next page, thereby repeating the column headings. In addition, the first page contains:
    •     the company logo inserted as graphic in bitmap format.
    •     the customer address. This address appears only on the first page (for the window in the envelope) and is preceded by the sender address in small font.
    •     a window containing company-related data in several fonts and font sizes (invoice, clerk, phone/fax, reference, customer number, date).
    •     the footer containing the company and bank data.
    The second page contains the current page number and the total number of pages in the document.
    Pages of a Form
    Definition
    On the pages of a form you determine the page layout and the sequence of pages with different structures.
    The page layout includes the page format (for example, DIN A4, Letter, DIN A5 landscape) and the position of the windows on a page.
    Use
    The individual pages of a form differ in their structure. The first page of an invoice, for example, contains the address, which you do not want to display on the next page; and you want to display the General Terms of Business on the last page. For each page, you must specify a next page to make the page sequence clear. You can also repeatedly call the same page if you want recursive output (for example, if the list of invoice items is very long and does not fit onto one document page).
    The page break either is triggered automatically by the main window (see also Main Window and Subwindows [Seite 8]) or you code it manually into the form logic (see also Specifying the Page Sequence [Seite 52]).
    Many forms contain only two pages of different structure: the first page, which calls the next page, and the next page, which calls itself. If the text does not entirely fit onto the second page, another document page is automatically displayed.
    Main Window and Subwindows
    Definition
    On a page, there are two different types of output areas for texts and data: the main window and the subwindow.
    Use
    You can position windows anywhere on a page, even overlapping. You can position the same window (determined by the technical name) on several pages of a form, so that the same contents are displayed on all these pages. You can choose a different size for the window on each page, except for the main window.
    Main Window
    In a main window you display text and data, which can cover several pages (flow text). As soon as a main window is completely filled with text and data, the system continues displaying the text in the main window of the next page. It automatically triggers the page break.
    You can define only one window in a form as main window.
    The main window must have the same width on each page, but can differ in height.
    A page without main window must not call itself as next page, since this would trigger an endless loop. In such a case, the system automatically terminates after three pages.
    Subwindows
    In a subwindow you display text and data in a predetermined output area. There is no flow text display with page break. If you position a subwindow with the same name on several pages, the system displays the contents of this subwindow on each page.
    Text and data that do not fit into the subwindow are truncated and not displayed.
    Texts and Data in a Form
    Definition
    You enter text in an editor (see also Positioning Text on a Form [Seite 26]).
    Data can be character strings or numbers. The system reads this data from a database and uses fields (parameters) to dynamically display it (see also Using Parameters in a Form [Seite 37]).
    Use
    To display text and data in table format (for example, lists or invoice items), you use tables or templates.
    To format texts and fields (data), you use paragraph and character formats. You assign paragraph formats to entire paragraphs and character formats to individual character strings, for example, to highlight a word.
    The paragraph format determines:
    •     Font family and font size,
    •     Indents and spacing,
    •     Text alignment within the paragraph,
    •     Tabs,
    •     Outline options, such as numbering,
    •     Protection of paragraphs against page breaks.
    To determine the paragraph and character formats, use the Smart Styles (see also Smart Styles [Seite 54]).
    Overview
    This section describes the architecture  [Seite 10]of SAP Smart Forms and how to create a form [Seite 11]. Essential for creating forms is to understand the form logic [Seite 13].
    Architecture
    If you create forms for an application, you want to include application data into the form. The architecture of SAP Smart Forms separates application data retrieval from the actual definition of the form:
    In a Smart Form you describe:
    •     The layout of your form (element positions on a page)
    •     Individual elements you want to display (text, graphics, addresses, tables, and so on)
    •     the form logic you use, for example, to read application data from internal tables, to introduce conditions, and to control process flows (see also: Form Logic: Introduction [Seite 13])
    •     a form interface to transfer application data to the form definition
    When you activate the Smart Form, the system generates a function module that encapsulates all attributes of the Smart Form. As soon as the application program calls the function module, the Smart Form uses the modules interface (which corresponds to the form interface) to transfer any table data previously selected and to print the form according to the form description.
    The form description can also contain statements that select further data during form processing. However, you should not use this method of data retrieval. Especially if you print mass forms, performance will deteriorate considerably.
    Creating Forms Using SAP Smart Forms
    This section gives an overview of how to create a form in which to display application data from database tables.
    For more detailed information on this procedure, see Using SAP Smart Forms [Seite 14].
    When creating a form, you must:
    1.     Retrieve the application data [Seite 11].
    2.     Describe your form [Seite 12].
    3.     Pass the application data to the form [Seite 38].
    Printing the Form
    Call a function module generated by Smart Forms to print your form. Smart Forms support the forllowing output options:
    •     The form is printed on a printer connected to the SAP System. Before printing, use the print preview to check whether the form is correct.
    •     The function module generates an XSF datastream that transfers, for example, the form description including the retrieved data to programs of third-party companies.
    Retrieving Application Data
    Prerequisites
    To achieve a good performance when printing a form, you must separate data selection from the use of data in the form. Thus you can bundle database operations before you start processing the form.
    Before you retrieve data, you should know:
    •     Which application data you want to appear in the form
    •     Which database tables you must access to retrieve this data
    Process Flow
    Write an ABAP program to retrieve data or include a retrieval routine into your application. This code consists of statements that select data from the database according to certain selection criteria. Store the retrieved data in internal tables, structures, or variables and transfer it to the form in one step.
    While you initialize the form, you can format the data, which you passed to the form, for output in the form. Formatting data in the form and not in the data retrieval program allows you to use one data retrieval program for several forms with different formatting routines.
    Result
    You store the application data in internal tables of the data retrieval program. Since you know now which table types occur, you can define a form interface to transfer this data to the appropriate form.
    Describing the Form
    You describe a form using a Smart Form. To do this, use the Form Builder (see also: Graphical User Interface [Seite 15]):
    1.     Describe the interface of the form. It results from the application data previously selected.
    2.     Create one or more pages. On a page, you can position windows, addresses, and graphics. Within a window, you can create additional elements.
    3.     Create elements (text, graphics, tables, and so on) for each page, using other tools of the Form Builder:
    &#61485;     Use the Form Painter [Seite 17] to position windows, graphics, and addresses on a page (the other elements are displayed in an assigned window).
    &#61485;     Use the PC Editor [Seite 19] to write your texts.
    &#61485;     Use the Table Painter [Seite 20] to format your tables.
    For an overview of the elements available on page level, see Node Types: Overview [Seite 23].
    4.     Use the flow control [Seite 50] to control whether and when to print pages and elements.
    Result
    When you activate your Smart Form, the Form Builder generates a function module that encapsulates the form description.
    Form Logic: Introduction
    In the Form Builder you describe a Smart Form by a set of nodes. To do this, you build up a tree structure on the left side of the user interface:
    This graphic already contains some nodes. The node Global Settings as well as its three successors Form attributes, Form interface, and Global definitions always exist for any newly created forms. To describe the Form logic, create a hierarchy under the node Pages and windows. This hierarchy determines the rules used to process the nodes of the tree. Depending on the node type, this could include:
    •     printing the node contents (text, addresses, graphics).
    •     executing the node statements.
    •     executing the successors of a node according to other rules (for example, in a loop).
    You use the form logic to control the flow of the form output. The following rules apply throughout:
    1.     The nodes in the tree structure are processed from top to bottom. This is easier to understand, if you imagine all nodes to be expanded.
    2.     For each node there is a tab, which you can use to link the node to a condition [Seite 51]. If the condition is true, the system processes the node. If not, it skips the node and all its successors.
    3.     You must define a next page for each page. However, you can also go to other pages dynamically (see also: Flow Control [Seite 50]).
    In addition, the page break depends on how much space there is left on the current page.
    For the complete rules for processing the tree structure, see Processing a Form [Seite 63].
    Example for Form Logic
    The diagram below shows the tree structure of the root node Pages and windows:
    The numbering of the nodes also shows the sequence in which they are processed (from top to bottom). The first node is the root node. The successors of a node are all nodes included directly under this node in the hierarchy. For node 5 these are the nodes 6 to 9 (direct successors are only the nodes of the next hierarchy level, that is 6, 7, and 9).
    A node without a successor node is also called end node. Elementary nodes can never have successors (see also Node Types: Overview [Seite 23]). If the condition of node 7 is false, neither node 7 nor node 8 are processed. Processing resumes directly with node 9.
    In this example, we assume that no pages are called dynamically and that there is enough space on the page for the output.
    Using SAP Smart Forms
    Graphical User Interface
    Use
    SAP Smart Forms provide a graphical user interface that helps you create and maintain the layout and the form logic of a form: the SAP Form Builder. You need neither have any programming knowledge nor use a Script language to adapt standard forms. Basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
    Features
    The SAP Form Builder of the SAP Smart Forms consists of:
    •     Form Painter for creating the layout of a form,
    •     PC Editor for entering texts and fields into output areas,
    •     Navigation tree for maintaining the form logic,
    •     Table Painter for creating templates and tables,
    •     Form check.
    To define text formats, use style maintenance (transaction SMARTSTYLES;see also Smart Styles [Seite 54]).
    Activities
    The SAP Smart Forms initial screen is the starting point for maintaining forms, styles [Seite 54], and text modules [Seite 54]:
    1.     Choose transction SMARTFORMS.
    The dialog window SAP Smart Forms: Request appears.
    2.     Select Form, Style, or Text module, depending on which object you want to create, display, or change.
    3.     Enter the name of the object.
    4.     Choose Create, Change, or Display.
    Depending on the radio button you selected (Form, Style, Text module), the system branches to the Form Builder, the style maintenance (transaction SMARTSTYLES ), or to the text module maintenance.
    Navigating in the SAP Form Builder
    The screen capture below shows the three different areas of the SAP Form Builder: The navigation tree (hierarchy structure of a Smart Form) on the left, the maintenance screen in the middle, and the Form Painter on the right.
    If you select a tree in the node, the system updates the maintenance screen and marks the relevant window in the Form Painter. You can also select a window in the Form Painter; the system them marks the relevant node in the tree.
    In the tree you determine the hierarchy of the form logic (see also Form Logic: Introduction [Seite 13]); in the Form Painter you determine the layout. If you, for example, move a window in the tree, this does not effect the layout of the Smart Form.
    Tree Navigation
    Selecting a Node
    To select a node in the tree, double-click it. The system updates the maintenance screen accordingly.
    Drag&Drop
    Use Drag&Drop to move (left mouse button) or copy (Ctrl + left mouse button) subtrees.
    Drag&Drop is a "move" operation, consisting of a "cut" and a "paste" operation with its own clipboard. If the node you are moving can be appended either on the same level as the target node or as a successor of the target node, the context menu offers both possbilities.
    Context Menu
    Use the right mouse button to display a sensitive context menu in the tree (that is, depending on the current node type). The following functions exist:
    •     Creating or deleting (only in change mode)
    Depending on the selected node type only valid node types appear.
    •     Clipboard operations (see below), such as cutting, copying to clipboard, pasting from clipboard (only in change mode)
    •     Expanding and collapsing a subtree
    Clipboard
    There are three clipboard operations:
    •     Copy
    Copies the selected node with all its successor nodes into the clipboard.
    •     Cut
    Copies the selected node with all its successor nodes into the clipboard and deletes the copied nodes from the tree.
    •     Paste
    Before pasting, the system checks whether and where you are allowed to append the root node of the clipboard contents.
    Maintenance Screen
    On the maintenance screen you can select different tab pages depending on the node type. For more information see Node Types: Overview [Seite 23].
    Form Painter
    You can suppress or display the Form Painter (choose Form Painter on/off). For more information on how to work with the Form Painter see Graphical Form Painter [Seite 17].
    Form Painter
    Use
    You use the Form Painter to design the layout of the pages of a Smart Form. You can include windows and graphics on a page, determine their positions and choose the window sizes.
    The Form Painter offers the following functions:
    •     Design area with ruler, cursor with help lines, and grid and main grid
    •     Display of the cursor position in the ruler, which you can suppress and set
    •     Two-level grid with engage function, which you can customize at will
    •     When creating, changing, and moving a window, the window size appears in the ruler.
    •     Detachable toolbar containing the most important functions
    •     Autoscrolling when moving windows; placing windows into the background
    •     Zoom factors you can set to any value and autozooming of the design area to the window size
    •     Sensitive context menu
    •     Placing a scanned graphic into the background of the design area (see also Printing Graphics [Seite 31])
    Activities
    To display or suppress the Form Painter choose Form Painter on/off.
    To make detailed settings in the Form Painter (for example, step size of the grid, zoom factors, and so on), choose Settings in its toolbar.
    PC Editor
    You use the PC Editor to enter and format texts and fields.
    Among others, the PC Editor offers the following functions:
    •     Enter, delete, select, cut, and copy texts (see also Entering Text in the PC Editor [Seite 27]).
    •     Assign paragraph and character formats (for a list of the available formats use the list boxes Paragraph formats and Character formats)
    •     Include, change, and delete fields (see also Using Fields in the Form [Seite 42])
    The PC Editor displays fields with a gray background.
    Table Painter
    Use
    You use the Table Painter to design templates and tables in a window (see also Displaying a Table with Static Data [Seite 33]).
    The Table Painter offers the following functions:
    •     Drawing lines and columns
    •     Inserting, cutting, copying, and deleting lines
    •     Deleting cells
    •     Changing cell size and moving cell separator lines
    •     Splitting cells
    •     Selecting table patterns
    Activities
    To display or suppress the Table Painter, choose Table Painter on/off on the Table tab on the maintenance screen of a table or template.
    The design area does not mirror the size of your window into which you include the table. Therefore, remember to check the size in the ruler.
    If you want to insert two tables one after the other, you must create two tables in the window node one after the other.
    To execute a function, mark a cell and choose the function in the context menu (right mouse button).
    To select a table pattern, select the Table tab in the node and choose Select pattern.
    To make detailed settings in the Table Painter (for example, step size of the grid, zoom factors, and so on), choose Settings in its toolbar.
    Style Builder
    The screen capture shows the Style Builder that you use to define Smart Styles. On the left, you see the style tree which consists of predetermined nodes (header data, folder for paragraph formats, folder for character formats). You can navigate between the nodes and create new nodes. On the right, you see the maintenance screen with its tab pages (here, for example, standard settings for the font in the selected color blue). At the bottom you see the preview of the selected font.
    For detailed information on how to create and maintain a Smart Style see Smart Styles [Seite 54].
    Field List and Error List
    Field List
    The field list displays the following data in a tree structure:
    •     all tables, structures, and fields passed via the form interface [Seite 38].
    •     system fields [Seite 43] and fields you defined in the global definitions [Seite 41]
    This allows you to check that you enter the correct field name when you include a field, and that the Smart Form actually knows the field.
    To display the field list, in the Form Builder choose Field list on/off.
    Error List
    When you check the Smart Form and any errors occur, the system displays a list of errors and warnings at the bottom of the maintenance screen. To find the error or warning in the tree, select the node in the second column. The system then goes to the corresponding position in the tree and you can correct the error.
    To check the entire Smart Form choose Check. If an error occurs the error list appears.
    For more information on testing and checking forms see Checking and Testing a Smart Form [Seite 58].
    Node Types: Overview
    When you create a Smart Form, the tree structure of the Form Painter already contains two root nodes:
    •     You use the successors of the Global Settings node to maintain Form attributes, the Form interface, and Global definitions.
    •     You use the successors of the Pages and windows node to create the pages of your form, position elements on these pages, and determine the sequence in which you want to process these elements.
    Apart from the two root nodes, each node has attributes. You can maintain these attributes on tabs on the right half of the screen. The attributes you can maintain on the tabs General Attributes, Output Options, and Conditions are the same for most of the node types (see: Shared Attributes of the Node Types [Seite 24]).
    Successors of Node Pages and windows
    As direct successors to root node Pages and windows you can create only page nodes. The tables below describe these page nodes and the other successors:
    Output areas
    Node type     Description     Possible direct successors
    Page [Seite 25]
    A page of the form. Direct successors of this node can be placed directly on the page.     Window, graphic, address
    Window [Seite 26]
    Output area on a page. There are main windows and subwindows.     All except window and page nodes
    Elementary nodes (without successors)
    Node type     Description
    Text [Seite 26]
    You use this node to print any texts (and table contents), except addresses.
    Graphic [Seite 31]
    You use this node to position graphics in the form. To include background graphics, use node type Page.
    Address [Seite 30]
    You use this node to include an address. The system reads the address data directly from the database tables and formats them for print output.
    Table output
    Node type     Description     Possible direct successors
    Template [Seite 33]
    Output of a table containing static data     All except window, page, table, and template nodes
    Table [Seite 46]
    Output of a table containing application data     As with template node
    Flow control
    Node type     Description     Possible direct successors
    Command [Seite 52]
    Executes special commands (next page, paragraph numbering, printer control)     (no successor)
    Loop [Seite 52]
    Processes successor node repeatedly.     All except window and page nodes
    Alternative [Seite 51]
    Branches depending on condition.     Direct successors are automatically the nodes TRUE and FALSE. The direct successors of these are all nodes except window and page nodes.
    Other nodes
    Node type     Description     Possible direct successors
    Folder [Seite 36]
    Combines successor nodes to logical groups     All except window and page nodes
    Complex section [Seite 60]
    Combines all attributes of the node types template, table, loop, folder     All except window and page nodes
    Program lines [Seite 61]
    Executes ABAP program code (for example, conversion routines).     (no successors)
    Shared Attributes of the Node Types
    The following tab pages are used in common by several node types:
    Tabs for general node attributes
    Name     Description
    General Attributes     Shows contents or description of the node
    Output Options     Contains attributes such as position, style, box and shading
    Conditions [Seite 51]
    Allows to display the node only if certain conditions are true (see also: Flow Control [Seite 50])
    The node types Table, Template, Loop, Folder, and Complex section share a different tab in the place of General Attributes.
    Output Options
    Except for the page nodes in the subtree Pages and windows, you can always use this tab to determine a box and shading for the respective node. Nodes with text output also have the attribute Style. You use this attribute to overwrite for the current subtree the style that was set in the form.
    Depending on where you insert a node, it can have additional output options (for example, if the predecessor is a template [Seite 33]).
    Basic Elements of a Form
    Creating Pages
    Use
    Each form consists of one or more pages. The first page in the tree structure is the start page (when you create a form, the start page already exists). With this page, processing of the form starts.
    When you call pages repeatedly or process pages again because the main window is not filled yet, a page node creates several print pages.
    See also: General Concepts on Form Printing [Seite 7].
    Procedure
    1.     Open the context menu for an existing page node and choose Create &#61614; Page.
    2.     Enter a unique name for the node and a description (for example, business terms).
    3.     Determine the format and the mode of the page counter [Seite 53] on the General Attributes tab. In the default setting, the next page is the page itself.
    4.     Determine the print attributes of the page on the Output Options tab (see F1 help).
    5.     Determine a background graphic for the entire page on the Background tab. For information on how to select the graphic see Printing Graphics [Seite 31]. If you do not determine an Output mode in the Output attributes box (in print preview only, on the printer as well), the system ignores the background graphic.
    If you select an output mode, the user can still choose Background graphic in the print preview to display or suppress it.
    Result
    You can now define the page contents. For each page, the Form Painter shows an individual layout. Whether the page is included into the printout depends on whether it is evaluated during form processing [Seite 62] (a page can be omitted even though it is part of the tree structure).
    Creating Windows
    Use
    Windows are output areas for all output data. You can set the size and position of a window graphically in the Form Painter. There are main windows and subwindows [Seite 8]. The most important difference is that the output in a main window can cover several pages.
    After you created a form, a main window already exists on the first page.
    Prerequisites
    A page [Seite 25] exists on which you want to create a window.
    Procedure
    6.     Open the context menu for an existing page node and choose Create &#61614; Window.
    If you create the window in the Form Painter using the context menu, you can use the mouse to position it immediately.
    7.     Enter a unique name for the node and a description (for example, booked flights).
    8.     On the General Attributes tab indicate whether the window is a Main window. If you want to create a subwindow, leave the checkbox empty.
    For each page you can indicate only one main window.
    9.     The Position and Size values in the Output options box correspond to the position in the Form Painter. If you want to, maintain other attributes [Seite 24].
    Result
    You can see the window in the Form Painter and in the tree structure. You can always change the specification of the main window or subwindow.
    Positioning Texts on the Form
    Use
    You display all texts in the form using text nodes. The only exception are addresses [Seite 30], which use their own node.
    Integration
    The predecessor node [Seite 14] of the text node determines its use:
    Examples for using text nodes
    Predecessor node     Used to
    Subwindow     Exactly position text on one or more pages
    Main window     Display text in relation to other nodes in the main window; it may cover several pages
    Template     Display texts for table cells of a static table [Seite 33]
    Table     Display table contents
    Header and footer [Seite 49]
    Display column headings and grand totals in tables
    Event node [Seite 48]
    Display subtotals in a table
    Features
    There are the following text types:
    •     Text element: to enter new text in the PC Editor [Seite 27]
    •     Text module: to include a text module [Seite 28]
    •     Include text: to include an existing SAPscript text [Seite 29]
    Positioning the Text
    The position of the text depends on the direct predecessor node (for example, you can assign text of a table cell) as well as on the processing sequence in the tree structure. In addition, you determine output of a text node in relation to the preceding node on the same level [Seite 14]. You can append the text directly to the output of that node or start it in a new paragraph or a new line (select via radiobutton).
    Entering Texts in the PC Editor
    Use
    You use the PC Editor [Seite 19] to enter new text. The position of this text on the form is determined by the predecessor node.
    To include data from the form interface (data from application tables) or system data (date, time) into the text, use system fields or user-defined fields, respectively, in the text (see Using Parameters in the Form [Seite 37]). When processing the form, Smart Forms replace these fields with the corresponding values.
    Procedure
    1.     To create a text node, call the context menu for that node in the tree structure that should receive the text. Then choose Create &#61614; Text.
    2.     Enter a unique name for the node and a node description (for example, letter).
    3.     On the General Attributes tab choose Text element as text type.
    Since you edit a text element, an included text, or a text module exclusively using the text node, the system stores only information on the selected type. When you change the text type, the system therefore asks for your confirmation.
    4.     Enter your text in the PC Editor
    &#61485;     either directly on the tab if you use the inplace version of the PC Editor
    &#61485;     or choose Text editor to go to the fullscreen mode of the PC Editor. If, after entering the text, you use the green arrow (F3) to leave the fullscreen editor, the system transfers the text into the inplace version.
    5.     In the Text node box choose whether you want the text to start with a new paragraph or only in a new line. You can also choose to append the text directly to the end of the current paragraph.
    6.     If desired, choose the Output Options [Seite 24] tab to maintain the style or box and shading of the text.
    Result
    The system displays the node in the tree structure, including its name and description.
    Including Text Modules
    Use
    You use the text type Text module of the text node [Seite 26] to refer to an existing text module  [Seite 54]in the system. This allows you to easily use texts from text modules in several forms. In addition, it is not necessary to load the entire form description to maintain these texts.
    You can use text modules in two ways:
    •     Refer to the text module. The text then appears read-only in the PC editor and is included when you print the form.
    •     Copy the text module. The system then copies the text of the module and automatically converts the text node into an editable text element.
    Text modules can be used cross-client and are connected to the transport and translation systems.
    Prerequisites
    The text module you want to include must exist in the system. To create a text module use the SAP Smart Forms initial screen [Seite 15].
    Procedure
    5.     To create a text node, call the context menu for that node in the tree structure that shall contain the text and choose Create &#61614; Text.
    6.     Enter a unique name for the node and a description (for example, business terms).
    7.     On the General attributes tab select the text type Text module.
    Since you edit a text element, an included text, or a text module exclusively via the text node, the system stores only information on the selected type. When you change the text type, the system therefore asks for your confirmation.
    8.     Enter the name of the text module in the Text name field. Or click on the black arrow and enter the name of a field to be evaluated dynamically [Seite 37].
    9.     If you want to change the text of the text module for the current form, choose Copy. The Form Builder changes the text type to Text element and copies the text of the module into the PC Editor, where you can edit it. In this case, the original text module remains unchanged.
    10.     Use the checkbox Always copy style from text to determine that the style of the text module is of higher priority than that of the text node or any style inherited from a predecessor. This is important if you specified the name of a field in step 4 (see F1 help).
    11.     If required, use the Output options [Seite 24] tab to maintain attributes for style, box and shading of the text.
    Result
    The system displays the node including name and description in the tree structure. It includes the relevant text itself in the moment the form is processed. If you refer to a text module, it appears in the PC Editor in read-only mode, if you copy it you can edit it.
    Including SAPscript Texts
    Use
    You use the text type Include text of the text node to refer to a SAPscript text that already exists in the system. To identify the text, you need the text name, the text object, the text ID, and the language. Thus, you can easily use the texts in several forms. In addition, you need not load the entire form description [Seite 12] to maintain these texts.
    This text type corresponds to the SAPscript statement INCLUDE. However, Smart Forms do not allow any control statements in include texts. When processing the form, they are simply ignored.
    To administer application-specific form texts, applications use transaction SE75 to define their own text objects with subordinate text IDs. Use text object TEXT with text ID ST to enter general standard texts. To maintain them, use the standard text editor (transaction SO10).
    If there is no need for you to use old SAPscript texts, you better use text modules [Seite 28]. They can be used cross-client and are connected to the transport and translation systems.
    Procedure
    1.     To create a text node, call the context menu for that node in the tree structure that shall receive the text and choose Create &#61614; Text.
    2.     Enter a unique name for the node and a node description (for example, letter).
    3.     On the General Attributes tab choose Include text as text type.
    Since you edit a text element, an included text, or a text module exclusively via the text node, the system stores only information on the selected type. When you change the text type, the system therefore asks for your confirmation.
    4.     In the Text key box, identify the include text.
    &#61485;     To identify individual text objects, use the search help in this field.
    &#61485;     The search help of the Text name field allows you include the attributes of SAPscript texts into the search.
    7.     If required, use the Paragraph formats box to format the include text:
    &#61485;     The style assigned to the text node contains a format for the standard paragraph ('*'). If you enter a paragraph format in the Standard paragraph field, this format overwrites the style format for all standard paragraphs in the include text that use this paragraph format.
    &#61485;     Use the First paragraph field to set a paragraph format for the first paragraph of the include text. This format also overwrites the format set in the style. If you set the First paragraph field but leave the Standard paragraph field empty, the system uses the format set in the First paragraph field for any standard paragraphs in the include text.
    6.     In the Text node box choose whether you want the text to start in a new paragraph, in a new line, or directly at the end of the current paragraph.
    7.     If desired, choose the Output Options [Seite 24] tab to maintain the style or box and shading of the text.
    Result
    The system displays the node in the tree structure, including its name and description. The included text is included only at the moment the form is processed.
    Inserting Addresses
    Use
    In many applications, addresses are administered using the Central Address Administration [Extern]. Depending on how the address is used, the application uses a particular address type [Extern]. The addresses are stored in the database tables of the central address administration and identified by the application via a number.
    You use the address node to insert an address into the form. This guarantees that the address is formatted according to the postal rules of the sender country.
    Prerequisites
    Your application must administer addresses using the central address administration. Otherwise you must use the text node [Seite 26] to insert your addresses.
    Procedure
    1.     To create an address node, call the context menu for that node in the tree structure that you want to contain the text and choose Create &#61614; Text.
    Create the address node as direct successor of the page node or use the context menu in the layout of the Form Painter. You can then position the address anywhere on the page.
    2.     Enter a unique name for the node and a description (for example, customer address).
    3.     Determine the address type on the General attributes tab.
    For a description of how to determine the address type dynamically and how to use fields instead of fixed values, see Using Parameters in the Form [Seite 37].
    4.     For organization addresses you must specify only an address number. For any other address types, you must specify a person number and an address number. To do this, use the search help.
    5.     In the box Additional address specifications you can maintain other attributes to specify how you want to display the address:
    &#61485;     Use field Output starts with paragraph to set the paragraph format of the style that you want to use to display the address.
    &#61485;     If the number of lines you specify in the field Number of lines to be used is smaller than the number of lines required to display the address, the central address administration suppresses lines of the address.
    &#61485;     As default, the system uses as sender country the country that was specified when creating the address. You can use the parameter Sender country to overwrite this setting.
    &#61485;     For addresses that have a P.O. box as well as a street address, use the other fields in the box to determine which of these addresses to display.
    6.     If desired, you can use the Output Options [Seite 24] tab to maintain attributes for style, box, and shading of the text. In addition, you can set values for position and size of the output area (instead of in the Form Painter).
    Result
    The system displays the node including name and description in the tree structure. If you insert the address as direct successor of a page or by using the Form Painter, the system displays an extra output area for the address. The address itself is inserted only at the moment the form is processed. You cannot view it in the Form Builder.
    Printing Graphics
    Use
    You use the graphic node to display graphics, such as a company logo, on the form. For performance reasons, make sure that the graphics are held in the printer memory. SAP Smart Forms support this method, provided that:
    •     The printer can be controlled accordingly.
    •     There is enough memory space on the printer.
    •     You activated this property in transaction SE78 (see below).
    In this case, the system sends the graphics to the printer only once during one print job.
    To include background graphics, use the Background graphic tab of a page node.
    Prerequisites
    You use the SAPscript Graphic Administration (transaction SE78) to import graphics into the SAP-System:
    1.     Double-click on a graphic format in the tree structure in the forder Document server &#61614; GRAPHICS General graphics.
    2.     Choose Graphic &#61614; import.
    The transaction imports the graphic and stores it on the Business Document Server (BDS). Now you can display it on a form.
    See also: Graphic Administration [Seite 65]
    Procedure
    1.     To create a graphic node, call the context menu for that node in the tree structure that you want to contain the graphic and choose Create &#61614; Graphic.
    Create the graphic node as direct successor of the page node or use the context menu in the layout of the Form Painter. You can then position the graphic anywhere on the page.
    In the Form Painter the system displays a small box for the newly created node.
    2.     Enter a unique name for the node and a description (for example, company logo).
    3.     On the General Attributes tab determine whether you want to include a colored graphic or a graphic in black and white.
    4.     Use the fields Object, ID, and Name to identify the graphic. Use F4 help of the Name field to copy the values of these fields. If you copy them with ENTER, the system displays the graphic in the Form Painter.
    The box for the graphic in the Form Painter also contains the name of the graphic node, which in part overlays the graphic.
    5.     In the Technical Attributes box determine the graphic resolution according to what the printer supprts. Small resolutions increase the size of the graphic on the form, higher resolutions reduce the size.
    6.     For graphic nodes that are displayed in a window, there is a box Horizontal position in addition to the general output options [Seite 24]. The parameters Reference point and Alignment determine the horizontal position in the window, while the vertical position is determined by the previous output in the window.
    At present, you cannot overlay graphics with text. However, if you use a template node [Seite 33], you can display graphics and text side by side.
    Result
    The system displays the node with name and description in the tree structure. If you insert a graphic as direct successor of a page or if you used the Form Painter, the system displays the graphic. Graphics in windows are inserted only when the form is processed. You can therefore not see them in the Form Builder. In addition, the system automatically dispalys the graphic on the next page if there is not enough space left on the current page.
    Displaying a Static Table
    Use
    Use node type Template to display a table whose layout and size (number of lines and columns) is determined before the runtime of the print program.
    To create a template, define a table layout to determine the cell structure for each line. The cells are used to display the contents of the successor nodes of the template node. This allows you to position text and a graphic side by side (see Displaying Graphics in Templates [Seite 36]).
    The template node is also suited for label printing.
    Integration
    You can use system fields or your own fields &#61630; for example, to display the current date &#61630; in table cells (see also Using Parameters in the Form [Seite 37]).
    To display application data, use the table node. For this node type the number of table lines to be displayed is not known before the form is actually printed (the number depends on the volume of application data selected in the data retrieval program [Seite 38]).
    Prerequisites
    You can create a template node only as a successor to a window node. If you want to display the template in a particular area of the page, create a subwindow for it. Otherwise, use the main window.
    Features
    The node type displays a table layout [Seite 34]. You can either enter the table layout directly or use the Table Painter to define it.
    To set other attributes, use the attributes the node types share [Seite 24].
    Activities
    To use a template, you must:
    1.     Define the table layout [Seite 34].
    2.     Display contents in the table cells [Seite 35].
    Defining the Table Layout
    Use
    You use the table layout to determine:
    •     The number of lines and cells
    •     The height of each line
    •     The width of each cell
    •     The alignment of the table in the window
    •     Whether and where to display separator lines or frames
    Procedure
    Create a template node and maintain the attributes Width, Horizontal alignment, and Vertical alignment (See F1 help).
    Use the table control on the Template tab to define the layout of the lines. Each line of the template must have a definition. You can use one line in the table control to define either the layout of one template line or a common layout for several template lines:
    •     Use the columns From and To to specify the lines of your template, for which the definition applies. The numbering starts with 1. The intervals in the line definition may neither overlap nor leave gaps.
    •     The Height you specify applies for all cells of this line. Specify a Width for each cell you want to display. The sum of the width values must amount to the specified Width of the template.
    •     You can reuse the Name of the template line for other lines of the same template. Enter it in the Reference column of the desired lines. The system then copies the values you specified for the line height and the individual cell widths.
    Use the Pattern box to select the desired table pattern.
    Example
    You define the following lines in the table control (in the example without measurement units):
    Name     From     To     Reference     Height     1.     2.     3
    Line1_2     1     2          1     1     2     3
    Line3     3     3          2     2     2     2
    Line4     4     4     Line1_2     1     1     2     3
    You use the Pattern box to specify that all cells are separated by visible lines and that the template is framed.
    Result
    On the form, the template may look like this:
    Displaying Contents in Cells
    Use
    The template node defines the table layout [Seite 34]. The successor nodes of the template node determine the data to be displayed in the table cells.
    Prerequisites
    You already created a template node as successor of a window node and defined the table layout.
    Procedure
    1.     Use the context menu of the template node to create successor nodes.
    For clarity reasons create one folder node [Seite 36] for each line. The folder node is an outline node that you can use to combine related nodes. For folder nodes, you need not fill in the input fields in the Output structure box (see next step).
    2.     The Output options tabs of the inserted nodes now contain an additional box Output structure with the fields Line and Column. Assign each node to the cell in which you want the output to appear.
    You can assign several nodes to one cell. The output sequence within the cell is determined by the sequence of the nodes in the tree.
    Result
    The system displays the contents in the print preview or prints them, respectively.

Maybe you are looking for

  • How do I create a sound loop with Garageband?

    Probably a simple question, but I'm very new to Garageband. I'm trying to make some sound loops to use as looping background music for a Flash website. How do I import an mp3 from my iTunes and the cut it down to a 10 second or so snippet, then have

  • Issue in setting IBASE component of service confirmation item

    Hello Experts,                I am facing a problem while creating a service confirmation item with reference to Service order items.  I am using CRM_ORDER_MAINTAIN bapi.  Issue is in the Ibase component of the service confirmation items as it is alw

  • Lumia 620 and bluetooth

    I am having an issue with a new Lumia 620. It cannot maintain a bluetooth connection. Watching this guy here: http://www.youtube.com/watch?v=XHaJmTxi5zU shows how it should be: Connect phone to computer via bluetooth and maintain connection. What hap

  • Query on KEY-PRVBLK trigger

    Hi All, I have a KEY-PRVBLK trigger which has certain validation which calls various procedures and functions in it. From business point of view they want previous block validation to execute however they doesnt not want previous block trigger to mov

  • Weird network stream broken wire

    Well, we decided to use network streams. Here is a strange one. Can anyone explain this one to me? I have resorted to transposing the data external to the process that receives it so a transpose doesn't have to be done in the receiver, which is resul