cancel
Showing results for 
Search instead for 
Did you mean: 

next-page issue

Former Member
0 Kudos

i have a script which is running for 6 company codes.it has 2 pages -first and next and both have different windows ,so layout design is also different.now,the business wants that for 1 company code the next page should be the first page.is there any way that i can make the next page as first page for only 1 company code.there is program associated with the sapscript?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use the Control_from function module for this one, In the command pass <b>New-Page 'First Page'</b>

You need to call this function module after printing the first page,

Regards

Sudheer

Answers (4)

Answers (4)

former_member480923
Active Contributor
0 Kudos

Hi

steps

1) Do not give any Next Page reference in the Page Heading

2) In the Main Body of the main window give a alternative with the condition

if p_bukrs = 'COMP1'.
Command firing next page = first page
else.
Command firing next page = 2nd page
endif.

Hope that Helps

Anirban M.

Former Member
0 Kudos

hi,

accoring to the requirement you mentioned we need to control. this at the program level not at script.

in the program when you enter the perticular company code in your loop after entering the first page use NEXT-PAGE command to get the next page.

hope this works

Sai

former_member181962
Active Contributor
0 Kudos

You can put your condition for triggering the next page like this:

/: if &company& = <Company1>

/: NEW-PAGE [page_name1]

/: else.

/: NEW-PAGE [page_name2]

/: endif.

Regards,

Ravi

Former Member
0 Kudos

Hi...

you can write the code like this:

if company code = companycode1 (your required company code)

new-page 'First'

else.

new-page 'Second'.

endif.

Reward points if useful......

Suresh.......