Hi,
I really don't like adding another flag and making even more conditions on TOTALS, HOW_TO_PAY and BANK_DETAILS, but I can't come up with a better idea, so...
- define global flag GF_FIRST_OR_NEXT_FINISHED type XFELD
- clear the flag in initialization;
- set the flag before page break via ABAP node
- add the flag in TOTALS, HOW_TO_PAY and BANK_DETAILS conditions:
( IS_BIL_INVOICE-HD_GEN-SHIP_COND = 'Z2'
OR
IS_BIL_INVOICE-HD_GEN-SHIP_COND ≠ 'Z2'
IV_CURRENT_PG = IV_TOTAL_PG )
GF_FIRST_OR_NEXT_FINISHED ≠ INITIAL
- get rid of 'Only After End of Main Window' flag on TOTALS, HOW_TO_PAY and BANK_DETAILS
Setting the flag and page break command can be wrapped in a folder. You could also trigger the page break directly from Abap node, as shown in the attached form.
Those IV_CURRENT_PG = IV_TOTAL_PG conditions are bothering me a little (because I don't know what the driver program is trying to accomplish there), but if it was working before it should still work after adding flag.
You are getting rid of all those nodes with 1 = 2 conditions when you are done with the form, aren't you
cheers
Jānis
P.s. There seems to be a little 'bug' in SF runtime - if there are secondary windows on the page where explicit page break is processed, processing the secondary windows sets the SFSY-PAGENAME back to the name of the page that was finished by page break command...