Skip to Content
avatar image
Former Member

smart forms

can i anybody provide d best example and step by step procedure of making smart forms,he or she will be definately rewarded

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 11, 2007 at 05:59 AM

    Follow this steps,

    SMART fORM

    USING TABLE IN Smart Form

    1) Tcode --> SmartForms

    2) Form name --> Z_SF_TEST Create

    3) Under Global settings

    a) Form Interface

    Table Tab

    ITAB LIKE EKPO

    b) GLOBAL Definitions

    WA_NETPR LIKE EKPO-NETPR

    In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields

    For that we have to create an extra variable in global definitions

    Ex: netpr FIELD of EKPO

    CREATE program lines and specify WA_NETWR = itab-netpr.

    4) RT CLick on main Window

    CREATE --> TABLE

    Click Table painter

    DEFAULT %LTYPE will be Created

    a) If you want more like Header footer etc add by rt click on %LTYPE1

    Table (Tab)

    %LTYPE Radio(SELECT) 5 CM 5 CM 6 CM

    CLICK on DATA (Tab)

    INTERNAL TABLE ITAB LIKE ITAB

    5)RT click on table control and create --> program lines

    General attribute (Tab)

    INPUT PARAMETER OUTPUT PARAMETER

    itab WA_NETPR

    Code Area

    WA_NETWR = ITAB-NETPR.

    6) RT CLcick on table ctl and create 3 text to display the fields

    a) % text1 +button(insert field)

    FIELD name &itab-ebeln&

    Output options (tab)

    Check New line LINETYPE %Ltype1

    check new cell

    b) % text2

    & itab-ebelp&

    output options

    check new cell

    c) % text2

    & wa_netpr&

    output options

    check new cell

    Report ac

    Tables ekpo.

    Data: itab1 like ekpo occurs 0 with header line.

    select * into table itab1 from ekpo.

    Call function module

    go through this link

    Samplewww.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985">Sample>

    Regards,

    SaiRam

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2007 at 06:07 AM

    hi

    i am giving the following procedure to create smart form and print program.

    please check it.

    Go with smartforms tcode->provide form name->go for create

    Provide a description for a form->under global settings

    (Form interface->declarations will be maintained for print program & form)

    So go with form interface->go with tables option->maintain internal table based on KNA1

    ITAB LIKE KNA1

    After that ,

    Go with Pages &windows option.

    Select page and provide the details.

    Then select page ->go for create->window

    Provide window name as LOGO.

    Repeat Same procedure for address and footer window also

    Go with form painter in application tool bar

    Adjust all the windows in proper manner.

    Then close form painter.

    Now select logo window

    Go for create->graphic

    Give the details there

    Name (for name search by F4 for predefine logo names or else give u r logo name)

    Object graphics

    Id bmap

    After that,

    Select address window ->go for create->flowlogic->loop

    Provide loop name &description

    Provide internal table ITAB INTO ITAB.

    SELECT LOOP ->go for create->text elements->provide the name and description

    Then GOTO->CHANGE EDITOR

    Keep variables in address window

    • cust no &ITAB-KUNNR&

    • cust name &ITAB-NAME1&

    • cust country &ITAB-LAND1&

    F3

    Now select main window

    Create->loop

    Provide the details

    Provide internal table ITAB INTO ITAB

    Select LOOP-> go for crate->elements

    Provide TEXT name and description

    GOTO->CHANGE EDITOR

    provide variables in main window

    F3

    select footer window

    go for CREATE->ELEMENTS

    PROVIDE DETAILS

    GO WITH CHANGE EDITOR OPTION

    • PH NO:23424234

    F3

    SAVE AND ACTIVATE

    F8

    Then u can get function module which is system generated automatically

    Copy this function module name

    Then create the executable program

    TABLES:KNA1.

    PARAMETERS:P_KUNNR LIKE KNA1-KUNNR.

    DATA:ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.

    SELECT * FROM KNA1 INTO TABLE ITAB WHERE KUNNR = P_KUNNR.

    Call that function module and pass the parameter

    TABLES

    ITAB = ITAB

    Save and activate

    execute.

    it will work.

    Reward points if useful.

    Thanks,

    Usha

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi ric,

      can u check once the main window in form painter.

      if it is small,the huge data from kna1 can't displayed.

      so you increase the size of main window.

      Thanks,

      Usha