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: 

Sap script problem

Former Member
0 Kudos

Hello All,

The FBL5N corespondence display report was working till last Friday. On last sunday there were support packages went into SAP production. The report totals is coming zeros. The rest everything looks fine. I looked at the sap script form. The following is the code in that particular page window:

IF &NEXTPAGE& eq 0

&RF140-RAST1& &RF140-RAST3& &RF140-RAST4& &RF140-RAST5& &RF140-SALDO&

ELSE

-


-


-


-


ENDIF.

To me looks like the fields are not populated in the next page/last page. But the footer text is printed perfectly and the total values are printed as zeros. If I take out the IF &NEXTPAGE& eq 0 condition, it is prinitng total values on the first page but not on the next/last page.

Can you help me to fix this problem?

Thanks,

Sobhan.

4 REPLIES 4

Former Member
0 Kudos

Hii

In the PAGE attributes of the first page, <b>Make the "Next Page" attribute the second page.</b>

also check if you have included <b>MAIN Window</b> in second page .

In scripts only main windows have the functionality of printing in the next page if a page exceeds.

the other windows doesnt have the functionality.

in order to do that u can as well declare that window on the next page .

Then I believe the data will flow into the NEXT page.

<b>Also increment the page number by 1 .</b> you can know the page number by using the symbol &page&.

Revert back for more help .

Reward points if found helpful .

Regards

Naresh

0 Kudos

Hi Naresh,

Thanks for the help. The problem is not with the sap script. The problem was with the actual code in the calling program.

Thanks,

Sobhan.

Former Member
0 Kudos

Hi Sobhan,

wat u can do is put a breakpoint in the write_form for the text element where this piece of code is inserted, in ur program...then chk the values of these variables at that point in the program ...which gives u an indication as to wat values are getting passed to the sapscript..

another option is to debug the script itself.activate the SAPSSCRIPt via>utilities>activate debugger..then run the transaction...use F6 to reach to ur piece of code...chk out the page no. mentioned at the top n the corresponding values for these variables....u may find something out that may help u resolve the problem...

hope it helps..

Regards

0 Kudos

Hi Bikash,

Thanks for the solution. I forgot to mention that I found the problem and fixed it.

Thanks for the help,

Sobhan.