How to refresh an ALV (CL_SALV_TABLE) after a  parallel process

Hello all,
I have created a list using CL_SALV_TABLE. When you click on a line, a new mode must be opened. There, the user will fill in some data that must be retrieved and shown in the main list when the user closes the new mode. To do so Iu2019ve used u201CCALL FUNCTION func STARTING NEW TASK task CALLING meth ON END OF TASKu201D statement.
Iu2019ve tried to refresh the list within meth (called on end of task) but it doesn't work. I've also tried to get all the data again, but it prompts a short dump, set a new ok code using method cl_gui_cfw=>set_new_ok_code, even a WAIT until process is finished (not valid because I need process 1 active all the timeu2026)
SAP help says u201CThe SET USER-COMMAND u2018OKCDu2019 statement replaces the REFRESH SCREEN commandu201D
CALL FUNCTION 'function'
    STARTING NEW TASK w_taskname
    PERFORMING end_of_creation ON END OF TASK
    EXPORTING
       i_zzta         = ztztl_zzta
       i_manual_order = space
    EXCEPTIONS
       communication_failure = 1 MESSAGE w_msg
       system_failure        = 2 MESSAGE w_msg.
[u2026]
FORM end_of_creation USING p_taskname.
  RECEIVE RESULTS FROM FUNCTION 'function'
     IMPORTING
        e_zzta         = ztztl_zzta
     EXCEPTIONS
        communication_failure = 1 MESSAGE w_msg
        system_failure        = 2 MESSAGE w_msg.
  [Modify list]
  SET USER-COMMAND 'OKCD'. 
[u2026]
AT USER-COMMAND.
 CASE sy-ucomm.
    WHEN 'OKCD'.  
     Perform get_data.  
How can I have the same behaviour when using CL_SALV_TABLE??
Thanks in advance!

Hello Matt,<br><br>
does not work means that if I write the following within method ON END OF TASK, the report is not refreshed.
<br><br>
<pre>
o_alv->refresh( ).
</pre><br><br>
I've also tried:
<br><br>
<pre>
o_alv->refresh( ).
o_alv->display( ).
data: o_alv TYPE REF TO cl_salv_table</pre><br><br>
<pre>Short dump: RPERF_ILLEGAL_STATEMENT
Error analysis                                                                               
There is probably an error in the program                                                    
    "SAPLSLVC_FULLSCREEN".                                                                       
    The program was probably called in a conversion exit                                         
    or in a field exit. These are implemented by                                                 
    function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or                                
    USER_EXIT_xxxxx_INPUT.                                                                       
    Conversion exits are triggered during screen field transports or                             
    WRITE statements, field exits during field transports from the                               
    screen to the ABAP/4 program.                                                                
    In this connection, the following ABAP/4 statements are not allowed:                                                                               
-  CALL SCREEN                                                                               
-  CALL DIALOG                                                                               
-  CALL TRANSACTION                                                                               
-  SUBMIT                                                                               
-  MESSAGE W... and MESSAGE I...                                                             
    -  COMMIT WORK, ROLLBACK WORK                                                                
    -  COMMUNICATION RECEIVE                                                                     
    -  STOP                                                                               
-  REJECT                                                                               
-  EXIT FROM STEP-LOOP                                                                               
Moreover, conversion exits for output conversion                                             
    (implemented by function modules called                                                      
    CONVERSION_EXIT_xxxxx_OUTPUT) do not allow                                                                               
-  MESSAGE E...                                                                               
to be used.
Trigger Location of Runtime Error                                                                
    Program                                 SAPLSLVC_FULLSCREEN                                  
    Include                                 LSLVC_FULLSCREENU01                                  
    Row                                     187                                                  
    Module type                             (FUNCTION)                                           
    Module Name                             REUSE_ALV_GRID_DISPLAY</pre><br><br>
But this short dump is expected since CALL FUNCTION - STARTING NEW TASK help says u201CIn the callback routine, you are not allowed to execute statements that interrupt the program execution or terminate a SAP LUW. Statements for list output are not executed.u201D<br><br>
Thanks Matt, I'll take a look at that forum, but I also tried a self list refresh using a timer and that prompted another short dump: LIST_TOO_MANY_LPROS -> "Error analysis: At present, the maximum permitted number of nested screen levels is restricted to 50." <br><br>
If I find a solution I'll let you know.<br><br>
<br><br>
Thank you!!
Edited by: Matt on Aug 26, 2009 1:16 PM

Similar Messages

  • How to refresh the ALV Tree

    Hi,
    I have an ALV Tree report developed using the OOPS. In my ALV Tree output, I have some buttons which will update the database after clicking. The data is correctly updating in the database. But, it is not getting updated in the ALV Tree display. That means, it is not REFRESHing the ALV Tree display. We have to again execute the program in order to see the updated output.
    Could anyone please suggest me how to Refresh the ALV Tree display..?
    We can't use the method 'REFRESH_TABLE_DISPLAY' as it is a PRIVATE method is the class CL_GUI_ALV_TREE.
    Please share your valuable thoughts.
    Thanks & Regards,
    Paddu.

    Hi paddu.
    please check out the link mentioned below,this will help u.
    How to Refresh data on ALV tree
    Regards
    Theres

  • How to change async to sync after deploying the process.? Thanks

    How to change async to sync after deploying the process.? Thanks

    you'd need to change the base wsdl, the generated one (_Name.wsdl) and the bpel.file .. and remove the generated classes .. (all in domains/you_domain/tmp/your_process dir)
    the wsdl needs to get the output msg to the input msg instead of a callback porttype, the same needs to be in the generated wsdl (don't forget to remove the callback role in plnk session).. and the bpel process needs to have a reply instead of the invoke ..
    this is what you would need to do .. BUT, maybe we can find a better solution for you, if you elaborate on the usecase..
    during design time this is easier :-)
    regards clemens

  • How to refresh the ALV Control

    Hi Experts,
    I have a selection screen and ALV control in webdydnpro report. If i enter valid input values in the selection screen the ALV contol is diplaying datas correctly but when i enter invalid data in the selection screen the ALV table control values still diplaying in the previous datas. I need to Refresh the ALV contol values once the incorrect data enter in the selection screen. How can i REFRESH the ALV control in Webdynpro report. I have Refreh button in the Selection screen when you press REFRESH button the ALV table control data should be initilize  Kindly help me out this issue.
    Thanks ,
    Kumar

    Hi.
    You have a selection screen where user can enter some data, with this data you
    perform a selection and then you bind the result to the ALV, right?
    Question is how you bind the result to ALV? Do you use external context mapping
    or the set_data method ?
    So I guess you have a method where you validate the select options and if they
    are correct you perform the selction and bind the result to the node for the ALV. If
    the select options are incorrect you just need to get the node for the ALV (which contains the
    previous result )and call the invalidate method on that node which deletes all
    elements of this node and after that the ALV should be empty again.

  • How can we monitor the audio after the cleanup process before we actually record the trans

    I have the Sound Blaster Audigy 2 ZS board and I am using it to transfer vinyl records to make CDs. Before my upgrading of Creative Media Source 2 to Creative Media Source 5, I was able to monitor the audio after the cleanup prior to the transfering process. Now I can only monitor the sound at the line input point and not after the cleanup process. Is there any way that we can do that?Vinylrecord

    Assuming you mean Actions when you say "Batches", use this menu...
    1.  Click on the name of the actions set you wish to save.
    2.  Click the fly-out menu icon at the upper-right corner.
    3.  Save Actions, put them someplace on your hard drive other than in the Photoshop installation area.
    -Noel

  • How to get BI background jobs to utilize parallel processing

    Each step in our BI process chains creates exactly 1 active batch job (SM37) with in turn utilizes only 1 background process (SM50).
    How do we get the active BI batch job to use more than 1 background process similar to parallel processing (RZ20) in an ERP system?

    Hi there,
    Have you checked the number of background and parallel processes. Take a look in SAP Note 621400 - Number of required BTC processes for process chains. This may be helpful ...                                                                               
    Minimum (with this setting, the chain runs more or less serially):        
    Number of parallel SubChains at the widest part of the chains + 1.        
    Recommended:                                                              
    Number of parallel processes at the widest part of the chain + 1.         
    Optimal:                                                                  
    Number of parallel processes at the widest part of the chain + number of  
    parallel SubChains at the widest part + 1.                               
    The optimal settings just avoids a delay if several SubChains are         
    started in parallel at the same time. In case of such a Process Chain     
    implementation and using the recommended number of background processes   
    there can be a short delay at the start of each SubChain (depends on the  
    frequency of the background scheduler, in general ~1 minute only).                                                                               
    Attention: Note that a higher degree of parallel processing and           
    therefore more batch processes only make sense if the system has          
    sufficient hardware capacity.                                                                               
    I hope this helps or it may lead you to further checks to make .
    Cheers,
    Karen

  • How to refresh the page/table after completion of taskflow in popup

    Hi,
    Scenario:
    In main page, having an emp-table and popup(which contains taskflow as region). In taskflow, iam modifying the emp-table data and after successfully completion of taskflow, want to refresh the emp-table present in the main page. How can we do this...?
    Note:
    (1) In Taskflow last activity is 'taskflow-return', where iam commiting all the data.After this i want to refresh the emp-table,(pop-up closes when it reaches last activity).
    (2) Tried PPR in bean code of main page, it refreshes, but before commiting.
    Something like, Refreshing the entire page either closing/hiding of popup, will help......?
    Regards.

    try with regionNavigationListener:
    public void myRegionNavigationListener(RegionNavigationEvent event) {
          String newViewId = event.getNewViewId();
          if (newViewId == null) { // null new view id indicates the taskflow has ended !
                refreshEmpTableSomehow();
    }As one alternative, take a look at my last message from this thread:
    Re: How to handle the "cancel" button and "close" icon of a popup ?
    Edited by: Cvele_new_account on Oct 5, 2012 12:19 AM

  • How to REFRESH Normal ALV..

    Hi Experts,
    I have Display normal ALV REPORT using 'REUSE_ALV_GRID_DISPLAY'.
    When Double Click on a Particular Field say EBELN I need to Modify the Text say TXZ01( In below Source Code I Cleared Text just for Example).
    Using u2018&IC1u2019 I modified in Internal Table, but it is not visible in the Screen.
    Can anyone Give Idea on This.
    TYPE-POOLS slis.
    DATA : it_ekpo TYPE STANDARD TABLE OF ekpo,
           it_fcat TYPE slis_t_fieldcat_alv.
    START-OF-SELECTION.
      SELECT * FROM ekpo INTO TABLE it_ekpo UP TO 10 ROWS.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'EKPO'
        CHANGING
          ct_fieldcat            = it_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = it_fcat
        TABLES
          t_outtab                = it_ekpo
        EXCEPTIONS
          program_error           = 1.
    *&      Form  USER_COMMAND
          text
         -->SLIS_SELFIELD  text
    FORM user_command USING command TYPE sy-ucomm
                            field   TYPE slis_selfield.
      FIELD-SYMBOLS <lfs_fcat>  TYPE ekpo.
      IF command EQ '&IC1'.
        IF  field-fieldname  EQ 'EBELN'.
          READ TABLE it_ekpo ASSIGNING <lfs_fcat> INDEX field-tabindex.
          IF sy-subrc EQ 0.
            CLEAR <lfs_fcat>-txz01.
          ENDIF.
          CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_REFRESH' .
        ENDIF.
      ENDIF.
    ENDFORM.            "USER_COMMAND
    Regards,
    Kumar

    Hi,
      Try like below:
    *& Form USER_COMMAND
    * text
    * -->SLIS_SELFIELD text
    FORM user_command USING command TYPE sy-ucomm
    field TYPE slis_selfield.
    FIELD-SYMBOLS <lfs_fcat> TYPE ekpo.
    IF command EQ '&IC1'.
    IF field-fieldname EQ 'EBELN'.
    READ TABLE it_ekpo ASSIGNING <lfs_fcat> INDEX field-tabindex.
    IF sy-subrc EQ 0.
    CLEAR <lfs_fcat>-txz01.
    ENDIF.
    ENDIF.
    ENDIF.
    field-refresh ' X'.                      <----Add this
    ENDFORM. "USER_COMMAND
    Regards,
    Himanshu

  • How to refresh after delete the records in ALV report ?

    Hi Friends,
    How to refresh after delete the records in ALV report.
    I am deleting records in ALV report .
    After successful delete the screen should refresh.
    u201C Deleted records should not appear in the screen u201C.
    Please guide me.
    Regards,
    Subash

    Hi subhash,
    FORM user_command USING r_ucomm LIKE sy-ucomm      rs_selfield TYPE slis_selfield.
    WHEN 'BACK'.
    Refresh the internal table from the ALV grid
          PERFORM update_alv_tab.
    ENDFORM.                    "user_command
    FORM update_alv_tab .
      DATA :  e_grid TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = e_grid.
      CALL METHOD e_grid->check_changed_data.
      "update_alv_tab
      CALL METHOD e_grid->refresh_table_display.
    ENDFORM.                    " UPDATE_ALV_TAB
    Then see in Debug mode is it updating or not..
    Please confirm .
    And please paste the code if you can.
    Regards.

  • How to save data in ztable after editing in alv report

    how to save data in ztable after editing in alv report?

    Hi,
        Please find the attachment below.This may be usefull to you.
         [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
    Regards,
    Ramakrishna Yella.

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • How to make field is editable in ALV  CL_SALV_TABLE only)

    Hi,
    How to make field is editable in ALV  CL_SALV_TABLE only)
    Any one has tried to make field si editable by using CL_SALV_TABLE class.
    *I know how to do it in REUSEALV function module and CL_GUI_ALV class.*_
    Please reply only if you riedin CL_SALV_TABLE class method.
    Regards
    Rajesh V
    Moderator message: not supported, please read class documentation and search for previous discussions.
    Edited by: Thomas Zloch on Mar 17, 2011 2:07 PM

    Hi Chad,
    Please refer the link,
    Edit field in alv
    Regards,
    Hema.
    Reward points if it is useful.

  • How to refresh an iterator with PPR set to none after task flow operation?

    Using JDev 11.1.2.1.0.
    Doing the sample here: http://www.gebs.ro/blog/oracle/oracle-adf-creating-an-addedit-bounded-task-flow-using-a-new-transaction/
    For this to work, you've got to set your page iterator/executable's ChangeEventPolicy to "none". Otherwise, you can't set the selected row correctly due to the iterator refreshing on commit.
    I'm trying to extend this example to include a Delete operation setup in the task flow. However, I can't figure out how to refresh the page's iterator to display the updated results. The Delete doesn't run in a dialog so it doesn't invoke the calling button's returnListener.
    Any ideas?
    Thanks,
    Will

    Thank you for your response.
    I'm trying to call the delete operation from a task flow. Once the delete occurs, the page should somehow call a refresh on the iterator displayed. However, since the iterator can not have PPR set, the refresh doesn't happen automatically. Additionally, since the delete doesn't happen as part of a dialog window, the returnListener for the calling button does not fire.

  • Refresh in alv report

    hi masters,
    i m working on alv report where i have to change the data. after changing the data i have to do the refresh for that i m using the method below
    wa_STBL-ROW = 'X'.
    wa_STBL-COL = 'X'.
    CALL METHOD grid_obj->refresh_table_display
        EXPORTING
             IS_STABLE      = wa_stbl
              I_SOFT_REFRESH = 'X '
    EXCEPTIONS
    finished = 1
    OTHERS = 2.
    but after executing this method its giving run time error saying that ' Access via 'NULL' object reference not possible.  You attempted to use a 'NULL' object reference (points to 'nothing') access a component (variable: "GRID_OBJ").'. can u plz help me where i m going wrong. and how to implement the refresh in alv report in details..
    thanks in advance.
    regards,
    vicky

    hi,
    when i clicked on refresh button it is going to pf-status after that as i shown in below code it goes to refresh_report. but in this 'form refresh_report'  it won't display the data. it goes into the infinite loop. within that form- endform. plz can u give me solution for this problem?
    set pf-status 'STANDARD_FULLSCREEN'.
      case sy-ucomm.
        when '&REFRESH'.
    perform refresh_report.
    endcase.
    form refresh_report .
      perform build_fieldcatlog.
      perform event_call.
      perform populate_event.
      perform data_retrieval.
      perform build_listheader using it_listheader.
      perform display_alv_report_fm.
    endform.                    " REFRESH_REPORT

  • How to create 2 ALV output lists in a single output?

    Hi guys...
    My clients requirement is to create 2 ALV output lists in a single output list.how can i do this?i mean which function module i can use for this requirement?please help me out...
    Regards..

    *& Report  ZLCL_ALV_INT_INVOICE                                        *
    REPORT  ZLCL_ALV_INT_INVOICE                    .
    DATA: O_CONT1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          O_CONT2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          O_GRID1 TYPE REF TO CL_GUI_ALV_GRID,
          O_GRID2 TYPE REF TO CL_GUI_ALV_GRID.
    DATA: IT_VBRK LIKE VBRK OCCURS 1 WITH HEADER LINE.
    DATA: IT_VBRP LIKE VBRP OCCURS 1 WITH HEADER LINE.
    DATA: WA_VBRK LIKE VBRK.
    *--Layout
    DATA: WA_LAYO TYPE LVC_S_LAYO.
          CLASS LCL_BILLING DEFINITION
    CLASS LCL_BILLING DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS: HANDLE_HOTSPOT_CLICK
                 FOR EVENT HOTSPOT_CLICK
                 OF CL_GUI_ALV_GRID
                 IMPORTING E_ROW_ID.
    ENDCLASS.                    "LCL_BILLING DEFINITION
          CLASS LCL_BILLING IMPLEMENTATION
    CLASS LCL_BILLING IMPLEMENTATION.
      METHOD HANDLE_HOTSPOT_CLICK.
        IF NOT E_ROW_ID IS INITIAL.
    *--Reading selected billing docno
          READ TABLE IT_VBRK INTO WA_VBRK INDEX E_ROW_ID-INDEX.
    *--GETTING BILLING DOC ITEMS
          REFRESH IT_VBRP.
          SELECT *
            FROM VBRP
            INTO TABLE IT_VBRP
            WHERE VBELN = WA_VBRK-VBELN.
          CALL SCREEN 200.
        ENDIF.
      ENDMETHOD.                    "HANDLE_HOTSPOT_CLICK
    ENDCLASS.                    "LCL_BILLING IMPLEMENTATION
    SELECT-OPTIONS: S_VBELN FOR IT_VBRK-VBELN.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      SET SCREEN 100.
    *&      Form  GET_DATA
          text
    FORM GET_DATA .
    *--billing header data
      SELECT *
        FROM VBRK
        INTO TABLE IT_VBRK
        WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'No Data Found'.
      ENDIF.
      EXIT.
    ENDFORM.                    " GET_DATA
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MENU'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          PERFORM EXIT_PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  PBO_100  OUTPUT
          text
    MODULE PBO_100 OUTPUT.
      IF O_CONT1 IS INITIAL.
        CREATE OBJECT O_CONT1
          EXPORTING
            CONTAINER_NAME              = 'VBRK_CONT'
          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 I000(Z00) WITH 'Error in container'.
          EXIT.
        ENDIF.
        CREATE OBJECT O_GRID1
          EXPORTING
             I_PARENT          = O_CONT1
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in Grid'.
          EXIT.
        ENDIF.
      ENDIF.
    *--Layout for 1st grid
      WA_LAYO-KEYHOT = 'X'.
      WA_LAYO-GRID_TITLE = 'Billing Document Header Data'.
      CALL METHOD O_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME              = 'VBRK'
          IS_LAYOUT                     = WA_LAYO
        CHANGING
          IT_OUTTAB                     = IT_VBRK[]
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in showing grid'.
        EXIT.
      ENDIF.
    *-Setting the focus on the grid
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL           = O_GRID1 "Grid control object
        EXCEPTIONS
          CNTL_ERROR        = 1
          CNTL_SYSTEM_ERROR = 2
          OTHERS            = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in setting focus'.
      ENDIF.
    *--Event handler registration
      SET HANDLER LCL_BILLING=>HANDLE_HOTSPOT_CLICK FOR O_GRID1.
    ENDMODULE.                 " PBO_100  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
          text
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'MENU'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
          text
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 100.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  PBO_200  OUTPUT
          text
    MODULE PBO_200 OUTPUT.
      IF O_CONT2 IS INITIAL.
        CREATE OBJECT O_CONT2
            EXPORTING
            CONTAINER_NAME              = 'VBRP_CONT'
        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 I000(Z00) WITH 'Error in container'.
          EXIT.
        ENDIF.
        CREATE OBJECT O_GRID2
          EXPORTING
            I_PARENT          = O_CONT2
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in grid linking'.
          EXIT.
        ENDIF.
        CALL METHOD O_GRID2->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
            I_STRUCTURE_NAME              = 'VBRP'
          CHANGING
            IT_OUTTAB                     = IT_VBRP[]
          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.
      ELSE.
    *--refreshing the alv grid with the latest content of the internal table
    *--which is linked
        CALL METHOD O_GRID2->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 1
            OTHERS   = 2.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in Refreshing gird'.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " PBO_200  OUTPUT
    *&      Form  EXIT_PROGRAM
          text
    FORM EXIT_PROGRAM .
    *--Deallocating the memory
      IF NOT O_CONT2 IS INITIAL.
        CALL METHOD O_CONT2->FREE
          EXCEPTIONS
            CNTL_ERROR        = 1
            CNTL_SYSTEM_ERROR = 2
            OTHERS            = 3.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
          EXIT.
        ENDIF.
        CLEAR: IT_VBRP,
               IT_VBRP[].
        FREE:  IT_VBRP,
               IT_VBRP[].
      ENDIF.
      IF NOT O_CONT1 IS INITIAL.
        CALL METHOD O_CONT1->FREE
          EXCEPTIONS
            CNTL_ERROR        = 1
            CNTL_SYSTEM_ERROR = 2
            OTHERS            = 3.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
          EXIT.
        ENDIF.
        CLEAR: IT_VBRK,
               IT_VBRK[].
        FREE:  IT_VBRK,
               IT_VBRK[].
      ENDIF.
    *--Cearing the buffered content
      CALL METHOD CL_GUI_CFW=>FLUSH
        EXCEPTIONS
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          OTHERS            = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in clearing Buffer'.
        EXIT.
      ENDIF.
      LEAVE PROGRAM.
    ENDFORM.                    " EXIT_PROGRAM
    SCREEN 100
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      MODULE PBO_100.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0100.
    SCREEN200
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0200.
      MODULE PBO_200.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0200.

Maybe you are looking for

  • How do you display multiple year reminders in Reminder Fox ?

    Appointments in Jan 2013 are not displayed unless you go to that year. I want to see Dec. 2012 & Jan 2013 in one panel.

  • I bought songs on iTunes but they dont show up on my library. Why?

    I need help so I don't waste money on a song that isn't working!!!

  • Revaluation and translation of assets  for FASB 52

    Hi, We are in ECC6.0. We have companies in China, US ,EURope. China . Exapmle the china Co code  is having local currency  and  the group currency is USD. Few accounts in China is maintained in USD . No parallel ledger. FASB 52 needs translation and

  • ICal Google Calendar Subscription not displaying

    Hi guys, I've recently added two different google calendars by creating subscriptions. Both calendars appeared to be added correctly as all of the calendar description is correct and they appear under the subscriptions bar. I can only view them on my

  • Forum Help

    Hi All If an ABAPer is having any query with him, he can post it into SDN forums and he will get useful information. in the same way if any person who is working in SAP-MM Functional side what are the forums available to post queries. if any of you k