Create new spool list for new ALV output

Hi,
I created a report that calls an several ALV Grids, when it is processed in background.
Unfortunately, only the last ALV is shown in the spool.
Could you tell me, how to store every ALV output in a new spool?
Best regards,
Fabian

hi kegel..
   check this piece of code ....
   call function 'GET_PRINT_PARAMETERS'
       exporting
            destination    =  loc_dest
            copies         =  l_copies
            list_name      =  l_listname
            list_text      =  l_listtext
            immediately    =  ' '
            release        =  'X'
            new_list_id    =  'X'
            expiration     =  l_days
            line_size      =  200
            line_count     =  65
            layout         =  'X_65_200'
            sap_cover_page =  'X'
            receiver       =  'SAP*'
            department     =  ''
            no_dialog      =  'X'
       importing
            out_parameters = l_params
            valid          = l_valid.
  IF l_VALID <> SPACE.
   NEW-PAGE PRINT ON PARAMETERS l_PARAMS NO DIALOG.
   NEW-PAGE PRINT OFF.
   NEW-PAGE PRINT ON PARAMETERS l_PARAMS NO DIALOG.
      PERFORM output_top.
      PERFORM output_data.
      PERFORM output_end.
   NEW-PAGE PRINT OFF.
NEW PAGE PRINT ON/OFF gives spool request...
u can call it again as above to print ur contents in another spool...
For my reqmt i had to internal table to be displayed in diff spools, so i used this code...
hope this helps.......
thanx....

Similar Messages

  • Creating Format type for printing ALV output.

    Dear Friends,
        I am using a format type for printing ALV output print which displays 65 rows and 255 columns on DINA4 page. I want to create a format type which will print 65 rows and 310 columns on 'LEGAL' page format .
    So plz suggest the ways along with help links if any.
    Regards,
    Madan.

    Hi Mandan,
    As long as I know the maximum column for printing is 255.
    Might be you can split your output into 2 rows...
    Regards,

  • How to get the spool id or how to create a spool id for the report .

    hi,
    how to get the spool id or how to create a spool id for the report .
    this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
    my requirement is to download a pdf file from the alv grid list.

    Hi Raghu,
    Execute this program.
    REPORT  ZTEST_3318                              .
    tables: usr01.
    perform send_report_to_spool.
    *&      Form  send_report_to_spool
          text
    form send_report_to_spool.
      data: loc_dest like pri_params-pdest,
            wf_listname type char12,
            wf_listtext like PRI_PARAMS-PRTXT,
            wf_copies type i,
            wf_days type i,
            wf_PARAMS LIKE PRI_PARAMS,     " achieving file PRI_PARAMS.
            wf_valid type c.
      clear : wf_listname , loc_dest , wf_listtext .
      move: 'AP interface' to   wf_listname .
      move: 'AP interface' to   wf_listtext .
    select single spld into usr01-spld from usr01 where bname eq sy-uname .
      if sy-subrc eq 0 .
        move: usr01-spld to loc_dest .
      endif .
      call function 'GET_PRINT_PARAMETERS'
        EXPORTING
          destination    = loc_dest
          copies         = 1
          list_name      = wf_listname
          list_text      = wf_listtext
          immediately    = ' '
          release        = ' '
          new_list_id    = 'X'
          expiration     = 1
          line_size      = 200
          line_count     = 65
          layout         = 'X_65_200'
          sap_cover_page = 'X'
          receiver       = 'SAP*'
          department     = ''
          no_dialog      = 'X'
        IMPORTING
          out_parameters = wf_params
          valid          = wf_valid.
      if wf_valid <> space.
        new-page print on parameters wf_params no dialog.
        perform write_summary .
        new-page print off.
      endif .
    endform.                    "send_report_to_spool
    *&      Form  write_summary
          text
    -->  p1        text
    <--  p2        text
    FORM write_summary .
    data: begin of itab occurs 0,
          matnr type matnr,
          end of itab.
    select matnr
           from mara
           into table itab
           up to 10 rows.
    loop at itab.
    write: / itab-matnr.
    endloop.
    ENDFORM.                    " write_summary
    This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
    After that use that spool for your purpose.
    If Useful award point

  • Creating single spool request for printing all shop floor papers

    Hello PP Gurus,
    We are printing shop floor papers at the time of releasing production order using txn CO02. It creates individual spool request for printing different shop floor papers in the same orders . eg Pick list, goods receipt list etc.
    Is it possible to do the cofiguration setting to create only one spool request for all the different SF papers belong to same order.? If yes, please let me know the steps for customising this.
    Thanks for your help in advance.
    Regards & Thanks
    Rajesh D.

    In transaction OPK8, in forms uncheck the 'New List' check box for the List.
    Regards
    Ramanujan

  • How do I create different contacts lists for two iphone/users?

    How do I create different contacts lists for two iphone/users?

    Sorry. This doesn't make a lot of sense. Each iPhone user should have their own cloud accounts with which to sync contacts.
    The iPhone is not a multi-user device.

  • Creating a member list for Custom3 dimension

    Hello gurus. I'm trying to create a member list for my custom3 dimension based on the UD1. I keep getting this error: Wrong number of arguments or invalid property assignment: HS.AddMember ToList. Here's my script. Can someone let me know what I'm doing wrong? Thanks
    Sub EnumMemberLists()
    Dim aCustom3Lists(2)
    Select Case HS.Dimension
    Case "Custom3"
         aCustom3Lists(1) = "Reporting Sector - SPS"
         aCustom3Lists(2) = "Tax Provision - US"
    HS.SetMemberLists aCustom3Lists
    End Select 'Dimension
    End Sub 'EnumMemberLists
    Case "Custom3"
    Select Case HS.MemberListID
    Case 1
         'Reporting Sector
         ELi=Hs.Custom3.List("","[Base]")
         For i = Lbound(ELi) to Ubound(ELi)
         If (StrComp(HS.Custom3.UD1(ELi(i)),"SPS",vbTextCompare)=0) Then
         HS.AddMemberToList (""),ELi(i)
         End If
    End Select ' Case HS.MemberListID

    Hi,
    An obvious reason that your code throws a number of arguments error to the AddMemberToList function, is that the line should read like this:
    HS.AddMemberToList ELi(i)However, in your code I see that there are also some incomplete structures, like the for-loop is not ended with a next and the whole paragraph after "End Sub 'EnumMemberLists" should be followed by a "Sub EnumMembersInList()". But I assume that you have omitted those in order to be short.
    Regards,
    Kostas

  • How to create a content list for sections and chapters etc

    just started with Pages on iPad 2 and really like is BUT where is the control for creating a content list for a long document for chapetrs etc?
    thanks guys

    Hi,
    Thank you for posting the screen shots I have been unsuccessful in determining exactly where the problem is coming from. Would it be possible for you to post the actual VI so that I can work with it so see if I can reproduce this issue using your code? In regard to your questions:
    1.    You are correct 1000 samples read should write 1000 samples to the table
    2.    I believe the discrepancy is due to amount of manipulation done between the read and the file write but I cannot be certain, without the code to work with.
    3.     I am unclear as to exactly what is happening. If you are reading empty channels then you may receive erroneous readings this is to be expected. When you connected your accelerometer did you connect in RSE or differential? You can also manipulate the signal range with will affect the gain setting, how off are the readings?
    JaceD
    Signal Sources Product Support Engineer
    National Instruments

  • How to Create Interactive report lists for the gross sales, credit ....

    How to Create Interactive report lists for the gross sales, credit returns, and gross weight for the               customer for the current year and comparing the same with that of the previous year for the same period.....
    plz tell me steps to accomplish this....plz ...give me the detail description..plz......many many thnx in advance...

    Hi raja,
    Display a checkbox , customer number on the basic list and also set a GUI STATUS  on the basic list.....
    Select the customer by checking the checkbox and click on the button you create in the GUI status....
    Write the desired code to be displayed in
    AT USER-COMMAND even checking the sy-ucomm....
    so this would make you to into interactive list...
    Hope this would help you.
    Regards
    Narin Nandivada

  • FM for saving ALV output ?

    Hi,
    Is there any FM which can give me all the output shown as ALV at run time and so that i can save them in an internal table?
    Regards
    Gunjan

    Hi..
    Check out the following link for top_of_page event in OOPs ALV.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    You can also check out the following program.
    DATA: save_ok LIKE sy-ucomm,
    g_container TYPE scrfname VALUE 'CC1',
    g_grid TYPE REF TO cl_gui_alv_grid,
    g_custom_container TYPE REF TO cl_gui_custom_container,
    gt_fieldcat TYPE lvc_t_fcat,
    g_max TYPE i VALUE 100.
    declarations for top of page event
    Data: gv_c_split type ref to cl_gui_splitter_container,
    gv_c_ptv type ref to cl_gui_container,
    gv_alv_ptv type ref to cl_gui_alv_grid,
    o_dd_doc TYPE REF TO cl_dd_document,
    text TYPE sdydo_text_element,
    o_split type ref to cl_gui_easy_splitter_container,
    o_top type ref to cl_gui_container,
    o_bot type ref to cl_gui_container,
    gv_c_vp type ref to cl_gui_container.
    end of declaration for top of page.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    *class lcl_application_dc definition deferred.
    DATA: o_event_receiver TYPE REF TO lcl_event_receiver.
    g_dc type ref to lcl_application_dc.
    DATA: gt_outtab TYPE TABLE OF sbook.
    CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS: handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
    IMPORTING e_fieldname
    es_row_no
    er_event_data
    et_bad_cells
    e_display,
    handle_top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid
    IMPORTING e_dyndoc_id.
    METHODS: reset.
    METHODS: show_f4.
    PRIVATE SECTION.
    attributes for creating an own F4-Help
    (using a second ALV Grid Control
    DATA: f4_grid TYPE REF TO cl_gui_alv_grid,
    f4_custom_container TYPE REF TO cl_gui_custom_container.
    TYPES: BEGIN OF ty_f4.
    TYPES: value TYPE s_class.
    TYPES: descr(20) TYPE c.
    TYPES: END OF ty_f4.
    DATA: f4_itab TYPE TABLE OF ty_f4.
    DATA: f4_fieldcatalog TYPE lvc_t_fcat.
    attributes to store event parameters
    (after the CALL SCREEN command, the event parameters
    are not accessible)
    TYPES: BEGIN OF onf4_event_parameters_type.
    TYPES: c_fieldname TYPE lvc_fname.
    TYPES: cs_row_no TYPE lvc_s_roid.
    TYPES: cr_event_data TYPE REF TO cl_alv_event_data.
    TYPES: ct_bad_cells TYPE lvc_t_modi.
    TYPES: c_display TYPE char01.
    TYPES: END OF onf4_event_parameters_type.
    DATA: f4_params TYPE onf4_event_parameters_type.
    Methods to create own F4-Help
    (This is done using a second ALV Grid Control)
    METHODS: init_f4.
    METHODS: build_fieldcatalog.
    METHODS: fill_f4_itab .
    METHODS: on_double_click FOR EVENT double_click OF cl_gui_alv_grid
    IMPORTING es_row_no.
    ENDCLASS. "lcl_application_f4 DEFINITION
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    *§2. Implement an event handler method for event ONF4.
    METHOD handle_f4.
    Save event parameter as global attributes of this class
    (maybe solved differently if you use a function module!)
    f4_params-c_fieldname = e_fieldname.
    f4_params-cs_row_no = es_row_no.
    f4_params-cr_event_data = er_event_data.
    f4_params-ct_bad_cells = et_bad_cells.
    f4_params-c_display = e_display.
    *§3. Call your own f4 help. To customize your popup check
    first if the cell is ready for input (event parameter E_DISPLAY).
    (parameter E_DISPLAY is checked later in method on_double_click)
    (Probably, you would call a function module at this point,
    pass the needed event parameter and call the popup screen
    within that function module. This is not done in this example
    to avoid scattering its code).
    CALL SCREEN 101 STARTING AT 10 10.
    *§7. Inform the ALV Grid Control that an own f4 help has been processed
    to suppress the standard f4 help.
    er_event_data->m_event_handled = 'X'.
    ENDMETHOD. "on_f4
    METHOD show_f4.
    DATA: ls_outtab TYPE sbook.
    initialize own f4 help if needed
    IF f4_custom_container IS INITIAL.
    CALL METHOD init_f4.
    ENDIF.
    CALL METHOD fill_f4_itab.
    refresh list of values in f4 help and show it
    CALL METHOD f4_grid->refresh_table_display.
    CAUTION: Do not use method REFRESH_TABLE_DISPLAY for
    your editable ALV Grid instances while handling events
    DATA_CHANGED or ONf4. You would overwrite intermediate
    values of your output table on frontend.
    'f4_grid' is a non-editable ALV Grid Control for the
    application specific F4-Help. Therefore, calling
    REFRESH_TABLE_DISPLAY for this instance has no
    negative effect.
    CALL METHOD cl_gui_cfw=>flush.
    ENDMETHOD. "show_f4
    METHOD init_f4.
    DATA: ls_f4_layout TYPE lvc_s_layo.
    build fieldcatalog entries for f4
    CALL METHOD build_fieldcatalog.
    create controls
    CREATE OBJECT f4_custom_container
    EXPORTING container_name = 'CC_ONF4'.
    CREATE OBJECT f4_grid
    EXPORTING i_parent = f4_custom_container.
    hide toolbar
    ls_f4_layout-no_toolbar = 'X'.
    CALL METHOD f4_grid->set_table_for_first_display
    EXPORTING
    is_layout = ls_f4_layout
    CHANGING
    it_fieldcatalog = f4_fieldcatalog
    it_outtab = f4_itab.
    register event double click on backend
    SET HANDLER me->on_double_click FOR f4_grid.
    flush since 'ls_layout' is local!
    CALL METHOD cl_gui_cfw=>flush.
    ENDMETHOD. "init_f4
    METHOD fill_f4_itab.
    DATA ls_f4_itab TYPE ty_f4.
    Delete all entries in f4_itab to determine
    offered values dynamically
    CLEAR f4_itab[].
    ls_f4_itab-value = 'C'.
    ls_f4_itab-descr = text-t03. "Business Class
    APPEND ls_f4_itab TO f4_itab.
    ls_f4_itab-value = 'Y'.
    ls_f4_itab-descr = text-t04. "Economie Class
    APPEND ls_f4_itab TO f4_itab.
    ls_f4_itab-value = 'F'.
    ls_f4_itab-descr = text-t05. "First Class
    APPEND ls_f4_itab TO f4_itab.
    ENDMETHOD. "fill_f4_itab
    METHOD build_fieldcatalog.
    DATA: ls_fcat TYPE lvc_s_fcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'VALUE'.
    ls_fcat-coltext = text-t02.
    ls_fcat-inttype = 'S_CLASS'.
    ls_fcat-outputlen = 5.
    APPEND ls_fcat TO f4_fieldcatalog.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'DESCR'.
    ls_fcat-coltext = text-t01.
    ls_fcat-inttype = 'C'.
    ls_fcat-outputlen = 20.
    APPEND ls_fcat TO f4_fieldcatalog.
    ENDMETHOD. "build_fieldcatalog
    METHOD on_double_click.
    *§5. If not already caught by your own f4 help, check whether
    the triggered cell was ready for input by using E_DISPLAY
    and if not, exit.
    IF f4_params-c_display EQ 'X'.
    LEAVE SCREEN.
    ENDIF.
    *§6. After the user selected a value, pass it to the ALV Grid Control:
    *§ 6a. Define a field symbol of type: LVC_T_MODI and a structure of
    type LVC_S_MODI to pass the value later on.
    FIELD-SYMBOLS  TYPE lvc_t_modi.
    DATA: ls_modi TYPE lvc_s_modi,
    ls_f4_itab TYPE ty_f4.
    *§ 6b. Dereference attribute M_DATA into your field symbol and add
    the selected value to the table to which this symbol points to.
    ASSIGN f4_params-cr_event_data->m_data->* TO .
    LEAVE TO SCREEN 0.
    ENDMETHOD. "on_double_click
    METHOD reset.
    FIELD-SYMBOLS display_document
    EXPORTING parent = o_top.
    ENDMETHOD. "handle_top_of_page
    ENDCLASS. "lcl_application_f4 IMPLEMENTATION
    END-OF-SELECTION.
    CALL SCREEN 100.
    MODULE PBO OUTPUT *
    MODULE pbo OUTPUT.
    SET PF-STATUS 'MAIN100'.
    SET TITLEBAR 'MAIN100'.
    IF g_custom_container IS INITIAL.
    PERFORM create_and_init_alv CHANGING gt_outtab[]
    gt_fieldcat.
    ENDIF.
    ENDMODULE. "pbo OUTPUT
    MODULE PAI INPUT *
    MODULE pai INPUT.
    save_ok = sy-ucomm.
    CLEAR sy-ucomm.
    CASE save_ok.
    WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
    PERFORM exit_program.
    WHEN 'SWITCH'.
    PERFORM switch_edit_mode.
    WHEN OTHERS.
    do nothing
    ENDCASE.
    ENDMODULE. "pai INPUT
    FORM EXIT_PROGRAM *
    FORM exit_program.
    LEAVE PROGRAM.
    ENDFORM. "exit_program
    *& Form build_fieldcat
    text
    -->PT_FIELDCAT text
    FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = 'SBOOK'
    CHANGING
    ct_fieldcat = pt_fieldcat.
    LOOP AT pt_fieldcat INTO ls_fcat.
    Exchange smoker field with invoice field - just to
    make the dependance between SMOKER and CLASS more transparent
    (Smoking is only allowed in the first class).
    IF ls_fcat-fieldname EQ 'SMOKER'.
    ls_fcat-col_pos = 11.
    ls_fcat-outputlen = 10.
    ls_fcat-edit = 'X'.
    Field 'checktable' is set to avoid shortdumps that are caused
    by inconsistend data in check tables. You may comment this out
    when the test data of the flight model is consistent in your system.
    ls_fcat-checktable = '!'. "do not check foreign keys
    MODIFY pt_fieldcat FROM ls_fcat.
    ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
    ls_fcat-col_pos = 7.
    MODIFY pt_fieldcat FROM ls_fcat.
    ELSEIF ls_fcat-fieldname EQ 'CLASS'.
    ls_fcat-edit = 'X'.
    ls_fcat-outputlen = 5.
    ls_fcat-checktable = '!'. "do not check foreign keys
    MODIFY pt_fieldcat FROM ls_fcat.
    ENDIF.
    ENDLOOP.
    ENDFORM. "build_fieldcat
    *& Form create_and_init_alv
    text
    -->PT_OUTTAB text
    -->PT_FIELDCAT text
    FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
    pt_fieldcat TYPE lvc_t_fcat.
    DATA: lt_exclude TYPE ui_functions,
    ls_layout TYPE lvc_s_layo.
    CREATE OBJECT g_custom_container
    EXPORTING container_name = g_container.
    CREATE OBJECT g_grid
    EXPORTING i_parent = g_custom_container.
    CREATE OBJECT gv_c_split
    EXPORTING
    link_dynnr = lv_dynnr
    link_repid = lv_repid
    parent = g_custom_container
    rows = 2
    columns = 1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    others = 3 .
    CALL METHOD gv_c_split->set_border
    EXPORTING
    border = space.
    CALL METHOD gv_c_split->get_container
    EXPORTING
    row = 1
    column = 1
    RECEIVING
    container = gv_c_ptv.
    CALL METHOD gv_c_split->set_row_height
    EXPORTING
    id = 1
    height = 20
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 6 .
    CALL METHOD gv_c_split->get_container
    EXPORTING
    row = 2
    column = 1
    RECEIVING
    container = gv_c_vp .
    CALL METHOD gv_c_split->set_row_height
    EXPORTING
    id = 2
    height = 10
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3 .
    CREATE OBJECT o_split
    EXPORTING
    parent = gv_c_ptv
    with_border = 1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 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.
    o_top = o_split->top_left_container.
    o_bot = o_split->bottom_right_container.
    CREATE OBJECT gv_alv_ptv
    EXPORTING
    i_parent = o_bot
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    others = 5 .
    CREATE OBJECT g_grid
    EXPORTING
    i_parent = gv_c_vp
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    others = 5 .
    PERFORM build_fieldcat CHANGING pt_fieldcat.
    Optionally restrict generic functions to 'change only'.
    (The user shall not be able to add new lines).
    PERFORM exclude_tb_functions CHANGING lt_exclude.
    PERFORM build_data CHANGING pt_outtab.
    ls_layout-grid_title = 'F4 help implemented for field CLASS'.
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_top_of_page FOR gv_alv_ptv.
    SET HANDLER o_event_receiver->handle_top_of_page FOR g_grid.
    CREATE OBJECT o_dd_doc EXPORTING style = 'ALV_GRID'
    no_margins = 'X'.
    CALL METHOD gv_alv_ptv->set_table_for_first_display
    EXPORTING
    is_layout = ls_layout
    CHANGING
    it_outtab = pt_outtab[]
    it_fieldcatalog = pt_fieldcat
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    CALL METHOD g_grid->set_table_for_first_display
    EXPORTING
    it_toolbar_excluding = lt_exclude
    is_layout = ls_layout
    CHANGING
    it_fieldcatalog = pt_fieldcat
    it_outtab = pt_outtab[].
    CALL METHOD gv_alv_ptv->list_processing_events
    EXPORTING
    i_event_name = 'TOP_OF_PAGE'
    i_dyndoc_id = o_dd_doc.
    register f4 for field CLASS
    PERFORM register_events.
    Set editable cells to ready for input initially
    CALL METHOD g_grid->set_ready_for_input
    EXPORTING
    i_ready_for_input = 1.
    ENDFORM. "CREATE_AND_INIT_ALV
    *& Form exclude_tb_functions
    text
    -->PT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    Only allow to change data not to create new entries (exclude
    generic functions).
    DATA ls_exclude TYPE ui_func.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
    APPEND ls_exclude TO pt_exclude.
    ENDFORM. " EXCLUDE_TB_FUNCTIONS
    *& Form build_data
    text
    --> p1 text
    <-- p2 text
    FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
    DATA: ls_sbook TYPE sbook,
    l_index TYPE i.
    SELECT * FROM sbook INTO TABLE gt_outtab UP TO g_max ROWS.
    IF sy-subrc NE 0.
    PERFORM generate_entries CHANGING pt_outtab.
    ENDIF.
    LOOP AT pt_outtab INTO ls_sbook.
    l_index = sy-tabix.
    CLEAR ls_sbook-class.
    Alternate between smoker and non smoker to make
    it more obvious what this example is about
    l_index = l_index MOD 2.
    IF l_index EQ 1.
    ls_sbook-smoker = 'X'.
    ELSE.
    ls_sbook-smoker = ' '.
    ENDIF.
    MODIFY pt_outtab FROM ls_sbook.
    ENDLOOP.
    ENDFORM. " build_data
    *& Form generate_entries
    text
    -->PT_SBOOK text
    FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
    DATA: ls_sbook TYPE sbook,
    l_month(2) TYPE c,
    l_day(2) TYPE c,
    l_date(8) TYPE c,
    l_prebookid TYPE i.
    ls_sbook-carrid = 'LH'.
    ls_sbook-connid = '0400'.
    ls_sbook-forcurkey = 'DEM'.
    ls_sbook-loccurkey = 'USD'.
    ls_sbook-custtype = 'B'.
    DO 110 TIMES.
    l_prebookid = sy-index.
    ls_sbook-forcuram = sy-index * 10.
    ls_sbook-loccuram = ls_sbook-loccuram * 2.
    ls_sbook-customid = sy-index.
    ls_sbook-counter = 18.
    ls_sbook-agencynum = 11.
    l_month = sy-index / 10 + 1.
    DO 2 TIMES.
    l_day = 3 + l_month + sy-index * 2.
    l_date+0(4) = '2000'.
    l_date+4(2) = l_month.
    l_date+6(2) = l_day.
    ls_sbook-fldate = l_date.
    SUBTRACT 3 FROM l_day.
    ls_sbook-order_date+0(6) = l_date+0(6).
    ls_sbook-order_date+6(2) = l_day.
    ls_sbook-bookid = l_prebookid * 2 + sy-index.
    IF sy-index EQ 1.
    ls_sbook-smoker = 'X'.
    ELSE.
    ls_sbook-smoker = space.
    ENDIF.
    ls_sbook-luggweight = l_prebookid * 10.
    IF ls_sbook-luggweight GE 1000.
    ls_sbook-wunit = 'G'.
    ls_sbook-class = 'C'.
    ELSE.
    ls_sbook-wunit = 'KG'.
    ls_sbook-class = 'Y'.
    ENDIF.
    IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
    ls_sbook-invoice = 'X'.
    ENDIF.
    IF ls_sbook-bookid EQ 2.
    ls_sbook-cancelled = 'X'.
    ls_sbook-class = 'F'.
    ENDIF.
    APPEND ls_sbook TO pt_sbook.
    ENDDO.
    ENDDO.
    ENDFORM. " generate_entries
    *& Form register_events
    text
    FORM register_events.
    *§1. Register event ONF4 at frontend using method
    register_f4_for_fields. For this purpose, you pass a table
    with all fields, for which you want to implement your own
    f4 help.
    remark: If you want to use an own f4 help for fields where
    no standard f4 help exists set field F4AVAILABL for
    this field in the fieldcatalog.
    DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
    CLEAR lt_f4.
    lt_f4-fieldname = 'CLASS'.
    If you would like to deregister the field again,
    pass value SPACE with field 'register'.
    lt_f4-register = 'X'.
    *§ 1b. If the value range in your f4 help depends on other
    values of cells that are input enabled, set the
    GETBEFORE parameter.
    The consequence is that the ALV Grid Control raises
    event DATA_CHANGED before the f4 help is called to
    check values that the f4 help depends on.
    lt_f4-getbefore = 'X'.
    The next parameter is used to change values after onf4 has
    been processed. The ALV Grid Control will raise
    event DATA_CHANGED afterwards, if you set it.
    lt_f4-chngeafter = space.
    INSERT TABLE lt_f4.
    CALL METHOD g_grid->register_f4_for_fields
    EXPORTING
    it_f4 = lt_f4[].
    register events for abap objects (backend)
    SET HANDLER o_event_receiver->handle_f4 FOR g_grid.
    ENDFORM. " register_events
    MODULE status_0101 OUTPUT
    MODULE status_0101 OUTPUT.
    SET PF-STATUS 'POPUP'.
    SET TITLEBAR 'POPUP'.
    CALL METHOD o_event_receiver->show_f4.
    ENDMODULE. " STATUS_0101 OUTPUT
    *& Module USER_COMMAND_0101 INPUT
    text
    MODULE user_command_0101 INPUT.
    PERFORM user_command.
    ENDMODULE. " USER_COMMAND_0101 INPUT
    *& Form user_command
    text
    FORM user_command.
    DATA: save_ok TYPE sy-ucomm.
    save_ok = sy-ucomm.
    CLEAR sy-ucomm.
    CASE save_ok.
    WHEN 'CANCEL'.
    CALL METHOD o_event_receiver->reset.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDFORM. "user_command
    *& Form switch_edit_mode
    text
    FORM switch_edit_mode.
    IF g_grid->is_ready_for_input( ) EQ 0.
    set edit enabled cells ready for input
    CALL METHOD g_grid->set_ready_for_input
    EXPORTING
    i_ready_for_input = 1.
    ELSE.
    lock edit enabled cells against input
    CALL METHOD g_grid->set_ready_for_input
    EXPORTING
    i_ready_for_input = 0.
    ENDIF.
    ENDFORM. "switch_edit_mode
    For popup try this
    Reward points if useful
    Regards
    Ashu

  • Creating the spool request for the internal table data

    Hi..
    I am little confused with the function module used for creating the spool request.
    well...I am practicing the ALV report and sending the that report to the spool.
    I  ve used the FM SLVC_TABLE_PS_TO_SPOOL.
    this is the way i defined the internal table.
    Data:
    begin of imat occurs 0,
    matnr like marav-matnr,
    maktx like marav-maktx,
    matkl like marav-matkl,                     
    ntgew like marav-ntgew,
    gewei like marav-gewei,
    end of imat.
    data i_lines type sy-tfill
    and i declared..
    describe table imat lines i_lines.
    then i given the value for i_file_length as i_lines in the export paramet of the FM SLVC_TABLE_PS_TO_SPOOL.
    CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
        EXPORTING
          i_file_length            = i_lines
       IMPORTING
         E_SPOOLID                = spoolid
        tables
          it_textdata              = imat
    when i executed it shows the list and wen going back it shows the runtime error as
    CALL_FUNCTION_CONFLICT_LENG  - Type conflict when calling a function module (field length).
    please provide me some solutions.
    thanks in advance.
    etienne.

    Hi satyajit,
    Thanks for your response....but the fields in my internal table "IMAT" is not compatible with the structure LVC_S_1022 as it has it componenrt - LINE.
    so how can i define my internal table IMAT as type lvc_s_1022 as you suggested.
    thanks in advance.
    etienne.

  • Spool list for Background job

    Dear all ,
    The background job is already scheduled daily (PR NOT PROCESSED BY PURCHASING) , isn't possible to check the list of users is assigned in the spool list recipiant, I have checked spool list , but its shows only one id ....
    how to check the list of Spool users ...any alternate option ?
    Kindly advise
    Regards

    Hi ,
    I have created a distribution list and i have included  the email ids also .
    any other activation is required for Distribution list ?
    how the background job is sending a report to Distribution list or i have to assign a distribution list to Background job .
    Kindly suggest
    Regards

  • Creating a Distribution list for iPhone using Outlook

    I use Microsoft outlook for contacts and have multiple "Distribution lists" that I send information to. The DL's are not syncing with my iPhone. I need to send group emails and am having to put each name in individually. Is there a way, using Outlook that I can create a "Distribution list", have it sync with the phone, select that group and send an email to all the contacts on the DL

    My address book groups in the Address Book on my Mac are synced and available on my iPhone, but addressing an email or an SMS to an address book group or distribution list is not supported - at the present time anyway.

  • Problem when creating standard recipient list for all documents

    Dear All,
    I am facing 'NO_RELATION_EXIST' dump issue. So i am following note 509191 provided by SAP. At the moment i am trying 2nd  option i.e. for automatic document distribution, i am trying to create one standard recipient list for all documents to be released. However when i try creating a recipient list it does not allow me to create for a particular document type. As i can see there are 2 important key fields Document no and Document type. But i want to create only for a document type. The reason for that is this document type is for a PR attachment. So as soon as a PR gets released by the final approver this distribution should happen, irrespective of document number.
    Please let me know if this is possible. I would like to apologize if it's too simple of a question as i am an ABAP person and have no knowledge in DMS. And there is no DMS consultant whom i can approach.
    Thanking in advance.
    Regards,
    Saud

    ...distribution should happen, irrespective of document number...
    This wouldn't be feasible because documents are identified in the recipient list by both,the document number and document type and hence are mandatory inputs.
    Regards,
    Pradeepkumar Haragoldavar

  • How to create a spool job for adobe form without dialog

    Hi All,
    I have a requirement like below.
    I need to generate a spool for Adobe form output and that sholud be without print parameters dialog popup.
    What are the parameters i need to pass to the FP_JOB_OPEN function module.
    Solutions will be appriciated.
    Thanks in advance

    hi,
    I think the following document will help you....
    http://help.sap.com/saphelp_nw04s/helpdata/en/48/8144ad5999426facb9b77bf0c1e868/frameset.htm
    Thanks and Regards
    shanto alooor

  • Not able to create a Task List for Charm Retrofit

    Hi All,
    we are trying to implement retrofit for our client. Created two projects one for implementation and one id maintenance and defined the system landscape for both.
    I have checked the RFC connection for all the systems involved and all works fine. IMG projects are created successfully for both.
    Problem comes when we are creating a maintanance cycle or task list after activating the change request management. We always get a logon screen after giving the name of task list and press ok. First we thought it could be the trusted RFC issue but trusted RFC for the current user is working fine.
    Could anyone know what is the problem and if you faced the same issue pls share your experience what all did you try to rectify it.
    Thanks
    Tripti

    Hi,
    BC sets are active. I have already checked, it ended up in warning but its general we can avoid it. One thing which we found out was thi error when I am checking the application log for the project
    System cancel RFC destination SM_GTDCLNT020_TMW, Call TMW_SET_PROJECT_SWITCHES: No authorization to change file /usr/sap/gttrans/a ctlog/GTDZP000XX.GTD
    I don't understand what exactly is this error about but informed the authorization team regarding this.
    Any idea?
    Thanks,
    Tripti

Maybe you are looking for

  • Error in JMS channel

    Hi ALL, I am getting the below error in Communication channel monitoring short log of JMS channel. "Cannot connect because class 'com.ibm.mq.jms.MQQueueConnectionFactory' is missing; ensure that JMS provider library 'aii_af_jmsproviderlib.sda' contai

  • Queue based printing stopped after 6.5 upgrade

    I had several print queues sitting on vol1 of a server, and after I upgraded the server from Netware 6.0 to Netware 6.5 we lost access to them. Now when I try to do a capture to that printer queue, I can click on browse and find the queue, but when I

  • Email distribution lists?

    I have made 'cards' in my contacts which makes it easy to find individuals to email, but how do I create a set of contacts as a group to email altogether without having to add each one to the address bar? Thank you. Dan

  • IMessages send button has disappeared in 10.8.2 ?!!

    I just upgraded to 10.8.2 and went to try the updated iMessages but I can't send anything as the send button has vanished! I quit the app and reloaded but still not there. Also tried a system restart but that has not fixed it. Any ideas?? Is anyone e

  • HELP...downloading the v 5.0 software

    Ok I got a message on my phone saying there was an update.  Great ...I'm game.  I go to the update section and follow the instructions.  Well My update is at Task in Progress (3 of 5) and it keeps trying to reconnect to the JVM(?) and then it through