Advertisement
Guest User

Untitled

a guest
Jul 11th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 2.33 KB | None | 0 0
  1. method CONSTRUCTOR.
  2.  
  3.   class cl_gui_cfw definition load.
  4.  
  5.   DATA: ctrl_name(80) TYPE c ,
  6.         wf_clsid(100) TYPE c .
  7.   IF NOT activex IS INITIAL .
  8. wf_clsid = '{904511D2-5407-4033-8DAD-07B33EC7317E}'.  "activex posnet
  9. elseif not javabean is initial.
  10.     raise gui_type_not_supported.
  11.     endif.
  12.  
  13. IF wf_clsid is initial.
  14.     raise gui_type_not_supported.
  15.   endif.
  16.  
  17.  if shellstyle is initial.
  18.  
  19.     shellstyle = cl_gui_control=>ws_visible
  20.             + cl_gui_control=>ws_child
  21.             + cl_gui_control=>ws_clipsiblings.
  22.  
  23.   endif.
  24.  
  25.  
  26.  
  27. CALL METHOD super->constructor
  28.   EXPORTING
  29.     clsid             = wf_clsid
  30. *        parent            = cont
  31.     shellstyle        = shellstyle
  32.     lifetime          = lifetime
  33.     name              = name
  34.   EXCEPTIONS
  35.     CNTL_ERROR        = 1
  36. CNTL_SYSTEM_ERROR     = 2
  37. CREATE_ERROR          = 3
  38.     OTHERS            = 4.
  39.  
  40.  
  41.  
  42. CALL FUNCTION 'FLUSH'
  43.  EXCEPTIONS
  44.    CNTL_SYSTEM_ERROR       = 1
  45.    CNTL_ERROR              = 2
  46.    OTHERS                  = 3
  47.           .
  48.  
  49. IF sy-subrc <> 0.
  50. raise cntl_install_error.
  51. ENDIF.
  52.  
  53.  
  54.   CALL METHOD cl_gui_cfw=>subscribe
  55.   EXPORTING
  56.     ref     = me
  57.     shellid = me->h_control-shellid
  58.   EXCEPTIONS
  59.     OTHERS  = 1.
  60.  
  61.   if sy-subrc <> 0.
  62.   raise error_cntl_create.
  63.   endif.
  64.  
  65. * create and initialize dataprovider =>  m_dp_handle
  66.  
  67. *  data m_dp_handle type CNTL_HANDLE.
  68. *  call function 'DP_CREATE'
  69. *       changing
  70. *            h_dp             = m_dp_handle
  71. *       exceptions
  72. *            dp_create_error  = 1
  73. *            dp_install_error = 2
  74. *            dp_error         = 3
  75. *            others           = 4.
  76. *  if sy-subrc <> 0.
  77. **    raise error_dp_create.
  78. *  endif.
  79. *
  80. *call method cl_gui_cfw=>flush.
  81.  
  82.  
  83. *CALL METHOD SUPER->CONSTRUCTOR
  84. **  EXPORTING
  85. **    CLSID              =
  86. **    LIFETIME           = lifetime_default
  87. **    SHELLSTYLE         =
  88. **    PARENT             =
  89. **    AUTOALIGN          = 'x'
  90. **    LICENSEKEY         =
  91. **    NAME               =
  92. **  EXCEPTIONS
  93. **    CNTL_ERROR         = 1
  94. **    CNTL_SYSTEM_ERROR  = 2
  95. **    CREATE_ERROR       = 3
  96. **    LIFETIME_ERROR     = 4
  97. **    PARENT_IS_SPLITTER = 5
  98. **    others             = 6
  99. *        .
  100. *IF SY-SUBRC <> 0.
  101. ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  102. **            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  103. *ENDIF.
  104. endmethod.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement