How Can I Debug My SAPscript

download How Can I Debug My SAPscript

of 9

Transcript of How Can I Debug My SAPscript

  • 8/10/2019 How Can I Debug My SAPscript

    1/9

    How can I debug my SAPscript?

    Go to the transaction SE71.

    Enter the form name.Choose the menu Utilities->Activate Debugger to enable debugging.

    r call standard !rogram "S#$D%UG.

    #o sto! debugging& 'ou must !rint the SA(scri!t form& and clic) E*it button in the debugger

    +indo+ +hen it is dis!la'ed.

    I have created a SAPscript in language DE. Now I need to

    translate it to EN. How could I do this?

    !en 'our SA(scri!t in transaction SE71.

    ,n the eader screen& in the anguage Attributes !tion& choose #ranslate to... !tion totranslate to other languages.

    ,f an' te*t modules or te*ts have to be translated +ithin the SA(scri!t& then it can be done using

    SE/0 transaction.

    How can I copy SAPscripts rom one client to another! or

    e"port#import them?

    ,n the transaction SE71& enter the orm name and choose the menu& Utilities->Co!' from client

    to co!' SA(scri!ts from one client to another.

    Use "S#$SC"( to im!ort2e*!ort SA(scri!ts.

    How can I change the page si$e o the layout?

    ,n the SA(scri!t& Goto -> eader -> %asic Settings

    ere 'ou could configure the !age settings and their orientation.

    How to ind the Driver Program or the given SAPscript?

    1. Go to the #able %NAP&using SE''3. Get the Contents of the #able4(N%&)*SHI+%*+',5

    0. n the #able Content Selection Screen& #'!e the SA(scri!t 6ame for +hich +e have

    find the Driver (rogram in the field +-NAand e"ecute/+01

  • 8/10/2019 How Can I Debug My SAPscript

    2/9

    . P2NAfield of the result dis!la' contains the Driver Program Name or ourSAPscript

    How can I get the landscape ormat in SAPscript?

    ,n the form go to basic settings--> 'ou can find a landsca!e o!tion --> clic) on it and at thebottom. 8ou can find the !age o!tion enter the !age name for +hich 'ou +ant to assign ladsca!e

    format.

    How many AIN windows are allowed or SAPscript?

    SA(scri!t allo+s 99 :A,6 +indo+s

    Each (age can consists u! to 99 +indo+s. Each main +indo+ is assigned a consecutive

    identif'ing number 4;..9

  • 8/10/2019 How Can I Debug My SAPscript

    3/9

    3. Select the names and the language of the SA(scri!t forms and choose Execute.

    #he s'stem creates the Smart orms under the names of the SA(scri!t forms !lus the

    e*tension S.,t dis!la's a list of the migrated forms.

    0. #o change and ada!t a form& go to transaction SA&%+-&S. #hen activate thechanged Smart orm.

    4hat are the dierent types o windows in SAPscripts?

    =indo+s are defined in the a'out sets +hich define the !osition and the te*t to dis!la'ed.

    #he different t'!es of +indo+s are

    :A,6 - :ain =indo+

    #he main +indo+ is a continous +indo+ +hich can e*tend over several !ages. ,f the te*t

    in the main +indo+ fills u! a !age& a ne+ !age is created.nl' one main +indo+ can be defined in the SA(scri!t +hereas u! to 1;; instances ofmain +indo+ can be created in a !age.

    A" - ariable =indo+

    #his +indo+ can have the variable contents dis!la'ed on them. #he contents of the

    +indo+ cannot e*ceed the +indo+ sie. #he content can be formatted for each !age.

    C6S# - Constant =indo+

    #he constant +indo+ can have a fi*ed content and is formatted onl' once.

    ElementsHow do I create 5o"es in SAPscript?

    8ou can create %o*es in the SA(scri!t using the %$ command s!ecif'ing the *&' co-ordinates

    and the +idth and the height

    /: BOX XPOS '0'CM YPOS '0.5'CM WIDTH '9.2'CM HEIGHT '3.5'CM FRAME 8TW

    How can I create a Shaded bo"?

    Use the addition ,6#E6S,#8 in the %$ command to a!!l' gra' shading to the bo*es.

    /: POSITION XORIGIN '2'CM YORIGIN '7.5'CM/: BOX WIDTH '8'CM HEIGHT '.25'CM INTENSITY 5

    #his +ill create a bo* +ith the given height and +idth and shading it +ith 1F intensit' 4'ou

    also need to !rovide $&8 !ositions5.

  • 8/10/2019 How Can I Debug My SAPscript

    4/9

    How do I set tabs between the ields in display?

    #o enter a tab& use && 43 commas5. #hen& in the (aragra!h ormat tab& create a ne+ !aragra!h

    format. ,n the H#absH #ab& enter the tab !osition and the alignment for the fields.

    How do I create standard te"ts or the SAPscripts?

    8ou can create standard te*ts using the transaction S1;. #hen to insert these standard te*ts in

    the SA(scri!t choose the menu& ,nsert->#e*t->Standard and choose the standard te*t that 'ou

    +ant to choose.

    Alternativel'& 'ou can dis!la' standard te*ts in 'our SA(scri!ts using the command

    /: INC!"DE #STEXT OB$ECT TEXT ID ST !ANG"AGE EN

    +here IS#E$# refers to the Standard #e*t name.

    How can I 4ord 4rap the te"t being displayed in

    SAPscript?

    Use the unction :odule "JD="D="A( to +ra! the te*t and use this for out!ut.

    How can I display barcodes in SAPscripts?

    Create a character format in the SA(scri!t.

    Choose the %ar Code for the character format.

    And finall' to dis!la' barcodes& in the command enter

    %C&()*+,%/&

    +here C1 is the character format created and vbeln is the variable for +hich the barcode

    is to be created.

    How can I print logos in SAPscripts?

    #, files 4K.tif5

    Use the !rogram "S#$D:C to convert the #, file to standard te*t.

    (rint this using the ,6CUDE command

    ,6CUDE IG %LEC# #E$# ,D S#

    %itma! files 4K.bm!5

    Go to transaction SE7

  • 8/10/2019 How Can I Debug My SAPscript

    5/9

    Choose %:A( under G"A(,CS

    Choose ,m!ort Gra!hic 4F5

    Select the image and u!load

    ,n SE71 choose ,nsert->Gra!hics and then choose the image for dis!la'

    How can I prevent page6brea7 in the message that is to be

    displayed?

    Enclose the te*t that 'ou +ant to !revent !age-brea) in ("#EC#... E6D("#EC#SA(scri!t +ill ensure that each line of this te*t is !rinted together on the same !age.

    ,e.,f SA(scri!t finds that the te*t cannot be !rinted on that !age com!letel' a im!licit !age brea)

    occurs and the te*t is !rinted on the ne*t !age

    /: PROTECT

    - T*

    - W1,

    - T1* 4* 6*

    /: ENDPROTECT

    4hat are the various te"t ormatting options in SAPscript?

    SA( ibrar' - SA(scri!t - ormatting o!tions

    +ormattingoption eaning (omment

    Ms'mbol465M

    Dis!la' 6 first

    characters ofs'mbol

    Ms'mbol4I5M mit leading eros

    Ms'mbol4S5M mit leading sign

    Ms'mbol4N5M

    Dis!la' leading

    sign to the eft

    4'ou ma' also use 2

    SE# S,G6 E#5

    forum ,gnored if the domain has HsignH o!tion disabled

    4sign is never !rinted in that case5

    Ms'mbol4>5M

    Dis!la' leadingsign to the right

    4'ou ma' also use 2SE# S,G6 ",G#5

    forum ,gnored if the domain has HsignH o!tion disabled

    4sign is never !rinted in that case5

    Ms'mbol4C5M Com!ress s!aces

    Ms'mbol4.65M Dis!la' u!to 6

    decimal !laces

    Do not use a field related to a currenc' code or unit of

    measure 4as these last define the number of decimals5&other+ise 'ouBll get error SSC:(SE"/;3 4ield M3

    http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/803411454211d189710000e8322d00/frameset.htmhttp://forums.sdn.sap.com/thread.jspa?threadID=1670618http://forums.sdn.sap.com/thread.jspa?threadID=1670618http://forums.sdn.sap.com/thread.jspa?threadID=1670618http://forums.sdn.sap.com/thread.jspa?threadID=1670618http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/803411454211d189710000e8322d00/frameset.htm
  • 8/10/2019 How Can I Debug My SAPscript

    6/9

    +ormatting

    optioneaning (omment

    ,ncorrect formatting o!tion HM1H5 +hile out!utting the form

    Ms'mbol4#5Mmit thousands

    se!arator

    Ms'mbol4"5M "ight @ustified

    Ms'mbol4,5MSu!!ress out!ut of

    the initial value

    Ms'mbol4J5M,gnore conversionroutine

    forum HJ o!tion +or)s onl' for Character-li)e variables

    4char& date& time& numc5& string and ,nteger. ,t doesnBt +or)for !ac)ed& float and other t'!es 4see routine

    C6E"#S8:%AUE in include S#$CD5H

    8ou ma' combine o!tions& for e*am!le Ms'mbol4

  • 8/10/2019 How Can I Debug My SAPscript

    7/9

    /: SET DATE MAS 'MMMM DD YY'

    #his dis!la's the date as Se!tember 3/& ;7

    #he follo+ing are the codes that can be used in the date mas)

    88 8ear 43 digits5

    8888 8ear 4 Digits5

    :: :onth 43 Digits5

    ::: :onth 6ame 4Abbreviated5

    :::: :onth 6ame 4ull5

    DD Da' as t+o digits

    DDD Da' name 4Abbreviated5

    DDDD Da' name

    Using the SE# DA#E :ASJ causes the subseOuent date fields to be dis!la'ed using the same

    formatting. #o return to the default formatting use the follo+ing command

    /: SET DATE MAS ' '

    or more information& see SA( ibrar' - SA(scri!t - ormatting Date ields SE# DA#E :ASJ

    How can I ormat the time in the SAPscript?

    Similar to SE# DA#E :ASJ for date fields +e can use SE# #,:E :ASJ for formatting time

    fields.

    /: SET TIME MAS 'HH 1 MM 4, SS *;'

    #his dis!la's the time as 11 hrs 0 min 07 secB

    #he follo+ing are the codes that can be used in the time mas)

    ours

    :: :inutes

    SS Seconds

    #he time formatting can be reset to the default setting using

    /: SET TIME MAS ' '

    or more information& see SA( ibrar' - SA(scri!t - ormatting Date ields SE# #,:E :ASJ

    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/d1/8031dd454211d189710000e8322d00/frameset.htmhttp://help.sap.com/saphelp_nw70ehp2/helpdata/en/d1/8031ea454211d189710000e8322d00/frameset.htmhttp://help.sap.com/saphelp_nw70ehp2/helpdata/en/d1/8031dd454211d189710000e8322d00/frameset.htmhttp://help.sap.com/saphelp_nw70ehp2/helpdata/en/d1/8031ea454211d189710000e8322d00/frameset.htm
  • 8/10/2019 How Can I Debug My SAPscript

    8/9

    4hat is the dierence between the SAPscript te"ts!

    ;(ustomer

  • 8/10/2019 How Can I Debug My SAPscript

    9/9

    8ou can e*!licitl' trigger a !age not in seOuence b' s!ecif'ing the name !f !age +ith the

    command 6E=-(AGE

    /: NEW