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: Starting Cluster Editor 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 2:38 pm    Post subject: Demo: Starting Cluster Editor in Display Mode Reply with quote

Code:
REPORT GRCNETC1 MESSAGE-ID CG.

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

* Erzeugen der INODES
PERFORM MAKE_INODES TABLES INODES_TAB
                           NVALS_TAB.

* Erzeugen der Boxen
PERFORM MAKE_BOXES TABLES BOXES_TAB
                          BVALS_TAB.

* Erzeugen der Frames
PERFORM MAKE_FRAMES TABLES FRAMES_TAB
                           FVALS_TAB.

* Erzeugen der Feldpositionen
PERFORM MAKE_AREA_POSITIONS TABLES AREA_POS_TAB.

DO.
* Aufrufen Clustereditor
  CALL FUNCTION 'CNET_GRAPHIC_CLUSTER'
       EXPORTING
            STAT           = STAT
       IMPORTING
            M_TYP          = M_TYP
       TABLES
            AREA_POSITIONS = AREA_POS_TAB
            BOXES          = BOXES_TAB
            BVALS          = BVALS_TAB
            DELETIONS      = DELETE_TAB
            FRAMES         = FRAMES_TAB
            FVALS          = FVALS_TAB
            INODES         = INODES_TAB
            NVALS          = NVALS_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_AREA_POSITIONS
*&---------------------------------------------------------------------*
*       Erzeugen der Feldpositionen                                    *
*----------------------------------------------------------------------*
*  <->  AREA_POS
*----------------------------------------------------------------------*
FORM MAKE_AREA_POSITIONS TABLES AREA_POS STRUCTURE NET_ARPOS.

  AREA_POS-ID     = 'B1'.
  AREA_POS-X_MIN  = 1.
  AREA_POS-Y_MIN  = 2.
  AREA_POS-X_MAX  = 1.
  AREA_POS-Y_MAX  = 2.
  APPEND AREA_POS.

  AREA_POS-ID     = 'B2'.
  AREA_POS-X_MIN  = 2.
  AREA_POS-Y_MIN  = 3.
  AREA_POS-X_MAX  = 2.
  AREA_POS-Y_MAX  = 3.
  APPEND AREA_POS.

  AREA_POS-ID     = 'B3'.
  AREA_POS-X_MIN  = 3.
  AREA_POS-Y_MIN  = 4.
  AREA_POS-X_MAX  = 3.
  AREA_POS-Y_MAX  = 4.
  APPEND AREA_POS.

  AREA_POS-ID     = 'B4'.
  AREA_POS-X_MIN  = 2.
  AREA_POS-Y_MIN  = 15.
  AREA_POS-X_MAX  = 2.
  AREA_POS-Y_MAX  = 15.
  APPEND AREA_POS.

  AREA_POS-ID     = 'B5'.
  AREA_POS-X_MIN  = 1.
  AREA_POS-Y_MIN  = 10.
  AREA_POS-X_MAX  = 1.
  AREA_POS-Y_MAX  = 10.
  APPEND AREA_POS.

  AREA_POS-ID     = 'F1'.
  AREA_POS-X_MIN  = 1.
  AREA_POS-Y_MIN  = 1.
  AREA_POS-X_MAX  = 2.
  AREA_POS-Y_MAX  = 3.
  APPEND AREA_POS.

  AREA_POS-ID     = 'F2'.
  AREA_POS-X_MIN  = 3.
  AREA_POS-Y_MIN  = 1.
  AREA_POS-X_MAX  = 4.
  AREA_POS-Y_MAX  = 14.
  APPEND AREA_POS.

  AREA_POS-ID     = 'F3'.
  AREA_POS-X_MIN  = 1.
  AREA_POS-Y_MIN  = 6.
  AREA_POS-X_MAX  = 1.
  AREA_POS-Y_MAX  = 18.
  APPEND AREA_POS.

ENDFORM.                               " MAKE_AREA_POSITIONS

*&---------------------------------------------------------------------*
*&      Form  MAKE_BOXES
*&---------------------------------------------------------------------*
*       Erzeugen der Boxen                                             *
*----------------------------------------------------------------------*
*  <->  BOXES
*  <->  BVALS
*----------------------------------------------------------------------*
FORM MAKE_BOXES TABLES BOXES STRUCTURE NET_BOXES
                       BVALS STRUCTURE NET_NVALS.

  BOXES-ID       = 'B1'.
  BOXES-BOX_TYPE = NET_CONST-ROWBOX.
  BOXES-TYPE     = NET_CONST-TYPE_1.
  APPEND BOXES.
* Background- und Linecolor werden spдter hier entfallen und
* aus dem TYPE ermittelt.
  BVALS-ID  = BOXES-ID.
  BVALS-FL  = NET_CONST-BOX_COLOR.     "Backgroundcolor
  BVALS-VAL = SGRC_CONST-RED.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-BOX_LINECOLOR. "Linecolor
  BVALS-VAL = SGRC_CONST-GREEN.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-TEXT_INDEX_0.
  BVALS-VAL = TEXT-003.                                     "Box 1
  APPEND BVALS.

  BOXES-ID       = 'B2'.
  BOXES-BOX_TYPE = NET_CONST-ROWBOX.
  BOXES-TYPE     = NET_CONST-TYPE_2.
  APPEND BOXES.
  BVALS-ID  = BOXES-ID.
  BVALS-FL  = NET_CONST-BOX_COLOR.     "Backgroundcolor
  BVALS-VAL = SGRC_CONST-DARKYELLOW.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-BOX_LINECOLOR. "Linecolor
  BVALS-VAL = SGRC_CONST-BLACK.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-TEXT_INDEX_0.
  BVALS-VAL = TEXT-004.                                     "Box 2
  APPEND BVALS.

  BOXES-ID       = 'B3'.
  BOXES-BOX_TYPE = NET_CONST-ROWBOX.
  BOXES-TYPE     = NET_CONST-TYPE_3.
  APPEND BOXES.
  BVALS-ID  = BOXES-ID.
  BVALS-FL  = NET_CONST-BOX_COLOR.     "Backgroundcolor
  BVALS-VAL = SGRC_CONST-MAGENTA.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-BOX_LINECOLOR. "Linecolor
  BVALS-VAL = SGRC_CONST-BLACK.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-TEXT_INDEX_0.
  BVALS-VAL = TEXT-005.                                     "Box 3
  APPEND BVALS.

  BOXES-ID       = 'B4'.
  BOXES-BOX_TYPE = NET_CONST-ROWBOX.
  BOXES-TYPE     = NET_CONST-TYPE_4.
  APPEND BOXES.
  BVALS-ID  = BOXES-ID.
  BVALS-FL  = NET_CONST-BOX_COLOR.     "Backgroundcolor
  BVALS-VAL = SGRC_CONST-DARKGREEN.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-BOX_LINECOLOR. "Linecolor
  BVALS-VAL = SGRC_CONST-BLACK.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-TEXT_INDEX_0.
  BVALS-VAL = TEXT-006.                                     "Box 4
  APPEND BVALS.

  BOXES-ID       = 'B5'.
  BOXES-BOX_TYPE = NET_CONST-ROWBOX.
  BOXES-TYPE     = NET_CONST-TYPE_5.
  APPEND BOXES.
  BVALS-ID  = BOXES-ID.
  BVALS-FL  = NET_CONST-BOX_COLOR.     "Backgroundcolor
  BVALS-VAL = SGRC_CONST-DARKCYAN.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-BOX_LINECOLOR. "Linecolor
  BVALS-VAL = SGRC_CONST-BLACK.
  APPEND BVALS.
  BVALS-FL  = NET_CONST-TEXT_INDEX_0.
  BVALS-VAL = TEXT-007.                                     "Box 5
  APPEND BVALS.

ENDFORM.                               " MAKE_BOXES


*&---------------------------------------------------------------------*
*&      Form  MAKE_FRAMES
*&---------------------------------------------------------------------*
*       Erzeugen der Frames                                            *
*----------------------------------------------------------------------*
*  <->  FRAMES
*  <->  FVALS
*----------------------------------------------------------------------*
FORM MAKE_FRAMES TABLES FRAMES STRUCTURE NET_FRAMES
                        FVALS  STRUCTURE NET_NVALS.

  FRAMES-ID   = 'F1'.
  FRAMES-TYPE = NET_CONST-TYPE_1.
  APPEND FRAMES.

  FRAMES-ID   = 'F2'.
  FRAMES-TYPE = NET_CONST-TYPE_2.
  APPEND FRAMES.

  FRAMES-ID   = 'F3'.
  FRAMES-TYPE = NET_CONST-TYPE_3.
  APPEND FRAMES.

ENDFORM.                               " MAKE_FRAMES


*&---------------------------------------------------------------------*
*&      Form  MAKE_INODES
*&---------------------------------------------------------------------*
*       Erzeugen der INODES                                            *
*----------------------------------------------------------------------*
*  <->  INODES
*  <->  NVALS
*----------------------------------------------------------------------*
FORM MAKE_INODES TABLES INODES STRUCTURE CNG_INODES
                        NVALS  STRUCTURE NET_NVALS.

  INODES-ID   = 'I1'.
  INODES-TYPE = NET_CONST-TYPE_1.
  APPEND INODES.
  NVALS-ID  = INODES-ID.
  NVALS-FL  = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL = TEXT-008.                "Cluster
  APPEND NVALS.

  INODES-ID   = 'I2'.
  INODES-TYPE = NET_CONST-TYPE_2.
  APPEND INODES.
  NVALS-ID  = INODES-ID.
  NVALS-FL  = NET_CONST-TEXT_INDEX_0.
  NVALS-VAL = TEXT-009.                                     "Box
  APPEND NVALS.

ENDFORM.                               " MAKE_INODES


*Text elements
*----------------------------------------------------------
* 003 Box 1
* 004 Box 2
* 005 Box 3
* 006 Box 4
* 007 Box 5
* 008 Cluster
* 009 Box
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.