Skip to Content
avatar image
Former Member

About "MAIN" Window in SAPSCRIPT

Hi,

I am creating one SAPSCRIPT by copying standard sapscript for printing checks.

I have one problem here. The customer wants that the same information(invoice no, amoun etc) is printed out in one page.

Can I use two MAIN windows in one page with same information?

Please see the below.

-


MAIN WINDOW----


Invoice No Description Date Invoice Amt Discount Net Amount

Invoice #1 Test Description 1 08/10/20010 1,000.00 20.00 980.00

Invoice #2 Test Description 2 09/10/20010 1,500.00 0.00 1,500.00

Invoice #3 Test Description 3 09/15/20010 3,000.00 0.00 3,000.00

Invoice #4 Test Description 4 09/20/20010 500.00 0.00 500.00

Invoice #5 Test Description 5 09/30/20010 600.00 0.00 600.00

Invoice #6 Test Description 6 10/1/20010 900.00 0.00 900.00

-


*Other Information will be here.

-


MAIN WINDOW----


Invoice No Description Date Invoice Amt Discount Net Amount

Invoice #1 Test Description 1 08/10/20010 1,000.00 20.00 980.00

Invoice #2 Test Description 2 09/10/20010 1,500.00 0.00 1,500.00

Invoice #3 Test Description 3 09/15/20010 3,000.00 0.00 3,000.00

Invoice #4 Test Description 4 09/20/20010 500.00 0.00 500.00

Invoice #5 Test Description 5 09/30/20010 600.00 0.00 600.00

Invoice #6 Test Description 6 10/1/20010 900.00 0.00 900.00

-


If it is possible, please someone help me.

Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 14, 2010 at 09:51 AM

    Hi,

    for this you have to create one main window and use the text elements like

    /E: DATA1

    /E: OTHERDATA

    /E: DATA2

    In Print program

    you have write logic like this

    open form.

    loop at itab.

    write_form using

    element DATA1

    endloop.

    write form using element

    OTHERDATA

    loop at itab.

    write_form using

    element DATA2

    endloop.

    close_form.

    Regards,

    Jagadeesh T.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sorry but I didn't tell you that I am printing out the checks(SAPSCRIPT) by using 'F110' Function.

      Which means that I am not developing the printing program.

      Thank you.

  • avatar image
    Former Member
    Sep 14, 2010 at 07:10 PM

    Hi there,

    Yes, you can use 2 main windows in one page. Your issue will be solved easily by using 2 mian windows. SAPScript can use Main Winsdows up to 99.

    Cheers.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI there,

      you have to change your printing program to control it in 2 main windows and you have to know how many lines in each main window and then control to print them into both. You need a small loop for second main window in big loop.

      loop it_tab1

      call write main window. This time it will only goes 1st main window

      --> fill in it_tab2 with fixed number of main window

      if fixed number reached, then

      loop itab2.

      call write main window. "This time it will go to the 2nd mainwindow

      endloop

      endif.

      endloop

      Hope this is clear enough.

      Cheers.

  • Sep 21, 2010 at 07:49 AM

    Hi Kim

    You can do one more thing make a copy of your standard print pgm and then get the config done for the output type with the script you have made and a new print program which you can customize.

    after that you can make a write form and use a different element and under which you can use the fields which you want seperately.

    Hope that you have understood and this helps.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 14, 2010 at 06:07 AM

    Hi,

    Only one Main window will be there in Script Page. For your requirement where you want to print the same data as in Main window then there are 2 ways.

    1) You have to create another secondary window and then change the print program at the place where the Main window is called in FM WRITE_FORM where in passing the text elements of the main windows in the secondary window using the FM WRITE_FORM so that the same data can be accessed.

    2) Create the secondary window and then using the document/invoice number you can fetch the required data using the subroutine in the script.

    Regards,

    Shakeel.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I didn't tell you that I am printing the checks by using 'F110'(Automatic payment).

      Can I use your logic in this case?

      Thank you.

  • avatar image
    Former Member
    Sep 14, 2010 at 05:21 PM

    Hi,

    I didn't get you, Could you explain me? I need clarity on the following thing,

    1. As of now how other information is printing? Is it printing like a static text / dynamic text / will it expand or shrink / will it be displayed at first page itself or will do page over run?

    2. Will other information is displaying in main window itself or separate window?

    3. If possible could you give me the standard SAPScript name (in case if you feel it is difficult to explain)?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you Mr.Rafiq

      I am answering for your questions.

      1. As of now how other information is printing? Is it printing like a static text / dynamic text / will it expand or shrink / will it be displayed at first page itself or will do page over run?

      --> The size of other information is fixed with dynamic text and only displayed in the first page.

      2. Will other information is displaying in main window itself or separate window?

      --> Other information is displayed in the separate window.

      3. If possible could you give me the standard SAPScript name (in case if you feel it is difficult to explain)?

      *--> I would like to send you sample format but I can't find your email address._*_

      Is there any way to send you a file?

  • avatar image
    Former Member
    Sep 21, 2010 at 01:30 PM

    I solved this with the other way with the

    customer.

    Add comment
    10|10000 characters needed characters exceeded