Skip to Content

frame in MAIN window

Hi,

in my print program i´ve got something like:

LOOP AT itab.

l_counter = l_counter + 1.

IF l_counter <= 13.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SMALLFRAME'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 1.

ELSE.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BIGFRAME'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 1.

ENDIF.
ENDLOOP.

and in my sapscript i´ve got:
/E BIGFRAME
/: POSITION WINDOW
/: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
/: SIZE WIDTH '+0.4' CH HEIGHT +1 LN
/: BOX WIDTH '71.50' CH

HEIGHT '40.87' LN

FRAME 20 TW
/E SMALLFRAME
/: POSITION WINDOW
/: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
/: SIZE WIDTH '+0.4' CH HEIGHT +1 LN
/: BOX WIDTH '71.50' CH

HEIGHT '27.40' LN

FRAME 20 TW

why is it not working?

is it not possible within the loop of itab (position´s values) to decide wich frame i want (big or small)?

is it only possible to define the frame dimensions before processing the lines of the main window and not within the loop?

Best regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2005 at 07:51 AM

    Hi

    It doesn't make a sense to put the call of a box into a loop if you have to call the box only one time for each page.

    You should create a window (not main) where you insert the text element to create a frame. This window should overlap at the main.

    For exampla if the main size is:

    - WIDTH = 71.50

    - HIGTH = 40.87

    The window for fram should be:

    - WIDTH = 71.51

    - HIGTH = 40.88

    So the code in your program should be:

    LOOP AT itab.

    l_counter = l_counter + 1.

    ENDLOOP.

    IF l_counter <= 13.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'SMALLFRAME'

    WINDOW = 'FRAME'

    EXCEPTIONS

    OTHERS = 1.

    ELSE.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'BIGFRAME'

    WINDOW = 'FRAME'

    EXCEPTIONS

    OTHERS = 1.

    ENDIF.

    Max

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2005 at 07:55 AM

    Yes it is possible to decide within loop but I guess one will be overwritten by the other as you are hardcoding the Xorigin and Y origin for the box . So before you call function WRITE_FORM you must decide whether BIGFRAME or SMALLFRAME is to be printed if you want only one . If you want one frame after the other you should remove the command POSITION WINDOW as it resets te pointer to print starting from Window Margin as reference .

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

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.