Graphic Window in SAPScript

Hello all,
I want to print a graphic element, included in a graphic window, conditionally.
Is there a way to print this window only when certain conditions are fulfilled (this will be checked in the print program)
or
the window will always print, regardless the conditions?
If case 2 it true, then is there another way to achieve my client's desire?
Best regards,
Bogdan

Hi,
Create a graphic window(Ex,Graph).Define a text element as Test (Ex. /E Test).
In your driver program :
Use following function  and call this function based on your conditions.
   CALL FUNCTION 'WRITE_FORM'
         EXPORTING
              ELEMENT = TEST
              WINDOW  = 'GRAPH'.
Lanka

Similar Messages

  • Putting condition in Graphic WIndow in SAPSCRIPT

    I created 2 Graphic Windows for Company Logos. Each will appear/ hide according to the company code. I was planning to put a condition onto the window's code but it seems like it doesn't allow edit mode. Just the blue background. Is it possible to edit the graphic code? Are there other alternatives to post the 2 logos?
    POints will be given thanks!

    Hi,
    You need to make use of PERFORM-FORM concept to solve your problem.
    For eg:
    In your text editor of SAP script:
    write the following code:
    PERFORM SET_FLAG IN PROGRAM ZFI1_CHECKFORM
    USING &REGUH-ZBUKR&
    CHANGING &V_FLAG&
    ENDPERFORM
    Now, in the subroutine PROGRAM 'ZFI1_CHECKFORM' write the below code:
    FORM SET_FLAG TABLES in_tab STRUCTURE itcsy
                        out_tab STRUCTURE itcsy.
    Data Declaration
      DATA:zbukrs        TYPE bukrs.
      READ TABLE in_tab INDEX 1.
      zbukrs = in_tab-value.
      READ TABLE out_tab INDEX 1.
    IF NOT zbukrs IS INITIAL.
          out_tab-value = '1'.
        ELSE.
          out_tab-value = '0'.
        ENDIF.
    MODIFY out_tab INDEX 1.
    Try your requirement referring this piece of code.
    Reward points if helpful.
    Thanks,
    Asha

  • Printing digital signature in main window of sapscript at some location

    Hi,
    I want to print graphics in main window in sapscript. I want to position the graphic ( signature) at some position (preferably right aligned ). How to do that? Can we do that in .bmp graphics. In case we use .tiff format , how to do it. Tell me the steps involved as I have never used RSTXLDMC to upload .tiff files.
    Regards,
    D.Mallick

    Hi
    Just open rstxldmc in se38 and execute.
    It will gve you a screen. You need to fill the first two blocks only. Remaining are optional.
    File Name :  Give pathe+name of your .tiff file
    Type         : Bcol for colour     and bmon for mono
    Resolution      : say 75 (as you wish)
    Second block
       Text name :   only replace astrick by your name ZHEX-MACRO- has to be there.
    Actually  this program will convert .tiff file into text file.
    you can include this text file in any window. Text name is the name of the text file generated
    no more changes
    Now execute.
    Now you can use this text file  ZHEX-MACRO-name   in any windoow
    If useful, give me points
    cheers
    vamshi

  • How to insert a condition in the Graphic Window of a SAP Script ?

    Hi,
    I need to give a condition inside the Graphic Window for printing the Logo in the  SAP Script. Now, my problem is that the Graphic window is only opening in Display mode. How to make it editable and insert a condition in it?
    OR
    Is there any other way to do it?
    Please Help.
    Thanks in Advance.
    -VRU

    Hi
    I got your point. I'll provide  you solution
    In the logo window goto coding part by pressing F9 and give your coding as
    IF &BKPF-BUKRS& = 'COM1'
    INCLUDE GSPL OBJECT GRAPHICS ID BCOL LANGUAGE DE
    BITMAP 'LOGO1' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM2'
    BITMAP 'LOGO2' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM3'
    BITMAP 'LOGO3' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM3'
    BITMAP 'LOGO4' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM4'
    BITMAP 'LOGO5' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ENDIF
    <b>Note:</b>But you have to upload all your logos in se78 then only you can upload and give conditions for this
    Regards
    Pavan

  • Putting method in graphic window instead of console

    Hello!
    I want my blackjack game to run in a graphical window instead of in the console.
    I have already made 2 buttons that starts the method(the blackjack game) and that shuts down the program. But when the program starts the text is printed in the console (which means that I have to write in the console if I want a new card or stand).
    Help is very much appreciated!

    OK :P
    Yeah I got it to compile correctly when I changed:
    "public void K�rspel() {"
    to
    "public String K�rspel() {"
    but the problem now is that none of the graphical stuff shows and the program is looping endlessly haha :P
    I can publish the whole thing instead :P
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Tjugoett extends JFrame implements ActionListener {
    Kortbunt lek = new Kortbunt();
    Manniska du = new Manniska(lek);
    Dator jag = new Dator(lek,du);
    private JButton starta = new JButton("Starta");
    private JButton sluta = new JButton("St�ng av");
    JLabel a = new JLabel(K�rspel());
    public Tjugoett() {
    Container c = getContentPane();
    c.setLayout(new GridLayout(1,3));
    c.add(starta); c.add(sluta); c.add(a);
    starta.addActionListener(this);
    sluta.addActionListener(this);
    setVisible(true);
    setSize(300,300);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    Container c2 = getContentPane();
    c2.setLayout(new GridLayout(1,1));
    setSize(350,100);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    public String K�rspel() {   // changed this from void to String
    boolean nyttParti�nskas = true;
    lek.nyKortlek();
    lek.blanda();
    du.spela();
    if (du.po�ng() > 21)
    System.out.println("Du F�rlorade!");
    else if (du.po�ng() == 21)
    System.out.println("Du Vann!");
    else {
    jag.spela();
    if (jag.po�ng() <= 21 && jag.po�ng() >= du.po�ng())
    System.out.println("Du f�rlorade!");
    else
    System.out.println("Du Vann!");
    return K�rspel(); // when changing from String to void I needed to write a return thing
    public void actionPerformed(ActionEvent e) {
    if (e.getSource()==starta)
    K�rspel();
    else if (e.getSource()==sluta)
    System.exit(0);
    public static void main(String[] arg) {
    Tjugoett tj = new Tjugoett();
    Do you think it can be because of the containers? That I need to change to JPanel instead? I am going to try it also and see what happens.

  • Graphic window condition

    Hi all,
    following is my requirement....
    1. Display text of designation code selected on the screen from table ZCMT011_DESGN
    2. Fore selected signature code on the screen get details of scanned file from table ZCMT011_SIGN and print scanned image.
    For this what should i do ... wherther i should have multiple graphic windows for each image ... or there is any other way of getting image on screen depending on input condition from the table.
    i hae uploaded the image in SE78 ... also then i have saved this file name in the ztable ......in filename field..
    Please help me its urgent

    Hi,
    whatever the images are there .you have to create the graphic windows and in conditon tab put conditions for all graphs.
    Whenever conditon satisfies particular  graph will display.
      Don't forget to reward if useful...

  • How to change CPI for a particular window in SAPScript

    We want to change the Character per inch of a particular window in SAPScript. Since SAPscripts allows only header level maintainence of CPI. We are unable to change for a particular line (or window).
    Could anybody help on this?
    Since its an urgent issue.
    Many thanks in advance.
    Regards,
    Dipen

    Hi Ravi,
        Thanks for your feedback.
        Actually the requirement is like we are not suppose to change the font size (i.e height of font should remain the same). But only CPI should be changed.
    Regards,
    Dipen

  • Window inside another window in SAPScript

    Hi ,
    Is it possible to create a window inside a main window in SAPScript ? If so,how ?
    Please help.
    Thanks&regards
    Ananya Mukherjee

    Hi !
    I don not think that will work...
    but... windows can overlap - perhaps that may help you.
    Simply create a new window that is laying "over" your main window... that's
    working.
    Regards
    Rainer
    Some points would be nice if that helped.

  • Calling a window in sapscript based on some conditions

    Hi all,
    I want to call a window in SAPScript based on some conditions.Plz suggest how could i do that.
    Regards,
    Chinmay.

    Hi,
    Use a text element in that window.
    ie..
    /E  TEXT
    &VBAK-VBELN&
    in ur driver program
    if vbak-vbeln is not initial. ( your condition)
    call function 'write_form'
    element = 'TEXT'
    window = 'WINDOW_NAME'
    Endif.
    hope this helps
    santhosh

  • Small Basic bugs: Graphics Window errors

    I apologise that this is in the wrong category, I could not find one that fit the subject.
    I have found several bugs in the Small Basic Graphics Window handling, such as unintended application termination and resizing errors while hidden. Here is some code including most of them:
    GraphicsWindow.Hide()
    GraphicsWindow.ShowMessage("Showing GW","Debugger")
    GraphicsWindow.Show()
    GraphicsWindow.ShowMessage("Size: "+GraphicsWindow.Width+"*"+GraphicsWindow.Height,"Debugger")
    GraphicsWindow.ShowMessage("Hiding GW","Debugger")
    GraphicsWindow.Hide()
    GraphicsWindow.ShowMessage("Size: "+GraphicsWindow.Width+"*"+GraphicsWindow.Height,"Debugger")
    GraphicsWindow.ShowMessage("Resizing GW to 800*600","Debugger")
    GraphicsWindow.Width=800
    GraphicsWindow.Height=600
    GraphicsWindow.ShowMessage("Size: "+GraphicsWindow.Width+"*"+GraphicsWindow.Height,"Debugger")
    GraphicsWindow.ShowMessage("Showing GW","Debugger")
    GraphicsWindow.Show()
    GraphicsWindow.ShowMessage("Size: "+GraphicsWindow.Width+"*"+GraphicsWindow.Height,"Debugger")
    GraphicsWindow.ShowMessage("Resizing GW to current size","Debugger")
    GraphicsWindow.Width=GraphicsWindow.Width
    GraphicsWindow.Height=GraphicsWindow.Height
    GraphicsWindow.ShowMessage("Size: "+GraphicsWindow.Width+"*"+GraphicsWindow.Height,"Debugger")
    GraphicsWindow.ShowMessage("Resizing GW to 800*600","Debugger")
    GraphicsWindow.Width=800
    GraphicsWindow.Height=600
    GraphicsWindow.ShowMessage("Size: "+GraphicsWindow.Width+"*"+GraphicsWindow.Height,"Debugger")
    On a Windows 7 machine there are the following bugs, which either seem not to apply in Windows 8.1 or do not appear with this code:
    When the Enter key is pressed on a GW message without the GW showing, the program ends, whereas when the button is clicked, the program continues as expected.
    When the GW is hidden, it does not resize properly in certain scenarios and the Height and Width properties stop returning meaningful values if set to a value.
    These errors can cause unwanted behaviour and could well break a program. Could somebody verify these please.

    Congrats to Nonki and ME!!!! =^)
     Small Basic Technical Guru - February 2015  
    Nonki Takahashi
    Small Basic: Key Input
    Michiel Van Hoorn: "Great improvement."
    RZ: "Very nice explanation and examples of key input handling"
    Ed Price - MSFT
    Small Basic: The History of the Logo Turtle
    RZ: "Turtle (Logo) was the first programming language for many, including perhaps some of the Small Basic prorammers. Nice article explaining the history."
    Michiel Van Hoorn: "A nice background article and hopefull inspiration for those who want to start in robotics"
    Nonki Takahashi
    Small Basic: TechNet Wiki Article List
    Michiel Van Hoorn: "This is great! Perfect as a local cache of the articles. "
    RZ: "A good example"
    Also worth a mention were the other entries this month:
    Small Basic Known Issue: 29976 - Assignment to Array in Event Handler Needs Time by
    Nonki Takahashi
    RZ: "This is a very good catch. The workaround mentioned is very helpful."
    Michiel Van Hoorn: "Ah, very helpfull if you ever bumped into this"
    Welcome to Small Basic by
    Nonki Takahashi
    Michiel Van Hoorn: "Nice greating"
    RZ: "A good introduction page"
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How to Edit the Graphical Window in SAP Script

    I want to change a logo in Window in SAP Script, but the window type is Graphical, hence it is not editable.
    Please let me know the solution

    @bhushankotwal
    I think you mean GRAPH window type in SAPscript form.
    You may change GRAPH window type to VAR, then you will able to edit it. After you modified it you can change it back to GRAPH window.

  • Urgent! Graphic-logo in Sapscript form!!!

    How to insert Graphic in SapScript form???
    i tried many ways. it doesnt work!!!

    Hi
    These are the steps to be followed for uploading graphics in R/3 system
    1. First save the file as BMP
    2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and
    make it Zoom as 100% and save as *.TIFF
    3. Open SE38 and execute program RSTXLDMC
    4. Give your TIFF file path name
    5. Select Bcol (for Color)
    6. TEXT ID will be ZHEX-MACRO-*.
    7. Inplace of * write your own logo name (ZCOMPANYLOGO)
    8. Execute the program
    9. Now Goto SE71 create your ZFORM
    10. Create logo window
    11. Goto text element of logo window
    or
    In 4.6x :-
    1. Goto SE71 Change the mode to GRAPHICAL
    2. Choose the Graph Tabstrips
    3. Now type in some name for the LOGO WINDOW
    4. Press the IMPORT BUTTON and then IMPORT the BMP file from your DESKTOP
    5. The code will be written automatically. You just need to drag and drop wherever you want
    the graphics to be.
    Please note that in 4.6c onwards, you can also used Windows Bitmap file ( .BMP).
    Refer this thread:
    How to change SAP SCRIPT logos at runtime

  • Box in a main window in sapscript

    Hello Forum!
    In my sapscript there's a window MAIN with BOX FRAME. This window is in a first and next page, but the box only appears in the first page, not in the others.
    Anybody knows what I shound be change? I need the box always appears (in all pages).
    Thanks in advance!!!
    Edited by: Pablo Ariel Vicente on Feb 14, 2008 3:57 PM

    Hi!
    Try specifying all the parameters (XPOS, YPOS, HEIGHT, WIDTH) in the BOX command. This may resolve the problem.
    Cheers!

  • How to do SUBTOTAL AND TOTAL in Main Window of SAPSCRIPT.

    Hello Friends,
    I am modifying standard SAPSCRIPT of packing slip. My client wants a subtotal and total in Main Window of Script for Eg. (They want Material Number wise Subtotal and finally Grandtotal at bottom in Main Window)
    Now i got stucked up here how to do it ?
    here is my sample code.
    LOOP AT XVBPLP WHERE VENUM = SHENR.
    IF XVBPLP-POSNR IS INITIAL.
        Versandelement
          PERFORM PACKING_TREE USING XVBPLP-UNVEL.
        ELSE.
        Lieferposition (Anteil)
          VBPLP = XVBPLP.
      CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT = 'DELPOS'.                     "Main Window call
    clear vbplp.
    ENDLOOP.
    Pls guide me for the same.

    HI,
    For the Line items, put a ELEMENT in the Smartform, and you will call this with in the LOOP and ENDLOOP, so here with in the LOOP count the TOTAL value.
    then create new element after the Line item Element, and call this Element after the Line items prints,
    /E  LINE_ITEM
      &1& &2 & &3&     " This will be in the loop and you need to caliculate the totla here
    /E SUB_TOTAL.
    &SUb_TOTAL&  " After all the line items pritns then call this Element
    Regards
    Sudheer

  • Box in MAIN window of sapscript keeps misaligning...

    Hello Experts,
    I am currently modifying a sapscript and inside the MAIN window, there is a box command that 'boxes' a
    static text. But the problem is, the box misaligns since the number of line items is dynamic.
    So, how can I make the box command to just 'box' the static text correctly even though the line item is
    dynamic?

    HI,
    Declare the Box and Static text in the main window with a new text element after the text element of the line items . so it will print it in the end when all of the Line items are printed..
    (or)
    Just create another script with the BOX and the text you want inside the BOX. i.e. this becomes another script which is separate from the line items you are printing there.
    call this script in your driver program with start_form FM.
    REPORT  YTEST_SCRIPT.
    DATA:
      ITAB TYPE TABLE OF SFLIGHT,
      FS TYPE SFLIGHT.
    SELECT * FROM SFLIGHT INTO TABLE ITAB.
    CALL FUNCTION 'OPEN_FORM'
      EXPORTING
        FORM                              = 'ZSCRIPT_TEST'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT ITAB INTO FS.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          ELEMENT                        = 'TEST'
          WINDOW                         = 'MAIN'.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDLOOP.
    CALL FUNCTION 'END_FORM'.      "---------->Ends the previous form
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'    "------------> Starts your new script with BOX and Static text
      EXPORTING
        FORM                   = 'ZSCRIPT_TEST1'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
        ELEMENT                        = 'TEST'
        WINDOW                         = 'MAIN'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'CLOSE_FORM'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This will print the BOX and the Static text in a new page after the line items got printed..
    This will solve your issue...
    Thanks&Regards
    Sarves

Maybe you are looking for

  • Best Practice On Taking Count in Bean

    Hi folks,   Here i'm using Jdev 11.1.1.7.0. where I have a case take count on inserted rows in bean. here we go.. Bean code developer way 1: button_click(){ int count = voins.getRowcount(); developer way 2: button_click(){ int count = iteratorbind.ge

  • Spelling Checker Issue in Microsoft Word 2011

    Hi, anyone here is bothered by this problem? Window with this content "Word cannot start the spelling checker. The spelling checker files may be missing. Make sure the spelling checker files are installed or use the Microsoft Office Installer to inst

  • How to use the List in this case.

    I got sample code from http://developer.java.sun.com/developer/technicalArticles/ThirdParty/WebCrawler/. But when I compiled it, there was error message like "webcrawler.java:16: reference to List is ambiguous, both class java.util.List in java.util

  • My iPhone cannot finish the sync process

    Hey guys, I was not sure whether there are German guys reading my problem so I decided to ask again but this time in English. My problem is that my Iphone 6 plus 64 gb is not able to complete the sync process when I try to synchronize it with my Mac

  • How do you move calendars and mailboxes from one HD to another?

    My MB hard drive crashed but I can still access the data on it by connecting it externally through USB. I installed a new HD and am now trying to get some mailboxes to the new HD from the old, crashed HD. I can see the mailboxes and emails on Home/Us