cancel
Showing results for 
Search instead for 
Did you mean: 

Get page no in the program

Former Member
0 Kudos

Hi,

I am using SAP Script to design a form, then call this form in a report.

How could I get the current page no of form in the report?

Thanks a lot.

Best Regards,

Stephanie

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can get that using itcsy structure in to ur program

Former Member
0 Kudos

Hi Venkat,

Could you please tell me how to use the itcsy structure?

I am very confused.

Thanks a lot!

Best Regards,

Stephanie

Former Member
0 Kudos

HI,

Write a subroutine program.

&PAGE& will display the current page number.

Former Member
0 Kudos

Hi

In ur smart form u press CTRLSHIFTF4 then ur field list will be on.There u select system defined field PAGE it will give u the current page number or Number of pages.

Regards,

Farook

Former Member
0 Kudos

Hi,

He asked in Scripts not in Smartforms.

Former Member
0 Kudos

Hi Usha,

Thanks for your reply, but it sounds impossible to use &page& directly in the subroutine of the report.

The field is unknown to the system.

Best Regards,

Stephanie

Former Member
0 Kudos

Hi Usha,

Sorry.By mistake I did like dat.I gave reply by considering the smartforms.

Anyway Sorry.

Regards,

Farook.

Former Member
0 Kudos

Hi,

In script write like this.

/:PERFORM PAGE IN PROGRAM 'Z_MM_R_MMPO'

/:USING &PAGE&

/:CHANGING &V_PAGE&

/:ENDPERFORM

In program

FORM PAGE TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

READ TABLE IN_TAB WITH KEY NAME = 'PAGE'.

Here u can get the Page value in IN_TAB-VALUE.

ENDFORM. "page

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

make use of

In script:

PERFORM get_pageno IN PROGRAM <xyz>

USING &PAGE&.

No need to use changing

In program:

FORM get_pageno TABLES input_table STRUCTURE itcsy

output_table STRUCTURE itcsy.

LOOP AT input_table.

CASE input_table-name.

WHEN 'PAGE'.

g_pageno = input_table-value.

WHEN OTHERS.

ENDCASE.

g_pageno holds the scripts page no