Generate spool smartforms in background

Dear friends,
How to generate direct spool in background without showing any popups
Regards,
Praveen Lobo

Hi
DO like this as per sample code:
    CONCATENATE sy-cprog sy-datum sy-uzeit
                INTO jobname SEPARATED BY '_'.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = jobname
      IMPORTING
        jobcount         = jobcount
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      IMPORTING
        out_archive_parameters = arc_params
        out_parameters         = print_params
        valid                  = valid
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF valid = chk.
      SUBMIT Yreport
                      WITH s_kunnr IN s_kunnr                     
                      AND RETURN
                      USER               sy-uname
                      VIA JOB            jobname
                      NUMBER             jobcount
                      TO SAP-SPOOL
                      SPOOL PARAMETERS   print_params
                      ARCHIVE PARAMETERS arc_params
                      WITHOUT SPOOL DYNPRO.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = jobcount
          jobname              = jobname
          strtimmed            = 'X'
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          invalid_target       = 8
          OTHERS               = 9.
      IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        MESSAGE i029 WITH jobname.
      ENDIF.
    ELSE.
      MESSAGE s000 WITH text-003.
      STOP.
    ENDIF.
Regards
Anji

Similar Messages

  • SPOOL not generated while smartform is executed in Background

    Hi
    I have issue while creating spool for smartform in background.Its works fine in foreground and i m able to view the outpt.
    But in background it should generate a spool but it is not generating?
    I have given the ouput options to supress the dialog but it still it is not generating the spool.
         control-preview = 'X'.
          control-no_dialog = 'X'.
          control-device = 'PRINTER'.
          control-no_dialog = 'X'.
          control-GETOTF = 'X'.
          OUTPUT_OPTIONS-TDDEST = 'LP01'.
          OUTPUT_OPTIONS-TDNOPRINT = 'X'.
    Any suggestions??
    Thanks & Regards
    Jyo

    Hi Jyotheswar,
    When the smartform is generated in background create a new spool by using following code
          output_options-no_dialog = 'X'.
          output_options-tdarmod = 1.
          output_options-tdcopies = 001.
          output_options-tddest = 'LP01'.
          output_options-tdprinter = 'SWIN'.
          output_options-tdlifetime = 1.
          output_options-tdnewid = 'X'.
    tdnewid is the field used to create a new spool request.  You can get the new spool request number in job_output_info-spoolids.
    Regards,
    Birendra

  • Regarding running a report in background and generate spool

    Hi,
    I am developing a report [<b>REPORT1</b>].
    It is taking long to execute if data is more.
    Now i want to schedule this report in background and generate spool along with.
    So once i execute REPORT1 it should run in background & generate spool?
    Can anybody give inputs for the same!
    Thanks,
    Deep.

    Hi,
              to generate spool, use below code
    FORM create_spool .
    CONSTANTS : l_c_device(4) VALUE 'LOCL'.
    Create Spool Request
    NEW-PAGE PRINT ON
    LINE-SIZE 120
    DESTINATION l_c_device
    IMMEDIATELY ' '
    KEEP IN SPOOL 'X'
    NEW LIST IDENTIFICATION 'X'
    NO DIALOG.
    ENDFORM. " create_spool
    And after createing spool to get the spool number use below code,
    FORM obtain_spool_id .
    TYPES : BEGIN OF t_tsp01,
    rqident TYPE tsp01-rqident,
    rqowner TYPE tsp01-rqowner,
    END OF t_tsp01.
    DATA : it_tsp01 TYPE STANDARD TABLE OF t_tsp01,
    wa_tsp01 LIKE LINE OF it_tsp01.
    SELECT rqident
    rqowner
    FROM tsp01
    INTO TABLE it_tsp01
    WHERE rqowner = sy-uname.
    SORT it_tsp01 BY rqident DESCENDING.
    READ TABLE it_tsp01 INTO wa_tsp01 INDEX 1.
    IF sy-subrc = 0 .
    v_spool_nr = wa_tsp01-rqident.
    ENDIF.
    Capture the immediate spool created for this report
    v_spool_nr = sy-spono.
    ENDFORM. " obtain_spool_id
    <b>Reward points</b>
    Regards

  • Is there any FM to generate spool request for error log of a background job

    Hi,
        I am going to create a program to create deliveries and do PGI. This program will be assigned to periodic background job.Now whatever  errors are generated in program i have to send the error log to spool request.Is there any FM for generating spool request with this error log  or how can this be done? Kindly provide sample code if possible.
    Thanks.
    Nimish Dongare.

    Hi Nimish,
    How are you doing, This is Shreekant working as ABAP developer, I sow your post in sdn forum, I have a similar requirement like I am changing the delivery taking some data from a flat file which is coming from other system and do PGI. If any error occurs during this process I need to capture it and present it as a report or create log file.. whichever is easier.
    Please can u help me how did u achieved this functionality for your requirement?.. pls. can u share some details.
    If u don mind, can u give me ur email id to communicate.
    Thanks,
    Shreekant

  • Long time for generating spool request for smartforms

    Hi,
    I'm have designed a  smartforms for printing a Receipt form. It takes about 1 minute for generating spool request after pressing the PRINT button in PRODUCTION Server only.
    The Code i used is below
    CALL FUNCTION lv_fname
      EXPORTING
          p_belnr                    = p_belnr
          p_bukrs                    = p_bukrs
          p_gjahr                    = p_gjahr
    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.
      Please help me out to sort this issue.
    Thanks,
    Ramesh
    Edited by: Rameshkumar Raamasamy on Mar 4, 2012 6:21 AM

    Hi Rameshkumar,
    you may look at the code sections of your smartform: If you have a lot more data in production than you have in development, it is especially important to use a fully specified primary key for any SELECTs.
    You may also ask your basis people to check if any performance warnings have been recorded with database system. This happens quite frequently that growing database tables cause problems when table spaces are not properly assigned or table sizes are not maintained adequately.
    Regards
    Clemens

  • How to edit the contents of spools generated by smartforms

    Hi All,
    I am developing a print form using print work bench & smartforms.
    There is a requirement to generate both preprinted forms (contains only datas) and Non-preprinted forms (contains u2026 data + layout + colors + picturesu2026etc) using a single smartform.In which the non-preprinted part should only get converted into pdf & preprinted should only be get printed.
    For this I am making a replica of the first two pages of non-preprinted into preprinted format in the same smartform(total 4 pages).
    Here I am able to extract & save the non-preprinted part from the spool into PDF.
    After the above process, I want to edit the spool content, & then sent to printer.
    But clueless about editing the spool content...
    ( for eg:- delete the first two pages of content in the spool & print the rest)
    So my question is u2026.
    -Is it possible to edit the contents of spool generated by smartforms u2026 ?
    (Is it possible to copy the content of existing spool ,edit, save it into new spool  and delete the old one. )
    Any solutions / suggestions u2026 ?
    Thank you for your attention.
    With Regards,
    santh

    Hi Niki,
    Thank you for your time & suggestions....
    >
    Niki wrote:
    >
    > try to control it in smartform itself.....(above idea will not work).
    >
    > try this ...
    >  from ur driver program pass a variable to identify o/p is preprinted forms or non-preprinted forms
    Yes, I got your point... I even tried this option also.
    First of all the user want both(preprinted-hardcopy & non-preprinted pdf) form in a single process, so that data integrity is maintained both in hardcopy & soft copy.
    Even if I negotiate tha above requirement....
    The problem is , I am using Print WorkBench , not an user-defined driver program.Inside printworkbench , the smartform is mentioned.
    The process is as follows...
    ea40/ea60(isu billing transaction) -> Printworkbench ->smartforms -> spool -> printer(preprint part) / pdf(non - preprint).
    Hope u understand my limitations....
    Still expecting a solution...
    Regards,
    santh

  • Spool request not generated in smartforms printing

    Hii all,
            I have smartform, which was printing properly in QA server and few days back when i tried to get print from Production Server, it is not generating spool request. and in QA also it is not having same as on date.
    is there anythng to check from ABAP side or there is a problem of Basis.?
    kindly give soln for points .
    - Maharshi

    hi Maharshi,
    Gimme some what clear picture abt ur problem.
    What exactly the problem in QA server.
    I mean when it is working properly and when it is not?
    and what Function Modules u have used ..?
    and i wanna know is there any other print forms are working or not. if the other are working, it is not BASIS problem.
    Regards,
    Naveen

  • Dynamic Documents ( CL_DD_DOCUMENT ) in background to generate spool

    Hi Everyone,
    Is it possible for a Dynamic Document with the use of CL_DD_DOCUMENT to run in background and generate spool output?
    If it is possible, can you please tell me how?
    Thanks in advance.

    Hi Denver,
    dynamic documents are screen controls to be put in a (enjoy) container controlled by SAPGUI. In background, SAP just ignores any display processing for GUI controls.
    The CL_GUI_ALV_GRID is an exception here, in background output is converted to an ALV list. I don't know and I don't think that for dynamic documents anything comparable exists.
    Regards,
    Clemens

  • Unable to generate spool for two tables in report output

    Hi,
    I created report with two custom containers displaying two tables in output. When I execute the report in background spool is created only for one table in top custom container.
    What should be done to generate spool for both the tables in two different custom containers.
    Thanks,
    Abhiram.

    Hi,
    Check the bellow link for your requirement.
    <<link removed>>
    Regards,
    Goutam Kolluru.
    Edited by: kishan P on Feb 2, 2012 1:50 PM

  • SSF_OPEN generating spool only for LOCL Device

    Hello all,
    I am using SSF_OPEN and SSF_CLOSE function module and in between i am calling two function modules.
    I have to generate a spool request for the smartform output (No preview) with the output device mentioned through selection-parameter.
    The problem i am getting is , the spool is always generating for device 'LOCL' , no matter what device i give in the selction parameter.
    Please help me solve this issue.
    Here is the code snippet i have used:
      lw_control-no_open   = 'X'.
      lw_control-no_close  = 'X'.
        lw_control-no_dialog = 'X'.
        lw_option-tdnewid   = 'X'.
        lw_option-tdimmed   = 'X'.
        lw_option-tddest    = p_ldest.
        lw_option-tddelete  = space.            "Delete After Printing
    *Opens an internal session of smartform,
    * call all smartforms in this sessions
      CALL FUNCTION 'SSF_OPEN'
        EXPORTING
          control_parameters = lw_control
          output_options     = lw_option
        IMPORTING
          job_output_options = lw_job_output
        EXCEPTIONS
          exceptions
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
    What are the parameters to be passed to the  smartform? is it sufficient if passed control parameters here only on SSF_OPEN Fm ?
    Regards,
    Giri

    Kindly use in this way to generate spool as per your required output device
    data : tspoolid1 type ssfcrespd,
            tspoolid2 type ssfcrescl,
            tspoolid3 type ssfcresop,
            spool type ssfcrescl-spoolids,
            control_parameters type ssfctrlop,
            output_options     type ssfcompop.
      output_options-tdnoprev = 'X'.
       output_options-tdnewid = 'X'.
       output_options-tdimmed = 'X'.
       output_options-tddelete = 'X'.
       control_parameters-no_dialog = 'X'.
        output_options-tddest = 'LP02'.
    call function fm_name
         exporting
           control_parameters   = control_parameters
           output_options       = output_options
           user_settings        = ''
           goodsmvt_header      = goodsmvt_header
           poheader             = poheader
           ch1                  = ch1
           head                 = ch2
         importing
           document_output_info = tspoolid1
           job_output_info      = tspoolid2
           job_output_options   = tspoolid3
      *   tables
    *   EXCEPTIONS
    *     FORMATTING_ERROR           = 1
    *     INTERNAL_ERROR             = 2
    *     SEND_ERROR                 = 3
    *     USER_CANCELED              = 4
    *     OTHERS                     = 5.
    if tspoolid2-spoolids is not initial.
    * To hold the value of tab index
         spool = tspoolid2-spoolids.
         read table spool into wa_spool index 1.
         concatenate 'GRN_NOTE_' v_mblnr into v_npdf.
    **  v_npdf = v_mblnr.
         submit rstxpdft4 using selection-screen '1000'
                          with spoolno eq wa_spool
                          with p_file  eq v_npdf
                          and return.
       endif.
    Many Thanks / HImanshu Gupta

  • Run smartforms in background mode

    Hi
       Can anybody tell me, can we execute smartforms in background mode. Please tell me. Can we take printout from the spool.
    Smartform have driver program.
    Thanks
    Murali Papana.

    hi,
    Use
    You can not only evaluate queries online, but also print them in the background. In the Reporting Agent of the Administrator Workbench, you can define the display of the query data as the setting for background printing. You can make as many various settings as you want for printing a query in the background. The settings are then brought together in scheduling packets and scheduled for background printing.
    Prerequisites
    You have defined a query in the Business Explorer Analyzer that you now want to print in the background. You have called up the Administrator Workbench to do this.
    You can only print out queries with key figures in structures. If you have defined a query with a key figure in the filter and want to print this query, you must change the definition of the query so that the key figure is in a structure to be printed.
    You can only schedule queries with entered variables for background printing if the required variable entry/entries have been saved as query variants.
    Procedure
    Defining Reporting Agent Settings for Printing in the Background
    Choose the Reporting Agent from the Administrator Workbench.
    Navigate in the left-hand tree to the query you want, and, using the right mouse button, choose New Setting. You get to the "New Reporting Agent Setting" dialog box.
    Enter a technical name and a description.
    Choose Print in the background from the General tabstrip.
    Choose the tabstrip Print Settings from the newly added tabstrips.
    Determine the print settings that you want to make. See also: Print Settings
    Choose the Print Layout tabstrip.
    Decide how you want to set the following print areas:
    Cover sheet
    Page header
    Table header
    Table
    Page footer
    Last page
    See also:
    Defining the Print Layout
    Choose Activate.
    Creating Scheduling Packets and Assigning Reporting Agent Settings for Printing in the Background
    Once you have made the Reporting Agent setting for printing in the background, you have to assign your setting to a scheduling packet for the background run.
    Creating a scheduling packet
    Go back to the Reporting Agent Scheduler, and, in the right-hand Scheduling packets tree, choose the Change pushbutton.
    Select the Print in the background node, and choose Create new packet from the context menu (right mouse button). You get to the Create Scheduling Packet dialog box.
    Specify a name and a description, and choose Save.
    Assigning Reporting Agent Settings for Printing in the Background
    Navigate in the left-hand tree, Reporting Agent Settings, to the Reporting Agent setting you want to use for printing in the background.
    Using drag-and-drop, drag the Reporting Agent setting that you want to use into the right-hand tree, and assign it to the corresponding scheduling packet.
    If the Reporting Agent setting refers to a query with variables, then you need to assign a variant:
    Select the Reporting Agent setting.
    Using the right mouse button, choose Assign variants from the context menu. A dialog box containing the variants for this query appears.
    Choose the variant you want to use.
    Choose Continue.
    You have the option of maintaining variants in the Reporting Agent (in both the left and right-hand trees).
    Select the Reporting Agent setting you want to use.
    Choose Maintain variants from the context menu (right mouse button).
    Note that you always assign Reporting Agent settings for printing in the background to a corresponding scheduling packet for printing in the background.
    To avoid confusion with Reporting Agent settings for exception reporting, you are able to filter according to these two functions in the left-hand menu. The symbols for Exception and Print, in the left-hand tree, also identify the settings.
    Scheduling a Packet as a Job
    In the right-hand tree, select the scheduling packet you want to use.
    Using the right mouse-button, choose Schedule from the context menu. You get to the Change Job RA (name of the scheduling packet) dialog box.
    The name of the job is made up of RA for Reporting Agent, and the name of the scheduling packet.
    Specify the start date and the repetition period for the job.
    See also:
    Scheduling Background Jobs in the documentation for the BC Computing Center Management System.
    If you want to check the status of the scheduled background job, choose the Jobs pushbutton above the right-hand tree in the Reporting Agent Scheduler.
    Hope this helps, Do reward.

  • How can we stop generating spools for some batch jobs?

    HI guys,
    Is memory will be occupied in SAP  during spool generation from batch jobs ?
    If yes, to reduce occupied memory, we want to stop generating spools for few batch jobs. Please suggest me the way how we can acheive this.(Step details)
    Please help me.
    Thanks in Advance.
    Regards,
    Sahil

    Stopping the spool generation for background jobs will not help you to reduce the memory load.
    First check what is the total memory utilization and type of processes where the memory is being utilized more.
    EWA can give you better idea to get the above details.
    Spooling concept doesn't eat that much of memory what you are expecting.
    Regards,
    Nick Loy

  • Generating spool request

    Hi Experts,
    My rquirement is to generate spool request without getting the output displayed  on the screen.
    <fs_outtab> is the dynamic internal table containing data. It will have several fields.
    I want to send this data to spool so that it can be seen when the background job runs.
    But I do not want the output to be displayed on the screen.
    << Removed >> Please don't forward links as it cannot be opened in my system.
    Thanks.
    Edited by: Rob Burbank on Jun 25, 2010 11:17 AM

    See try to make an alv grid diaplay program for the internal table.( like this)
    form fill_catalogue .
      wa_fieldcatalog-fieldname   = 'WERKS'.
      wa_fieldcatalog-seltext_m   = 'Plant'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'LGORT'.
      wa_fieldcatalog-seltext_m   = 'St.Loc'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'SHKZG'.
      wa_fieldcatalog-seltext_m   = 'Iss/Rec'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'BUDAT'.
      wa_fieldcatalog-seltext_m   = 'Posting Date'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'CHALAN'.
      wa_fieldcatalog-seltext_m   = 'Document No'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'BOLNR'.
      wa_fieldcatalog-seltext_m   = 'Bill of Lading'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'BRGEW'.
      wa_fieldcatalog-seltext_m   = 'Gross Wt.'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'NTGEW_CH'.
      wa_fieldcatalog-seltext_m   = 'Net Chargeable Wt.'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'SHIP_PARTY'.
      wa_fieldcatalog-seltext_m   = 'Customer/Vendor/Plant'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'SAL_GRP'.
      wa_fieldcatalog-seltext_m   = 'Sales Group'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
    endform.                    "fill_catalogue
    *&      Form  display
          text
    form display .
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-repid
          it_fieldcat        = fieldcatalog[]
        tables
          t_outtab           = it_final
        exceptions
          program_error      = 1
          others             = 2.
    Then you must be accepting some parameters fromthe screen. just take the values from the selection screen
    press F9, and proceed as your requirement is.
    endform.                    "display

  • Alv show in report but when see in spool (after run background job) there i

    my program have some error when i run result alv show in report but when see in spool (after run background job) there is no data, (other program can see result in spool)
    Please help
    here is some example of my program
    ********************************declare internal table*****************************
    internal table output for BDC
    data : begin of t_output occurs 0,
    bukrs type anla-bukrs,
    anln1 type anla-anln1,
    anln2 type anla-anln2,
    zugdt type anla-zugdt,
    result(70) type c,
    end of t_output.
    *****get data from loop********************************
      loop at t_anla.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = t_anla-anln1
             IMPORTING
                  OUTPUT = t_anla-anln1.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = t_anla-anln2
             IMPORTING
                  OUTPUT = t_anla-anln2.
    check record is correct or not
        select single bukrs anln1 anln2 zugdt
        into w_output
        from anla
        where bukrs = t_anla-bukrs and
        anln1 = t_anla-anln1 and
        anln2 = t_anla-anln2
       zugdt = '00000000'
    if record is correct
        if sy-subrc = 0 and w_output-zugdt = '00000000'.
          w_output-bukrs = t_anla-bukrs.
          w_output-anln1 = t_anla-anln1.
          w_output-anln2 = t_anla-anln2.
          w_output-result = 'Yes : this asset can delete'.
          append w_output to t_output.
    if record is not correct
        elseif sy-subrc = 0 and w_output-zugdt <> '00000000'.
    there is error record  this asset have value already
          v_have_error = 'X'.
          w_output-bukrs = t_anla-bukrs.
          w_output-anln1 = t_anla-anln1.
          w_output-anln2 = t_anla-anln2.
          w_output-result = 'Error : this asset have value already'.
          append w_output to t_output.
        else.
    there is error record this asset donot exist in table anla
          v_have_error = 'X'.
          w_output-bukrs = t_anla-bukrs.
          w_output-anln1 = t_anla-anln1.
          w_output-anln2 = t_anla-anln2.
          w_output-result = 'Error : this asset doest not exist'.
          append w_output to t_output.
        endif.
    *end of check record is correct or not
        clear w_output.
      endloop.
    ******************************show data in ALV***************************************************
    show data from file in ALV
      perform display_report_ALV.
    *&      Form  display_report_ALV
    form display_report_ALV.
      DATA: LT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
          LT_EVENTS TYPE SLIS_T_EVENT,
          LV_REPID LIKE SY-REPID.
      PERFORM ALV_DEFINE_FIELD_CAT USING LT_FIELD_CAT.
      PERFORM ALV_HEADER_BUILD USING T_LIST_TOP_OF_PAGE[].
      PERFORM ALV_EVENTTAB_BUILD USING LT_EVENTS[].
      LV_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM = LV_REPID
                IT_FIELDCAT        = LT_FIELD_CAT
                I_SAVE             = 'A'
                IT_EVENTS          = LT_EVENTS[]
           TABLES
                T_OUTTAB           = t_output
           EXCEPTIONS
                PROGRAM_ERROR      = 1
                OTHERS             = 2.
      IF SY-SUBRC NE 0.
        WRITE: / 'Return Code : ', SY-SUBRC,
          'from FUNCTION REUSE_ALV_GRID_DISPLAY'.
      ENDIF.
    endform.
    *&      Form  alv_define_field_cat
          text
         -->P_LT_FIELD_CAT  text
    FORM ALV_DEFINE_FIELD_CAT USING  TB_FCAT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: WA_FIELDCAT LIKE LINE OF TB_FCAT,
        LV_COL_POS TYPE I.
      DEFINE FIELD_CAT.
        CLEAR WA_FIELDCAT.
        ADD 1 TO LV_COL_POS.
        WA_FIELDCAT-FIELDNAME = &1.
        WA_FIELDCAT-REF_TABNAME = &2.
        WA_FIELDCAT-COL_POS = LV_COL_POS.
        WA_FIELDCAT-KEY = &3.
        WA_FIELDCAT-NO_OUT = &4.
        WA_FIELDCAT-REF_FIELDNAME = &5.
        WA_FIELDCAT-DDICTXT = 'M'.
        IF NOT &6 IS INITIAL.
          WA_FIELDCAT-SELTEXT_L = &6.
          WA_FIELDCAT-SELTEXT_M = &6.
          WA_FIELDCAT-SELTEXT_S = &6.
        ENDIF.
        WA_FIELDCAT-DO_SUM = &7.
        WA_FIELDCAT-OUTPUTLEN = &8.
        APPEND WA_FIELDCAT TO TB_FCAT.
      END-OF-DEFINITION.
      FIELD_CAT  'BUKRS'  'ANLA'     'X' '' 'BUKRS' 'Company Code' '' ''.
      FIELD_CAT  'ANLN1'  'ANLA'     'X' '' 'ANLN1' 'Asset Number' '' ''.
      FIELD_CAT  'ANLN2'  'ANLA'     'X' '' 'ANLN2' 'Asset Sub Number' '' ''.
    FIELD_CAT  'ATEXT'   'T5EAE'     'X' '' 'ATEXT' 'Result' '' ''.
      FIELD_CAT  'RESULT'  ''     'X' '' 'RESULT' 'RESULT' '' ''.
    ENDFORM.                    " alv_define_field_cat

    Hi,
    Check this code..
    FORM display_report_alv.
      DATA: lt_field_cat TYPE slis_t_fieldcat_alv,
      lt_events TYPE slis_t_event,
      lv_repid LIKE sy-repid.
      PERFORM alv_define_field_cat USING lt_field_cat.
      PERFORM alv_header_build USING t_list_top_of_page[].
      PERFORM alv_eventtab_build USING lt_events[].
      lv_repid = sy-repid.
      IF sy-batch EQ 'X'.  ----> " System Field for Backgroud..if Background use list display
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program = lv_repid
            it_fieldcat        = lt_field_cat
            i_save             = 'A'
            it_events          = lt_events[]
          TABLES
            t_outtab           = t_output
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
      ELSE.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program = lv_repid
            it_fieldcat        = lt_field_cat
            i_save             = 'A'
            it_events          = lt_events[]
          TABLES
            t_outtab           = t_output
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
      ENDIF.
      IF sy-subrc NE 0.
        WRITE: / 'Return Code : ', sy-subrc,
        'from FUNCTION REUSE_ALV_GRID_DISPLAY'.
      ENDIF.
    ENDFORM.                    "display_report_ALV

  • RBCA_PP_SIF_RUN_PP_TEMPLATE generates spool only in debug mode

    Hi
    I have developed a PP report based on the templaate RBCA_PP_SIF_RUN_PP_TEMPLATE. The report is a simple selection and is supposed to write to the spool (success or error messages). Using WRITE <text> should write to the spool for every job under this parallel processing.
    When I am debugging the code, or simply set a breakpoint (BCADEBUG) and execute, spool appears. But if i simply run the job with same variant (no debugging, no BCADEBUG), the spool does not appear.
    Any suggestions why this is happening ans how to generate spool in all modes.
    Regards
    Vikram

    Hi Billy,
    this is nasty.
    My strategy for this situation would be to start 2 browsers.
    In 1 browser session I use the Apex Application Builder and in the other (in private/ incognito) browser I run the application in debug mode.
    The debug information can be viewed in the Application Builder using the Utillities or by using the URL to the debug screen directly like so
    http://localhost:8888/pls/apex/f?p=4000:19:<APP_SESSION>:::RIR,19:IR_APPLICATION_ID,IR_PAGE_ID:<APP_ID_OF_APP_TO_DEBUG>,<PAGE_TO_DEBUG>regards,
    Erik-jan

Maybe you are looking for

  • Function module for Delivery and billing based on sales order

    Hi Friends I am developing an object which has to create the sales order, delivery for that sales order and billing for it at the same time. I have tried for few function modules to create the delivery and billing but I am not able to achieve. Would

  • Honeycomb keyboard predictive text only showing names...

    Ran a search for this topic and found nothing. I have a Honeycomb tablet (Lenovo IdeaPad K1) and the keyboard is set to show spelling correction suggestions (I'm a terrible speller) but its only showing names of people in my contacts, its not showing

  • Photoshop Elements 11 Install on Mac

    I can not install Photoshop Elements 11. The install keeps quitting with errors on my iMac running 10.8.2 after repeated downloads directly from Adobe web site.

  • *** My Airport Express just completely died

    I came back from a week away from the office and my Airport Express plug is totally dead - ***. I tried plugging it into different outlets and no light - nothing. Is this possible? Is there any way to try and revive it? Thanks in advance.

  • Can't search in the address bar

    Hello, I did something wrong with the search and now I can't search in the location bar. How can I fix it?