ALV grid to list processing and GUI status

Hi,
In a customized program the report output is in ALV grid which is interactive. On selecting a record and pressing SAVE button a BAPI runs in background. In order to display BAPI error message the leave to list-processing has been used. But GUI status is not working in list display and can not exit or go back from here to main selection screen.
when try to see program name & screen no it displays
Program - SAPLKKBL
Menu - STANDARD_FULLSCREEN
pls advise how to go back from list to main screen or ALV output.
thanks
anya

Hi Anya,
As per my understanding, this is your prog flow:
*Main ALV Display.
*Select record.
*Click on Button SAVE.
*Handle Event.
*Call BAPI for processing based on selection.
Now at this point why dont you colect the error messages from the BAPI, and display it in a POP-UP ALV display?
You need not e very much worried about the PF status and all. Also this POP-UP will be placed on the MAIN ALV. So when you close the POP-UP it will come back to the main ALV.
By this when you press the BACK button of the main ALV, it will take you back to the selection scree.
Please let me know if i am missing something.
ags

Similar Messages

  • List processing and PF status.

    Hi Team ABAP,
    i got a problem in List processing.
    I´m in a dypro with a table control on it. Users can mark one or more ALV lines and then e.G. press "process".
    Something gets done then (some forms get printed), and after that i want to display a protocol.
    First i tried to process a simple write list by using WRITE statement.
    Coding got processed, but it had no effect, no write list was generated, or at least not shown on my screen.
    So i tried to code a "LEAVE TO LIST PROCESSING" right before my first WRITE statement.
    Well, now it works my write list is on Screen. But here start the Problem. Like i got told in the ducomentation of the LEAVE TO LIST PROCESSING statement the WRITE list gets processed with the actual active PF status from the dynpro where i came from.
    1. This is quite uncool, since i do not need those Buttons in my List.
    2. Even if it was ok, those buttons are not working. Typing /h in OK_CODE field and pressing ENTER doesnt help it. When after that i click a button, nothing happens, such as if i didnt click them.
    I searched the forum, but i got drowned in thousands of "interactive list" threads and wasnt able to find my required info in an acceptable time of 30 minutes.
    Did i do a essential error? Someone got an Idea where i´m stuck or a proposal on how to improve?
    Any Help or tip will be welcome and rewared accordingly.
    regards

    Hi Florian,
    Try if you can display the list in ALV where you can maintain the pf-status.
    You can check the demo program  DEMO_LEAVE_TO_LIST_PROCESSING. In this, it is setting set pf-status to space.
    Hope it helps.
    Sujay

  • Problem facing in ALV to List processing and back to ALV

    HI all,
    In ALV USER_COMMAND i have inserted statement 'LEAVE TO LIST-PROCESSING'. I want to display records on List processor (Classical report) which are selected from ALV.
    Due to LEAVE TO LIST-PROCESSING i can see Classical report but from here i am not able to come back on ALV screen...even not on any screen because BACK button on GUI-Status is not working.
    From List Status i can see same GUI status which i gave to ALV.
    also i have tried giving LEAVE LIST PROCESSING but due to this though i get ALV back but i cant get List display.
    Please direct how to move.
    thanks,

    hello~ try this
    FORM alv_user_command  USING r_ucomm LIKE sy-ucomm
                                 rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN 'ELOG'.
          call screen 100.
      ENDCASE.
      rs_selfield-refresh = 'X'.
    ENDFORM.
    screen 100 just need PBO Module
    module LOG_DISPLAY output.
      SET PF-STATUS space.
      WRITE: / 'HELLO'.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      LEAVE SCREEN.
    endmodule.

  • Problem with leave to list-processing and return to screen

    Hi all,
    I am designing a screen in which I have provided a pushbutton which will allow the user to upload (via BDC) the price list to VK11 transaction. And consequently, after upload the BDC message will be captured and displayed as an ALV list. for this, I am using leave to list-processing and return to screen 100 statement.
    My problem is, when I return from the alv list screen by pressing back/any button the called screen 100 is displayed as a dialog window. but actually the screen 100 is a normal screen.
    How can I rectify this problem?
    Thanks,
    Rajan

    rajan,
    i think the below link will clear your problem.
    [http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9d2f35c111d1829f0000e829fbfe/frameset.htm]
    Regards,
    Venkat

  • ALV grid oo delete rows and update to table

    Hi all
      How can I delete one row and update to the db table?
    thanks

    Hi,
    Refer:-
    The ALV Grid has events data_changed and data_changed_finished. The former method is
    triggered just after the change at an editable field is perceived. Here you can make checks for
    the input. And the second event is triggered after the change is committed.
    You can select the way how the control perceives data changes by using the method
    register_edit_event. You have two choices:
    1. After return key is pressed: To select this way, to the parameter i_event_id pass cl_gui_alv_grid=>mc_evt_enter.
    2. After the field is modified and the cursor is moved to another field: For this, pass cl_gui_alv_grid=>mc_evt_modifies to the same parameter.
    To make events controlling data changes be triggered, you must select either way by
    calling this method. Otherwise, these events will not be triggered.
    To control field data changes, ALV Grid uses an instance of the class
    CL_ALV_CHANGED_DATA_PROTOCOL and passes this via the event data_changed.
    Using methods of this class, you can get and modify cell values and produce error messages.
    Hope this helps you.
    Regards,
    Tarun

  • Leave to list processing and retun to scren 100

    Once output is generated in the list i want back to main screen .
    How i will prceed
    regards
    jithen

    This will end up current calling sequence (will proceed after CALL SCREEN XXX statement). So if no other CALLs were found the program will be finished, or will go back in selection screen.
    LEAVE to LIST-PROCESSING and RETURN TO SCREEN 0. 
    This will go back to screen XXX, if main screen is 200.
    LEAVE to LIST-PROCESSING and RETURN TO SCREEN 200.  "when you choose BACK, screen 200 will be called (main screen)
    Regards
    Marcin

  • List box in alv grid control  through slis and reuse_alv grid_display metho

    hello,
    i want to display list box in one column of alv by slis method.can u suggest me how to do it?
    neon

    Hi,
    plz check below code :
    TYPE-POOLS : slis.
    *data declarations for ALV container,ALV grid, Fieldcatalogues & layout
    DATA: 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,
          gs_layout TYPE lvc_s_layo.
    *INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    *initialisation event
    INITIALIZATION.
    *Start of selection event
    START-OF-SELECTION.
    *Call to ALV
      CALL SCREEN 600.
    *On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
    set pf-status 'xxx'.
    set titlebar 'MAIN100'.
    Subroutine to display the output in alv
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
    PAI module of the screen created. In case we use an interactive ALV or
    *for additional functionalities we can create OK codes and
    based on the user command we can do the coding.
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
      DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'SLART'.
    *drdn-hndl = '1' is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    *drdn-hndl = '2' is the second list box
          WHEN 'ABART'.
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .
    *Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.
    ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.
    *Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Primary school'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Lower Secondary'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Upper Secondary'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Professional School'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 College'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 University'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Establishment'.
      APPEND ls_dropdown TO lt_dropdown.
    Second ABART listbox (handle '2').
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '10 Primary School certificate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '20 Lower secondary/Junior high'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '30 High school diploma(B-levels)'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '31 Vocational'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '32 Matriculation'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '40 Specialist vocational certificate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '50 College degree Level1'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '51 College degree Level2'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '52 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '60 Univ Degree level1'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '61 Bachelors degree'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '62 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '63 Licenciate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '64 Doctors Degree Ph.D'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '89 None'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '90 Unknown'.
      APPEND ls_dropdown TO lt_dropdown.
    *method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.
    ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .
      gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.
    ENDFORM.                    " build_layout
    reference : wiki.

  • Report program with detail list and GUI status.

    Hi,
    I am working on type 1 program (report) and want to use detail lists.
    I want to use a GUI status and want to use AT LINE-SELECTION. But AT LINE-SELECTION does not work when I use a GUI status.
    How do I achieve this?
    Thanks.

    Hi
    In the secondary windows, it is not possible to have GUI Status.
    If you need like that, you should go for ALV Reports.
    Here, You can have GUI Status only in the selection-screen as below..
    REPORT  zak014  LINE-SIZE 60 LINE-COUNT 20(2).
    TABLES: sscrfields.
    * Appliction Tool Bar Elements
    SELECTION-SCREEN FUNCTION KEY 1.
    SELECTION-SCREEN FUNCTION KEY 2.
    * Selection Screen
    PARAMETERS: matnr TYPE matnr.
    INITIALIZATION.
      sscrfields-functxt_01 = 'TEST1'.
      sscrfields-functxt_02 = 'TEST2'.
    START-OF-SELECTION.
      WRITE:/20 'CLICK HERE TO NAVIGATE'.
    AT LINE-SELECTION.
      WINDOW STARTING AT 5  5
             ENDING   AT 50 18.
      CASE sy-lsind.
        WHEN 1.
          WRITE:/ 'This is First window'.
        WHEN 2.
          WRITE:/ 'This is second'.
      ENDCASE.
    TOP-OF-PAGE.
      WRITE:/5 'LINE SELECTION'.

  • Alv grid - call transaction 'ME22N' and reflect the change made in alv grid

    Hi,
    <u>Scenario</u>
    I have an alv list which has fields Purchase document no. (EBELN) and Item delivery date (EINDT). EBELN field is hot spot enabled. when i click on that transaction 'ME22' is called. I have done this using USER_COMMAND subroutine.the code is given.
          FORM USER_COMMAND                                             *
    Call transaction ME22N on clicking Document number                 *
    FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
                    I_SELFIELD TYPE SLIS_SELFIELD.
      DATA: F_SUBRC LIKE SY-SUBRC,
            s_arseg like G_T_PORD. "the internal table used is G_T_PORD
      CASE F_UCOMM.
        WHEN '&IC1'.
          IF i_selfield-fieldname = 'EBELN'.
            READ TABLE G_T_PORD INDEX i_selfield-tabindex INTO s_arseg.
            SET PARAMETER ID 'BES' FIELD s_arseg-ebeln.
            CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    endform.
    <u>Requirement</u>
    After calling the transaction, If the user changes the Item delivery date (EINDT) at the ME22 transaction screen, the new date needs to be reflected in the ALV grid.
    Plz help it is very urgent.

    The first method (using selfield-refresh = 'X'.) didn't work as the internal table doesnt get modified when the user make changes in Item delivery date(EINDT) at ME22 transaction screen. The 2nd method is OO,which can't be used in my case.
    I tried calling the subroutine for populating the itab (G_T_PORD) and the subroutine for displaying the alv grid immediately after calling ME22N transaction. Still it is not reflecting the new date in the output alv. The code is given below.
          FORM USER_COMMAND                                             *
    Call transaction ME22N on clicking Document number                 *
    FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
                    I_SELFIELD TYPE SLIS_SELFIELD.
      DATA: F_SUBRC LIKE SY-SUBRC,
            s_arseg like G_T_PORD.
      CASE F_UCOMM.
        WHEN '&IC1'.
          IF i_selfield-fieldname = 'EBELN'.
            READ TABLE G_T_PORD INDEX i_selfield-tabindex INTO s_arseg.
            SET PARAMETER ID 'BES' FIELD s_arseg-ebeln.
            CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
            refresh G_T_PORD.
            perform F1000_POPULATE_PO.
            perform F2000_DISPLAY_PO .
    endform.

  • Runtime Error during export ALV Grid to Local File and Print Priview

    Hi all,
             While Exporting ALV grid to local file using menu List->export->local file , I m getting following runtime error,
             Field Symbol has not yet been assigned.
    Details of Errors:
    Program : SAPLKKBL
    Include :   LKKBLF99
    Module Type : (FORM)
    module name : GEN_FIELD_OUT2
    So. pls Suggest any good solution.
    Thanks & Regards,
    Sandip Sonar.

    hi
    this is happening just because you might have declared that your ALV list should have a checkbox, but defined no field as "checkbox" into your internal table.
    and one more thing to check up is that before you call the REUSE_ALV_GRID_DISPLAY, you need to fill a few parameters for instance is_layout. This one has a field box_fieldname, in which you have to enter the name of the field of the internal table that will store the 'X' as and when the checkbox is checked.
    hope this helps
    regards
    Aakash Banga

  • ALV Grid -- Heading in each and every page while printing

    Hello!!!!
    How to display heading in ALV Grid in each and every page while printing?
    Thanks in Advance!!!!!!

    Hi nitesh,
    <b>data: lt_list_commentary type slis_t_listheader.
    perform build_comment using
    lt_list_commentary.
    form build_comment using
    pt_list_commentary type slis_t_listheader.
    data: ls_line type slis_listheader.
    clear ls_line.
    ls_line-typ = 'H'.
    ls_line-info = 'SREEKANTH REDDY'.
    append ls_line to pt_list_commentary.
    clear ls_line.
    ls_line-typ = 'H'.
    ls_line-info = 'HEADER1'.
    append ls_line to pt_list_commentary.
    clear ls_line.
    ls_line-typ = 'H'.
    ls_line-info = 'HEADER2TEXT'.
    append ls_line to pt_list_commentary.
    clear ls_line.
    endform.
    </b>In Function module REUSE_ALV_COMMENTARY_WRITE , give the parameter as
    <b>it_list_commentary = lt_list_commentary </b>
    Here ls_line-typ = 'H'. you can use options like 'H' , 'A' , 'S'.

  • Regarding module pool programming,reports and gui status

    hi,
       I have created a mpp program in which i called a report using the SUBMIT statement.In the Report i have used Gui status for BACK.When i execute the MPP and press BACK it should call a another screen of the MPP,but it leaves to the program i.e., it comes out.
    example,
    case sy-ucomm.
    When 'BACK'.
    CALL SCREEN 0002.
    endcase.
    This is what i have used in my report program.
    Please help me,
    Thanks in advance,
    Aruna

    Hi.
    Change the name BACK because it is standard FCode.
    Try Changing the Fcode.
    Awrd Points if useful
    Bhupal

  • Can ALV Grid show credit limit and excess credit limit but do not sum them?

    Can ALV Grid show 100,000.00(in ???1) and 84,260.94(???2). Not sum them up.
    Credit limit, Inv. Curr, Inv. Amount, Amt in LC, Excess Credit Limit
    100,000.00     USD     1,594.20     5,260.86     84,260.94
    100,000.00     USD     263.84     870.67     84,260.94
    100,000.00     USD     1,935.60     6,270.38     84,260.94
    100,000.00     USD     806.70     2,613.30     84,260.94
    100,000.00     USD     214.98     696.43     84,260.94
    100,000.00     USD     8.50     27.42     84,260.94
    ???1     USD     4,823.82     15,739.06     ???2     
    USD     4,823.82     15,739.06

    Hi Sandeep,
    Please refer to the bold figure as they are the credit limit and excess credit limit for 1 vendor.
    It is not right if sum the credit limit and excess credit limit.
    Is it ALV cant handle this type of requirement?
    Is there any way to solve this?
    Credit limit, Inv. Curr, Inv. Amount, Amt in LC, Excess Credit Limit
    100,000.00 USD 1,594.20 5,260.86 84,260.94
    100,000.00 USD 263.84 870.67 84,260.94
    100,000.00 USD 1,935.60 6,270.38 84,260.94
    100,000.00 USD 806.70 2,613.30 84,260.94
    100,000.00 USD 214.98 696.43 84,260.94
    100,000.00 USD 8.50 27.42 84,260.94
    100,000.00 USD 4,823.82 15,739.06 84,260.94 <--subtotal line
    USD 4,823.82 15,739.06 <-- total line
    Edited by: Check Chuan Kuan on Feb 24, 2011 10:03 AM

  • ALV grid refresh while fcat and internal table change

    Hi,
       I am displaying an ALV output using OOPS ALV grid. It is displaying data from internal table t1.
    Later I am changing fieldcat table content and I want to display with internal table t2. how can I do this.
    It is not refreshing the fieldcat values in the ALV.
    Which method I should call to refresh the ALV.
    Thanks and regards,
    Venkat.

    hi,
    to refresh the alv display.
    you can use the method refresh_table_display
    of the class cl_gui_alv_grid.
    regards.

  • Processing and Released Status when we create a new Condition table

    Hi all
    I created a new condition table in M/03, and assigned one field to it, Generated and saved. Then added the condition table in the access sequence. There appeared two more lines below the field that i have assigned. One is Processing status and the other is released status, both are having green lights. what are these and what is its impact.
    inputs will be highly appreciated
    thanks

    I myself could find the answer

Maybe you are looking for