Subscreen ALV reload

Hi,
I got a dynpro which contains a subscreen. The dynpro is called after a selection screen. In the dynpro, I add a couple of lines to the alv-table and refresh it - works fine.
Problem is if i leave the dynpro with the back button (leave to screen 0) and enter it again, the old alv-table is displayed, even the internal table in the background is empty?!
Does anyone know why this happens? Do I have to delete the alv instance in a certain way? A clear doesn't work here.
Thanks in advance!
Regards,
Tobi

Hi,
Clearing reference variable is not enough here, as corresponding proxy object still resides in frontend. You need to free that object before clearing alv ref.
r_alv->free( ).
clear r_alv.
Now each time you enter that screen recreate alv. New object will replace old one .
Regards
Marcin

Similar Messages

  • Classic dynpro with subscreens, alv oo, event triggerd multiple times

    Dear all,
    I've created a program using several subscreens displayed in 1 main screen.
    On 4 of those subscreens I've included an ALV using the ALV OM model.
    After navigating to several subscreens I trigger the event "on user command" in one of the ALV's.
    This event is then triggerd several times, depending on how much I have been navigating between the subscreens of the program.
    In the user command I eather do some database changes using several BAPI's. In the code I have made sure that the changes are executed only once, but the program slows down.
    I also use the event to navigate to transactions MM03 and CG02. These transactions are also called several times.
    How can I resolve this?
    Cheers,
    Luk

    Hi Adviat,
    Thanks for the hint.
    I created 4 objects for the 4 differenc ALV's all having the same name. When I use different names for each alv, the problem was solved.
    Luk

  • Checkbox gets disabled on custom screen

    Hi All ,
    I have a raise an error message on a custom screen which has an ALV grid display (OOPS ALV) .On top of the alv grid ,i have couple of checkboxes .
    I have to raise error message based on the grid display values.The problem is ,if i raise error message ,the checkboxes get disabled and i have to go back and execute again correcting the problem .Instead the user wants to be in the same screen and should be allowed to correct .I am not able to do this .Please help me how to make the checkboxes active to input again without going back ??
    thanks

    Build the screen with 2 sub screen areas. In the top subscreen area ( selection screen )
    , Have the 2 check boxes.
    You can use
    selection-screen begin of screen 800 as subscreen.
    Parameters : var1 TYPE c AS CHECKBOX,
                         var2 TYPE c AS CHECKBOX.
    selection-screen begin of screen 800 as subscreen.
    You can use At selection screen events to throw an error but still be in the screen without an issue.
    Have the ALV in the bottom subscreen area.
    In the PBO for the main screen,
    Call the subscreen 800 ( selection screen)
    Call the subscreen ALV .
    Hope it helps.
    Cheers
    Sujay

  • Edit a field in ALV tree in a subscreen of a module pool

    Hi
    I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool.  I used the edit = 'X' field in the fieldcatalog still it  is showing the field as display and not edit.
    Please help me to get the field as editable and save it to the database table.
    Please not this is ALV TREE
    Regards,
    Mozila

    Hi Mayank,
    Thanks for the reply
    I am using oops method.
    I tried making the field which is to be made editable  as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said  edit in layout object.
    I also went through the demo programs but these programs are not having editable fields.
    My code is as follows:
    IF tree4 IS INITIAL.
    * create container for alv-tree
      l_tree_container_name = 'TREE4'.
      CREATE OBJECT l_custom_container
        EXPORTING
          container_name              = l_tree_container_name
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
    * create tree control
      CREATE OBJECT tree4
        EXPORTING
          i_parent                    = l_custom_container
          i_node_selection_mode       = cl_gui_column_tree=>node_sel_mode_multiple
          i_item_selection            = 'X'
          i_no_html_header            = 'X'
          i_no_toolbar                = 'X'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7.
    * create hierarchy
      CALL METHOD tree4->set_table_for_first_display
        EXPORTING
          is_layout       = s_layo
        CHANGING
          it_sort         = it_sort
          it_outtab       = it_final
          it_fieldcatalog = it_fieldcat.
    ELSE.
      CALL METHOD tree4->refresh_table_display
        EXPORTING
          it_sort           = it_sort
        EXCEPTIONS
          program_error     = 1
          failed            = 2
          cntl_system_error = 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.
    endif.

  • Double click on the node,ALV tree, subscreen

    Hi,
    I have a small requirement in ALV Tree
    left side i get a tree and when i double click on one of it , i'm trying to display the subscreen. even though i am setting the paramaters to the screen but i'm unable to get those values in the subscreen.
    example
    Name        Description                                                subscreen 0101
    xyz           xyz desc (double click on this)                  name    = XYZ
    ABC         abs desc                                                      descrip = xyz desc
    This is what the requirement is:
    Please help me out with the solution.
    Bhavana

    Hi Bhavana,
    Register your double click event in the ALV Tree program. Then call the respective subscreen using sy-ucomm value.
    IF NOT r_ucomm IS INITIAL.
        CASE r_ucomm.
          WHEN '&F03'.
            SET SCREEN 100.
            LEAVE SCREEN.
    endif.
    Refer the below code for setting the registering the event.
      CALL METHOD tree->get_registered_events
        IMPORTING
          events = l_events_s.
      l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
      APPEND l_event TO l_events_s.
      CALL METHOD tree->set_registered_events
        EXPORTING
          events                    = l_events_s
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      CREATE OBJECT l_events_receiver.
      SET HANDLER l_events_receiver->handle_item_click FOR tree.
    CLASS lcl_events_receiver DEFINITION.                       "#EC *
      PUBLIC SECTION.
        METHODS:
        handle_item_click FOR EVENT item_double_click OF cl_gui_alv_tree
            IMPORTING node_key fieldname.
    ENDCLASS.                    "lcl_handle_events DEFINITION
    CLASS lcl_events_receiver IMPLEMENTATION.
      METHOD handle_item_click.
        PERFORM employee_data USING node_key fieldname.
        CALL SCREEN 300.
      ENDMETHOD.                    "HANDLE_ITEM_DOUBLE_CLICK
    ENDCLASS.                    "lcl_events_receiver IMPLEMENTATION
    Thanks.
    Ganesh R K
    Edited by: Ganesh.rk83 on Jun 23, 2011 11:21 AM

  • PAI is NOT trigger for ALV in subscreen

    Hi, All
    Currently, I am using ALV object to output ALV report in one SUBSCREEN.
    When I double-click, the PAI is not trigger. But just go into double-click event directly.
    However, If I use AVL function or object to output in NORMAL screen, PAI is trigger after double click.
    SY-UCOMM is like %_GC 920 3

    Hello Ocean
    The ALV grid is a special control in terms that all the events are already pre-registered at the control (method SET_REGISTERED_EVENTS). This means that as soon as you define an event handler method and SET HANDLER for the corresponding event your application can deal with this event.
    You can register all events of the ALV grid as application events (i.e. after any event handling PAI of the screen is triggered) at the CONSTRUCTOR method:
    I_APPL_EVENTS = 'X'
    However, I prefer to use method CL_GUI_CFW=>SET_NEW_OK_CODE because it offers more flexibility to me:
    Only those event where I need to trigger PAI after event handling are affected
    By setting a new ok-code I can trigger a specific logic at PAI
    Regards 
      Uwe

  • Alv grid display in subscreen

    Hi ,
           How can I display ALV grid display in subscreen area that is called in main screen .?
    Thanx in advance  .

    Hi Pallavi,
    Use these parameters in Alv Fm
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
    Hope this will help you.
    Regards,
    Vijay

  • ALV grid in Subscreen

    Hi all,
    I have a subscreen with ALV grid in module pool program.
    The main screen has two subscreens (one is header and other is items/reports)
    from the main screen, the ALV Grid subscreen can be called in two ways.
    1. from application tool bar (show report button) - ALV grid will be displayed in Items/Reports subscreen.
    2. In Items/Reports subscreen, while displaying items there is a requirement to display same ALV grid subscreen report on hotspot of particular item.
    ALV Grid in subscreen displaying only first come first serve for subscreen, if the subscreen called from application toolbar button then the ALV grid from items hotspot call not displaying and vice versa.
    Not sure where i am doing wrong, but if i free the container, alv and re-generate all the objects its working fine but user doesn't like the flickering display of conatiner when it re-generating.
    Any suggestions would help.
    Regards
    Syed

    Hi Aruna Kumara,
    Thanks for the reply.
    I have only one ALV grid instance.
    Process Flow from Application toolbar
    Main Screen: 100
    PBO:
    CALL SUBSCREEN C_REPORT INCLUDING SY_REPID '0300'.
    SUBSCREEN: 300
    PBO:
    IF CONTAINER IS NOT BOUND.
         CREATE Container.           with container name
         CREATE ALV_Grid.           passing container created
         BUILD FIELDCAT.
         CREATE EVENTS.
         CALL METHOD SET_DISPLAY_TABLE_FIRST.
    ELSE.
         REFRESH_TABLE_DISPLAY.
         FLUSH.     "tried with without flush too.
    ENDIF.
    Process Flow from Items:
    Items table is a subscreen 200 in main screen.
    When the desired item click thru hotspot, a Modal dialog screen 250 open with subscreen element.
    In event hotspot_click.
    CALL SCREEN 250 STARTING AT ...ENDING AT.
    PBO of 250:
    CALL SUBSCREEN C_REPORT INCLUDING SY-REPID '0300'.
    SubScreen 0300:
    PBO as describe above, as the container already bound next time it refreshes the table display. But i see a blank screen in Popup.
    Hope this helps.
    Regards
    Syed

  • ALV Grid Subscreen to Display Text

    Folks,
    I am really sorry I am creating a new thread for this because I can see it has been discussed a lot but I am finding it hard to clearly identify what needs to be done from all the posts.
    I have an ABAP with a selection screen, it runs and generates an ALV output, on that ALV output I have a column called COMMENT, in the column COMMENT there is a string of text which can be very large. Since I can not change the row height on the ALV grid I am going to implement a work-around where when the user double-clicks on the comment, it pops up a screen displaying the full text.
    I presume I need to call a subscreen to get this to happen but I can not see how to do this and any help would be greatly appreciated.
    Many Thanks,
    Colm
    P.S. Here is how I catch the double click.
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.           "#EC CALLED
      DATA: w_ans(1).
      CASE r_ucomm. "The users command
       WHEN '&IC1'.                       "Double Click
    *Doc drill down
          IF rs_selfield-fieldname = 'COMMENT'.
            READ TABLE gt_output INDEX rs_selfield-tabindex.
            IF sy-subrc = 0.
    *Call the screen here displaying the full note text
            ENDIF.

    I feel so foolish, I was trying to re-invent the wheel and didn't think before I asked. Apologies and Thanks.
    However, if for some reason I didn't want to use the POPUP_TEXT FM, is there a way I could have called the subscreen?
    Here is the code I used if anyone is interested:
    DATA: w_ans(1),
            lt_text TYPE TABLE OF trtab,
            ls_title TYPE c,
            crlf(2) TYPE c VALUE cl_abap_char_utilities=>cr_lf.
      CASE r_ucomm. "The users command
        WHEN '&IC1'.                       "Double Click
    *Doc drill down
          IF rs_selfield-fieldname = 'COMMENT'.
            READ TABLE gt_output INDEX rs_selfield-tabindex.
            IF sy-subrc = 0.
              SPLIT gt_output-comment AT crlf INTO TABLE lt_text.
              CALL FUNCTION 'LAW_SHOW_POPUP_WITH_TEXT'
                EXPORTING
                  titelbar                     = ls_title
                 line_size                    = 132
                TABLES
                  list_tab                     = lt_text.

  • ALV GRID  and Integrated ITS 7 (SAP GUI for HTML) - dissapears on reload

    Hi All,
    We have a custom report that uses an ALV grid to display information to the user. Within this grid, there are fields that are display only and fields that are editable. Also, the grid is wider than the screen's width. It works fine in ECC. It also worked fine when we were using ITS 6.4.
    We have recently upgraded to ITS 7. Now when we run the report using a Transaction iView (in EP 7) or the Webgui service (SAP GUI for HTML), if a field that is editable has focus when an event is triggered that reloads the grid, the screen becomes blank. So, you can click the Save button and the screen goes blank, also, there are date fields in the grid and if you choose a new date, the grid reloads and the screen becomes blank.
    We have found that when the screen is blank, you can use the "Page Up" button on your keyboard and the last few columns of the grid will appear. As if the entire grid has moved off-screen to the left.
    If you click onto a non-editable field and refresh or save, the grid returns to its normal state.
    We are on Basis Patch level 15.
    Does anyone have any ideas on how to fix this?
    Also, does anyone know of a standard SAP transaction we can call from the Webgui that would have a similar setup...with an ALV grid containing editable and non-editable fields? We would like to rule out any errors in the report itself. Since it worked before we upgraded and it works fine in ECC. This would be a really big help too.
    Thank you so much!
    -Kevin

    Hi,
    Thanks Raymond, I have seen Note 314568. I could not get the second link to work but I have looked at just about every Note in reference to Integrated ITS 7 and Tables or ALV Grids and there are very many, so it would appear that SAP has had a hard time with implementing this control, but I have not seen any instance that matches the problem we are having.
    Unfortunately, SAP will not investigate this unless we can provide a standard Transaction that exhibits the same behavior.
    If anyone knows of a standard SAP Transaction that displays an ALV Grid that is wider than the screen (requiring a horizontal scroll bar) and with editable and non-editable fields, that would be fantastic. If we can test against that, then we would know for sure if this is a problem with ITS / SAP GUI for HTML, or if there is an issue with this specific report.
    Thanks!
    -Kevin

  • ALV in subscreen that was defined inside of report (not SE51)

    Hello Gurus,
    I've one problem and I'm out of ideas. I've defined in code tapstrips like below
    SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
    SELECTION-SCREEN END OF SCREEN 102.
    SELECTION-SCREEN BEGIN OF SCREEN 0103 AS SUBSCREEN.
    SELECTION-SCREEN END OF SCREEN 0103.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK one FOR 25 LINES.
      SELECTION-SCREEN TAB (15) bl_corr USER-COMMAND ucomm1 DEFAULT SCREEN 102.
      SELECTION-SCREEN TAB (15) bl_addit USER-COMMAND ucomm2 DEFAULT SCREEN 103.
    SELECTION-SCREEN END OF BLOCK one.
    In screen 103 I would like to show ALV. How can I achive this? When I'm using code below nothing is being displayed. I think that problem lies in container. When I execute method IS_VALID of container I'm getting 0. When I'm passing empty parameter during creation of grid object (no conatiner) then I'm getting results on whole screen.
    INITIALIZATION.
    DATA: go_container1 TYPE REF TO cl_gui_docking_container,
           go_grid1 TYPE REF TO cl_gui_alv_grid,
           gs_fieldcatalog TYPE LVC_T_FCAT.
    CREATE OBJECT go_container1
      EXPORTING
        REPID                       = sy-repid
        DYNNR                       = '0103'
        NAME                        = 'CUSTOM_AREA'.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
        I_STRUCTURE_NAME             = '/VFE/JTO_SCI_RPL'
      CHANGING
        CT_FIELDCAT                  = gs_fieldcatalog.
    CREATE OBJECT go_grid1
        EXPORTING i_parent =  go_container1.
      CALL METHOD GO_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        CHANGING
          IT_OUTTAB                     = gt_replacment_lines
          IT_FIELDCATALOG               = gs_fieldcatalog.
    BR
    Marcin Cholewczuk

    HI,
    this is how i achived alv on tabstrip.
    REPORT  zreport_alv_tabstrip.
    TYPES:
      BEGIN OF type_s_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        seatsmax LIKE sflight-seatsmax,
        seatsocc LIKE sflight-seatsocc,
      END OF type_s_flight,
      BEGIN OF type_s_sbook,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        bookid   LIKE sbook-bookid,
      END OF type_s_sbook.
    CONSTANTS:
      BEGIN OF c_tab1,
        tab1 LIKE sy-ucomm VALUE 'TAB1_FC1',
        tab2 LIKE sy-ucomm VALUE 'TAB1_FC2',
      END OF c_tab1.
    CONTROLS:  tab1 TYPE TABSTRIP.
    DATA:
      t_flight TYPE TABLE OF type_s_flight,
      fs_flight LIKE LINE OF t_flight,
      t_book TYPE TABLE OF type_s_sbook,
      fs_book LIKE LINE OF t_book,
      c_container TYPE REF TO cl_gui_custom_container,
      c_container1 TYPE REF TO cl_gui_custom_container,
      grid TYPE REF TO cl_gui_alv_grid,
      grid1 TYPE REF TO cl_gui_alv_grid,
      t_fcat TYPE lvc_t_fcat,
      t_fcat1 TYPE lvc_t_fcat,
      fcat LIKE LINE OF t_fcat,
      fcat1 LIKE LINE OF t_fcat,
      gs_layout TYPE  lvc_s_layo,
      ok_code LIKE sy-ucomm,
      BEGIN OF g_tab1,
        subscreen   LIKE sy-dynnr,
        prog        LIKE sy-repid VALUE 'YH1494_ALV_TABSTRIP',
        pressed_tab LIKE sy-ucomm VALUE c_tab1-tab1,
      END OF g_tab1.
    SELECT carrid   connid   fldate   seatsmax    seatsocc  FROM sflight   INTO TABLE t_flight  UP TO 100 ROWS.
    SELECT carrid    connid   bookid  FROM sbook  INTO TABLE t_book UP TO 50 ROWS.
    gs_layout-sel_mode = 'D'.
    gs_layout-no_merging = 'X'.
    gs_layout-zebra = 'X'.
    fcat-fieldname = 'CARRID'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'CONNID'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'FLDATE'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'SEATSMAX'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'SEATSOCC'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat1-fieldname = 'CARRID'.
    fcat1-outputlen = 15.
    fcat1-ref_table = 'SBOOK'.
    fcat1-key_sel ='X'.
    APPEND fcat1 TO t_fcat1.
    fcat1-fieldname = 'CONNID'.
    fcat1-outputlen = 15.
    fcat1-ref_table = 'SFLIGHT'.
    fcat1-key_sel ='X'.
    APPEND fcat1 TO t_fcat1.
    fcat1-fieldname = 'BOOKID'.
    fcat1-outputlen = 15.
    fcat1-ref_table = 'SBOOK'.
    fcat1-key_sel ='X'.
    APPEND fcat1 TO t_fcat1.
    CALL SCREEN 100.
    MODULE tab1_active_tab_set OUTPUT.
      tab1-activetab = g_tab1-pressed_tab.
      CASE g_tab1-pressed_tab.
        WHEN c_tab1-tab1.
          g_tab1-subscreen = '0101'.
        WHEN c_tab1-tab2.
          g_tab1-subscreen = '0102'.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                    "TAB1_ACTIVE_TAB_SET OUTPUT
    MODULE tab1_active_tab_get INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN c_tab1-tab1.
          g_tab1-pressed_tab = c_tab1-tab1.
        WHEN c_tab1-tab2.
          g_tab1-pressed_tab = c_tab1-tab2.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                    "TAB1_ACTIVE_TAB_GET INPUT
    MODULE status_0110 OUTPUT.
      CREATE OBJECT c_container
        EXPORTING
          container_name              = 'C_CONTAINER'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CREATE OBJECT grid
        EXPORTING
          i_parent          = c_container
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init   = 2
          error_cntl_link   = 3
          error_dp_create   = 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.
      CALL METHOD grid->set_table_for_first_display
        EXPORTING
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = t_flight
          it_fieldcatalog               = t_fcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 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.
    ENDMODULE.                 " STATUS_0110  OUTPUT
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    MODULE status_0100 OUTPUT.
      SET PF-STATUS '100'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE status_0102 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      CREATE OBJECT c_container1
        EXPORTING
          container_name              = 'C_CONTAINER1'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CREATE OBJECT grid
        EXPORTING
          i_parent          = c_container1
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init   = 2
          error_cntl_link   = 3
          error_dp_create   = 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.
      CALL METHOD grid->set_table_for_first_display
        EXPORTING
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = t_book
          it_fieldcatalog               = t_fcat1
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 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.
    ENDMODULE.                 " STATUS_0102  OUTPUT
    Regards and Best wishes.

  • ALV grid on TABSTRIP- Subscreen

    Hi,
    How to display ALV grid screen on Tabstrip- Subscreen.
    Please send sample code.
    Thanks in advance.
    -Mohan

    Its not going to be different that what you do on a normal screen. I am assuming that you are using OO ALV control.
    Here you do this on the sub screen instead of the main screen. Take a look at my weblog.
    /people/ravikumar.allampallam/blog/2005/06/01/alv-reporting-using-controls--part-i
    regards,
    Ravi
    Note :Please close the thread if this resolves the issue

  • Placing ALV grid on subscreen-URGENT

    Hi,
    I have a selection screen in my report program. I have placed a custom container in the selection screen in which I have placed an ALV grid.
    Now my requirement is to place this ALV grid on a subscreen and define this subscreen in my selection screen.
    I have included the following code in my report and also created a new subscreen 0100.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK sub FOR 197 LINES,
                      END OF BLOCK sub.
    INITIALIZATION.
    sub-prog = sy-repid.
    sub-dynnr = 100.
    Please let me know how do I place the ALV grid on the subscreen.
    Thanks & Regards,
    Srilakshmi B

    Hi,
    1.goto se51.give the module pool name and scrren no.
      2.Select the custom container and give name only.
    3.use that name in the report.
    Regards,
    Shiva.

  • ALV grid in a Subscreen

    Hi,
    I have a problem with the display of a ALV grid in a subscreen. I am going to try to explain my problem and maybe somebody knows any solution.
    In a regular screen I have a subscreen that should show the ALV, I am following all the steps like callling the subscreen, creating the container for the ALV grid, ... but it doesn' show anything.
    I have tried some things to check if the calling of the subscreen works, so I just call any other subscreen and it works. Also I have tried to call two alv in the same screen using the custom control and it works.
    I have changed the subscreen into screen and I have added the status and so on and by itself it also works.
    Does anybody know what can be missing??
    Thanks very much

    Hmm, works fine for me. Below code a litte bit tweaked but working one. Try it:
    "ABAP program
    DATA: g_custom_container TYPE REF TO cl_gui_custom_container,
          g_alv_grid_ref TYPE REF TO cl_gui_alv_grid,
          gt_sflight TYPE sflight OCCURS 0.
    SELECT * FROM sflight INTO TABLE gt_sflight UP TO 10 ROWS.
    CALL SCREEN 0100.
    MODULE pbo_0200 OUTPUT.
      IF g_custom_container IS INITIAL.
        "create custom container
        CREATE OBJECT g_custom_container
           EXPORTING
             container_name              = 'CUSTOM_AREA'.
        CREATE OBJECT g_alv_grid_ref
            EXPORTING
               i_parent          =  g_custom_container.
        CALL METHOD g_alv_grid_ref->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SFLIGHT'
          CHANGING
            it_outtab        = gt_sflight.
      ELSE.
        CALL METHOD g_alv_grid_ref->refresh_table_display.
      ENDIF.
    ENDMODULE.                                                  "PBO_0200
    "Main screen 0100 - type normal
    "here on layout ensure subsreen area called SUB_AREA is placed
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN sub_area INCLUDING sy-repid '0200'.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_area.
    "Subscreen - type subscreen (please check that in attributes)
    "here custom control named CUSTOM_AREA was placed in layout
    PROCESS BEFORE OUTPUT.
       MODULE pbo_0200.
    Hope this helps
    Marcin

  • Call Subscreen in ALV

    Hi Experts,
    I have to call a subscreen MRP1 of MM03 with corresponding value on click of a materials number in my interactive ALV report.
    When we Open MM03 it askes for subscreen, if we select MRP1 it askes for Plant entry & then it opens the MRP1 subscreen, I need tht screen to be open on click of a material Number.
    DO anyone have any idea regarding this?
    Regards,
    Nik

    Hi Eswar,
    I used the CALL TRANSACTION & passed the paramenter matnr. But it is not skipping any screen. It shows th e1st screen of MM03 with the materials Number i am passing. Code is as below.
    IF rs_selfield-fieldname  = 'MATNR'.
        SET PARAMETER ID 'MAT' FIELD gt_final-MATNR.
        CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    It skipps the ALV screen only & give me the MM03 screen with the material Number.
    I dont want MM03 screen I want the subscreen MRP1, which comes after selecting MRP1 & passing the plant in MM03 for a material.
    I tried the BDC code you had given. as it was for MM03 only I did a BDC for MM03 by passing plant also.
    I added the code in my report But it askes for me to pass OK code, means says to press enter when i am execution the report & clicking on the material. It opens MM03 with OK code pop up.
    Code is as below:
    IF rs_selfield-fieldname = 'MATNR'.
        SET PARAMETER ID 'MAT' FIELD gt_final-MATNR.
        GET PARAMETER ID 'MAT' FIELD p_matnr.
        Perform BDC_CALL_MRP1.
    FORM BDC_CALL_MRP1 .
    *START-OF-SELECTION.
      PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
      PERFORM bdc_field USING 'BDC_CURSOR' 'RMMG1-MATNR'.
      PERFORM bdc_field USING 'BDC_OKCODE' '=AUSW'.
      PERFORM bdc_field USING 'RMMG1-MATNR' p_matnr.
      PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
      PERFORM bdc_field USING 'BDC_CURSOR' 'MSICHTAUSW-DYTXT(09)'.
      PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
      PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(09)' 'X'.
      PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
      PERFORM bdc_field USING 'BDC_CURSOR' 'RMMG1-WERKS'.
      PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
      PERFORM bdc_field USING 'RMMG1-WERKS' 'BP22'.
      CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'
        EXPORTING
          material                  = p_matnr
          materialart               = 'ROH'
          selection                 = 'D' " --> MRP Data
          tcode                     = 'MM03'
        TABLES
          btci_d0070                = bdcdata1
        EXCEPTIONS
          material_not_found        = 1
          material_number_missing   = 2
          material_type_missing     = 3
          material_type_not_found   = 4
          no_active_dynpro_selected = 5
          no_authority              = 6
          OTHERS                    = 7.
      APPEND LINES OF bdcdata1 TO bdcdata.
      CALL TRANSACTION 'MM03' USING bdcdata MODE 'A'.
    CLEAR p_matnr.
    ENDFORM.                    " BDC_CALL_MRP1
    start new screen *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program = program.
      bdcdata-dynpro = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "prepare_attachment
    insert field *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "prepare_attachment
    Could you please tell me how to solve this problem. if i resolve this we can then call the MRP1 directly
    Regards,
    Nik

Maybe you are looking for

  • International Calling charges $2.50 per minute

    I used the *611 tool to add international calling to my plan. It was super easy but I've been financially assaulted with charges. Here's how things transpired: 1) Dialed *611 and stepped through the options, some via key strokes and verbal direction,

  • HTTP 1.1

    Hi all, I would want to know as I can make multiple transactions during a single persistent connection ( as it allows HTTP 1.1..). Now, I close and reopen every time the HttpConnection object and I apply every time a new command GET. I would want to

  • Inkjet Cartridge Warranty - HP DENIES CLAIM - HOW TO FILE A CLAIM?

    I have a genuine 75XL cartridge which is 50% full.  It no longer prints correctly, and cleaning has not helped in any way.   The date on the cartridge is 6 months in the future. The HP Web site states that the warranty is as follows: Ink Cartridges -

  • Skip mail signature for internal emails (same domain as me)?

    Is it possible to set up the signature in Apple Mail (3.5) to be attached to all email EXCEPT for those going to internal recipients -- those that use the same email domain as myself?

  • Trying to delete a clip makes iMovie glitch out.

    I selected a clip in the source window at the bottom and hit COMMAND-DELETE to get rid of it. The first time, it removed all of the UI elements from the iMovie window except for the preview window and the button for the camera. Everything else was gr