on 10-13-2006 9:39 AM
Hi everybody,
I've got a sapscript with a page counter (page 1/3 for example), and I don't want that the total number of pages includes the last page of the sapscript. So if I'm on the second page of a 3 pages form, I should see : page 2/2.
Do you know how I could do that?
Thanks in advance!
Hi Gallina,
Try this way..
temp = &SAPSCRIPT-FORMPAGES& - 1.
and then print
&PAGNO& / &temp&.
Cheers...!
Jayaram..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Make use of &PAGE& '/'&SAPSCRIPT-FORMPAGES'.
Regards,
Shrita
Message was edited by: shrita sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may have to use performs in sap script:
/: DEFINE &TOTAL_PAGES& := '&SPACE(2)&'
/: PERFORM GET_COUNT IN PROGRAM ZGETCOUNT
/: USING &SAPSCRIPT-FORMPAGES&
/: CHANGING &TOTAL_PAGES&
/:ENDPERFORM
IN PROGRAM ZGETCOUNT:
FORM get_COUNT TABLES sap_data STRUCTURE itcsy
abap_data STRUCTURE itcsy.
DATA : COUNT LIKE SAPSCRIPT-FORMPAGES.
READ TABLE sap_data WITH KEY name = 'SAPSCRIPT-FORMPAGES'.
IF sy-subrc EQ 0.
MOVE sap_data-value TO COUNT.
COUNT = COUNT - 1.
ENDIF.
READ TABLE abap_data WITH KEY name = 'TOTAL_PAGES'.
IF sy-subrc EQ 0.
abap_data-value = COUNT.
MODIFY abap_data INDEX sy-tabix.
ENDIF.
ENDFORM. "GET_COUNT
Regards,
Ravi
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.