ALV List only 80 Columns when runinning as background job

Hello Guys,
I have a Problem with an ALV List.
We use the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for a Document Journal.
When I run it in foreground it works fine. But when I view the spool in background the list makes a break at excactly 80 signs, but the line size should be about 120.
In the report the Line-Size is set correctly, even the print parameters seem to be ok. We are running it with X_65_255.
I saw that there are some SAP Notes to this topic, but on our release (SAP_BASIS 700) the notes are already implemented.
Has anyone a solution to this topic?
Thanks and regards
Roland

Try this.
[ALV List only 80 Columns when running in background job|https://forums.sdn.sap.com/click.jspa?searchID=25735042&messageID=5686003]

Similar Messages

  • Extract ALV list to a file in the background

    I am currently working on an ALV report which the user requires that a file be generated automatically based on the ALV list output. Any ideas? Thanks in advance.

    Hello Emmanuel,
    I have had the same problem, and i found no solution on the forums... So i have implemented my own solution: I implemented a child class, in order to add a new method write_file. This coding creates a file on the application server, considering the field catalog from the choosen variant. It can be enhanced in order to get the sort and the filter criteria (but if the file is exported to excel, the sort and filter can be managed within excel). Such a program can be run in background, and it works perfectly!
    Sample coding:
    REPORT z_alv_download_file.
          CLASS LCL_GUI_ALV_GRID  INHERITING FRO
          Local child-class in order to implement a new method for      *
          download in a file in background                              *
    CLASS lcl_gui_alv_grid DEFINITION INHERITING FROM cl_gui_alv_grid.
      PUBLIC SECTION.
        METHODS: write_file IMPORTING i_structure_name TYPE dd02l-tabname
                                      is_variant       TYPE disvariant
                                      i_default        TYPE char01
                                      i_save           TYPE char01
                                      i_file           TYPE fileextern
                            CHANGING  it_outtab        TYPE STANDARD TABLE.
    ENDCLASS.
          CLASS lcl_gui_alv_grid IMPLEMENTATION
          Implementation of the new method write_file                   *
    CLASS lcl_gui_alv_grid IMPLEMENTATION.
      METHOD write_file.
      Local types
        TYPES: BEGIN OF ty_fieldnames,
                 field(60),
                 field2 TYPE help_info-tabname,
                 field3 TYPE help_info-fieldname,
                 key(1),
               END OF ty_fieldnames.
      Local data
        DATA: lt_catalog      TYPE lvc_t_fcat,
              ls_catalog      TYPE lvc_s_fcat,
              lt_datatab      TYPE TABLE OF hrdatatab,
              ls_datatab      TYPE hrdatatab,
              lt_fieldnames   TYPE TABLE OF ty_fieldnames,
              ls_fieldnames   TYPE ty_fieldnames,
              ls_record       TYPE string,
              l_field(60)     TYPE c,
              l_nbcol         TYPE i,
              l_colpos        TYPE i,
              l_colpos_c(2)   TYPE c,
              l_fieldname(21) TYPE c VALUE 'ls_datatab-langtext  '.
        FIELD-SYMBOLS <f> TYPE ANY.
      Call the grid display
        CALL METHOD me->set_table_for_first_display
             EXPORTING i_structure_name = i_structure_name
                       is_variant = is_variant
                       i_default = i_default
                       i_save = i_save
             CHANGING  it_outtab        = it_outtab.
      Get the field catalog according to the display variant which is used
        CALL METHOD me->get_frontend_fieldcatalog
             IMPORTING et_fieldcatalog = lt_catalog.
      Get an internal table with only the fields from the field catalog
        CALL FUNCTION 'ALV_CONVERT_DATA'
             EXPORTING
                  alv_fieldcat    = lt_catalog
             TABLES
                  alv_datatab     = it_outtab
                  hr_datatab      = lt_datatab
                  hr_fieldnametab = lt_fieldnames.
      Keep only the displayed fields from the field catalog
        DELETE lt_catalog WHERE no_out = 'X'.
        SORT lt_catalog BY col_pos DESCENDING.
        READ TABLE lt_catalog INTO ls_catalog INDEX 1.
        IF sy-subrc = 0.
          CLEAR ls_record.
          l_nbcol = ls_catalog-col_pos.
        Open the file
          OPEN DATASET i_file FOR OUTPUT IN TEXT MODE.
        Write the column names
          LOOP AT lt_fieldnames INTO ls_fieldnames.
            CONDENSE ls_fieldnames-field.
            CONCATENATE ls_record ls_fieldnames-field
                        INTO ls_record SEPARATED BY ';'.
          ENDLOOP.
          SHIFT ls_record.
          TRANSFER ls_record TO i_file.
        Write the lines
          LOOP AT lt_datatab INTO ls_datatab.
            CLEAR: l_colpos,
                   ls_record.
          Condense the fields in a single string, separated by ';' (csv)
            DO l_nbcol TIMES.
              ADD 1 TO l_colpos.
              CLEAR l_colpos_c.
              l_colpos_c = l_colpos.
              CONDENSE l_colpos_c.
              l_fieldname+19(2) = l_colpos_c.
              ASSIGN (l_fieldname) TO <f>.
              WRITE <f> TO l_field.
              CONDENSE l_field.
              CONCATENATE ls_record l_field INTO ls_record SEPARATED BY ';'.
            ENDDO.
            SHIFT ls_record.
            TRANSFER ls_record TO i_file.
          ENDLOOP.
        Close the file
          CLOSE DATASET i_file.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
          MAIN PROGRAM
    DATA: wo_alv      TYPE REF TO lcl_gui_alv_grid,
          wt_sflight TYPE TABLE OF sflight,
          ws_variant    TYPE disvariant.
    PARAMETERS: p_file TYPE fileextern OBLIGATORY
                       DEFAULT '/usr/sap/.../file.csv',
                p_vari TYPE slis_vari
                       DEFAULT 'DEFAULT'.
    START-OF-SELECTION.
      ws_variant-report = sy-repid.
      ws_variant-username = sy-uname.
      ws_variant-variant = p_vari.
      SELECT * FROM sflight INTO TABLE wt_sflight.
      CREATE OBJECT wo_alv EXPORTING i_parent = cl_gui_container=>screen0.
      CALL METHOD wo_alv->write_file
           EXPORTING i_structure_name = 'SFLIGHT'
                     is_variant       = ws_variant
                     i_default        = 'X'
                     i_save           = 'A'
                     i_file           = p_file
           CHANGING  it_outtab        = wt_sflight.

  • Report program when run in background job getting cancelled immediately

    Hi
    When i run a program in foreground i am able to see the output. But when run in background not able to run the job successfully. The job is getting cancelled immediately.
    I am using the below function module for output display. Should i need to pass any parameters in the below function module so that i can run the program in background  successfully.
      CALL METHOD DETAIL_GRID->SET_TABLE_FOR_FIRST_DISPLAY     
          EXPORTING                                            
            IS_LAYOUT         = IS_LAYOUT                    
            I_SAVE            = 'A'                        
            IS_VARIANT        = GS_VARIANT                   
          CHANGING                                           
            IT_FIELDCATALOG   = IT_FIELDCATALOG               
            IT_OUTTAB         = BLOCKED_STOCK_TAB_ALV[].     
    Please suggest.
    Thanks and regards
    Rajani Yeluri

    Hi Rajani.
      ALV require the DRYPOR(screen) for display but incase you run in back ground which have to write to spool but in spool we can only write in format of LIST REPORT not inter-active report like ALV. That why
    system cancelled your process immediately.
    Hope it helps.
    Sayan.

  • Multiple ALV lists in a single spool of a job

    Hi All,
    Executing a custom program in background generates 2 lists in two different spools.
    First list  - ALV Grid displayed as ALV list
    Second List - ALV Blocked List.
    Though both the Spool request numbers generated during the execution of the program are displayed in the JOB LOG of the background job,only the latest spool(ALV Blocked List) is saved under this job.
    We should go to Tx:SP01/02 to view the First list(ALV Grid) generated in the first Spool request.
    Can someone tell me how to get both the lists in a single spool request..(Programmatically)
    Or let me know if there is a way to display both the spool numbers in the Spool list of the job in SM37.
    Thanks in advance.
    Hemanth

    Hi Hemanth,
    maybe you can have a look at the function RSPO_INSERT_SPOOL_CONCATENATE. There is a documentation in the function module transaction.
    Regards
    Frédéric

  • Different result when running as background job

    Hi,
    We got a program which has a selection screen with a couple of select-options.
    When we start this programm with a specified variant, it proceeds to a result screen. If we click back now (to the selection-screen) and run the programm with the exactly same settings again, one select-option is getting ignored and therefore we get incorrect results.
    This happens only, if you go back from the result screen and  excecute it again from the selection screen or if we start it as a background job.
    If you exit the programm completely and restart it, the results are correct again.
    It makes no sense to post any code snippets here, since the program is very complex. I just can't imagine any reason, why the select-option is sometimes getting ignored.
    Does anyone have an idea?
    Thanks in advance.
    Regards,
    Tobi

    oh well it DOES explain it.
    just think of following select:
    Select *
    from   vbap
    into    ls_vbap
    where vbeln not in lr_vbeln.
    if lr_vbeln is not cleard you will run into problems maybe.
    anyway, may it be that somewhere in coding you are manually modifying your select option?
    It´s just an internal table of type range, so have a look there.

  • DYNPRO_SEND_IN_BACKGROUND when submitting a background job, when creating a

    Hi.
    We create sales orders via EDI.   When certain sales orders are created, we execute user exists on the Sales Order save.  During the User Exit, we submit/create (job_open_adk function, the submit command, and the job_close_adk function) a background job. 
    The background, is created and executed successfully, but we get 2
    short dumps everytime.
    The short dump is:
    DYNPRO_SEND_IN_BACKGROUND
    The description is:
    Screen output without connection to user.
    The short dump is for the user WF-BATCH.
    I've used DEBUG and the shortdump occurs on the submit command.
    submit zsd
    to sap-spool
    destination 'null'
    immediately ''
    keep in spool 'X'
    without spool dynpro
    and return
    user l_user via job tbtcjob-jobname
    number tbtcjob-jobcount
    with p_vbeln = l_order
    with p_ebeln = l_po
    with p_uname = l_user.
    Nothing should be displayed on the screen.
    I used 'without spool dynpro' to prevent the 'Print Screen List' window
    from appearing.
    I've put this code into a TEST program. I ran the test program
    myself. (under my ID) The program run perfectly. No
    shortdump.
    Similar code is used in other programs and it works perfectly - no shortdumps.
    The short dump occurs when we use ALE/EDI to create a sales order.
    The short dump has the ID WF-BATCH on it.
    I'm guessing the problem is with the WF-BATCH ID. Are printer setting
    missing on a Work Flow ID?
    Any ideas why the 'without spool dynpro' parameter doesn't work for the
    WF-BATCH ID?
    I've tried searching OSS and I looked at the on-line help/documentation
    on Submit. I saw a recommentation to use the
    fuction 'GET_PRINT_PARAMETERS' to set all of the print parameters. I
    tried this, but still got the short dumps.
    Any suggestion on how I can run the Submit command and not get a short dump?
    thanks,
    Michelle

    Hi,
    Try this notes:
    0100915 RSBDCREO: System hangs or parameters not effective
    0377038 HR-CA-ALE: DYNPRO_SEND_IN_BACKGROUND for HR doc. d
    0105165 Dump "DYNPRO_SEND_IN_BACKGROUND" in prog.SAPMSSY0
    0169303 Warning messages displayed for settlement mass pro
    0428489 VL10: Dump 'DYNPRO_SEND_IN_BACKGROUND' with backgr
    [[http://forums.sdn.sap.com/thread.jspa?threadID=14875|http://forums.sdn.sap.com/thread.jspa?threadID=14875]]
    Regards
    HM

  • Some records are missing in the mail, when scheduled a background job.

    There is a Z report,  which will display some details from SD, MM , WM every day , and the same thing need to be mailed to the user through background Job.
    Issue is that spool is correct and it is missing some records ( Billing due list ), even internal table have records and displayed in the spool , in the mail it says
    “No Entries Found”.
    Is there any chance of debugging background job.
    Good thing is that when executed in foreground it is working fine. Both mail and report display.

    EM_BODY = '4) VF04 -- Processing Billing document due list.'.
      APPEND EM_BODY.
      EM_BODY = ' '.
      APPEND EM_BODY.
      IF IT_FINAL3[] IS INITIAL.
        EM_BODY = '        No Entry Found'.
        APPEND EM_BODY.
        EM_BODY = ' '.
        APPEND EM_BODY.
      ELSE.
        CONCATENATE 'Delivery No' 'Created By' 'Created On'
                     'Reason' INTO HEAD SEPARATED BY '     '.
        EM_BODY = HEAD.
        APPEND EM_BODY.
        EM_BODY = ' '.
        APPEND EM_BODY.
        CLEAR V_TEXT.
        CLEAR ITEM.
        LOOP AT IT_FINAL3.
          CONCATENATE IT_FINAL3-VBELN  IT_FINAL3-ERNAM IT_final3-ERDAT
                      IT_FINAL3-RESO INTO ITEM SEPARATED BY '     '.
          V_TEXT = ITEM.
          EM_BODY = V_TEXT.
          APPEND EM_BODY.
        ENDLOOP.
        EM_BODY = ' '.
        APPEND EM_BODY.
      ENDIF.
    This is the part where it is failing, where it_final3[] is initial.
    but whereas in the spool i can view those records.

  • Force Dialog in ATP when run in Background Job

    Hi gurus,
    Can we set the ATP to always show even if in Background Job? I have a requirement to run a program in background job and set the confirmed qty to 0. In foreground the process is ok (the ATP screen shows up so my BDC is correct). But when I run the program in background, I have an error in my BDC because the screen for the ATP does not show up.
    Best regards,
    Andre
    Edited by: Andre Reforma on Jun 5, 2009 9:28 AM

    chdir("..") Err#13 EACCES [file_dac_search]
    I suspect that an underlying mount point has improper file access.
    Unmount the ZFS filesystem (either /zones or /zones/test) and check the perms on the directory that it's mounted on.
    Darren

  • Spool list is not getting created for background job

    I am creating background job using JOB_OPEN and then submitting my z-report using submit statement and then closing job using JOB_CLOSE. for this job is getting creating in sm37 and also gets finished but it does not create spool list showing output.
    Any idea how to do this?
    Thanks in advance.

    DATA: lv_jobname TYPE tbtcjob-jobname,
            lv_jobcount TYPE tbtcjob-jobcount,
            lv_variant TYPE variant,
            wa_var_desc TYPE varid,
            wa_var_text TYPE varit,
            it_var_text TYPE TABLE OF varit,
            it_var_contents TYPE TABLE OF rsparams.
      REFRESH: it_var_contents, it_var_text.
      CLEAR: wa_var_desc, wa_var_text.
      CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
        EXPORTING
          curr_report     = sy-cprog
        TABLES
          selection_table = it_var_contents
        EXCEPTIONS
          not_found       = 1
          no_report       = 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.
      CONCATENATE sy-datum sy-timlo INTO lv_variant.
      wa_var_desc-mandt       = sy-mandt.
      wa_var_desc-report      = sy-cprog.
      wa_var_desc-variant     = lv_variant.
      wa_var_desc-transport   = 'F'.
      wa_var_desc-environmnt  = 'B'.
      wa_var_desc-version     = '1'.
      wa_var_desc-protected   = 'X'.
      wa_var_text-mandt = sy-mandt.
      wa_var_text-langu = sy-langu.
      wa_var_text-report = sy-cprog.
      wa_var_text-variant = lv_variant.
      lv_jobname = lv_variant.
      CONCATENATE 'Batch Job Variant -'(006)
                  sy-uname INTO wa_var_text-vtext.
      APPEND wa_var_text TO it_var_text.
    Create the varaint for the back ground job.
      CALL FUNCTION 'RS_CREATE_VARIANT'
        EXPORTING
          curr_report               = sy-cprog
          curr_variant              = lv_variant
          vari_desc                 = wa_var_desc
        TABLES
          vari_contents             = it_var_contents
          vari_text                 = it_var_text
        EXCEPTIONS
          illegal_report_or_variant = 1
          illegal_variantname       = 2
          not_authorized            = 3
          not_executed              = 4
          report_not_existent       = 5
          report_not_supplied       = 6
          variant_exists            = 7
          variant_locked            = 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.
      ENDIF.
    Open the job.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = lv_jobname
        IMPORTING
          jobcount         = lv_jobcount
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 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.
    submitt the job in background mode.
      CALL FUNCTION 'JOB_SUBMIT'
        EXPORTING
          authcknam               = sy-uname
          jobcount                = lv_jobcount
          jobname                 = lv_jobname
          report                  = sy-repid
          variant                 = lv_variant
        EXCEPTIONS
          bad_priparams           = 1
          bad_xpgflags            = 2
          invalid_jobdata         = 3
          jobname_missing         = 4
          job_notex               = 5
          job_submit_failed       = 6
          lock_failed             = 7
          program_missing         = 8
          prog_abap_and_extpg_set = 9
          OTHERS                  = 10.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    close the job.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = lv_jobcount
          jobname              = lv_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.
      ENDIF.
    Hope this will be helpful..

  • List Format Different When Run In Background...

    Hi Guys,
    When I run a report in the Foreground my List displays normally.  It is worth knowing that this list has 36 Columns (36 added to the Field Catalog).
    But, when I run it in the background (F9), it seems to "wrap"/"split" the columns...  The last few colums are sent to the next line so my field catalog is actually displayed over 2 lines!!!
    When running the Report in the background (F9) I did choose the "Properties" button and I set the Rows to be 65 and the Colums to be 255 under the "Format" Parameter.  This does not change anything...
    We recently upgraded to ERP6.0. I wonder if it is some kind of SAP Standard that changed???
    Please advise - Point will be rewarded for usefull awnsers.
    Christiaan

    Tks, But it is still not working.
    I think it is SAP Standard not to go over the 255 limit when run in the background.  My list DEFINATELY has more than the 255 limit...
    Here is my statement:
    REPORT /bsa/rp_purchaseorder_analysis MESSAGE-ID /bsa/mm LINE-SIZE 400.
    This does not work.  When I use F9, it gives a message : "Formatting is set to X_65_255".  I run this WITHOUT overriding and it does not work.  I also ran this overriding the settings...  I made the columns 400 and it did not work.
    I dont think it is possible????
    tks
    Christiaan

  • To show the list in complete format when creating an background job

    Hi ,
    I need to show the list in full format when after running a report in background.
    In sm37 after the job run the the full list is not shown.
    when I click on 'Show complete list 'it will show the complete list.
    My requirement is I want this option in default .Is there any thing we can do by configuration or is there any chance of enhancement
    kindly help
    thanks and regards,
    Subeesh Kannottil

    Hi Subeesh,
    It is one of the standard setting provided by SAP for extracting spool output.In most of the case it is sufficient. Incase of special requirement we can do as below.
    In SM37,open the spool and click the icon Display in Maximum Width or (Shift+F4). Then the complete list will be displayed.
    Regards,
    Kannan

  • ALV last 10 columns are truncating in background mode

    I am using Reuse_alv_list_display function module and running the report in the background mode, the spool is generating fine but the problem is that the last 10 columns of the report are truncating.what will be the possible solution.

    The default maximum line width of the spool is 255 characters which means anything more the 255 will be truncated, To display more the 255 characters you have to do two things:
    1] select a printer format which outputs more than 255 characters for eg x_65_512 or x_65_1023. If you cannot find any printer which has these formats then you have to ask the basis guys to create Z format for you like Z_65_1023.
    2] After you use the above format of the printer when you display the spool there is an option of "DISPLAY IN MAXIMUM WIDTH" in the tool bar. Choose that it will show you the entire output.

  • Getting Message as "File not open", when I ran background Job

    Hi,
    I developed a Migration Program, Which reads the data from Application serever and procced with further process in back ground mode.
    Same program is workind fine in Development System in Back ground mode (SY-BATCH = 'X', Scheduled a batch Job). So I transported to Quality system.
    Now When I run the program in background mode (SY-BATCH = 'X', Scheduled a batch Job), getting Message as "File is not Open" at Quality system. So I debugged the Batch job  through "JDBG", and found file opening and reading the content sucessfully.
    But its not working without debugging mode and getting message as "File not open".
    Is there any Authorizations required for background mode (without debugging).
    So can you please help me on this how to solve this issue.

    Try this code:
    DATA: PATH_NAME(80) TYPE C,
            LV_FILENAME TYPE STRING.
      DATA: LW_XSTRING         TYPE XSTRING,
            X_LEN             TYPE I.
      DATA: FILE_AUTH_ERR TYPE REF TO CX_SY_FILE_AUTHORITY,
            FILE_OPEN_ERR TYPE REF TO CX_SY_FILE_OPEN,
            FILE_OPEN_MODE_ERR TYPE REF TO CX_SY_FILE_OPEN_MODE,
            FILE_CLOSE_ERR TYPE REF TO CX_SY_FILE_CLOSE,
            FILE_CONVERSION_ERR TYPE REF TO CX_SY_CONVERSION_CODEPAGE,
            FILE_TOO_MANY_ERR TYPE REF TO CX_SY_TOO_MANY_FILES,
            MESS TYPE STRING,
            W_TEXT TYPE STRING.
      DATA: L_RC TYPE INT4.
    concatenate pathname lv_filename into lv_filename.
    TRY.
          OPEN DATASET LV_FILENAME FOR INPUT IN BINARY MODE MESSAGE MESS.
        CATCH CX_SY_FILE_OPEN_MODE INTO FILE_OPEN_MODE_ERR.
          W_TEXT = FILE_OPEN_MODE_ERR->GET_TEXT( ).
          L_RC = 1.
        CATCH CX_SY_FILE_AUTHORITY INTO FILE_AUTH_ERR.
          W_TEXT = FILE_AUTH_ERR->GET_TEXT( ).
          L_RC = 2.
        CATCH CX_SY_CONVERSION_CODEPAGE INTO FILE_CONVERSION_ERR.
          L_RC = 3.
          W_TEXT = FILE_CONVERSION_ERR->GET_TEXT( ).
        CATCH CX_SY_TOO_MANY_FILES INTO FILE_TOO_MANY_ERR.
          L_RC = 4.
          W_TEXT = FILE_TOO_MANY_ERR->GET_TEXT( ).
        CATCH CX_SY_FILE_OPEN INTO FILE_OPEN_ERR.  "File already open
          L_RC = 5.
          W_TEXT = FILE_OPEN_ERR->GET_TEXT( ).
      ENDTRY.
      IF L_RC = 0.
        L_RC = SY-SUBRC.
      ENDIF.
      IF L_RC <> 0 OR SY-SUBRC NE 0.
    Issue Error message in open file.
       CONCATENATE MESS 'Open dataset failed'  w_text INTO MESS SEPARATED BY SPACE.
       message Exx(yyy) with mess.
          ELSE.        "file exists and can be opened
      ENDIF.

  • Changing the file format of spool output when scheduling a background job.

    Hello Experts,
    I have an issue. It is related to Spool output format. I created a job for one report program for which the output is a list output. I have added one recipient in the 'Spool list recipient' while creating the job SM36. After the job is finished the spool output is sent to the recipient mail id as .htm format as an attachment. But the attachment should be excel sheet or text file. No coding in the program should be used to convert the file format. Only settings in the spool while creating job should be manipulated. Please help me in solving this issue.
    Regards.

    Hi Sunil,
    You can use the logic for converting spool to PDF using program : RSTXPDFT4 . Alternatively you can use FM: CONVERT_ABAPSPOOLJOB_2_PDF . In this FM you need to pass the Spool id .
    u can make use of these FM's SO_DOCUMENT_SEND_API1
    SO_NEW_DOCUMENT_SEND_API1
    Check out the following wiki:
    https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertsspoolrequestintoPDFdocumentand+emails
    hope this will use full to you.
    Thanks!!

  • Whi is the winner? ALV LIst or ALV Grid OO?

    Hi Guys,
    Hope you are all well.
    My company is still mostly using the ALV List Function Modules when creating reports. Yes, they are using the SLIS pools.
    I have written a template program for them to start doing things the OO way. That is to say, using ALV Grid Objects.
    We are now thinking of COMPLETELY going over into ALV Grid Objects, but some of us are still arguing which one is best?
    The biggest argument is :
    Is ALV too "expensive" with regards to using system recources?
    Please give me your thoughts as Im all for going for OO, but I would understand if it would make things slower.
    Points will be awarded for useful arguments.
    tks
    Christiaan

    SLIS is OLD,  OBSOLETE DINOSAUR technology.
    With the new classes you can create new reports really quickly and easily and add all sorts of functionality to them.
    There's a small learning curve -- but what ought to appeal to management is that once you get the hang of it you can produce a report in hours (or even minutes) which done in the old way could take a week or more.
    These days Human development time is far far more expensive than machine time so there's NO CONTEST. 
    The advantages in general of OO are too numerous to list here but if you look at the sample code I've listed here you can see how easy and quicklly you can get an application up and running even if you haven't got my Z_class definition listed in the program (it's a global class now defined with SE24).
    With either cl_gui_alv_grid or even easier (if you don't need  edit capability)  the salv_table type class it only takes a few lines to code your program and display the grid.
    All you ever now need to do in an alv program is the following.
    1) define your data structures
    2) use RTTI to generate dynamic field catalog from your data structures
    3) create dynamic table
    4) populate it
    5) display grid.
    You should have all the events etc you need such as cell selection etc etc.
    Your whole code could be quite small.
    For example I've got a generalized Z_cLass for my alv grid.
    Now here's a sample program to display program names in the system. When I double click a program SE38 is entered and on exit unlike the standard sap transaction my list is re-displayed where I can choose another program.
    Note how small the code is.
    You won't be able to copy and run this  program directly as you'll need the Z_class definitions.
    In this Z_class there's also functionality for ON  data change, multiple cell selection , toolbar additions etc.
    These methods are available to EVERY program calling the class.
    If you need the extra functionality using SLIS you have to program it in every time for each individual program.
    You can therefore concentrate in your application program on just getting the data and displaying it. All the complicated functionality is in the Z_class.
    Incidently using ALV classes can also render the whole idea of classical dynpros with Table controls as also obsolete.
    program  zzjimboprogs.
    tables : trdirt.
    include my_zdata.  "data references to my Z_Class etc.
    * Front end to call SE38 Program list
    * When you use the search Program facility in SE38
    * the system loses the LIST after you choose a program and enter
    * transaction SE38
    * double click on the Program module you want SE38 to use.
    * After exiting SE38 you will return to the list .
    types:  begin of s_elements,
      name  type trdirt-name,
      text   type trdirt-text,
    end of  s_elements.
    data: progname type trdirt-name.
    data: wa_elements type s_elements.
    selection-screen begin of block one with frame title text-t01.
    select-options:  s_prog for trdirt-name obligatory.
    selection-screen end of block one.
    at selection-screen.
    initialization.
       invoker = sy-repid. "Name of calling program for alv class.
    start-of-selection.
      create data dref type s_elements.
      assign dref->* to <fs>.
      i_gridtitle = 'Program List'.
      invoker = sy-repid.
      i_zebra = ' '.
      i_edit = 'X'.
      create object z_object
           exporting
                      z_object = z_object
                      cfname = 'CCONTAINER1'.
         assign z_object to <fs1>.
      i_object = <fs1>.
      call method i_object->build_dynamic_structures
      exporting
        my_line = <fs>
        calling_program = invoker
      importing
        dy_table = dy_table
      changing
        it_fldcat = it_fldcat.
    perform populate_dynamic_itab
    changing dy_table.
    perform modify_fldcat.
    i_screen = '100'.
    i_text = 'Prog List'.
    perform display_grid
           using
             i_screen
             i_text
             it_fldcat
             <dyn_table>.
    end-of-selection.
    form populate_dynamic_itab changing dy_table.
      assign dy_table->* to <dyn_table>.
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
      select *
            from trdirt
             into  corresponding fields of table <dyn_table>
             where name in s_prog
             and sprsl eq sy-langu.
    endform.
    form display_grid
    using i_screen
         i_text
         field_catalog
         dynamic_table.
    call method i_object->display_data
             exporting
               i_gridtitle = i_gridtitle
               i_edit = ' '
               i_zebra = ' '
               i_opt  = ' '
               title_text    = i_text
               program       = invoker
               screen_number = i_screen
               z_object = i_object
                changing
               it_fldcat = field_catalog
               gt_outtab = dynamic_table
               e_ucomm = e_ucomm.
             if e_ucomm  = 'BACK'.
               leave to screen 0.
          else.
            leave program.
          endif.
    endform.
    form verwerk.
    endform.
    form refresh.
      call method i_object->refresh_grid.
    endform.
    form dubbelklik using
            e_row   type lvc_s_row
            e_column type lvc_s_col
            es_row_no type lvc_s_roid.
      read table <dyn_table> index e_row into wa_elements.
    progname = wa_elements-name.
        set parameter id 'RID'  field progname.
         call transaction  'SE38'.
      perform refresh.
      row_number-row_id = e_row.
      call method z_object->set_cell
        exporting
                e_column = e_column
                es_row_no = row_number.
    endform.
    form modify_fldcat.
      col_name it_fldcat 1 'Programe' 25.
      col_name it_fldcat 2 'description' 50.
    endform.

Maybe you are looking for

  • ALV grid in Spool screen limit

    Hi, I am displaying a report for bulk of order. So we will schedule it in background . Through the program, i am creating the output as file in appln server also i m dispklaying the report in ALV grid. now the report is working fine and its creating

  • Kodo 4.1.2 license key problem

    Has anyone tried the JDO tutorial provided with Kodo 4.1.2? Everything works fine until I try to create the mappings with 'mappingtool -p jdo.properties package.jdo'. Then I get: Exception in thread "main" com.solarmetric.license.LicenseException: No

  • Movies on photo album page not working correctly

    I have movies on some photo album pages, and only since updating to Snow Leopard, when I click on a movie, the sound begins to play, but the picture sticks on the poster frame. If I go "back to album" and click the movie again, it will usually play n

  • Does Nokia Asha 303 supports Viber?

    nokia,please i do not like i am been seening that Asha303 does not support viber.. When i try to download it from nokia store it say's is unavialable..please i want you teach me the way i can get it please. Moderator's note: We amended the title of t

  • Oracle iDS / FORM 6i on IBM AIX

    Can 9i iDS be run on IBM AIX / RS/6000 series machines? Please advise.