Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript write form skips my first record

aris_hidalgo
Contributor
0 Kudos

Hello experts,

I am currently debugging my SAPscript and I found out that on the first run one of my WRITE_FORMS seems that it skips the first record even though I have conditions both on the window and the report program. So in effect, what happens is that the valuy in my KOPF window that is supposed to be intended for the first page is based from the 2nd page! for example, on the main window, line item one is displayed, so the value in the KOPF window must be dealer 1 but it is displayed as dealer 2.

2 REPLIES 2

Former Member
0 Kudos

Hello Viraylab,

As I understand u are printing line item with values from KOPF table in another window, so this involves main window and another window. I am assuming the write form abt which u are talking is for KOPF window. can u set a breakpoint just before the call to the KOPF window WRITE_FORM and check the table contents. I believe u are passing the same to the window.

Former Member
0 Kudos

Hi Viray,

u need to set breakpoints in the loop and then c the values of the variables that u r passing to the script at the point of WRITE_FORM.. just check if a NEW_PAGE is getting triggered before u have written anything in the script..this u can do by activating the SAPSCRIPT debugger at the same time..in sapscript debugger it shows u the page number, window and the current Element..so u can know bit by bit wats happening in runtime.. this will definitely take some time, but then it also helps in the long run to understand how exactly data flows from program to script an also how the commands in the script work..

Hope it helps,

Regards,

Bikash