cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript - Error page format

former_member409998
Participant
0 Kudos

Hi Experts,

I have a problem to print a label.

When I use the default format page (DINA4) in a sapcript basic settings the label was print correctly. But, when I use the new format page (ZGB_PRAT - created by basis) the error happens.

In a debbug mode I can see that: The functions to open and start form returns correctly (subrc = 0). But the function to print the main window returns with error (subrc = 7) and leave the process.

The message error is that: END_FORM is invalid, OPEN_FORM is missing.

I checked the size of main window and it's according to size of format page.

To make sure, I created a new sapscript and since the start I use the page format size. Didn't work.

I don't know how I can resolve this.

Please, Help me.

Accepted Solutions (0)

Answers (2)

Answers (2)

naresh_bammidi
Contributor
0 Kudos

Hi,

Can you post the error, when you are executing driver program (THAT IS NOT IN DEBUGGING MODE).May be the problem is with your new Page format.it might not created correctly.please let me know the error ,when your executing the driver program.

with regards

Naresh bammidi

mithun_shetty4
Contributor
0 Kudos

call function 'OPEN_FORM'
exporting
device = '??????'    "what is the printer used ?

it might be possible that you are printing on an wrong /invalid printer .May be this printer cant print the page format you specified.

former_member409998
Participant
0 Kudos

The code is this way:


*Abre o Formulário
  CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      device   = 'PRINTER'
      dialog   = ' '
      form     = form
      language = sy-langu
      OPTIONS  = itcpo
    EXCEPTIONS
      canceled = 1
      device   = 2
      form     = 3
      OPTIONS  = 4
      unclosed = 5
      OTHERS   = 6.

former_member409998
Participant
0 Kudos

Let me explain more about the problem...

I have two labels.. The first one work perfectly and uses the same device type. The second one uses different format page. And is the only difference between both.

I have a perform to call the function. The perform to start and open form is the same to everyone, the only different parameters is the name of form.

So, all leads to belive the problems in the format page.

mithun_shetty4
Contributor
0 Kudos

Try


      device   = 'PRINTER'
      dialog   = ' X'

former_member409998
Participant
0 Kudos

Didn't work.

The only difference was the pop-up with parameters to print...

Another suggestion?

mithun_shetty4
Contributor
0 Kudos

Is Next page available in your script ? I feel the new page format is smaller than the DINA4 and having problem moving to the next page