Skip to Content
author's profile photo Former Member
Former Member

Problem in BDC

Dear Experts,

I have developed a program for shipping advice and created transaction for this then I did BDC recording for this transaction

and in between I am calling printer (RSPO_FRONTEND_PRINTERS_FOR_DEV) to print the document.

The problem I am facing is the dialog for print will open if I run program in foreground (Mode 'A') but if run in background the print dialog will not open.

could anyone suggest me that how can I fix this issue.

CALL FUNCTION 'RSPO_FRONTEND_PRINTERS_FOR_DEV'

EXPORTING

DEVICE = 'LOCL'

IMPORTING

PRDEFAULT = V_DEFUALT_PRINTER

TABLES

LIST = L_PRLIST

EXCEPTIONS

NO_LIST = 1

LIST_TRUNCATED = 2

NAME_NOT_FOUND = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

MESSAGE E600(FR) WITH 'Error on CALL FUNCTION "GET_DEFAULT_PRINTER" process. '.

V_ERROR = 1.

ENDIF.

Thanks in advance....

Best Regards

Venkat

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 24, 2011 at 09:10 PM

    Hi,

    What is the format of your document?

    You should probably use the EXECUTE method of the class CL_GUI_FRONTEND_SERVICES to achieve that...

    for example to print a PDF document:

                cl_gui_frontend_services=>execute( 
                  EXPORTING
                    application = l_appl       "Full path to AcroRd32 executable
                    parameter = l_param        "/n /t [filename] 
                    synchronous = 'X'
                  EXCEPTIONS
                    cntl_error = 1
                    error_no_gui = 2
                    bad_parameter = 3
                    file_not_found = 4
                    path_not_found = 5
                    file_extension_unknown = 6
                    error_execute_failed = 7
                    synchronous_failed = 8
                    not_supported_by_gui = 9 ).
    
    

    Concerning the parameter passed to acrobat reader:

    /n = Launch a separate instance of the Acrobat application, even if one is currently open.

    /t = Used to initiates the Reader, prints a file while suppressing the Acrobat print dialog box, then terminates Reader.

    That means also that the document must be downloaded first...but can be deleted right after printing...

    Hope it helps,

    m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2011 at 08:36 AM

    its done

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.