Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in determining Paper Format for Printout triggering from ABAP Code

Former Member
0 Kudos

Hi Experts,

I am trying to trigger a printout from my ABAP code using "NEW-PAGE PRINT ON ...... NEW-PAGE PRINT OFF" statement.

I am passing the Print Parameters using the FM "GET_PRINT_PARAMETERS" as below:


    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination    = ls_options-tddest
        copies         = 1
        list_name      = 'Notification'
        list_text      = 'ERROR NOTIFICATION'
        immediately    = 'X'
        release        = 'X'
        new_list_id    = ' '
*        expiration     =
        line_size      = 79
        line_count     = 23
        layout         = 'X_65_80'
        sap_cover_page = ' '
        receiver       = 'SAP*'
        department     = 'System'
        no_dialog      = 'X'
      IMPORTING
        out_parameters = lv_params.

But I am facing a problem. Though I am passing X_65_80 to the LAYOUT in the Function Module, it is trying to print in LETTER format. But the specified printer as the printer supports only A4 paper format and as a result, I am not getting any printout.

Kindly help me with your suggestions to resolve this.

Thanks in advance.

Regards,

Keerthi

5 REPLIES 5

Former Member
0 Kudos

You need a SAP destiantion that is defined for the A4, and not the standard 65X80, don't you?

0 Kudos

Hi,

Yes, I am in fact passing the destination to the Function module GET_PRINT_PARAMETERS.

The destination defined is also one that supports A4, but somehow, the program is trying to look for Letter format paper.

That is what completely escapes me.

Thanks & Regards,

Keerthi

0 Kudos

Hi,

I just found that this problem is even stranger.

I am able to print the said message on my local printer but when I try to print the same message on a different printer located at a different location, the printout does not get triggered. I am not getting any error messages also in this case.

What could be the possible reason for this?

Kindly share your views/experience with me on this one.

Thank you.

Regards,

Keerthi

0 Kudos

So, your form is defined as A4? Not letter/portrait?

0 Kudos

Yes, I have defined it as A4 only.

And its not exactly a form. I am just trying to print a custom message from an ABAP Program.

Regards,

Keerthi