SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Demo: Hierarchy Graphics in Display Mode



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming -> Graphics
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Mon Nov 05, 2007 1:41 pm    Post subject: Demo: Hierarchy Graphics in Display Mode Reply with quote

Code:
PROGRAM HIER_BO1.

INCLUDE LCNETDAT.                      "allg. Datendeklarationen
INCLUDE LCNETCON.                      "Konstanten

* Erzeugen der Knoten
PERFORM MAKE_NODES TABLES HIER_NODES_TAB NVALS_TAB.

DO.
* Aufrufen der Hierarchiegrafik
  CALL FUNCTION 'CNET_GRAPHIC_HIERARCHY'
       EXPORTING
            STAT      = STAT
       IMPORTING
            M_TYP     = M_TYP
       TABLES
            CLUSTERS  = CLUSTERS_TAB
            CVALS     = CVALS_TAB
            DELETIONS = DELETE_TAB
            INODES    = INODES_TAB
            NODES     = HIER_NODES_TAB
            NVALS     = NVALS_TAB
            POSITIONS = POSITIONS_TAB.

  CASE M_TYP.
    WHEN NET_CONST-M_TYP_D.
      EXIT.
    WHEN NET_CONST-M_TYP_I.
      STAT = NET_CONST-STAT_4.
  ENDCASE.
ENDDO.

*---------------------------------------------------------------------*
*       FORM MAKE_NODES                                               *
*---------------------------------------------------------------------*
*       Erzeugen der Knoten                                           *
*---------------------------------------------------------------------*
*  -->  NODES                                                         *
*  -->  NVALS                                                         *
*---------------------------------------------------------------------*
FORM MAKE_NODES TABLES NODES STRUCTURE CHG_NODES
                       NVALS STRUCTURE NET_NVALS.

  NODES-ID        = '1'.
  NODES-PARENT_ID = SPACE.
  NODES-LEFT_ID   = SPACE.
  APPEND NODES.
  NVALS-ID        = '1'.
  NVALS-FL        = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL       = TEXT-001.          "Knoten 1
  APPEND NVALS.

  NODES-ID        = '2'.
  NODES-PARENT_ID = '1'.
  NODES-LEFT_ID   = SPACE.
  APPEND NODES.
  NVALS-ID        = '2'.
  NVALS-FL        = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL       = TEXT-002.          "Knoten 2
  APPEND NVALS.

  NODES-ID        = '3'.
  NODES-PARENT_ID = '1'.
  NODES-LEFT_ID   = '2'.
  APPEND NODES.
  NVALS-ID        = '3'.
  NVALS-FL        = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL       = TEXT-003.          "Knoten 3
  APPEND NVALS.

  NODES-ID        = '4'.
  NODES-PARENT_ID = '2'.
  NODES-LEFT_ID   = SPACE.
  APPEND NODES.
  NVALS-ID        = '4'.
  NVALS-FL        = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL       = TEXT-004.          "Knoten 4
  APPEND NVALS.

  NODES-ID        = '5'.
  NODES-PARENT_ID = '2'.
  NODES-LEFT_ID   = '4'.
  APPEND NODES.
  NVALS-ID        = '5'.
  NVALS-FL        = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL       = TEXT-005.          "Knoten 5
  APPEND NVALS.

  NODES-ID        = '6'.
  NODES-PARENT_ID = '3'.
  NODES-LEFT_ID   = SPACE.
  APPEND NODES.
  NVALS-ID        = '6'.
  NVALS-FL        = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL       = TEXT-006.          "Knoten 6
  APPEND NVALS.

ENDFORM.


*Text elements
*----------------------------------------------------------
* 001 Node 1
* 002 Node 2
* 003 Node 3
* 004 Node 4
* 005 Node 5
* 006 Node 6


*Selection texts
*----------------------------------------------------------
* PRF_GRUP         Profile group
* PRF_INDX         Profile index
* PRF_NAME         Profile name
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming -> Graphics All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.