Text-element in main window

Hello together,
is it sorrect, that text-elements can only be used in the main window?
Is there any chance to use text-elemnts in a new-created window?
an example that does not work:
new window: TABLE
call in print-program:
CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'ITEM_GR'
          window  = 'TABLE'.
Unfortunately i need a new window with a possibility to print several text-elements.
Thanks a lot for help.

Hi Marcel,
In one of my developments, i've created text elements in the windows other than MAIN window. But it worked properly. I think there might be some other reasons for ur failure. Try to trace that.
Or else u just try by changing the Window type as CONST.
Try this out & let me know in case of any other concrens..
Reward if useful.
Pavan.

Similar Messages

  • Issue with printing of multiple text elements in main window

    Hi experts,
    I have developed a sales order form in SAP script.
    I hv got two text elements in the main window. n i m calling these two text elements by using two write form functions in d print program.
    The first text element is gettin called n d relevant fields in dat particular text element is being displyed. (Window - Main)
    My problem is dat the second text element for the same main window is not gettin called n its relevant fields r not gettin displayed.
    Plz help me to solve the querry.
    Its urgent.
    Thanks n Regards,
    Purva

    Hi,
    Are you testing that from in same client where you developed, else make sure that after each change you need to transport the form to testing client.
    second thing is check with code did you mention the same text element in window editor and in the program.
    Reward if useful,
    Thanks,
    Sreeram.

  • How to display standard text element of main window in next page

    hi all
    In scripts we have standard script medruck for purchase order.
    i want to pull text elements ( terms and payment terms ) in to main window of next page.
    i have included main window in page windows of next page ,but im unable to print text elements of terms and payment terms in next page...
    any one give your valuable inputs.
    Thanks
    deepika.

    Hi deepika,
    First copy standard MEDRUCK to ZMEDRUCK and do the necessary changes.
    Then check in driver program when exactly Terma and condition text element is called. Generaly its after printing all items but just check once to confirm.
    If TERMS and condition element is called ate end just put a NEW-PAGE  command at end of the text element which is called before terms.
    Hope this will help You.
    Thanks
    Dhiraj.

  • Short dump when trying to see the text elements of main window

    Hi ,
            The form is running properly in 4.7 c . But when the same is copied in ECC5.0 (unicode) , i 'm getting short dump while trying to see the TEXT ELEMENTS .
                    The message is like ' trying to create a field with zero length'.
    Regards,
    Jytoi.

    hi
    I've never worked on ECC 5.0 version..however, I can only tell u that this could be the issue that code written in 4.7 may not be supported in 5.0..so try to get a good idea of ECC 5.0 before u start coding in this..
    regards,
    shamim

  • Print  material po text in the main window of pur. order

    Hi experts,
    Here is my issue regarding MATERIAL PO TEXT in  smartform  of purchase order:
                          I want to get the material po text in the material description field itself or beside to this column  in the mainwindow only in the  print of purchase order
    so please let me know how to read the material po text to a internal tab field.
    very glad for ur replys
    TNQs n REGARDS
    mahathma

    Hi    TNQs for ur responce.
      i want to get the item text in the  main window beside to material description column .
    i think u got my point actually we'll have item texts for each item , i want to get the text of each item  in that row only
    i used include text and i gave following attributes
    Text Object :      EKPO
    Text ID         :  A03
    Language     :     EN
    just tell me ,should i need to give any code for this.
    thanks and regards,

  • Two Elements in Main Window

    Hello,
    I am working on sapscript. MAIN window has two elements ( Order Info, Carrier Info. ) First page display only 1 - 10 records for each element in Main Window.
    ( In my scenario, it's possbile the either one of the element may have more then 10 record but 11th record should print in that section of Next Page )
    Next page should display starting with record 11 on subsequent elements. How can i accomplish this scenario.
    I apperciate your help.
    Thanks
    Hitesh

    Hi,
    in driver program, count the sy-tabix if it reaches '11', then call the FM 'CONTROL_FORM' and in the command give 'NEW-PAGE' and then call the WRITE_FORM of 2nd element.
    write code like below in ur driver program.
    eg:
    data : gv_tabix.
    LOOP AT itab.
    gv_tabix = sy-tabix.
      IF sy-tabix LE 10.
       call function 'WRITE_FORM'
        EXPORTING
          element = element1
        EXCEPTIONS
        ENDIF.
        IF gv_tabix GT 10.
           call function 'CONTROL_FORM'
             exporting
                command = 'NEW-PAGE'.
           clear gv_tabix.
        ENDIF.
        IF sy-tabix GT 10.
           call function 'WRITE_FORM'
        EXPORTING
          element = element2
        EXCEPTIONS
        ENDIF.
    ENDLOOP.
    dont forget to give NEXT PAGE for first page as 'FIRST PAGE' name.
    Hope it resolves
    Rgrds,
    Pavan

  • How to Print text in two main windows

    For printing label have created two main windows on a page. calling function write_form In ABAP Program under do loop for two times. 
    but program prints only one window. why is it so? how can i print text on two windows.
    do 2 times.
      COUNT = COUNT + 1.
    loop at itab WHERE DEPTT LT 200.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT  = 'TEST'
            FUNCTION = 'SET'
            TYPE     = 'BODY'
          WINDOW   = 'MAIN'
          EXCEPTIONS
           ELEMENT   = 1
           FUNCTION  = 2
           TYPE      = 3
           UNOPENED  = 4
           UNSTARTED = 5
           WINDOW    = 6
           OTHERS    = 7.
      endloop.
    enddo.
    Please guide.

    Since the information is variable and coming out of the print program, I can assume you want to print many labels but two to a page. Also, any page numbering, etc will need to be updated. This is easily accomplished with SAPScript but a feature people rarely use I believe. Here are the simple steps:
    1) On the Windows Screen: Creat a main window for the size of the label, etc knowing that you will be putting multiple windows on a page. For example, if page size is 8.5 x 11, maybe your window size is 6 X 4 or something similar. You only need one main window defined.
    2) Now go to Page Windows Screen. Add a window MAIN and down at the bottom where it says Window Type put in MAIN. Next to this field is a little field about two characters long. In here put in '01'.
    3) Now Add another window MAIN and down at the bottom put in '02'.
    Hopefully this gives you the idea. I've done this with up to 30 small windows in order to print variable window for labels on label stock such as Avery 8167, etc. 
    Good Luck!
    Tim Stadler
    Menasha Corporation

  • Syntax for text element in page windows.

    Hi ,
    I have written the syntax in page windows as follows:
    <B>Customer/Supplier:</> ,, &KNA1-NAME1&
    But I am not getting any data in the output screen.
    Plz suggest me the correct syntax.
    Regards,
    Mridul.

    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 .
    PARAMETERS:  p_cheque   RADIOBUTTON GROUP rb1 DEFAULT 'X',              " Cheques
                 p_credit   RADIOBUTTON GROUP rb1,                          " Credit card
                 p_bacs     RADIOBUTTON GROUP rb1.                          " Bacs/Chaps
    SELECTION-SCREEN END OF BLOCK blk1.
    goto ->Text Element Selection Text
    P_CHEQUE     Cheques
    P_CREDIT                     Credit Card
    P_BACS               Bacs / Chaps
    you can able to assign text to radio button.
    Rewards if useful...............
    Minal

  • Columns in sapscript form in main window

    Hi,
    In the script for packing list, i want to display columns for the item details for the item details in main window.
    can any budy tell regarding how to write the box statement for the itrem details.
    regards,
    vamsykrishna.
    reward point for good answers

    hi vamsy,
          try this:
    Goto the text elements of main window spcify the following command.
       /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    WIDTH
    Width of the box. Default: WIDTH value of the SIZE command.
    HEIGHT
    Height of the box. Default: HEIGHT value of the SIZE command.
    FRAME
    Thickness of frame. Default: 0 (no frame).
    INTENSITY
    Grayscale of box contents as %.
    Default: 100 (full black)
    EXAMPLE:
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    thanks,
    raji
    reward if helpful

  • Display text in script  at the bottom of the main window

    Hi all,
    I want to display a long text in the main window at the bottom.
    In case of single page output the text should be displayed in the main window at the bottom. But in case of multiple page output I want the text to be displayed only in the last page.I have tried giving the text inside BOTTOM ENDBOTTOM but its not working. In case of multiple page output also the text is getting printed an all the pages.Kindly let me know the answer at the earliest.
    Thanks & Regards,
    Neethupriya.

    Hi all,
    If anybody knows the solution please let me know at the earliest.
    Thanks & Regards,
    Neethupriya.

  • What is the difference between Constant Window, Variable Window,Main Window

    hello all
    what is the difference between 1) Constant Window
                                                2) Variable Window
                                                3) Main Window   in SAP SCRIPT

    Hi,
    Window Types
    When defining a form window, you must select a window type for the window.
    You can choose between three types:
    Constant Windows (CONST)
    Variable Windows (VAR)
    Main Windows (MAIN)
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR.
    Therefore, if you create a new window, always use type VAR.
    Variable Windows (VAR) 
    The contents of variable windows is processed again for each page, on which the window appears.
    The system outputs only as much text as fits into the window. Text exceeding the window size is truncated;
    the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike.
    The only difference is that constant windows have the same size throughout the form.
    Main Windows (MAIN) 
    Each form must have one window of type MAIN. Such a window is called the main window of the form.
    For SAPscript forms, the main window has a central meaning:
    It controls the page break.
    It contains the text body that may cover several pages.
    It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to
    output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form.
    The SAPscript composer thus avoids reformatting of the text after each page break.
    If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page.
    This page must not call itself as subsequent page (recursive call), since this would produce an endless loop.
    In such a case, SAPscript terminates the output after three subsequent pages.
    For printing header lines or totals, the different output areas of the main window are of special importance.
    go through this links:
    In Scripts Variable window and constant wind difference?
    Main Window
    Re: Main Window in SAP Script
    What is the difference between Constant window and variable window?
    Regards
    Adil

  • 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

  • What is the use of MAIN WINDOW in SCRIPTS

    what is the use of MAIN WINDOW in SCRIPTS, y we con't create a script w/o main window.
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    See this
    What are the different types of windows in SAP Scripts?
    Windows are defined in the Layout sets which define the position and the text to displayed.
    The different types of windows are:
    MAIN - Main Window
    The main window is a continous window which can extend over several pages. If the text in the main window fills up a page, a new page is created.
    Only one main window can be defined in the SAP Script whereas upto 100 instances of main window can be created in a page.
    VAR - Variable Window
    This window can have the variable contents displayed on them. The contents of the window cannot exceed the window size. The content can be formatted for each page.
    CONST - Constant Window
    The constant window can have a fixed content and is formatted only once.
    Main Windows (MAIN)
    Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:
    • It controls the page break.
    • It contains the text body that may cover several pages.
    • It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.
    Variable Windows (VAR)
    The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR. Therefore, if you create a new window, always use type VAR.
    <b><REMOVED BY MODERATOR></b>
    Anji
    Message was edited by:
            Alvaro Tejada Galindo

  • Main Window in SAP Script

    Hi Guys,
    I wanted to know as to why is it possible to create multiple main window in SAP Script.
          In most theory it is written a SAP Script can only use 1 main window, If thats the case why is it still possible to create more than 1 of them.
          Can you explain its use and functionality.
    Helpful answers will be duly rewarded.

    Hi,
    U can have multiple main windows in Sapscripts(Upto 99)
    Main Windows (MAIN)
    Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:-
    ? It controls the page break.
    ? It contains the text body that may cover several pages.
    ? It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.
    If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page. This page must not call itself as subsequent page (recursive call), since this would produce an endless loop. In such a case, SAPscript terminates the output after three subsequent pages.
    For printing header lines or totals, the different output areas of the main window are of special importance.
    The diffetent Output areas of main window are
                                                                      TOP
                                                                      BODY
                                                                      BOTTOM
    its use and functionality.*
    Suppose you have requirement that you r displaying data from two line item tables which can flow multiple pages.
    In this case u have to use multiple mail windows.
    Regards
    Sandipan

  • Possible to print Int.Tab data in a window other than MAIN window in Script

    Hi,
      Can we print a internal table data in a window which is a VARIABLE Window in SAP Script? my requirement is not to print in MAIN Window.
    Thanks in Advance,
    Jakeer.

    Hi,
    You can do that.But main window is must.
    Create a text element and please check it maynot overflow if so data will be truncated.
    For not printing main window :
    Do one thing set the main window margint to the botom of the form.
    Then create a text element in main element
    NEW             
    NEW-PAGE        
    NEXT            
    NEW-PAGE = 'NEXT'

Maybe you are looking for

  • How to print selected page no. with smart forms?

    Say hello to everybody,     I just want to print page from 4-6 for example, how can I make it?     I have a mothod that we can use T-code sp02 to print page 4-6, and it works.     Is there any other way to make it? Such as setting some parameters for

  • WiFi on my MacBook Pro works in one room but not in others

    If I bring my MacBook Pro next to an iMac in one room it will connect (albeit slowly) to the internet. When I walk 2 metres into my own bedroom it simply disconnects and stops working, while my phone stays connected and at a similar speed. The MacBoo

  • Text table Description

    In an ALV report i have created, I have a column displayed which has an underlying text table associated with it for the value description. Does ALV reporting have the capability to retrieve these descriptions from the Text table. I want to display t

  • EJB reference not bound

    I'm running JBoss 3.0.1 with Tomcat 4.0.4 bundle. I have successfully deployed a EJB to Jboss and created 2 clients (java & JSP client). For some reasons, I'm able to run the java client but when I try the JSP client (served by Tomcat) I get this err

  • Ikev2 VPN without using a SSL license? (ASA-5512)

    Hi All, I've enabled Cisco "Anyconnect Premium Peers" for client less ssl vpn connections, the obvious catch is that for ikev2 Anyconnect sessions it wants to use up the SSL license pool instead of the IPSEC pool  (which I have lots of connection lic