cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript: event NEW-PAGE is triggered if printer called in SAP's name

former_member699400
Active Participant
0 Kudos

Hi All,

there is a usual window TITLE with a few text elements and nothing else inside,

but when this window is processed, event NEW-PAGE is triggered (I see it in debugger).

This happens only if I call printer with printer SAP's name, for example - PRNT

but if I call the same printer with abbreviation LOCL, than event NEW-PAGE is not being triggered and form is processed as expected.

Any ideas why this happens?

Best regards,

Mindaugas

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member699400
Active Participant
0 Kudos

found it out.

we have:

STRING_1 was let's say "invoice title"

STRING_2 was let's say "invoice"

result "invoice" is part of STRING_1 and not STRING_2, as I was thinking

result is STRING_1 and not STRING_2, as I was thinking...

calling printer as PRNT made it impossible of using (do not know why) of font defined, so the output became longer in milimetres because of other font and there was not enough space for the whole STRING_1, so the output was "invoice" and after I have increased width of window, output now is "invoice title"

cheers,

Mindaugas

former_member699400
Active Participant
0 Kudos

Example:

content of window TITLE:

TITLE_VKORG (text element)

IF &VBDKR-VKORG& EQ '0001'

STRING_1

ELSE

STRING_2

ENDIF

if I put PRNT as printer name, the text element is processed until line STRING_1.

At this line event NEW-PAGE is triggered and the result in the title of the form is STRING_2 (not STRING_1)

If I put LOCL as printer name, the whole text element is processed and result is STRING_1 (as it has to be).

Cheers,

Mindaugas