Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

code?

Former Member
0 Kudos

hi All,

I want a code for OCX controls???

PLease send me a code

Thanks in Advance!!!

Gauima.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

You can use folllowing code to knoew how to use textedit and picture controls.

->just copy this code in abap editor Type 1 prg.

->In path variable U need to pass a object of the picture

that u can create using TRANSACTION 'SMW0' , here u can create object for any pic. on ur PC .

DATA: custom_container3 TYPE REF TO cl_gui_splitter_container,

custom_container2 TYPE REF TO cl_gui_custom_container ,

custom_container1 TYPE REF TO cl_gui_custom_container ,

editor TYPE REF TO cl_gui_textedit,

picture TYPE REF TO cl_gui_picture,

repid LIKE sy-repid.

DATA url(256).

DATA : BEGIN OF itab OCCURS 0,

name(256),

END OF itab.

DATA : num(10) TYPE c,

n1 TYPE i.

DATA ok_code LIKE sy-ucomm.

CONSTANTS: line_length TYPE i VALUE 256.

DATA container TYPE REF TO cl_gui_container .

DATA path(10).

repid = sy-repid.

CALL SCREEN 500.

*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DATA events TYPE cntl_simple_events.

DATA wa_events TYPE cntl_simple_event.

DATA: event_type(20) TYPE c.

----


  • CLASS lcl_event_handler DEFINITION

----


  • ........ *

----


CLASS lcl_event_handler DEFINITION.

PUBLIC SECTION.

CLASS-METHODS: catch_dblclick FOR EVENT dblclick OF cl_gui_textedit.

  • IMPORTING SENDER.

ENDCLASS.

DATA: event_handler TYPE REF TO lcl_event_handler.

----


  • CLASS lcl_event_handler IMPLEMENTATION

----


  • ........ *

----


CLASS lcl_event_handler IMPLEMENTATION.

METHOD catch_dblclick.

event_type = text-002.

CLEAR itab.

CLEAR itab[].

DO 25 TIMES.

itab-name = 'vikas vishnoi'.

APPEND itab TO itab.

ENDDO.

CALL METHOD editor->set_text_as_r3table

EXPORTING

table = itab[]

.

ENDMETHOD.

ENDCLASS.

*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

START-OF-SELECTION.

END-OF-SELECTION.

&----


*& Module USER_COMMAND_0500 INPUT

&----


  • text

----


MODULE user_command_0500 INPUT.

CASE ok_code.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'GET'.

CLEAR itab.

CLEAR itab[].

DO 25 TIMES.

itab-name = 'vikas vishnoi'.

APPEND itab.

ENDDO.

CALL METHOD editor->set_text_as_r3table

EXPORTING

table = itab[]

.

WHEN 'SEL'.

CALL METHOD editor->highlight_selection

EXPORTING

highlight_mode = 1

.

ENDIF.

WHEN OTHERS.

CALL METHOD cl_gui_cfw=>dispatch.

ENDCASE.

ENDMODULE. " USER_COMMAND_0500 INPUT

&----


*& Module STATUS_0500 OUTPUT

&----


  • text

----


MODULE status_0500 OUTPUT.

ENDMODULE. " STATUS_0500 OUTPUT

&----


*& Module initial_500 OUTPUT

&----


  • text

----


MODULE initial_500 OUTPUT.

IF editor IS INITIAL.

repid = sy-repid.

CREATE OBJECT custom_container1

EXPORTING

container_name = 'MYCONTAINER1'.

CREATE OBJECT custom_container3

EXPORTING

parent = custom_container1

rows = 2

columns = 2

name = 'MY_CNT'

.

CREATE OBJECT custom_container2

EXPORTING

container_name = 'MYCONTAINER2'.

CREATE OBJECT editor

EXPORTING

parent = custom_container2

wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position

wordwrap_position = line_length

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

DATA: row TYPE i, col TYPE i.

CLEAR url.

row = 1.

col = 1.

PERFORM create_pic USING row col .

path = 'BIKER'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

CLEAR url.

row = 1.

col = 2.

PERFORM create_pic USING row col .

path = 'ZANK'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

CLEAR url.

row = 2.

col = 1.

PERFORM create_pic USING row col .

path = 'ZKAT'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

CLEAR url.

row = 2.

col = 2.

PERFORM create_pic USING row col .

path = 'ZDOG'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

**************************************

SET HANDLER lcl_event_handler=>catch_dblclick FOR editor.

wa_events-eventid = cl_gui_textedit=>event_double_click.

wa_events-appl_event = 'X'.

APPEND wa_events TO events.

CALL METHOD editor->set_registered_events

EXPORTING events = events[].

***************************************

ENDIF. "editor is initial

ENDMODULE. " initial_500 OUTPUT

&----


*& Form load_pic

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM load_pic USING p_path.

DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.

DATA html_table LIKE w3html OCCURS 1.

DATA return_code LIKE w3param-ret_code.

DATA content_type LIKE w3param-cont_type.

DATA content_length LIKE w3param-cont_len.

DATA pic_data LIKE w3mime OCCURS 0.

DATA pic_size TYPE i.

REFRESH query_table.

query_table-name = '_OBJECT_ID'.

query_table-value = p_path.

APPEND query_table.

CALL FUNCTION 'WWW_GET_MIME_OBJECT'

TABLES

query_string = query_table

html = html_table

mime = pic_data

CHANGING

return_code = return_code

content_type = content_type

content_length = content_length

EXCEPTIONS

object_not_found = 1

parameter_not_found = 2

OTHERS = 3.

IF sy-subrc = 0.

pic_size = content_length.

ENDIF.

CALL FUNCTION 'DP_CREATE_URL'

EXPORTING

type = 'image'

subtype = cndp_sap_tab_unknown

size = pic_size

lifetime = cndp_lifetime_transaction

TABLES

data = pic_data

CHANGING

url = url

EXCEPTIONS

OTHERS = 1.

ENDFORM. " load_pic

&----


*& Form create_pic

&----


  • text

----


  • -->P_ROW text

  • -->P_COL text

----


FORM create_pic USING p_row

p_col.

CALL METHOD custom_container3->get_container

EXPORTING

row = p_row

column = p_col

RECEIVING

container = container

.

CREATE OBJECT picture

EXPORTING

  • LIFETIME =

  • SHELLSTYLE =

parent = container

  • NAME = 'MY_CNT'

  • EXCEPTIONS

  • ERROR = 1

  • others = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL METHOD picture->set_display_mode

EXPORTING

display_mode = cl_gui_picture=>display_mode_fit

  • EXCEPTIONS

  • ERROR = 1

  • others = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " create_pic

regards

vikas.

6 REPLIES 6

Former Member
0 Kudos

Have a look at the following posts, it may be of some assistance. Asking the posters of these questions directly could lead to some assistance.

Regards

Former Member
0 Kudos

hi

good

go through this

REPORT ZCOMBOBOX.

tables usr03.

data : itabitems like listitem occurs 0 with header line,

dname like usr03-bname,

indx type i,

itemname(256) type c,

first(4) type c value 'true'.

TYPES: BEGIN OF CNTL_FONT,

INIT(1) TYPE C,

F_TYPE TYPE I,

BOLD TYPE I,

ITALIC TYPE I,

SIZE TYPE I,

END OF CNTL_FONT.

TYPES: BEGIN OF CNTL_HANDLE,

OBJ LIKE OBJ_RECORD,

SHELLID TYPE I,

PARENTID TYPE I,

C_TYPE(4) TYPE C,"CNTL_TYPE,

CLSID LIKE CNTLSTRLIS-NAME,

ORIGIN LIKE SY-REPID,

HANDLE_TYPE(10) TYPE C,

LIFETIME TYPE I,

PROGRAM LIKE SY-REPID,

DYNNR LIKE SY-DYNNR,

IMODE TYPE I,

DYNPRO_POS TYPE I,

GUID TYPE I,

END OF CNTL_HANDLE.

data : CNTL_FONT_DEFAULTS TYPE CNTL_FONT.

data : CNTL_HANDLE_TEST TYPE CNTL_HANDLE.

cntl_font_defaults-f_type = 0.

cntl_font_defaults-bold = 1.

cntl_font_defaults-italic = 0.

cntl_font_defaults-size = 0.

cntl_font_defaults-init = ''.

select bname from usr03 into itabitems-item.

append itabitems.

endselect.

call screen 1000.

&----


*& Module COMBOCLICK INPUT

&----


  • text

----


MODULE COMBOCLIK INPUT.

CALL FUNCTION 'COMBOBOX_GET_SELECTION'

EXPORTING

HANDLE = CNTL_HANDLE_TEST

IMPORTING

INDEX = indx

ITEM = itemname

EXCEPTIONS

CNTL_SYSTEM_ERROR = 1

CNTL_ERROR = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

message ID SY-MSGID TYPE 'E' NUMBER 1

with itemname.

ENDMODULE.

" COMBOCLICK INPUT

&----


*& Module COMBOPBO OUTPUT

&----


  • text

----


MODULE COMBOPBO OUTPUT.

IF First = 'true'.

First = 'false'.

CALL FUNCTION 'OCX_COMBOBOX'

EXPORTING

LEFT = 100

TOP = 20

WIDTH = 280

HEIGHT = 16

FONT = CNTL_FONT_DEFAULTS

VISIBLE = 'X'

DISP_SCREEN = '1000'

IMPORTING

COMBOBOX_HANDLE = CNTL_HANDLE_TEST

TABLES

LIST_ITEMS = itabitems

EXCEPTIONS

LINK_ERROR = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

ENDMODULE. " COMBOPBO OUTPUT

thanks

mrutyun

Former Member
0 Kudos

Hi Gauima,

Declaration Part--

DATA: container TYPE REF TO cl_gui_custom_container,

tree TYPE REF TO cl_gui_simple_tree.

DATA: g_event(30),

g_node_key TYPE tv_nodekey,

node_key TYPE tv_nodekey,

ans.

DATA : BEGIN OF t_plant OCCURS 0,

werks LIKE mska-werks,

END OF t_plant.

DATA : node_table LIKE STANDARD TABLE OF mtreesnode

WITH DEFAULT KEY,

t_node_table LIKE LINE OF node_table.

DATA number(12).

----


  • CLASS lcl_tree DEFINITION

----


  • ........ *

----


CLASS lcl_tree DEFINITION.

PUBLIC SECTION.

CLASS-METHODS : catch_dbl FOR EVENT node_double_click OF

cl_gui_simple_tree IMPORTING node_key.

ENDCLASS.

----


  • CLASS lcl_tree IMPLEMENTATION

----


  • ........ *

----


CLASS lcl_tree IMPLEMENTATION.

METHOD catch_dbl.

g_event = 'NODE_DOUBLE_CLICK'.

g_node_key = node_key.

ENDMETHOD.

ENDCLASS.

DATA: events TYPE cntl_simple_events,

event TYPE cntl_simple_event.

CREATE OBJECT container

EXPORTING

container_name = 'CUSTOM'.

IF sy-subrc <> 0.

MESSAGE e009(zvikalp).

ENDIF.

CREATE OBJECT tree

EXPORTING

parent = container

node_selection_mode = cl_gui_simple_tree=>node_sel_mode_single.

IF sy-subrc <> 0.

MESSAGE e014(zvikalp).

ENDIF.

event-eventid = cl_gui_simple_tree=>eventid_node_double_click.

event-appl_event = 'X'.

APPEND event TO events.

CALL METHOD tree->set_registered_events

EXPORTING

events = events

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

illegal_event_combination = 3

OTHERS = 4.

IF sy-subrc <> 0.

MESSAGE e014(zvikalp).

ENDIF.

SET HANDLER lcl_tree=>catch_dbl FOR tree.

SORT t_mchb BY werks.

DELETE ADJACENT DUPLICATES FROM t_mchb. "COMPARING WERKS.

DATA: node LIKE mtreesnode,

w_werks LIKE mska-werks,

w_matnr LIKE mska-matnr,

w_lgort LIKE mska-lgort,

index(3),

lindex(3),

l_index(3),

l_werks(8),

l_lgort(8).

LOOP AT t_mchb.

MOVE-CORRESPONDING t_mchb TO t_plant.

APPEND t_plant.

ENDLOOP.

SORT t_plant.

DELETE ADJACENT DUPLICATES FROM t_plant.

IF NOT t_mchb[] IS INITIAL.

LOOP AT t_plant.

index = sy-tabix.

CONCATENATE 'P' index t_plant-werks

INTO node-node_key.

l_werks = node-node_key.

  • node-node_key = t_mchb-werks.

CLEAR node-relatkey.

CLEAR node-relatship.

node-n_image = '@A8@'.

node-exp_image = '@A8@'.

node-expander = 'X'.

CONCATENATE 'Plant' t_plant-werks

INTO node-text SEPARATED BY space.

  • node-text = t_mchb-werks.

APPEND node TO node_table.

CLEAR node.

SORT t_mchb BY lgort.

LOOP AT t_mchb.

IF t_mchb-lgort <> w_lgort AND t_mchb-werks = t_plant-werks.

w_lgort = t_mchb-lgort.

l_index = l_index + 1.

CONCATENATE 'L' index t_mchb-lgort

INTO node-node_key.

  • node-node_key = t_mchb-werks.

l_lgort = node-node_key.

node-relatkey = l_werks.

node-relatship = cl_gui_simple_tree=>relat_last_child.

node-n_image = '@AC@'.

node-exp_image = '@AC@'.

node-expander = 'X'.

node-disabled = space.

CONCATENATE 'Storage Location' t_mchb-lgort

INTO node-text SEPARATED BY space.

  • node-text = t_mchb-lgort.

APPEND node TO node_table.

ENDIF.

CLEAR node.

IF t_mchb-matnr <> w_matnr AND t_mchb-lgort = w_lgort AND

t_mchb-werks = t_plant-werks.

lindex = lindex + 1.

w_matnr = t_mchb-matnr.

l_count = t_mchb-quan.

CONCATENATE 'M' index l_index lindex

INTO node-node_key.

node-relatkey = l_lgort.

node-relatship = cl_gui_simple_tree=>relat_last_child.

node-n_image = '@A6@'.

node-exp_image = '@A6@'.

node-expander = 'X'.

node-disabled = space.

CONCATENATE t_mchb-matnr l_count

INTO node-text SEPARATED BY space.

APPEND node TO node_table.

ENDIF.

CLEAR node.

ENDLOOP.

CLEAR : w_lgort , l_index.

ENDLOOP.

ENDIF.

CALL METHOD tree->add_nodes

EXPORTING

table_structure_name = 'MTREESNODE'

node_table = node_table.

IF sy-subrc <> 0.

MESSAGE e014(zvikalp).

ENDIF.

Hope this helps u.

Regards,

Seema.

Former Member
0 Kudos

Hi Gauima,

Combobox is an OCX control. Just go to this link.

http://sap.ittoolbox.com/code/archives.asp?i=10&d=1621&a=s

This will have the program to create a combobox using ABAP code.

Regards,

SP.

Former Member
0 Kudos

hi,

You can use folllowing code to knoew how to use textedit and picture controls.

->just copy this code in abap editor Type 1 prg.

->In path variable U need to pass a object of the picture

that u can create using TRANSACTION 'SMW0' , here u can create object for any pic. on ur PC .

DATA: custom_container3 TYPE REF TO cl_gui_splitter_container,

custom_container2 TYPE REF TO cl_gui_custom_container ,

custom_container1 TYPE REF TO cl_gui_custom_container ,

editor TYPE REF TO cl_gui_textedit,

picture TYPE REF TO cl_gui_picture,

repid LIKE sy-repid.

DATA url(256).

DATA : BEGIN OF itab OCCURS 0,

name(256),

END OF itab.

DATA : num(10) TYPE c,

n1 TYPE i.

DATA ok_code LIKE sy-ucomm.

CONSTANTS: line_length TYPE i VALUE 256.

DATA container TYPE REF TO cl_gui_container .

DATA path(10).

repid = sy-repid.

CALL SCREEN 500.

*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DATA events TYPE cntl_simple_events.

DATA wa_events TYPE cntl_simple_event.

DATA: event_type(20) TYPE c.

----


  • CLASS lcl_event_handler DEFINITION

----


  • ........ *

----


CLASS lcl_event_handler DEFINITION.

PUBLIC SECTION.

CLASS-METHODS: catch_dblclick FOR EVENT dblclick OF cl_gui_textedit.

  • IMPORTING SENDER.

ENDCLASS.

DATA: event_handler TYPE REF TO lcl_event_handler.

----


  • CLASS lcl_event_handler IMPLEMENTATION

----


  • ........ *

----


CLASS lcl_event_handler IMPLEMENTATION.

METHOD catch_dblclick.

event_type = text-002.

CLEAR itab.

CLEAR itab[].

DO 25 TIMES.

itab-name = 'vikas vishnoi'.

APPEND itab TO itab.

ENDDO.

CALL METHOD editor->set_text_as_r3table

EXPORTING

table = itab[]

.

ENDMETHOD.

ENDCLASS.

*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

START-OF-SELECTION.

END-OF-SELECTION.

&----


*& Module USER_COMMAND_0500 INPUT

&----


  • text

----


MODULE user_command_0500 INPUT.

CASE ok_code.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'GET'.

CLEAR itab.

CLEAR itab[].

DO 25 TIMES.

itab-name = 'vikas vishnoi'.

APPEND itab.

ENDDO.

CALL METHOD editor->set_text_as_r3table

EXPORTING

table = itab[]

.

WHEN 'SEL'.

CALL METHOD editor->highlight_selection

EXPORTING

highlight_mode = 1

.

ENDIF.

WHEN OTHERS.

CALL METHOD cl_gui_cfw=>dispatch.

ENDCASE.

ENDMODULE. " USER_COMMAND_0500 INPUT

&----


*& Module STATUS_0500 OUTPUT

&----


  • text

----


MODULE status_0500 OUTPUT.

ENDMODULE. " STATUS_0500 OUTPUT

&----


*& Module initial_500 OUTPUT

&----


  • text

----


MODULE initial_500 OUTPUT.

IF editor IS INITIAL.

repid = sy-repid.

CREATE OBJECT custom_container1

EXPORTING

container_name = 'MYCONTAINER1'.

CREATE OBJECT custom_container3

EXPORTING

parent = custom_container1

rows = 2

columns = 2

name = 'MY_CNT'

.

CREATE OBJECT custom_container2

EXPORTING

container_name = 'MYCONTAINER2'.

CREATE OBJECT editor

EXPORTING

parent = custom_container2

wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position

wordwrap_position = line_length

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

DATA: row TYPE i, col TYPE i.

CLEAR url.

row = 1.

col = 1.

PERFORM create_pic USING row col .

path = 'BIKER'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

CLEAR url.

row = 1.

col = 2.

PERFORM create_pic USING row col .

path = 'ZANK'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

CLEAR url.

row = 2.

col = 1.

PERFORM create_pic USING row col .

path = 'ZKAT'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

CLEAR url.

row = 2.

col = 2.

PERFORM create_pic USING row col .

path = 'ZDOG'.

PERFORM load_pic USING path.

CALL METHOD picture->load_picture_from_url

EXPORTING

url = url

.

**************************************

SET HANDLER lcl_event_handler=>catch_dblclick FOR editor.

wa_events-eventid = cl_gui_textedit=>event_double_click.

wa_events-appl_event = 'X'.

APPEND wa_events TO events.

CALL METHOD editor->set_registered_events

EXPORTING events = events[].

***************************************

ENDIF. "editor is initial

ENDMODULE. " initial_500 OUTPUT

&----


*& Form load_pic

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM load_pic USING p_path.

DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.

DATA html_table LIKE w3html OCCURS 1.

DATA return_code LIKE w3param-ret_code.

DATA content_type LIKE w3param-cont_type.

DATA content_length LIKE w3param-cont_len.

DATA pic_data LIKE w3mime OCCURS 0.

DATA pic_size TYPE i.

REFRESH query_table.

query_table-name = '_OBJECT_ID'.

query_table-value = p_path.

APPEND query_table.

CALL FUNCTION 'WWW_GET_MIME_OBJECT'

TABLES

query_string = query_table

html = html_table

mime = pic_data

CHANGING

return_code = return_code

content_type = content_type

content_length = content_length

EXCEPTIONS

object_not_found = 1

parameter_not_found = 2

OTHERS = 3.

IF sy-subrc = 0.

pic_size = content_length.

ENDIF.

CALL FUNCTION 'DP_CREATE_URL'

EXPORTING

type = 'image'

subtype = cndp_sap_tab_unknown

size = pic_size

lifetime = cndp_lifetime_transaction

TABLES

data = pic_data

CHANGING

url = url

EXCEPTIONS

OTHERS = 1.

ENDFORM. " load_pic

&----


*& Form create_pic

&----


  • text

----


  • -->P_ROW text

  • -->P_COL text

----


FORM create_pic USING p_row

p_col.

CALL METHOD custom_container3->get_container

EXPORTING

row = p_row

column = p_col

RECEIVING

container = container

.

CREATE OBJECT picture

EXPORTING

  • LIFETIME =

  • SHELLSTYLE =

parent = container

  • NAME = 'MY_CNT'

  • EXCEPTIONS

  • ERROR = 1

  • others = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL METHOD picture->set_display_mode

EXPORTING

display_mode = cl_gui_picture=>display_mode_fit

  • EXCEPTIONS

  • ERROR = 1

  • others = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " create_pic

regards

vikas.

Former Member
0 Kudos

Hi Gauima,

There is following phase of using OCX in this there is local class we declare like OCX methods in this we declare our event implementation and use our program, if want more information you can refer from transaction dwdn from there you can refer container control/tree control these are OCX example.

and if you want more ,I will send you my program.

Ankur Garg.