cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript Issues - Page numbering and logic coding on SAPScript

Former Member
0 Kudos

Ladies and Gentlemen,

I have 2 problems with a SAPScript development for a client.

1) I am using the &PAGE& of &SAPSCRIPT-FORMPAGE&, but when the output continues over 2 or more pages, the numbering on the form continues to show 1 of x. Do I need to manually increment the &PAGE& value? I thought SAPScript managed this funtionality automatically.

and 2) I have a constant value ( '>' ) that I need to print if text is available. How do I code an if statement around the constant. I have tried

/:  if  not wa_text is initial.
ZL   >,,&wa_text&
/:  endif.

(where ZL is the paragraph type) but I get a syntax check error. Any thoughts or answers would be greatly appreciated (and rewarded).

Cheers,

Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try like this :

&PAGE& of &SAPSCRIPT-FORMPAGE(3Z)&

/: <b>if wa_text ne ''.</b>

ZL >,,&WA_TEXT&

/: endif.

I hope you will get it.

Thanks

Seshu

Former Member
0 Kudos

Seshu,

Thank you for your assistance, but unfortunately it didn't work. I think I can get around the logic by changing the '>' to a variable and managing it in the program code, but the page number is totally confusing.

The actual code (I was working from Memory before) for the page print is:

 Page: &PAGE& / &SAPSCRIPT-FORMPAGES(C)& 

. It works on other forms, but on is causing a problem with this one. Is there something that I need to define/maintain in the program code?

Thanks,

Steve

Former Member
0 Kudos

Then use below like this :

/: DEFINE &TPAGE&

/: &TPAGE& = &SAPSCRIPT-FORMPAGES&

P1 &PAGE& / &TPAGE(C)&

NOW IT SHOULD COME ,EVEN IF IT IS COMING,THEN USE LIKE THIS

&PAGE& / &SAPSCRIPT-<b>JOBPAGES</b>(C)&

Thanks

Seshu

Former Member
0 Kudos

Seshu,

Problems solved. Thanks for your assistance.

Answers (0)