cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Sapscript NEW-PAGE

former_member203305
Active Contributor
0 Kudos

Hi,

I need to create a new page for the sapscript of Purchase Orden.

the first page goes to the first page (FIRST).

The new page is called SECOND and it contains just text, such as Terms & conditions.

The problem is that i couldnt be able to use the statement :


/: NEW-PAGE SECOND

It doesnt go to the second page.

I added it at the end of the MAIN windows of the FIRST page.

I also added it at the end of the TOTAL windows of the FIRST page, because that windows is the last one.

What am i doing wrong? I think that it should be worked.

Please some help.

Accepted Solutions (1)

Accepted Solutions (1)

suzy_bijnens
Active Participant
0 Kudos

Hi,

If, in a NEW-PAGE command, you specify a page not contained in the form, the specification is ignored.

Please check for typing errors.

Rgds,

Suzy

former_member203305
Active Contributor
0 Kudos

Hi guys

the SECOND page is created and it contains texts, just texts. In addition, that page is contained in the sapscript.

What i was able to do until now, was create a smartform and called it from the sapscript. It is working well.

But i wanna know why my sentence doesnt work in the sapscript.

In everywhere says that using that command should be work, but it doesnt.

Regards

suzy_bijnens
Active Participant
0 Kudos

Hi,

Have you tried to debug the SAPscript? (SE71 - utilities - activate debugger)

Rgds,

Suzy

former_member203305
Active Contributor
0 Kudos

sure.

this is the last option that i have on mind.

Thanks

P.D: it gives me a sy-subrc = 4. I dont know why, but i am giving up. Maybe the easy way is to do that i did. Unless somebody gives me a better idea.

Former Member
0 Kudos

Hi

It's not very important where u've insert the command NEW-PAGE, but it's important the command is inserted in a text element of the MAIN.

So when do u call this text element in order to skip to next page?

Max

former_member203305
Active Contributor
0 Kudos

Hi master.

Why text element r u talking about? i havent create text element.

what do i have to do? please some help.

Regards

Former Member
0 Kudos

Hi

Your MAIN should be:

/E  NEW_PAGE
/:   NEW-PAGE SECOND

So your driver program should call the fm WRITE_FORM:

CALL FUNCTION 'WRITE_FORM'
       EXPORTING
            WINDOW  = 'MAIN'
            ELEMENT = 'NEW_PAGE'.

Or u can also use the fm CONTROL_FORM instead of the code above:

CALL FUNCTION  'CONTROL_FORM'
      EXPORTING  COMMAND   = 'NEW-PAGE SECOND'
      EXCEPTIONS UNSTARTED = 1
                 UNOPENED  = 1.

Max

former_member203305
Active Contributor
0 Kudos

Thank u very much.

Answers (1)

Answers (1)

Former Member
0 Kudos

This message was moderated.