cancel
Showing results for 
Search instead for 
Did you mean: 

First Record is repeated twice in main window of script

Former Member
0 Kudos

Dear All,

I am developing a Script form, which contains 3 windows Header,Main and Footer. My Problem is that in Main window

the first record is repeated twice and the remaining all records

are ok. I am unable to solve this issue of stopping the duplicate

first record. Your response might be helpfull to me.

Regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I came across this prob today too.

I did some digging, maybe it is something with the window type, this prob only occurs when the type of the window is continuious, and it is only possible for the main window to be set to the continuious type.

The only way, as far as I know, is that you can put those your wanna print in a text element. And by doing so, the prob is gone. But, do pay attention to those are not continuious type windows, and remember that they are variable. The content of the windows like those, are only kept until the next write_form is called to repaint the window content and any content of the ex-window would vanish without a trace. And if you also put the content of the variable windows in a text element, there will be some format confusion getting in the way.

That is all I got, But I still have no idea about the course.

Former Member
0 Kudos

Hi,

Use text elements while printing the data. Then the first record does not repeat.

While printing the data using FM 'WRITE_FORM' , pass element parameter in Import parameter.

Thanks,

Phani Diwakar.

Former Member
0 Kudos

Hi people!

Just for record!

I had the same problem and setting the text element in sapscript and calling it from Call Function "Write_Form" solved it!!! 😃

Regards

Eduardo Kassabian

Former Member
0 Kudos

Hi,

Debug script.

Check internal table values.

Former Member
0 Kudos

Debugging was done already, i could see only one record in internal table. But in the Form main window it is displaying the first record twice. I tryed putting CLEAR <itab> in the text elements of main window, but it is not working. Any other way to force CLEAR <itab> to work in the text elements of main window.

regards,

Former Member
0 Kudos

Check 'WRITE_FORM' function module. Is it called multiple times.

How many times the text element of main window is called?

Check whether it is equal to no of records in internal table.

Juct comment your code in script where u r writing the record.

If it is not printing anything means thr might be problem in your driver programm. You may have used 'write_form' two times depend on conditions.