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 problem: my window does not seem to follow my logic

aris_hidalgo
Contributor
0 Kudos

Hello experts,

I am currently having a problem on how to go about this. I inserted a code in 2 of my windows in sapscript namely KOPF and MAIN window. The MAIN window does seem to output the result correctly but the KOPF shows the wrong output. for example, on page 1, which is, lets say line item 1 the value of dealer must be Mr. A and the MAIN window does show it correctly but on the KOPF window gets it wrong. Whats more, they basically have the same logic to follow.

Also, I am confused as to where to look at the problem. Is it on the driver report or in the SAPscript?

Again, thanks you guys for your help. I really appreciate it.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Viraylab

It may not be possible for us to analyse the source of problem.

I will suggest you that you debug your driver program and your SapScript form and see things in action.

For debugging the SapScript: Goto SE71, write the name of your SapScript name, from the menu 'UTILITIES', choose dubugging, switch it on.

Next time when you run your driver program, debugger will stop inside SapScript form. Here, you can see the things in action. If things seems right here, then you can do some reverse-engineering and retract back to driver program to find the problem.

Cheers

Ashish

7 REPLIES 7

Former Member
0 Kudos

make sure u have a text element in ur KOPF window and u call this element also wen u call the element in the main window.. try this out.. u may need to do some trial n error buddy..

Regards,

Bikash

0 Kudos

Hello,

Yup, I have declared elements for both windows.

0 Kudos

Are you printing the correct values in the windows??

Are you using 'WRITE_FORM' for printing the details of the window with the element in it??

Former Member
0 Kudos

Hi Viraylab

It may not be possible for us to analyse the source of problem.

I will suggest you that you debug your driver program and your SapScript form and see things in action.

For debugging the SapScript: Goto SE71, write the name of your SapScript name, from the menu 'UTILITIES', choose dubugging, switch it on.

Next time when you run your driver program, debugger will stop inside SapScript form. Here, you can see the things in action. If things seems right here, then you can do some reverse-engineering and retract back to driver program to find the problem.

Cheers

Ashish

0 Kudos

Hi Ashish,

I tried using what you told me to but it is my first time to debug a sapscript. Any tips?

0 Kudos

Hi Viray,

for debugging the sapscript just enter ur script name in se71, ther utilities-->activate debugger...now wen u run ur program, it shows a pop-up asking u to filter the debugging part, u may just press enter...

u can view ur spscript in debugging mode now..

regards,

Bikash

Former Member
0 Kudos

Hi Viraylab

The pop-up that you get when debugger goes to form - you may well just click OK to continue.

But it may not be a good idea if you really want to be more specific while debugging and specially in bigger forms.

This pop-up gives you some options like text element, window, etc. (just have a look there). If you use this filter, you can go directly to that part of form while debugging instead of going line-by-line.

Cheers

Ashish