Smartform Form Layout creation TCode - SMARTFORMS.docx

  • Upload
    dipesh

  • View
    239

  • Download
    0

Embed Size (px)

Citation preview

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    1/23

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    2/23

    & Form Interface: "n t#is tab parameter details are pro'ided$ "mport$()port parameters.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    3/23

    Import Parameter: *e'eloper need to pro'ide parameters w#ic# will beoutput of dri'er program. Same parameters will be used for creatingSmartforms.

    Export Parameters: +e need to pro'ide e)port parameters. ,ormally we don-tneed to pro'ide e)port parameters as it is used for print or output purpose.

    Table :,eed to pro'ide internal tables w#ic# need to be used $ associatedtype s#ould be dened in S(!! /Table *enation /. As in smartforms $only TYPEoption is a'ailable for type assignments.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    4/23

    0 Global e!nition: "n t#is de'eloper need to dene all t#e 'ariables $

    wor1 area and "nternal table $ Local structure denitions $ Field symbols$currency2 3uan elds w#ic# will be used in smartforms.4 Global ata : *e'eloper need to add all t#e 'ariable $ wor1 area and"nternal table. "otefor internal table associated type s#ould be dened as

    Table type in S(!!.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    5/23

    # Types : *e'eloper need to dene structure types in t#is tab.

    # Field Symbols: T#is is used to dene eld symbols $used in OO5S.

    4 Initiali$ation : "n t#is tab$ de'eloper need to write global code w#ic# can beused to wor1 on t#e data transferred from *ri'er program."nput 5arameters : ,eed to dene all t#e input parameters re6uired to

    e)ecute code.Output 5arameters : ,eed to dene all t#e output parameters re6uired toe)ecute code. Code need to be written in te)t area $ as per below screens#ot.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    6/23

    4 %urrency&'uant Fields: ,eed to dene all t#e currency 2 3uantity eldsto be used in t#is smartforms.

    () Pages and *indo+s -ayout creation): "n t#is section de'eloper candesign Smartforms as per business needs. +e can create 5ages$ +indows$7rap#ics and Address elds.

    T#ere are four types of window t#at can be created:

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    7/23

    .ain *indo+: "t contains all t#e information w#ic# we need to display.Most of t#e times *ata is dynamic in main window. +e can dene only oneMain window in a page. +e can create: Te)t$ Table$ Template$ Flow Logic$Address window$ 7rap#ics$ Address.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    8/23

    Grap/ics Section: As per business re6uirements user can assign image ingrap#ics section. ,ormally t#is used to display company logo or plant address 8to

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    9/23

    reduce t#e space

    Address: Smartforms gi'es t#e option of gi'ing t#e address number w#ic# is

    maintained in t#e central address management. T#e address will be directly

    ta1en from A*RC table and will be populated in t#e form.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    10/23

    Table Painter: "n Table painter$ you can draw t#e format as per client re6uirement

    8e.g. 9eading$ Sub 9eading$ "tem$ Sub Total$ 7rand Total etc.. "n simple words

    Table = Loop + Template

    you can use t#e table layout to determine:

    T#e number of lines and cells

    T#e #eig#t of eac# line

    T#e widt# of eac# cell

    T#e alignment of t#e table in t#e window

    Table e)tends dynamically.

    Table contains dynamic data.

    T#e Table s#ows t#e dierent line types w#ic# will be used in t#e table. T#e Linetypes dene t#e si;e of eac# cell and t#e number of cells in eac# line.

    Table #as 0 sections$ 0E1E2, ITE., FOOTE2 t#e #eader section will bee)ecuted once and it will loop at t#e item le'el$ and at t#e end footer will bee)ecuted.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    11/23

    ails

    Sections in table:

    # Table:"n t#is section line type is dened. w#ic# will be used w#iledening sections in 9eader $ Main area and Footer.etails 3 Field detailssection

    # ata:"n t#is de'eloper need to pro'ide details of "nternal Table and+or1 area

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    12/23

    # %alculations: "f we need to display total $ we need to pro'ideoperations w#ic# need to be e)ecuted $ eld details $ Target eld details andw#en t#is acti'ity need to be e)ecuted.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    13/23

    .ain *indo+ Section :

    +e need to add Row for 0eader , .ain 1reaand Footer 1rea4

    "n eac# section we need to pro'ide -ine typew#ic# need to be displayed in

    Template:

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    14/23

    Template is a predened format w#ic# you can design in t#e smartform

    li1e a ruled note boo1. *e'eloper can grap#ically create no of rows and

    columns u want

    it is static

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    15/23

    0eader:Static eld labels are pro'ided in te)t elds of 9eader section.

    .ain 1rea: T#is section is updated dynamically as per t#e data fetc#ed fromdatabase. =alues in main area are dynamic.

    Footer Section :T#is section normally used to display total 'alues $ total 'aluesor number of line items. +e can add conditions in all t#e windows$ if condition issatised t#en t#is section will be displayed or it will not be displayed. Similar toIF 444 E" IF %ondition.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    16/23

    Secondary *indo+: Si;e of secondary window is always )ed. "f data e)tendsbeyond t#e si;e of secondary window t#en it will be truncated. ,ormally

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    17/23

    Secondary window section is used to display address$ nal total$ company logoor T>Cs.

    Final *indo+: *e'eloper cannot add any ot#er window after nal window isdened on t#at page.

    System Fields for S.12TFO2.S

    System fields of Smart Forms

    5SFSY#1TE5*isplays t#e date.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    18/23

    5SFSY#*I"O*"1.E5Contains t#e name of t#e current window 8string in t#e +indow eld

    5SFSY#P1GE"1.E5Contains t#e name of t#e current page 8string in t#e 5age eld

    5SFSY#P1GE(2E175"s set to ?@? after a page brea1 8eit#er automatic 5age B or command4controlled5age DE

    5SFSY#.1I"E"5"s set as soon as processing of t#e main window on t#e current page ends

    5SFSY#E8%EPTIO"5Contains t#e name of t#e raised e)ception.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    19/23

    In General Attributes of the alternate give condition !"#$%& ' (I#( as shown below

    %ight lick on $rue and create text and write some text in that, likewise create text and write something forfalse condition also. #ow our screen will appear as shown below

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    20/23

    )In this case I have written *Alternate ondtion $rue + ountry is India for the text in true condition and*Alternate ondtion $rue + ountry is India for text in false condition-

    -oop : oop can be used in any window , it is not limited to /ain 0indow alone . Give a descriptivename to the oop 1escription text area.

    !n the 1ata tab of the 2martform oop element, define the loop for each I$345A6 row as follows.

    !n every turn of the defined loop, move each loop item into G2345A6 vbak global structureor 45A6work area item.

    Also set the %ow range from 7 to a logical number for example 8888, etc.

    #ow we willcreatea data section which will show the 2A9 sales document number and the detail

    items of the 45A6 row which maps to 2A9 45A9 records of the related 45A6 header data.

    irst of all, we willcreatea text element under the oop element node.$his text element will display the 45E# sales document number for each record of it3vbak selected

    in the loop.

    $hen we will add a table element in order to display the items of the loop item.

    $he last 2martform element which we willcreateon this 2martforms example document is ommand

    element.

    0e will use the ommand element in order to set page break between two vbak header records.

    5elow is the screenshot that the 2A9 2martform elements of this example 2martforms.

    #ote that the descriptions of the 2martforms elements are given due to their respective tasks.

    Program -ines: "n t#is section de'eloper #as to write program lines as perbusiness re6uirements.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    21/23

    *e'eloper #as to pro'ide input parameters and output parameters$ as t#is eldsare mandatory.

    %ommand:T#is section is used to add control brea1 statements.

    ()G in some cases user will ask only specific number of records should be displayed per page, butbased on space availability of main window data will populate. $o restrict manually the number of

    records displayed per page we can use !//A#1.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    22/23

    1evelopers have to write comparison value field and value in condition tab.

    1uxiliary "odes in S.12TFO2.S

    ! Table:O2p of a table containing application 2 dynamic data.

    & Template:o2p of a table containing static data.

    0 Program -ines:()ecutes AHA5 code.

    D Folder:Combines successor nodes to logical group.

    I -oop:5rocesses successor nodes repeatedly.

  • 7/25/2019 Smartform Form Layout creation TCode - SMARTFORMS.docx

    23/23

    E 1lternati9e: In Alternative, programmer can give some condition. If the condition is true, only theelements within true node will be executed if its false only the elements within false node will be executed..

    ;- Commands:Executes special commands.