7203270 sap scripts

Upload: amit-verma

Post on 02-Mar-2018

233 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/26/2019 7203270 SAP Scripts

    1/53

    SAP Script

  • 7/26/2019 7203270 SAP Scripts

    2/53

    2 TheASPplusSolutions Com

    SAP Script is the SAP System's owntext-processing system.

    SAP Script is integrated textmanagement system of the SAP R/3system.

    The TCode (Transaction Code isS!"#.

    What is SAP Script ?

  • 7/26/2019 7203270 SAP Scripts

    3/53

    3 TheASPplusSolutions Com

    Why SAP Script ?

    $t is %sed to print preformatted textin preformatted forms.

    &nie reports ) the text can *e

    aigned) di+erent fonts can *e%sed.Company ,ogo can *eprinted.

  • 7/26/2019 7203270 SAP Scripts

    4/53

    4 TheASPplusSolutions Com

    A ayo%t set is dened as a pagedesign for a doc%ment.

    A ayo%t set species the pagedesign *y dening one or morewindows and arranging them on a

    page.,ayo%t set on its own does notcontain any data.

    How to go about creating Forms ?

  • 7/26/2019 7203270 SAP Scripts

    5/53

    5 TheASPplusSolutions Com

    The seection of data for thedoc%ment is done thro%gh the print

    program.

    hen the print program is exec%tedthe doc%ment is printed.

    The print program seects thedata from data*ase ta*e and

    feeds it to the ayo%t set.

    Contn

  • 7/26/2019 7203270 SAP Scripts

    6/53

    6 TheASPplusSolutions Com

    A ayo%t set consists of foowingcomponents

    eader Pages

    indows Page indows Paragraph 0ormats Character 0ormats

    Components of Layout set

  • 7/26/2019 7203270 SAP Scripts

    7/537 TheASPplusSolutions Com

    Header 1 This part of the ayo%t

    set consists of *oth administrati2edata and *asic (defa%t settings forthe 2ario%s other components ofthe ayo%t set ie 0irst page)

    efa%t paragraph for ,ayo%t setetc.)

    Header

  • 7/26/2019 7203270 SAP Scripts

    8/538 TheASPplusSolutions Com

    Pages 1 At east one ogica page

    m%st *e dened for e2ery ayo%tset. (4therwise it is not possi*e toformat the texts A page is

    dened *y assigning a name andspecifying attri*%tes.

    Pages

  • 7/26/2019 7203270 SAP Scripts

    9/539 TheASPplusSolutions Com

    Windows 1 At east one ogicawindow m%st *e dened for e2ery

    page. (4therwise it is not possi*eto format the texts indowdenition in2o2es a ist of windownames and corresponding window

    types. A 5A$6 window is dispayeda%tomaticay.

    Windows

  • 7/26/2019 7203270 SAP Scripts

    10/531 TheASPplusSolutions Com

    Page Windows - A page windowis dened *y aocating a ogicawindow to a ogica page andspecifying the position and si7e of

    the window.

    Page Windows

  • 7/26/2019 7203270 SAP Scripts

    11/53

    1 TheASPplusSolutions Com

    Paragraph Formats 1 Aparagraph contains a the

    information needed to format aparagraph of text and font. Ta*sare important for paragraphs.Specifying the ist of ta*s is theway to create co%mns foro%tp%tting ine items of adoc%ment.

    Paragraph Formats

  • 7/26/2019 7203270 SAP Scripts

    12/53

    1 TheASPplusSolutions Com

    Character Formats

    Character Formats 1 This is%sed to o2erride paragraphsettings for specic words in a

    Paragraph.

  • 7/26/2019 7203270 SAP Scripts

    13/53

    1 TheASPplusSolutions Com

    To create a ,ayo%t set go toToos -8 SAP Script -8 0orm.

    The Transaction code is S!"#.

    Creating a Layout Set

  • 7/26/2019 7203270 SAP Scripts

    14/53

    1 TheASPplusSolutions Com

    #. 9o to S!"#. This taes yo% tothe 0orm .!nter name for the,ayo%t / 0orm in the text *ox

    gi2en.The screen as shown *eow.

    Steps to Create Layout Set

  • 7/26/2019 7203270 SAP Scripts

    15/53

    1 TheASPplusSolutions Com

    Form Painter (S!"#

  • 7/26/2019 7203270 SAP Scripts

    16/53

    1 TheASPplusSolutions Com

    :. After entering the name for the

    ,ayo%t set choose the ;Create. The a*o2e screen taes to thePages screen of the 0orm.After

    Pages) yo% ha2e to createindows needed for the Page.9oto indows *%tton on thetoo*ar.5A$6 indow is createdgi2en *y the system itsef.Theindow can *e of type ?AR orC46ST except for 5A$6.

  • 7/26/2019 7203270 SAP Scripts

    21/53

    2 TheASPplusSolutions Com

    @. 6ext step is to create indowson the Page .

    Window $etai%s & Form

  • 7/26/2019 7203270 SAP Scripts

    22/53

    2 TheASPplusSolutions Com

    . To Create indows go to !dit-8 Create !ement of 5en%

    *ar.&sing this option yo% cancreate as many windows asneeded for the page.=y defa%tthe indow created wi ha2e

    window type as ?AR.0or indowsto *e Constant) yo% can namethem as C46ST.

  • 7/26/2019 7203270 SAP Scripts

    23/53

    2 TheASPplusSolutions Com

    ". 6ext step after creatingindows is to ;Create Page

    indows

  • 7/26/2019 7203270 SAP Scripts

    24/53

    2 TheASPplusSolutions Com

    $etai%s of Page Windows

  • 7/26/2019 7203270 SAP Scripts

    25/53

    2 TheASPplusSolutions Com

    B. 9o to Paragraph 0ormats in theAppication too*ar.

    . 6ame the Paragraph 0ormat andenter the description .Specify the0ont famiy and si7e .$f needed

    )specify the ta* positions. Ta*s areco%mns created for o%tp%tting ineitems of a doc%ment.

    Paragraph Formats

  • 7/26/2019 7203270 SAP Scripts

    26/53

    2 TheASPplusSolutions Com

    Paragraph Formats & Form

  • 7/26/2019 7203270 SAP Scripts

    27/53

    2 TheASPplusSolutions Com

    #D. 6ext step is to create;Character 0ormats

  • 7/26/2019 7203270 SAP Scripts

    28/53

    2 TheASPplusSolutions Com

    Character Format

  • 7/26/2019 7203270 SAP Scripts

    29/53

    2 TheASPplusSolutions Com

    ##. 9o to Text !ements (0 in theAppication too*ar of the seected

    page window.

    #:. The text eements are assignedto the acti2e window. Eo% can createse2era text eements in a window.

  • 7/26/2019 7203270 SAP Scripts

    30/53

    3 TheASPplusSolutions Com

    #3. The text eements are caedfrom print program)thro%ghf%nction mod%es and o%tp%tted inthe respecti2e window.

  • 7/26/2019 7203270 SAP Scripts

    31/53

    3 TheASPplusSolutions Com

    'A) Window * +e,t %ement

  • 7/26/2019 7203270 SAP Scripts

    32/53

    3 TheASPplusSolutions Com

    #>. 6ext step is to sa2e the,ayo%t.9o to 0orm -8 Sa2e. hie

    sa2ing the 0orm )it ass for theefa%t paragraph and page ineader detais of =asic

    Settings.Eo% need to specify thedefa%t paragraph and page in thispage.

  • 7/26/2019 7203270 SAP Scripts

    33/53

    3 TheASPplusSolutions Com

    Header $etai%s

  • 7/26/2019 7203270 SAP Scripts

    34/53

    3 TheASPplusSolutions Com

    #. The form gets sa2ed afterentering the a*o2e detais. Sa2e theform as a oca o*Fect. 6ext step isto acti2ate the ,ayo%t set.Afteracti2ating the form)a dri2er programor print program has to written in

    S!3B. The print program has to *ewritten %sing 4pen)rite and Cosef%nction mod%es.

  • 7/26/2019 7203270 SAP Scripts

    35/53

    3 TheASPplusSolutions Com

    Function 'odu%es

    Open Form

    Close Form

    Control Form

    Write Form

    Start Form

    End Form

  • 7/26/2019 7203270 SAP Scripts

    36/53

    3 TheASPplusSolutions Com

    #. 6ew Page G 0orcing a page*rea in a

    text.Syntax G

    /G 6!-PA9! HpageInameJ

    !x G/G 6!-PA9! S# -8 Contents ofS# are printed in a new page.

    SAP Script * Contro% Commands

  • 7/26/2019 7203270 SAP Scripts

    37/53

    3 TheASPplusSolutions Com

    :. Set ate 5as G 0ormatting dateeds.

    Syntax G

    /G S!T AT! 5ASK L

    MdateImasN.!x G /G S!T AT! 5ASK LM/55/EEN.

    OAT!O L D#/D#/D#

    $ate Command

  • 7/26/2019 7203270 SAP Scripts

    38/53

    3 TheASPplusSolutions Com

    3. $6C,&! G To inc%de contentsof another text into c%rrent text.

    Syntax G/G $6C,&! name H4=!CT oJ H$ iJ

    H,A69&A9! J HPARA9RAP pJH6!-PARA9RAP npJ

    !x G

    /G $6C,&! 5ET!QT ,A69&A9! '!'PARA9RAP 'A#'

    nc%ude Command

  • 7/26/2019 7203270 SAP Scripts

    39/53

    3 TheASPplusSolutions Com

    >. AR!SS 1 !6AR!SS GTo format the address.

    Syntax G

    /G AR!SS H!,$?!REJ HTEP! tJHPARA9RAP aJ HPR$4R$TE pJ H,$6!S

    J/G T$T,! tite

    /G 6A5!

    name#H)name:H)name3H)name>JJJ

    Address * ndAddress

  • 7/26/2019 7203270 SAP Scripts

    40/53

    4 TheASPplusSolutions Com

    /G P!RS46 name of nat%ra personHT$T,! form of addressJ

    /G !PART5!6T department/G STR!!T street name

    /G ,4CAT$46 additiona ocation

    information

    /G P4=4Q po *ox HC4! post code /7ip codeJ HC$TE cityJ

    -Contn

  • 7/26/2019 7203270 SAP Scripts

    41/53

    4 TheASPplusSolutions Com

    /G P4STC4! post code / 7ipIcode

    /G C$TE city#H)city:J

    /G R!9$46 co%nty / state/G C4&6TRE recipient co%ntryH,A69&A9! ang%age codeJ

    /G 0R45C4&6TRE sender co%ntry/G AR!SS6&5=!R addressn%m*er

    /G !6AR!SS

    -Contn

  • 7/26/2019 7203270 SAP Scripts

    42/53

    4 TheASPplusSolutions Com

    @. P!R04R5 G $t is %sed to ca anA=AP/> s%*ro%tine from any S!3Bprogram.

    Syntax G

    /G P!R04R5 formIname8 $6PR49RA5 prog8

    /G &S$69 O$6?AR#O..

    /G CA69$69 O4&T?AR#O..

    /G !6P!R04R5

    Perform Command

  • 7/26/2019 7203270 SAP Scripts

    43/53

    4 TheASPplusSolutions Com

    Form

  • 7/26/2019 7203270 SAP Scripts

    44/53

    4 TheASPplusSolutions Com

    . /G $0 condition

    G

    /G !6$0 L ! eU%a to

    ,T ess than

    8 9T greater than L ,! ess than or eU%a to

    8L 9! greater than or eU%a to

    8 6! not eU%a to

    F Command

  • 7/26/2019 7203270 SAP Scripts

    45/53

    4 TheASPplusSolutions Com

    Synta' ( C)SE Command

    /G CAS! sym*o

    /G !6 2a%e#G

    /G !6 2a%en

    G

    /G !6 4T!RS.

    G

    /G !6CAS!

    Case Command

  • 7/26/2019 7203270 SAP Scripts

    46/53

    4 TheASPplusSolutions Com

    Protect * nd Protect

    Protect 1 !ndProtect Command is%sed to print compete text onsame page.

    Syntax G / G PR4T!CT

    - - - -

    - - - -/ G !6PR4T!CT

  • 7/26/2019 7203270 SAP Scripts

    47/53

    4 TheASPplusSolutions Com

    Steps reU%ired to print a Company

    ogo G

    #. 9o to S!3B .Type RSTQ,5C inthe text *ox pro2ided .

    Printing Company Logo

  • 7/26/2019 7203270 SAP Scripts

    48/53

    4 TheASPplusSolutions Com

    S./ Screen

  • 7/26/2019 7203270 SAP Scripts

    49/53

    4 TheASPplusSolutions Com

    2. !xec%te the program *y pressing0B.

    3. !nter the 0ie name of the T$00

    e)reso%tion )Text name and Texttite

  • 7/26/2019 7203270 SAP Scripts

    50/53

    5 TheASPplusSolutions Com

  • 7/26/2019 7203270 SAP Scripts

    51/53

    5 TheASPplusSolutions Com

    >. The T$00 e wi *e %poaded andgets stored as a text eement inS4#D.

  • 7/26/2019 7203270 SAP Scripts

    52/53

    5 TheASPplusSolutions Com

  • 7/26/2019 7203270 SAP Scripts

    53/53