HOW TO CREATE A VARIABLE IN SAP SCRIPT

HI ALL,
CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
THANK YOU,
BYE
TAKE CARE.

Hi Ravi,
You can use like this
A text in the editor contains the following DEFINE commands:
/: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
&mysymbol&
/: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
/ &mysymbol&
The printed text appears

Similar Messages

  • Sap script '' how to create table frame in sap script"""

    i have some problem in sap script''  how to create table frame in sap script"""

    Hi,
    you can use BOX command..
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.
    1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.
    3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.
    4. FRAME: Thickness of frame.
    Default: 0 (no frame).
    5. INTENSITY: Grayscale of box contents as % .
    Default: 100 (full black)
    Measurements: Decimal numbers must be specified as literal values (like ABAP numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    • TW (twip)
    • PT (point)
    • IN (inch)
    • MM (millimeter)
    • CM (centimeter)
    • LN (line)
    • CH (character).
    The following conversion factors apply:
    • 1 TW = 1/20 PT
    • 1 PT = 1/72 IN
    • 1 IN = 2.54 CM
    • 1 CM = 10 MM
    • 1 CH = height of a character relative to the CPI specification in the layout set header
    • 1 LN = height of a line relative to the LPI specification in the layout set header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shadowing having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    check the fallowing link also
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803293454211d189710000e8322d00/content.htm
    Mark the points if u find it useful...
    Regards,
    Omkar.

  • How to create a hypertext in SAP script

    Hi All,
    I want to create a hypertext in SAP script.I read 'Creating hypertext in SAP script' posted on www.sdn.sap.com, but I am not able to get desired output.Kindly suggest the soloution.
    Regards,
    Pranjali Silimkar

    Hi,
    I read the document 'Creating hypertext in SAP script' posted on the link 'http://wiki.sdn.sap.com/wiki/display/ABAP/CreatingHypertextinSAPScripts', but I am not able to get the desired output.It is displaying the same text again on the same page which is not the desired output.Kindly suggest me some solution.
    Regards,
    Pranjali Silimkar

  • How to create table in the sap script

    Hi,
    How to create a table in the  sap script layout, i Have to use table in the main window with  7 columns. can any one send sample code.
    How to calculate the number of line items which are displaying in the main window, if the number of line items are exceed in the main window then the amount has to be calculate and print as "BALANCE FORWARD" and the next page had to be displayed as "CARRY FORWARD" that amount. if this is the last page not subsequent page the amount had to be calculated the carry forward amount and total amount and print as "TOTAL AMOUNT". i am creating the new layout and the program is the standrad driver program i have to use and i have to use the standard Text elements only, can any one help me on this issue

    hi
    good
    there is no "pattern" option in SAPscript. All you have at your disposal are the following SAPscript commands: BOX, POSITION and SIZE. Not only are these commands both confusing and tedious to implement, they also are limited in what they can achieve. For instance, although you can suppress a box during printout (by making it conditional), there is no simple way to adjust it dynamically instead. Thus, to divide sequential line items, you may wish to use an underline (ULINE) or simply white space.
    thanks
    mrutyun

  • How can create a table in sap script?

    Hi,
    How to create a table in the sap script.i Have to use table in the main window with 11  rows and 3 columns. can any one send sample code. Any ideas?¿
    THKS 4all.

    Try and check on the below logic....
    1. write -
    2. write headings with '|' at start and end as well as the field separator.
    3. write -
    4. similar to step two write the data with pipe separators.
    5. write -
    regards
    Anurag

  • How to create new page in SAP Script?

    Moved to correct forum by moderator.  Duplicate deleted.  Do NOT post the same question in two forums.
    Hello friends,
    I am modifying one SAP script.
    It is already contains 2 pages. FIRST and NEXT.
    All I have to do is to create one more page which should be display as last page.
    And this last page should display some data.
    I tried and created a new page in SE71 but when i execute the program, it doesn't show newly created (LAST) page.
    Please guide me.
    REgards,
    RH
    Edited by: Matt on Nov 7, 2008 4:26 PM

    Hi
    U need to force the call of this new page.
    I suppose your sapscript is arrange with 2 page: FIRST and NEXT, where FIRST has NEXT as next page.
    So the system automatically print the pages FIRST and NEXT: u need to insert the statament:
    /: NEW-PAGE LAST
    in the MAIN window.
    U can create a text element NEW_PAGE and you'll call it as soon as you've finished to print the main data:
    /E NEW_PAGE
    /: NEW-PAGE LAST
    U can use the fm CONTROL_FORM
    Max

  • How to create a box in sap script n footer

    Hi,
    I am working on a Sap Script in which i have to display a box having the decision of crt profile and i don't know how to display it. It is clear that it is to be displayed in the footer of it and the code for that decision is coming from the program.
    plzz provide me guidelines as how to solve this problem.

    To draw a box, try this syntax.
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    example:
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.18' MM INTENSITY 100.
    /: POSITION XORIGIN '11.21' MM YORIGIN '5.13' MM.
    /: SIZE HEIGHT '120' MM WIDTH '90' MM.
    Regards,
    Joan

  • How to create box in the sap script.

    I have a address like
    SAP America,
    Pala alto,Ca
    USA
    I want to put the above address in the box in sap scritp.
    How to do it .
    Please let me know.
    Any help would be highly appreciated.
    Thanks
    Edited by: mark_yellow mark on Jul 8, 2008 1:54 AM

    Hi Mark,
    If u you what to display the window with a box thw u can simply write this way
    /: BOX FRAME 10 TW
    You can use the POSITION and SIZE commands to set default parmeters for a box.
    You can write:
    /: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
    /: SIZE HEIGHT '2' MM WIDTH '76' MM
    /: BOX FRAME 10 TW INTENSITY 10
    This can be usefull if you gave several boxes that share the same parameters.
    If you want to set the position realtively to the window use POSITION WINDOW
    to set the position to the top/left start of the window. Then use POSITION
    to set the current position relatively to the start of the Window.
    Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
    /: POSITION WINDOW
    /: POSITION XORIGIN '+5' MM YORIGIN '+10' MM
    the position is now 5 MM from the left and 10 MM from the top of the window
    Drawing a line. You can draw a line by setting the Height or Weidth to 0
    and add a frane. E.g. a horizontal line:
    /: SIZE HEIGHT '0' MM WIDTH '200' MM
    Best regards,
    raam

  • Create new window in SAP Script

    Dear All
       how to create new window in sap script
    Regards
    Suresh
    Edited by: Alvaro Tejada Galindo on Apr 9, 2008 11:58 AM

    Hi,
    To create a new window in scripts.
    1.  After opening the form in SE71   Click on Windows push button.
        it will gives a screen  list of windows in a page
    2. Click on Edit option in menu bar  in Edit-->Create Element click it will gives a popup window in the window give Name of the window and short description press enter  like that you can create windows in  a page
    3.  Click on Page windows it will gives a screen where that window you want to place in that page.    Click on Edit option on menu bar Edit-->Create Element
    it will gives a list of windows which your created in a page   here you have to select which window you want to place.  Double click on that window it will adds on the page and give the bottom of the screen you can find  standard attributes block
    there you have to give the position of the window in a page. 
    or
    Click on setting option on menu bar  settings-->form painter
    it will gives a GUI editor here you can drag the window position it is easy to use.
    then you can see the layout.
    Thanks
    Ganesh

  • How to print last page in sap script in ladscape format?

    Hi all,
    can any 1 tell me How to print last page in sap script in ladscape format?
    Thanks In advance.
    Pravin

    Hi Pravin Sherkar,
    we can do this in SAP Scripts.
    we need to create two pages, one of landscape and another of potrait.
    now after filling the data at last we need to call the page which is of format landscape using START_FORM  function module.
    You can use condition &PAGE& = &FORMPAGES&.
    Please check this link
    Printing Portrait/Landscape in sapscript
    Re: Landscape and potrait in same layout?
    http://www.sap-img.com/ts013.htm
    Best regards,
    raam

  • How to use IF Conditon in SAP Scripts?

    Hi Guys,
                   I am having adoubt how to use IF conditon with multiple variables in SAp Scripts
    for ex If a>b and a>c and a>d
             Elseif b>a and b>c and b> d.
             Elseif .....
              endif.
              How to use above example in SAP Scripts.
    thanks,
    Gopi.

    hi Gopi,
    it is almost the same as normal ABAP, you only have to use & before and after the variable and the variable has to be in capitals and you have to make the line as command ( /: before the line )
    IF &A& > &B& AND ...
    text to print
    ELSEIF ...
    text to print
    ENDIF.
    hope this helps
    ec

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • How to print Vertical barcode in SAP script

    I want to print barcode related items in SAP script . can you plz tell me any one
    1.How to print vertical barcode in SAP script ?
    2.How to print vertical text in SAP script ?

    1.
    Create the character format in se71, in that select standard barcode. like
    Char.format: C1 Description: Barcode
    Barcode: BC_CD39 save the character format.
    you can select from the list.
    in the form coding, can you use barcode like
    <C1> program variablr <>.
    <C1> &itab-matnr <>.    "--->like this
    Then it shows the barcode in output.
    check this.
    2. for vertical text ..
    if this is a window text then its possible but
    like
    S
    H
    I
    P
    T
    O
    This is possible in giving the window name but in the layout i never tried this.
    If u can tell the scenario(with data reference) then may be i can try but not sure that this will give me hit.
    regards,
    vijay.

  • How to use Standard text in SAP SCRIPTS

    Hi all,
    Please tell me how can we use the standard text what we have created in SO10 with sap scripts.

    Hi Gaurav
    You can create standard texts using the transaction SO10. Then to insert these standard texts in the SAPScript choose the menu, Insert->Text->Standard and choose the standard text that you want to choose.
    Alternatively, you can display standard texts in your SAP Scripts using the command:
    INCLUDE ZSTEXT OBJECT TEXT ID ST LANGUAGE EN
    where ZSTEXT refers to the Standard Text name.
    Reward pts if found usefull
    Regards
    Sathish:)

  • How to insert the style in sap-script? and in smart form?

    how to insert the style in sap-script? and in smart form?

    Hi..,
    For SAP scripts u need to create them in SE72 ...
    and u can include them in the script editor as..
    /: STYLE <STYLE-NAME>
    P1 text...............  (*** P1 is the Paragraph format created in SE72 )
    /: STYLE *
    For smartforms u need to go for the transaction (tcode) SMARTSTYLES... here u can create paragraph and character formats globally...
    <b>Sunil, plz do remember to close all your threads, when ur problem is solved !!</b>
    reward all helpful answers,
    sai ramesh

Maybe you are looking for

  • Premiere Pro CS3 to CS4

    I did a project using Premiere Pro CS3. I deactivated Cs3 from my system and installed CS4. Opened the project in CS4 and it is OK except that the aspect ratio of playback is badly distorted (image is stretched horizontally and squezed vertically). E

  • Formatting write error every time when trying to burn a DVD

    DVD Studio has worked for me in the past, but now every time I try to burn a DVD project, I get this: "Formatting failed - The recording device reported the media error: Write error (0x0C, 0x00)" As far as I can tell, I cleared the prefs for DVD Stud

  • Error in J1INCERT

    I could see the Print preview well but when I click on Print, it is showing error in a POPUP WINDOW as "Number Range Generation Failure" and asking to EXIT Pl advise Raju

  • TS1424 how do i solve error (-50) that stops me from connecting to i-tunes?

    how do i solve error (-50) that stops me from connecting to i-tunes?

  • 10g: DTO Mapper needed

    With 10g it is now possible to generate DTO's from entity-beans, which is a great feature, but to be really useful we also need a generator for DTO-Entity Bean Mapper classes ( like dto.setXXX ( bean.getXXX()) , bean.setXXX (dto.getXXX()) with suppor