sapdev logo background
sapdev logo sapdev logo
Comments

Add already exists check!




Add check to pbo module to check if tree already exists, so it does not try and create it again!


*--------------------------------------------------------------*
***INCLUDE ZDEMO_ALVTREEO01 .
*--------------------------------------------------------------*
*&-------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&-------------------------------------------------------------*
*       text
*--------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STATUS1'.
*  SET TITLEBAR 'xxx'.

* If ALVtree already exists then it  mush not be re-created as this
* will cause a runtime error.
  IF gd_tree IS INITIAL.
*   Create ALVtree (must be performed within screen PBO module)
    PERFORM create_alvtree_container.
    PERFORM create_object_in_container.
    perform define_events.
    PERFORM create_alvtree_hierarchy.
  ENDIF.
  CALL METHOD cl_gui_cfw=>flush.

ENDMODULE.                 " STATUS_0100  OUTPUT





comments powered by Disqus