cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SAP Script

Former Member
0 Kudos

Hi All,

1. I have some code which generates a SAP Script using the form.

2. When I execute the Program, it asks for Print Prieview Dialog Box.

3. I created a header structure for the type ITCPO and passed the required parameters to the FM to suppress that window.

4. But, I could see the dilalog box again popping out asking us to select Print Preview/Print.

Here is the code that I used :

data : l_itcpo type itcpo.

l_itcpo-TDDEST = 'LP01'.

l_itcpo-TDNOPREV = 1.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DEVICE = 'PRINTER'

DIALOG = 'X'

FORM = 'ZBNCHSS_FORM'

LANGUAGE = SY-LANGU

OPTIONS = l_itcpo

Please advice on this.

I repeat my requirement. As soon as I execute the program, I want the scipt output on to the screen without any dialog box in between.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

try this

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DEVICE = 'PRINTER'

DIALOG = ' '

FORM = 'ZBNCHSS_FORM'

LANGUAGE = SY-LANGU

OPTIONS = l_itcpo

Regards,

Venkatesh

Former Member
0 Kudos

Venkatesh,

Thanks. That worked.

Babu Kilari

Answers (3)

Answers (3)

Former Member
0 Kudos

The requirement can be solved by changing user profile settings for printing with the help of basis.

I have achieved the same.

Regards,

Rajanbabu.

Former Member
0 Kudos

Hi Rajan Babu,

I tried doing the same by setting the user profile with the required values.

But, I could not get what I needed.

Thanks,

Babu Kilari

Sougata
Active Contributor
0 Kudos

Can you change the code as below and test it to see if it works?


L_ITCPO-TDNOPREV = 'X'.          "<-----change this line only to test

Let me know if it worked.

Sougata.

Former Member
0 Kudos

Hi Sougata,

Thanks for the reply. I made the changes told by you but invain.

It is again asking to click on either Print Preview/Print with a dilog box popping out

Thanks,

Babu Kilari

Former Member
0 Kudos

Hi,

try this .

Goto select menus system tab-->user profile->owndata->defaults->spoolcontrol--->

write printer name,check output immediately.