‎2006 May 30 6:59 AM
How come my program(sapscript) still writes on the same page even though I explicitly called
a new-page via FM CONTROL_FORM? My condition is, for every change of dealer, I would call on a new page
then write the details of that dealer on the new page. I debugged my sapscript and noticed that it calls a new-page
based on the condition that I made but I noticed that it does not immediately create a new page but writes the details
of that new dealer on the current page where its supposed to be for the new page.
Hope to hear from you guys. Again, thank you!
‎2006 May 30 7:12 AM
the new-page command has to be put in the MAIN window. Pl chk if its written within any other window,...
‎2006 May 30 7:12 AM
the new-page command has to be put in the MAIN window. Pl chk if its written within any other window,...
‎2006 May 30 7:13 AM
Hi,
I've written it in the report. If it has to be written in the main window, what would be the code?
‎2006 May 30 7:20 AM
‎2006 May 30 7:34 AM
hi viray,
instead of checking the conditon from the main program
do it in the script itself ..
just store the last value in a temporary variable and check if it matches the current value..
if not call a new page..
/: IF v_tmp NE v_curr
/: NEW-PAGE
/: ENDIF
regards
satesh
Message was edited by: Satesh R
‎2006 May 30 7:39 AM
Hi viraylab,
1. I explicitly called
a new-page via FM CONTROL_FORM
Instead of using CONTROL_FORM,
we can do simply like this
2. a) create a new ELEMENT in layout
/E mynewpage
/: NEW-PAGE
b) In your driver program,
write the IF condition for page break
,and then using WRITE_FORM
call this ELEMENT mynewpage.
regards,
amit m.
‎2006 May 30 9:42 AM
I wrote an IF condition in my MAIN window that if a certain valuable is initial, it would trigger a new page. Here is the code below:
/: IF &XKOPFDR& EQ ''
/: NEW-PAGE
/:ENDIF
I am currently debugging my sapscript and found out that even though the condition is TRUE, it would not immediately trigger a new page so value that are supposed to be written on the next page are written on the current page.
Help would be greatly appreciated.Again, thank you guys and take care!
‎2006 May 30 9:48 AM
Hi again,
1. u may write this logic
inside the driver program, and test.
(instead of writing the logic in layout itself)
regards,
amit m.
‎2006 May 30 9:54 AM
Hi again,
That was what I did before trying to code it in the layout itself but it also didn't work. Sorry for being so stubborn but I really can't seem to figure this out since this a Z version of WASCHEIN and I'm kinda new to ABAP. Again, thank you guys for your help!
‎2006 May 30 10:31 AM
Hi Viray,
have u checked if the variables that u want to print in next page are getting triggered AFTER the new-page command in SAPSCRIPt??
also, is ur cursor really goin within the IF condition, ie in the NEW-PAGE command?? pl chk that carefully...
apart from that i dont c any reason why this is happening..