Data is missing in Even Page when report running in background (spool)

Hi
I have this weird problem in my report. The report would run in background convert the data in to PDF from spool and then email it to people.
Now when the PDF has more then 1 page the error occurs.
It drops the last row from the even page. The total at the end and every thing shows correctly. If there r more than 2 pages then on page 3 the last row is not dropped and its all fine but again on page 4 it drops one record and on page 5 again its working fine.
One thing is it also puts an extra line(horizontal line which is not in the code) on those pages where its unable to put the record and its always the last one on the even page. I also looked up the spool. Its doing it in the spool too. So i think its not the PDF converter its when the spool is getting created for some reason its droping the rows for the even pages...
Did any one else encountered some thing like this? please help.
Thanks
Message was edited by:
        Anwarul Kabir

is there any problem with Background spools with SAP? We are running R3 here. And looks like its the spool background job that's creating the error. When i execute the report it shows all the record in print preview or if i print it.
Please Help!

Similar Messages

  • Less coloumns displayed when report run in background

    Hi,
    There is a problem, when i run a report in background last few columns are not displayed. But when i run it in foreground all the columns are displayed properly.. Bt since the report hs to be run background, I need to fix this issue..
    Cn anyone explain why this is happenin and wht i cn do to rectify it?
    Thanks
    Keshi

    Hi,
    Use REUSE_ALV_GRID_DISPLAY and you will be able to run the report in foreground or background.
    If you must use OO ALV controls, you won't be able to run the program in background. In this scenario, I would check SY-BATCH and if it is set, I run REUSE* FM and if not I do CALL SCREEN..
    If you are using the ABAP Grid Control (OO object), you can still create the ALV list as a spool listing for the background job.
    The easiest way to do this is to put all the create object statements and method calls for the custom container and ALV grid object inside a subroutine (for example, present_grid).
    All that is required is a simple check of the sy-batch variable to determine if the program is being executed in the foreground or background.
    e.g. if sy-batch is initial.
    call screen 0100.
    else.
    perform present_grid.
    endif.
    In a PBO module of screen 0100, the subroutine present_grid is also performed.
    The set_table_for_first_display method will be invoked in the routine present_grid, however, due to the job being executed in the background, the ALV list output will be written as spool output for the background job.
    Regards,
    Srini

  • Is it possible to print just odd or even pages when preparing document or a booklet?

    Is it possible to print just odd or even pages when preparing document or a booklet?

    It can also depend on the application you are using. Which are you using for this project.

  • I have BSP Page.When i run it should open in new window .

    Hi friends,
    I have BSP Page.When i run it should open in new window .
    I want code also whatever i want i can able change  the height width .

    CLOSED

  • I have BSP Page.When i run this BSP my internet expolrer browser screen hei

    Hi friends,
    I have BSP Page.When i run this BSP my internet expolrer browser screen height =200 ,width =-200.
    How to code this layout in BSP and where i have to write?

    chk this
    http://www.codeave.com/javascript/code.asp?u_log=7065

  • HP Laserjet Pro 200 color MFP skipping even pages when scanning

    my scanner skips ever other page when scanning. noticed other posts regarding a different model and wondering if there is a fix out there for the Laserjet Pro 200 MFP??? Please and Thank you!!

    Hi jbogda,
    I see by your post that the printer skips every other page when scanning. I can help you.
    Do you have the Laserjet Pro M276 printer?
    How Do I Find My Model Number or Product Number?
    I believe that you are scanning from the ADF, multiple pages and the feeder isn't pulling in the pages properly. Please clarify if I am incorrect.
    Make sure the printer is connected directly to a wall outlet. (don't use a power hub or a surge protector) This ensures the printer is receiving full power and may help this situation.
    I have provided a document with some steps to try to see if that will resolve the issue.
    'Document feeder mispick' Message Displays on the Control Panel and the ADF Does Not Pick Up Paper o... Disregard the title.
    If you need further assistance, just let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Error when OO ALV report run in background

    Hello all,
    We recently applied stack 12 for a 7.0 system.  My custom ALV report using CL_GUI_CUSTOM_CONTAINER coding now returns an error when run in Background.  It works fine in dialog.
    The error occurred in program CL_GUI_CUSTOM_CONTAINER=======CP.  The log message was "Control Framework: Fatal error - GUI cannot be reached".
    Is there a solution for OO ALV reports run in the background?  I would not like to re-write my ALV reports using the function call.  Any advice is appreciated.  Thanks!!

    Yes, you need to code it a little differently, but you can still use CL_GUI_ALV_GRID.  Here is an example. 
    REPORT ZRICH_0006 .
    DATA: ITAB TYPE TABLE OF MARA.
    DATA: R_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: R_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.
    DATA: OKCODE type sy-ucomm.
    START-OF-SELECTION.
      SELECT * FROM MARA INTO TABLE ITAB  up to 100 rows.
      CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    * text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '0100'.
      SET TITLEBAR '0100'.
      IF R_CONTROL IS INITIAL.
    * Check whether the program is run in batch or foreground
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    * Run in foreground
          CREATE OBJECT R_CONTROL EXPORTING CONTAINER_NAME = 'CONTAINER_1'.
          CREATE OBJECT R_GRID EXPORTING I_PARENT = R_CONTROL.
        ELSE.
    * Run in background
          CREATE OBJECT R_GRID EXPORTING I_PARENT = G_DOCK.
        ENDIF.
        CALL METHOD R_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
        I_STRUCTURE_NAME = 'MARA'
        CHANGING
        IT_OUTTAB = ITAB.
      ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    * text
    MODULE USER_COMMAND_0100 INPUT.
      CASE OKCODE.
        WHEN 'BACK'.
          leave program.
      ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    Regards,
    Rich Heilman

  • Length exceeds When report run in bachground.

    Hi,
    When I run the report in back ground, output eceeds and getting data in next lines.
    I need output in a single line each record.
    Suggest me on this issue.
    Regards,
    Rayeez

    Hi,
    Change the width of your report according to your requirement.
    You can do this the following way :
    report zzzz line-size i.
    where i is a numeric constants.
    Regards,
    Abhinab Mishra

  • Call javascript to expand detail row when report runs

    Hi,
    Is there any way to call javascript when report is run? What I want to do is to expand all detail rows (of Carl's Ajax report row detail example) when the report is run. In the original example, an user needs to click the link in the report row in order to display its detail row. I would like to expand all the rows as soon as the report is run.
    Thanks.
    Andy

    Hi Andy,
    You can use jquery to fire all the onclick events within the DIV's on the page.
    In the HTML Header add
    <script type="text/javascript">
    function allclicks(){
    $("div").click();
    </script>In the HTML Body Attribute add
    onload="allclicks();"You will also need to load the jquery files.
    Regards
    Paul

  • How to change the Browser title when report runs on the web?

    Hi folks,
    How to change the title of the browser when I run my report on the web? Iam using Internet explorer and Reports 6i. Is it possible in 6i or 10g reports?
    Could you please tell me the step by step procedure ?
    Right now the browser is displaying the URL when I run the report with format = PDF.
    Thanks.

    It works for me. I don't see why you have a problem with >this code.
    Can you look at the source code of the html >file that was created (so, not in the browser, but in a >text editor). What do the header and title look like?The Html code in the file is same as the above code I specified. Actually I copied the same code and pasted here. But when I run the html file the Title shows up.
    Don't put </html> there. Maybe that helps. I tried this, but it did not work.
    Please let me know is there any way to set it dynamically inside the triggers using SRW built_in.
    Thanks alot.

  • Hi experts 1 query regarding alv report running in background

    when i run my alv report with 40 columns in background in spool when i get output disturbed 20 lines of first row is moving to second row so when i download to excel the o/p is completely disturbed and no use for me is there any way to solve this problem.please reply

    hi ,
    this will solve your problem
    http://www.****************/Tutorials/ALV/Spool/width.htm
    Increasing the width of the spool when using ALV List
    By Aafaque Husain, YASH Technologies
    Whenever an ALV report (with more number of columns) is scheduled in background, the output will be displayed in a zigzag fashion as shown below:  
    If we try to download the output from the spool or try to view the output, then we observe that the output is not in an appropriate fashion.  
    To get the right format of output in the spool we generally increase the u201Cno. of columns fieldu201D in the Format typesu201D. Have a look at the following screenshot:   
    Sometimes even when we change this field, we get the output truncated at the end, like last few columns are not displayed. There is certain limitation for this field, so that even if increase this value again, we find no change in the output display in spool. 
    This value is effective only when we check the check box u201CNumber of columns from list display formatu201D in the SPAD transaction.
    Ø       GO to SPAD Transaction code
    Ø       In the menu Settings -> Spool System as shown belowu2026
    Ø       In the others tab check the first check box in the Output Controller block, SAVE and exit.
    Now Schedule the ALV report again by providing the output device and format, and then we get the full output in the spool as shown below: 
    Regards,
    Madhavi

  • Spool to PDF Conversion in ECC6 from Report running in Background

    Hi Friends,
    Iam working in ECC6, I have created one Classical report with line size of 295 which is running in Background and spool is generating.
    But my requirement is I have to send this spool to email through PDF Attachment.
    Here i have to convert Spool of line size 295 to PDF format. and then using FM give mail to respective email ids.
    Here is the code i have written for your refference:
    IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf.
        PERFORM process_email.
    endif.
    1.      FORM GET_JOB_DETAILS .
    Get current job details
         CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
            IMPORTING
            eventid                 = gd_eventid
            eventparm               = gd_eventparm
            external_program_active = gd_external_program_active
            jobcount                = gd_jobcount
            jobname                 = gd_jobname
            stepcount               = gd_stepcount
        EXCEPTIONS
          no_runtime_info         = 1
          OTHERS                  = 2.
    ENDFORM.                    " G
    2.  FORM OBTAIN_SPOOL_ID .
         CHECK NOT ( gd_jobname IS INITIAL ).
         CHECK NOT ( gd_jobcount IS INITIAL ).
         SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        MESSAGE s004(zdd) WITH gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.                    " OBTAIN_SPO
    3.       CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
              EXPORTING
              src_spoolid              = gd_spool_nr
             no_dialog                = c_no
            dst_device               = c_device
         dst_device               = 'ZLOCL'
          PDF_DESTINATION          = 'X'
        IMPORTING
          pdf_bytecount            = gd_bytecount
        TABLES
          pdf                      = it_pdf_output
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          OTHERS                   = 12.
      CHECK sy-subrc = 0.
    *Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " CONVERT_SPOOL_TO_PDF
    4.     FORM PROCESS_EMAIL .
            DESCRIBE TABLE it_mess_att LINES gd_recsize.
          *DESCRIBE TABLE it_pdf_output LINES gd_recsize.
          CHECK gd_recsize > 0.
          PERFORM send_email USING p_email1.
    ENDFORM.                    " P
    5.   FORM SEND_EMAIL  USING    P_EMAIL.
         CHECK NOT ( p_email IS INITIAL ).
         REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachnament'.
      CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as PDF  format
      PERFORM send_file_as_email_attachment
                                   TABLES it_mess_bod
                                          it_mess_att
                                          it_pdf_output
                                    USING  p_email1
                                          'PDF Document Attached'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 CHANGING gd_error
                                          gd_reciever.
    ENDFORM.                    " SEND_EMAIL
    6.         FORM SEND_FILE_AS_EMAIL_ATTACHMENT  TABLES  it_message
                                                it_attach
                                          USING p_email
                                                p_mtitle
                                                p_format
                                                p_filename
                                                p_attdescription
                                                p_sender_address
                                                p_sender_addres_type
                                       CHANGING p_error
                                                p_reciever.
    DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
              t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
              t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              w_cnt TYPE i,
              send_mail LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
              w_sent_all(1) TYPE c,
              w_doc_data LIKE sodocchgi1.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      LOOP AT p_email1.
        t_receivers-receiver =  p_email1-low.
        t_receivers-rec_type = 'U'.
        t_receivers-com_type = 'INT'.
        t_receivers-notif_del = 'X'.
        t_receivers-notif_ndel = 'X'.
        APPEND t_receivers.
      ENDLOOP.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = t_packing_list
          contents_bin               = t_attachment
          contents_txt               = it_message
          receivers                  = t_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    But when iam executing the report in Background mail is coming to respective email ids but when i opened that attachment which is in PDF is not opening, giving error as below:
    "Could not parsed Attachment.PDF!"
    and file size is less oringinallly file size should be 125 KB buit in mail it is coming only 3 KB.
    When i executed FM CONVERT_ABAPSPOOLJOB_2_PDF in foreground, its working fine for that Spool id.
    Any suggestions from u friends.
    regards,
    Sekhar.

    Hi when ur running tha application in background pass the below parameters .
    DATA:
    w_form_name TYPE tdsfname VALUE 'Zpramu_TEST',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Some events are not dispatched when app runs in background

    My Android app has a TIMER event which fires once every second to connect a TCP socket (class flash.net.Socket) and send a request.
    A packet sniffer confirms that a socket is in fact connecting, request is sent, reply comes back and connection is closed, all happening once per second.
    Clearly, even with the app in the background, the TIMER event is occurring every second, because the timer handler is initating every socket.
    But not every closing connection causes a CLOSE event to dispatch, because my close handler is called less frequently.  Sometimes once in 3 seconds, 8 seconds or even longer.
    The CLOSE dispatches correctly once per second when the app is in the foreground.
    Why are CLOSE events being missed when the app is in the background?  What is the difference between a TIMER event and a CLOSE event, causing one to dispatch correctly but not the other?
    Thanks.

    I've narrowed my problem down by chopping pieces of code until it works, and I think I have it narrowed down to the code that uses FlexGraphing but need to check a bit more...
    It's odd that it works in Flex3 builder though, and there are no errors when I run in as AIR. In fact, the app RUNS, since it is in the task manager, but it won't appear.

  • When MRP run through background process in MDBT open PR and PO not comming?

    Hi,
    When MRP run through backgroung process in MDBT open PR and PO not coming in MDBT result.
    Pls advise accordingaly.
    Regards
    rk

    Ram,
    Either I am totally misunderstanding your statements, or your business people are misinformed.  
    The output of MD01 (MRP total run in foreground) and the output of MDBT (MRP total Run in Background) ARE IDENTICAL, provided you have selected the same parameters.  
    Neither output contains a discrete listing of open Purchase orders and Purchase requisitions.
    Standard output of both MD01 and MDBT are:
    1.  List of materials processed, with exception messages
    2.  Statistics
    In addition, both of these programs also write MRP records to the MRP databases, provided that the "Display Material List" parameter is set.  In this case, both of these programs will produce data that can be further reviewed and managed in MD05 and MD06. MD06 is the tool that most planners use to process the MRP database info.
    If you wish to see a listing of the entire MRP results (either MD01 or MDBT), then execute transaction MDLD.  This will produce either a spoolfile or a printed document.
    For the PO or PR listings, review my earlier suggestions.
    Rgds,
    DB49

  • File generated when program run in background

    Hi,
    I have program that generates a report & all the data in the report output is down loaded to a file .please somebody make it clear:
    if I run the report in background will the file still be generated.
    thanks,
    reddy.

    Hi,
    If the program has logic to transfer the data to appliacation layer, then it works. Other wise it is not possible to download the data into your desktop by running in Background.
    Regards,
    Ashok

Maybe you are looking for