In SAP Scripts MAIN procesed first?

Hi Experts,
I hv a small doubts in SAP Scripts, they r,
1- In SAP Scripts the MAIN window is procesed very first all over the SAP Script?
2- To debug the script, after activating the debugger in Script, Shall I go & debug the Print prog step by step or just run the Transaction, e.g.
say ME23?
ThanQ.

Hi Srinivas,
   The order in which the windows are triggered is determined by the print program.
The print program will call the WRITE_FORM function modules which will trigger the windiw that is passed to it.
You can see the example print program:
RSTXEXP1
The fm WRITE_FORM is called multiple times, and different windows get triggered as and when the control comes to the Function module.
And regarding your second question, in general you cannot run the print programs as stand alone(most cases) as the would not have and executable code outside the form-endform .So, to test the script, you must run the transaction after your activate the script debugging.
Regards,
Ravi

Similar Messages

  • Problem with sap script main window

    Hi,
    I am modifying the existed sap script. I added a box and some line items to the sap script main window.
    Now i want to increase the size of the mainwindow.
    Please guide me how to increase the lines of main window . I am unable to edit the standard attributes of the main window ,because all are in disable mode.
    Please guide me how to increase the size of the main window.
    Thanks in advance
    Regards
    Sudhakar

    Hi,
    You might be trying to edit the script in non original language. You can change the layout only in the original language.
    Check the attributes of the script to see the original language.
    Thanks,
    Vinod.

  • Sap script main window related question

    hi
    i have a requirement to add a new column to sap script main window picking information from some table
    this new column is C2 and it takes reference from C1
    i ahve below queries
    1) is is better to add a new column to main window and increase and decrease alsl columns width of all columns
    or create a new window below the main window in which this new field will apear
    ie C1 and C2 to appear in this new window
    c1 is already coming in main window it needs to reaper with the new C2 in new window
    my concern is that since main window is only one and it it being called again and again to polultate the data
    how this new window will work will it be able to display the corect data
    whcih is better approach
    2) ASLO the requriement is that the new field should appear only when Reprint is done for the transfer order
    can anyone tell how to catch the reprint option or code from teh program what is defined for reprint option in program and how to catch it and put condtion?
    regards
    Arora

    If you would like to have vertical lines as well inside the frame....
    /:   BOX FRAME 10 TW                                                
    /:   BOX XPOS '1.2'  CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW     
    /:   BOX XPOS '11.00' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW    
    /:   BOX XPOS '15.5' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW     
    /:   BOX XPOS '18.4' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW     
    Regards,
    Rich Heilman

  • Vertical line issue in SAP Script main window

    Hi All,
    I want to draw a vertical line in my main window in SAP Script output.
    But problem is in main window i am printing some texts at the beggining then i am printing line items.
    So this is not fixed line (box). It may increase/decrease based on text available before line items.
    How can i manage this prining vertival line as i don't know height, top of this line!
    Thanks in advance.
    Thanks,
    Deep.

    Hai Deep,
    Use Elements as suggested by Kodarapu.
    Now goto Paragraph Formats create a format for Item lines.
    ex.
    Name Paragraph Format as 'IL' Now click on the Push Button "Tabs" on bottom Right.
    now in "Tab Position" enter the spacing that you need for your item dispaly
    ex.
    Number     Tab position       Alignment
    1               6.00   CH          LEFT
    2               25.00  CH         LEFT
    3               54.00  CH         LEFT
    The above example is for 3 items
    Now in your Script Windows-> Main
    do the following.
    /E           ITEM_LINE_A
    IL           &EKPO-EBELP&,,&EKPO-EMATN&,,,,&EKPO-TXZ01&
    Hope it SOlves your Issue.
    Cheers,
    Suvendu

  • PROTECT-ENDPROTECT problem in SAP Script

    In SAP Script MAIN Window I have 10 different elements to print differet stuff related with each delivery line item.
    Like Material Number
    Material Description
    Long text [Has formatted text and I am reading that text and printed in some format some lines under material number and some under materail desc.]
    and other information required by client.
    Loop at Delivery item table.
    CALL FUNCTION 'CONTROL_FORM'
           EXPORTING
                command = 'PROTECT'.
    Print differnt elements.
    Loop at lond text internal table.
    print in proper format as I mentioned.
    endloop.
      CALL FUNCTION 'CONTROL_FORM'
           EXPORTING
                command = 'ENDPROTECT'.
    ENDLOOP.
    My problem is PROTECT ENDPROTECT is not working properly.
    It is printing only 1 item with other info on first page as there are enough space left to print minimum three items with details.
    on next page it is priting only 3-4 items as there are enough sapce to ptint at lease 10 items with details.
    The only good thing is it is not spliting the Item details and other text.[Main window on next page has bigger size]
    Any idea why PROTECT - ENDPOTECT not behaving properly.
    Thanks
    Aman
    Message was edited by: Amandeep  Singh

    Hello,
    Try to do like, Put PROTECT and ENDPROTECT in the SAPScript itself.
    Like
    Element 1
    Protect
    ..matnr....
    element 2
    ...desc....
    element 3 (long text)
    ...text
    ....text
    element 4
    endprotect
    call the element 4 in the loop statment, whenever required.
    Hope it will work.
    Regards,
    Naimesh.

  • The next page in not displaying in the SAP Script

    Hello,
    I had one SAP script. There were two pages in the script and i mentioned the next page also for the FIRST and NEXT page as
    First - next page --> next
    and next -- next page --> next
    Now, I am having 3 items which needs to be gets displayed using SAP script.
    The first two items displayed properly but the third item is not getting displayed, as of the size of main window is small.
    Whenver i am increasing the size of main window the third item gets displayed propely.
    But i guess whenever the data will get overflow in main window then it should gets displayed in the next page, this is not happening in my case.
    Can any one tell me, how to display the next page whenver the data will get overflow in main window?
    Please help me with this.
    Thanks in advance
    Regards,
    Darshana

    Hi Darshana,
    if you use text element for the item output, you will need same text element on NEXT page. Check for Typos. Switch on sapscript debugger and check what happens.
    Regards,
    Clemens

  • Problem in sap script for Item data

    Hi Guys ,
    Although I am working in ABAP for last 1 year but I am new to SAP script , This is first time I am doing this -
    I am creating excise invoice profarma and able to print all that data except J_1IEXCDTL ( Item data ) that I have to display in loop ,
    I am using
    LOOP AT ITAB_J_1IEXCDTL.
      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                ELEMENT = 'ITEM_VALUES'
                WINDOW  = 'MAIN'
           EXCEPTIONS
                ELEMENT = 1
                WINDOW  = 2.
    ENDLOOP.
    My problem is that this is working fine for 1 record but if there are more than 1 record in ITAB_J_1IEXCDTL. , it is showing only first record ,
    Other thing i want to know what is connection of element between Driver program and sap script , Can we give any name to element and it doesnt make any impact on Sap script
    i have done same in my program ,
    Thanks in advance
    Amit

    my problem is solved now ,
    Thanks

  • SAP-Script - Draw Table (Boxes) with variable number of lines

    Hello,
    I want to create a Table with Frames in a SAP-Script Form. First of all I don´t know the position of the table in the window main. It can be page 2 or 3 on top or in the middle. But i have to describe a position like
    POSITION YORIGIN '12.95' CM.  How can i position the table in a variable way?
    And i don´t know the number of lines of the table. How can I manage to draw the correct numbers of boxes as numbers of lines exist?
    Kind Regards
    Carsten Fuchs

    Hi carsten,
    1. Drawing GRID (just like excel, matrix)
       is very cumbersome in sapscript layout.
      (either dynamically, or hardcoded)
    2. Moreover, the final look,
       may or maynot appear as requried,.
      ie. exactly with proper alignment and grid lines.
    3. If the font size is required to change,
      then the dynamic position also changes.
    4. If the grid is supposed to go to the next page,
      again the calculation and logic becomes tougher.
    5. To use grid, its better to use smartform,
       which provided FINE CONTROL of the grid
      and its lines and width, height, style etc.
    6. In sapsctip, at most we can use
       UNDERLINE (_) and PIPE (|)
    regards,
    amit m.

  • Read header text from vf01 and print in script main window

    Hi Gurus,
               I need to read text from vf01 header note 1, there user type max 10 lines i want to read that 10 lines and print in sap script main window after line item printed. i used read text but  one line only  fetched. i declare variable like  data : NEXRSP LIKE TLINE-TDLINE and read_text function module. pls provide solution for this.
    Regards
    G.Vendhan

    HI GURUS,
    Thank u for reply i declare like
        ID = '0002'.
        PERFORM READTEXT USING EN NAME OBJECT ID TEXT_OUTPUT.
        NEXRSP = TEXT_OUTPUT . CLEAR TEXT_OUTPUT.
    FORM READTEXT  USING    P_EN
                            P_NAME
                            P_OBJECT
                            P_ID
                            P_TEXT_OUTPUT.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          CLIENT                  = SY-MANDT
          ID                      = P_ID
          LANGUAGE                = P_EN
          NAME                    = P_NAME
          OBJECT                  = P_OBJECT
        TABLES
          LINES                   = LINES
        EXCEPTIONS
          ID                      = 1
          LANGUAGE                = 2
          NAME                    = 3
          NOT_FOUND               = 4
          OBJECT                  = 5
          REFERENCE_CHECK         = 6
          WRONG_ACCESS_TO_ARCHIVE = 7
          OTHERS                  = 8.
       LOOP AT LINES.
        P_TEXT_OUTPUT =  LINES-TDLINE.
        EXIT.
       ENDLOOP.
      FREE LINES. CLEAR LINES.
      ENDFORM.                    " READTEXT

  • SAP Script Check box

    Hi,
    how can we able to add Check box in SAP script main window. My requirement is to display two check boxs with YES and No names. Based on condition, I want to mark any one check box.
    Thanks in Advance.
    Thanks,
    Raman

    Hi,
    Please refer the below link
    http://abapeasy.blogspot.com/2008/03/3-easy-way-to-add-checkbox-in-your.html
    Regards
    Ramakrishna Pathi

  • Sap script text printing issue..

    Hi,
    I have a SAP script with a text symbol say &abc& defined in the SAP script main window.
    From the print program I want to pass some text to this text symbol.
    In the print program I have an internal table with lines of text, sometime it can have just one line of
    text CHAR512 length or it can have multiple lines of char512 length text.
    Now how do I pass these lines to the text symbol &abc& ?
    I tried to do the following, but it does not help...
    DATA l_data TYPE STRING.
    loop thru the internal table
    concatenate l_data with text got from internal table
    endloop
    CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
        EXPORTING
          name   = '&abc&'
          value  = l_data
        EXCEPTIONS
          OTHERS = 0.
    I debugged and saw that l_data has most of the text (not all) but the sap script's printed output
    has only few text.
    what should I do to get all the text displayed on the printed output ?
    thnks

    Hi Vivek,
        Including two work area next to each other should not be a problem because i am doing the same thing. Check whether the length of field of work area one is over lapping the field of other work area.
    Note: Reward points if helpful.
    Cheers,
    Shafiq

  • How can I create more than one main window in a page of SAP SCRIPT?

    How can I create more than one main window in a page of SAP SCRIPT? If anybody helps me I will be obliged.
    Regards,
    Subhasish

    Hi Ganguly,
    It is possible to have more than one main window in a same page.
    You create a main window and simply you copy and past it in the same page.. it will create first main window name as MAIN and other main windows as MAIN01,MAIN02.... up to MAIN99.
    Contets flow from MAIN , MAIN01, MAIN02.......................MAIN99. contents after filling the current window it flows to next window(by default, you skip as well with some keyword not sure could be NEW-WINDOW)
    you want print the main window data twice? or you want to create two main window in the same page ?
    1. give two copies in the no of copies in the output type screen ( Which pop up is coming after excute the program ).
    2. create two page with the same script form.
    3. you can write the coding inside the program to print twice the same page.
    Hope this information use full to you..

  • Text getting overwritten in first page of SAP Script

    Hi All,
    My Requirement:
    1. I have a SAP Script which has a main window which prints the internal table data
    2. I have created a instance of Mainwindow to display watermark.
    3. Now, everything seems to be fine while displaying the watermark/foreground text.
    Problem is:
    4. If the data exceeds 15 records(i.e, end of the main page), 16th record starts printing from the top of the main window again.
    5. This continues till the end of the 30th record(i.e., it is Overwriting all the first 15 records) and the 31st records is getting printed in the 2nd page.
    6. FYI, I have maintained the header in such a way that 2nd Page should be triggered after the first.
    7. Also, I have called the windows in the correct order
    What could be the problem? Is it because, I have created an instance of main window to display the text. If that is the case, how to resolve this ??? Any thoughts on this would be highly appreciated

    Hello Richa,
    I tried creating a variable window and inserted a Watermark on it.The thing is, Watermark is not getting displayed.I tried both the ways calling the watermark before displaying the text and after displaying the text.
    Hello Ravi,
    See to display the watermark, I created an instance of mainwindow by using
    So, this main window which is an instance of the actual main window will have the same co-ordinates.
    I think, this has got nothing to do with that. But, there is something that is missing out here.
    Hello Rajani,
    I tried using Protect and End Protect. But, it didnot work
    Hello Sarves,
    I tried creating a variable window exactly the size of the main window and then placed the variable window back of the main window. But, I am not able to see the watermark in the preview.
    If I am missing something, please let me know.
    Thanks in advance........

  • SAP Script Check printing Layout, Line Items to display twice in First Page

    Hi All,
    This requirement is for US check printing Layout.
    My Requirement is to display Items twice on the first page.
    Eg : Main Window has 10 Items, I need to display all the Items at the bottom in another window at the bottom.
    I can't create 2 Main windows in the first page, as the data from the Main window 1 overflows to Main window 2 in the first page.
    I copied print program RFFOUS_C into a Z-version and try to implement the logic, however unable to print the line items in the bottom window.
    Kindly give your valuable Inputs.
    Thanks
    Vinayak

    Hi
    I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
    If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more. 
    Best regards
    JD

  • Printing of boxes in Main window of SAP Script at 2 different locations

    Hi Experts,
      I have an requriement in SAP script, I want to draw two boxes. The first box will be at the beginging of main window with 0.5 cm, which is comming perfectly. After the first box I have to display the entries related to a particular table, after the completion of that table I need to draw another box of lenght 0.5cm and the entries related to another table, needs to be displayed.
    I am able to get the first box with intensity, but for the second box I am not getting exact position where i need to draw a dynamic box by filling intensity.
    For that reason i have drawn two ulines and wrote the text, is there any way to fill internsity in between those lines.
    Thanks
    Ravi.

    Hi Sujeet,
    I already tried with that command, the problem is in between two boxes I dont know how many lines of data will come.
    There is a need of drawing a box dynamically.
    Thanks
    Ravi

Maybe you are looking for

  • Cannot download any apps from app store

    Hello - I have the iPhone 4S & I'm unable to download any new apps from the app store.  I click on INSTALL but only indicates INSTALLING for about 2 seconds then goes back to INSTALL; I'm not prompted to enter my ITunes password; Install isn't workin

  • Add a 2nd HD to a dv7 3160us?

    I want to install a second hard drive in my dv7 3160us. Will the hardware kit shown for the primary HD work for the second HD too? When I get the 2nd HD installed is there anything that has to be changed in the BIOS so it is recognized? Is there a si

  • Why wont apple tv mirror any apps on my ipad 3?, why wont apple tv mirror any apps on my ipad 3?

    I was sold Apple TV on the premise that I could play games on my ipad3 and see it on my tv. However, all I get is audio! What's the deal? I feel ripped off!!!

  • Can i count the number of Mondays in a specific month with a formula?

    Hi I am looking for a streamlined way of calculating an amount to invoice for a job that I am paid for weekly, but for which I invoice monthly, meaning that I am invoicing different amounts each month, depending on how many Mondays fall in a given mo

  • Trouble publishing

    Hello- I upgraded to Snow Leopard a couple of days ago and everything seemed to be ok. But I started doing some updates to my webpage (hosted by mobileme) and cannot get it to publish consistently. When I finish making changes I choose File>Publish A