Skip to Content
author's profile photo Former Member
Former Member

Deleting the secondary window dynamically in sap-scripts...

Hi friends,,

I need to delete a secondary window dynamically in particular conditions...

let me give you the clear details about the condition.

1. if the data printed in the main window ends in the same page and also the remarks (which is a long text ) ends in the same page then header should be printed.

2. if the data printed in the main window ends in the same page and remarks continues and ends in the next page then the header window should not be printed in the next page which is the last page.

so overall... "the condition is if the data printed in the main window ends in the current page then header should not be printed in the next-page...."

Hope I am clear with the conditions..

&next-page& ne 0 wil work for the 2nd condition and not for the first condition..

I need a statement which will work for both the conditions..

looking for a solution asap...

Regards....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2009 at 07:27 AM

    Are both the Data and Remarks displayed in MAIN window or they belong to different windows ?

    If they belong to same window ( MAIN ) then make them as two Elments and call each element explicitly in the program.

    so before calling the Remarks element you can check how many lines are printed in the main window and by using READ_TEXT you will get the Remarks data from which you can find out the number of lines that data contain .

    So now you can add both the number of lines and can determine whether they can fit in a single page (Provided you make size of the main window in lines - some constant ).

    Then based on this value you can call the header explicitly.

    Hope this helps

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      For that only I told you to use READ_TEXT and find out the number of lines in the Remarks.

      Before that you should call a FM to know the number of lines already printed in the main window ( Please explore for that .. I actually not remember it ).

      So When you draw the main window you will know the fixed lines it can accomodate.

      So now find the sum of the lines ( i.e Already printed and Going to be printed ) . If this sum is greater than the Fixed lines of the main window then follow this logic.

      IF addedtotal > fixedlines.

      call the header element.

      Endif.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.