About control commands in scripts

hi abapers
can u plz tell about control commands in scripts uses of control commands

Hi,
Control Command Purpose:
The purpose of these is to allow control of the output formatting. These commands are not interpreted by the SAPscript editor, but are passed through to the SAPscript Composer for processing. The Composer is the program that converts text from the form displayed in the editor to the form used for printing. This includes, for example, line and page formatting, the replacement of symbols with their current values and the formatting of text according to the paragraph and character formats specified.
The SAPscript control commands are described in the following sections.
<b>Syntax of Control Commands</b>
Explicit Page Break: NEW-PAGE
Preventing Page Breaks: PROTECT
Next Main Window: NEW-WINDOW
Assigning a Value to a Text Symbol: DEFINE
Formatting Date Fields: SET DATE MASK
Formatting Time Fields: SET TIME MASK
Country-Dependent Formatting: SET COUNTRY
Position of the Leading Sign: SET SIGN
Initializing Numbered Paragraphs: RESET
Including Other Texts: INCLUDE
Changing the Style: STYLE
Formatting Addresses: ADDRESS
Setting a Header Text in the Main Window: TOP
Setting a Footer Text in the Main Window: BOTTOM
Conditional Text: IF
Finding a Match: CASE
Calling ABAP Subroutines: PERFORM
Inserting Print Controls: PRINT-CONTROL
Boxes, Lines, Shading: BOX, POSITION, SIZE
Hexadecimal Data: HEX, ENDHEX
Summing a Program Symbol: SUMMING
Br,
Laxmi

Similar Messages

  • SAP Script : Control Commands for printing Label (barcode) by Zebra Printer

    Hello,
    I would like to know the control commands in sap script for Zebra Printer. The purpose of task is to print a field in barcode format in Right Bottom of the label.
    The sample code is placed below. Kindly have a look at it. The problem now i am facing is, the barcode for Customer PO is printing on the wrong place (Left Bottom, the text & barcode are overwriting). Can anyone suggest a possible way or can any one send the document for Barcode commands in SAP Script for Zebra Printer.
    Sample script code:
    Initialization and reset Barcode
    XAMCY^XZ
    Start
    ^XA
    Barcode setup
    ^BY3,2.7,2.2
    Set label home position
    ^LH
    ^FWN
    FO385,025A0R,40,50FDPN: &VBAP-MATNR&FS
    FO385,725A0R,40,50FD&VBAP-ARKTX&FS
    FO385,1710A0R,40,50FDRtns: &zsntsc-contr&FS
    FO345,025A0R,40,50FDService Order# &AUFK-AUFNR&FS
    FO345,725A0R,40,50FDSerial# &EQUI-SERNR&FS
    FO345,1710A0R,40,50FDRepair Order# &VBAP-VBELN&FS
    FO245,025B3R,N,90,N,NFD&AUFK-AUFNR&FS
    FO245,725B3R,N,90,N,NFD&EQUI-SERNR&FS
    FO245,1710B3R,N,90,N,NFD&VBAP-VBELN&FS
    FO138,1710A0R,40,35FDCustomer PO# &VBKD-BSTKD&FS
    FO98,025A0R,40,50FDWrnty: &W_WARRANTY&FS
    FO98,605A0R,40,50FDRoute: &W_ROUTE&FS
    FO58,025A0R,40,35FDShip-to-name: &W_NAME1&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO18,885A0R,40,35FDReported By: &QMEL-QMNAM&FS
    FO18,1710B3R,N,90,N,NFD&VBKD-BSTKD&FS
    ^XZ
    Thanks in Advance,
    Ramasamy

    HI
    GOOD
    GO THROUGH THIS
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool. 
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research - 
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes. 
    - Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.
    Now you have a barcode printed - what next?
    Well there are two options, depending on your business requirements:
    - You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
    - Another solution is to use SAPConsole transactions
    or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor. 
    These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.
    GO THROUGH THESE LINKS
    http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm
    THANKS
    MRUTYUN

  • Mail command in script hangs and does not release control to calling script

    Hello folks,
    I am running in a situation which I haven't seen before.
    Main script calls function which executes another script.
    No matter which statement is the last in called script, it hangs on the last line and does not return control to main script.
    I tried to call another script not within the function - it is the same result.
    Can you help please.
    Below example of code:
    --- Main script:
    function checksum
    set -x
    /sybdump/ukgoald/scripts/egrep_expr1
    ##MAIN --- call to script script execution which runs mail command
    checksum
    ---- trace execution of called script:
    + read A B RF_FULL_NAME
    + print
    + /usr/bin/mailx -s Checksum Report [email protected]
    + 0< /sybdump/ukgoald/dump1/egrep_expr1.log3
    + print
    + return 0
    Edited by: ge**** on Dec 14, 2010 11:29 PM

    Hello folks,
    I am running in a situation which I haven't seen before.
    Main script calls function which executes another script.
    No matter which statement is the last in called script, it hangs on the last line and does not return control to main script.
    I tried to call another script not within the function - it is the same result.
    Can you help please.
    Below example of code:
    --- Main script:
    function checksum
    set -x
    /sybdump/ukgoald/scripts/egrep_expr1
    ##MAIN --- call to script script execution which runs mail command
    checksum
    ---- trace execution of called script:
    + read A B RF_FULL_NAME
    + print
    + /usr/bin/mailx -s Checksum Report [email protected]
    + 0< /sybdump/ukgoald/dump1/egrep_expr1.log3
    + print
    + return 0
    Edited by: ge**** on Dec 14, 2010 11:29 PM

  • About BOX control command in SAPScript.

    Hi,
    I am using the BOX control command in SapScript.
    Is it possible to assign the values of Xpos and Ypos dynamicalliy.
    In BOX XPOS 16 CH WIDTH 0 MM HEIGHT 18 MM FRAME 10 TW,
    i want to assign the values at runtime, instead of
    xpos 16 , something like Xpos Var, where var contain the value of xposition.

    Hi,
       We cant give the dynamic value in runtime . It should be static.
    Regards,
    Saran

  • Problem with SAP Script (Control Commands)

    Dear friends,
          I am facing one problem withg control commands. When i use <b>PROTECT.....ENDPROTECT</b> with <b>VAR type</b> window then it is not working instead i use with <b>MAIN type</b> window it is working fine. Another problem with <b>BOX command</b> when i use with <b>MAIN type</b> window then it is not working but when i use with VAR type window then it is working fine. SO i am little bit confused that is there any relation between control commands and window type?
    THanks & Regards,
    Bhavin

    Hi,
    There is no restriction to use any control commands on any windows.
    The SAP doesnt give any error, but the point of using Protect Endprotect in windows other than main window doesnt apply.
    Only main window carries from one page to another. So in order to print certain lines in a single page we use this control command.
    Regarding BOX command it works fine on any window.
    Thanks and Regards.
    Lavanya.

  • I can disable one of my MacBook's two CPUs using the CPUPalette application.  How can I do it under control of a script?

    I can disable one of my MacBook's two processors using the CPUPalette application.  How can I do it under control of a script?
    I want to do this because the MacBook is overheating.  I will soon get it repaired, but in the meantime, disabling CPU 2 is effective at preventing overheating.  Sadly CPUPalette is not scriptable, and it won't remember its setting after the computer is restarted.
    Would it be worth learning about the relevant Darwin API (supposing there is one) and writing a small command-line program for the job?  I am an experienced developer of software using Standard C.
    Comments appreciated.
    Dave

    i wonder if there is a key that is stuck cause whenever i try to turn it on again after the 60 minute lockout, it says that the password was incorrect and i am locked out for another 60 minutes

  • Printing Control Commands!

    Hi!
       I want to know that all sap script control commands work for smartform.
       eg. protect endprotect newline pagebreak etc..
       If no is how to fullfill in smartforms.
       Thanks

    Hi,
      IN Smartforms.. all these commands will work but the
      way of using them is different.
      for ex: if u want trigger a new page on certain condition..in scripts
                we use NEW-PAGE command but where as in Smartforms
                we create a COMMAND node in that we check the NEW PAGE
                option and give the page name that is to be triggered.
       That is one of the main difference between Smartfroms and Scripts.
       In scripts, we need to code every thing but in smartforms we have by default
       IF statement in scripts is similar to Alternative options..
       just we need to know how to use them.
    Thanks
    Dinakar.

  • Fp-ai-110 remote control command

    Hi
    where can I find remote control commands for FP-AI-110 ,I could not find it in its manual like other devices , is there any one have idea about it ?

    What do you mean by "remote control command"?

  • Reg: control command

    hi,
        all control commands are only for main window?

    sap script
    control commands can be used in all windows

  • Control Command

    What are control commands in SAP Scripts?

    Preeti,
    Control Command Purpose:
    The purpose of these is to allow control of the output formatting. These commands are not interpreted by the SAPscript editor, but are passed through to the SAPscript Composer for processing. The Composer is the program that converts text from the form displayed in the editor to the form used for printing. This includes, for example, line and page formatting, the replacement of symbols with their current values and the formatting of text according to the paragraph and character formats specified.
    The SAPscript control commands are described in the following sections.
    Syntax of Control Commands
    Explicit Page Break: NEW-PAGE
    Preventing Page Breaks: PROTECT
    Next Main Window: NEW-WINDOW
    Assigning a Value to a Text Symbol: DEFINE
    Formatting Date Fields: SET DATE MASK
    Formatting Time Fields: SET TIME MASK
    Country-Dependent Formatting: SET COUNTRY
    Position of the Leading Sign: SET SIGN
    Initializing Numbered Paragraphs: RESET
    Including Other Texts: INCLUDE
    Changing the Style: STYLE
    Formatting Addresses: ADDRESS
    Setting a Header Text in the Main Window: TOP
    Setting a Footer Text in the Main Window: BOTTOM
    Conditional Text: IF
    Finding a Match: CASE
    Calling ABAP Subroutines: PERFORM
    Inserting Print Controls: PRINT-CONTROL
    Boxes, Lines, Shading: BOX, POSITION, SIZE
    Hexadecimal Data: HEX, ENDHEX
    Summing a Program Symbol: SUMMING
    refer.
    Re: SAP SCRIPT COMMANDS
    check this link
    http://www.allsaplinks.com/Scripts_1.html
    Don't forget to reward if useful

  • Sapscript Control Commands

    Dear All,
                in Sapscript Control Command  there is one command
                INCLUDE .
                Pls explain it.

    Hi Kapoor,
    <b>INCLUDE: </b>To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    <b>Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p]
    [NEW-PARAGRAPH np]
    </b>
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
              o Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
              o In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
              o Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
              o In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    All text IDs are allowed in a form.
    In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    0: the text include was successful.
    1: the command could not be executed because it contained syntax errors.
    2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    4: the specified text could not be found.
    <b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you by taking their  time.
    Thanks,
    Vinay

  • Tip about backup command

    Hi all,
    I need a tip about backup command.
    Well, I have th e following script:
    replace script sunday_backup
            resync catalog;
            allocate channel c1 type disk;
            setlimit channel c1 kbytes 2097150 maxopenfiles 4;
            allocate channel c2 type disk;
            setlimit channel c2 kbytes 2097150 maxopenfiles 4;
            allocate channel c3 type disk;
            setlimit channel c3 kbytes 2097150 maxopenfiles 4;
            allocate channel c4 type disk;
            setlimit channel c4 kbytes 2097150 maxopenfiles 4;
            set maxcorrupt for datafile 1,2,3,4,5,6 to 0;
            backup
                       incremental level 0 cumulative
                       skip inaccessible
                       tag sunday_level_0
                 filesperset=10
                       format '/oracle_4/oradata/devdb/backup/rman/db_%d.%t.%s.%p.%c.bkp'
                       database;
            sql 'alter system archive log current';
            backup
                 filesperset=10
                       skip inaccessible
                       format '/oracle_3/oradata/devdb/backup/rman/al_%d.%t.%s.%p.%c.bkp'
                       archivelog all
                       delete input;
            release channel c1;
           release channel c2;
           release channel c3;
           release channel c4;
            delete noprompt obsolete;
    }Into this script, I perform a backup that stores backupsets on '/oracle_4/oradata/devdb/backup/rman/db_%d.%t.%s.%p.%c.bkp'.
    Is there a way, using only one "backup database", to divide the backupsets along several paths?
    This is because all backup sets are stored on only one path.
    Thanks!!!!

    When you configure your channel just specify different FORMAT clause and configure the device type to enable PARALLEL. Check Configuring Specific Channels for an example.

  • My MacBook pro is frozen and I can't restart, even by using the power button or control command

    Hi- my MacBook pro froze about an hour ago and I've been unable to reboot it. Any suggestions? I've tried the power button, control + command + restart, erc ad none of them do anything.

    Hold down the power button for 6-7 seconds.  It will power off, then click the power button to turn on again.
    Regards,
    Captfred

  • Remote app: control command not available

    Hi all,
    I am using Remote app 2.3 on a iPhone 4G and an iPad 1 together with Apple TV 1st gen (software version 3.0.2).
    On the ipad I can see the control cross as an icon to control Apple TV with finger moves.
    Unfortunately on my iPhone, remote only shows the following standard icons in the menu bar: Genius, Lists, Artists, Search and more.
    I can't find any control field.
    Does anyone has an idea why the app is missing the control command in the iPhone's version?
    Kind regards
    Günter

    Hi vazandrew,
    thank you for your tipps.
    I selected Apple TV in the two squares (I have two entries my media library of macbook and my Apple TV).
    In a youtube tutorial I saw that if you control your macbooks media library, no gesture interface is visible. http://www.youtube.com/watch?v=eUzy8jcjvPs&feature=related (min 4:30) If you select your Apple TV, the interface is shown.
    I can imagine that remote app does not recognize Apple TV as a device that can be controled with the gesture interface. What do you think?
    So I tried next the complete homesharing activation on every device.
    Infortunately - even if selected the homesharing option in my macbook and the remote control, the menu for Apple TV stays without the icon of gesture interface.
    So I disconnected my library from Apple TV (which copies the contents of my macbook on the harddisk of Apple TV) and I hoped that only streaming of the media library to the Apple TV could help. But no fortune (even the connection via my wlan router broke very often down, when the macbook streamed to Apple TV).
    It is now still copying the contents again on it - approx. 120 GB - so I will have to wait to try out other things.
    As I said, my iPad 1 works properly with the gesture interface.
    Kind of strange thing... :-)
    Kind regards,
    Günter

  • How to use print control in Sap script

    I would like to use print control in Sap script.Actualy my problem I have security font Troy ECF. Using this font I would like to print amount field in Check printing.
    we count download this font with sap .we talked to customer care they told we should hard code in sapscript. pls can any1 help on this how to do and how to use print control for this fonts.

    call this funcation. crate_text.
    CALL FUNCTION 'CREATE_TEXT'
             EXPORTING
               FID               =
               FLANGUAGE         =
               FNAME             =
               FOBJECT           =
             SAVE_DIRECT       = 'X'
             FFORMAT           = '*'
             TABLES
               FLINES            =
           EXCEPTIONS
             NO_INIT           = 1
             NO_SAVE           = 2
             OTHERS            = 3
           IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.

Maybe you are looking for

  • How to track session IDs for multiple apps in same server instance?

    All: We have 2 web applications (for example: app1,app2) running in one app server instance (weblogic 5.1). Both of those applications use the same cookie name (defined in weblogic.properties ) to keep the HttpSessionID. The tricky thing is that if a

  • How big of a partition do I need?

    How Big of a partition do I need for Windows XP? And to be able to run visual Basics program? And other applications for school purposes?

  • No muxer in lib.java.path

    Hello, I keep getting this error when starting my weblogic server. ####<Nov 30, 2001 5:25:49 PM CST> <Notice> <WebLogicServer> <bobbys-linux> <myserver> <main> <system> <> <000327> <Starting WebLogic Admin Server "myserver" for domain "BobbysLinux">

  • Profit center trail balance report using report painter

    HI Experts, Please let me know steps to write functional specs for creating profit center trail balancing using report painter and also steps to create profit center trail balance using report painter. Thnaks, Vani

  • Deploying a custom login module to the J2EE engine

    I have developed a custom login module, and want to deploy it to the SAP j2ee engine. How should I go about this ? I tried packaging it as a jar and then using the deploytool, went into user management to register the module, but when the module was