Application Development and Automation 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: 
Read only

is bound ?

Former Member
0 Likes
3,758

Hi

As a newbie to ABAP, I would like to know the meaning of the phrase 'is bound'

as in: 'IF htmlb_event IS BOUND AND htmlb_event->name = 'button'. '

Can you also refer me to a tutorial on OO ABAP?

Thank you

yuval

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
2,020

Hello Yuval

With this statement you check whether a reference variable holds indeed an instance of a class. For example, when have a dynpro with a container where you display an ALV grid you should instantiate the controls (container and ALV grid) only once.


DATA:
  go_container    TYPE REF TO cl_gui_custom_container,
  go_grid            TYPE REF TO cl_gui_alv_grid.

MODULE init_controls OUTPUT.

  IF ( go_container IS NOT BOUND ).
    CREATE OBJECT go_containe
       ...

    IF ( go_container IS BOUND ).
      CREATE OBJECT go_grid
        EXPORTING
          parent = go_container
          ...
    ENDIF.

  ELSE.  " ( go_container IS BOUND ).

  ENDIF.

ENDMODULE.

Regards

Uwe

3 REPLIES 3
Read only

Former Member
0 Likes
2,020

OO ABAP

http://www.sapgenie.com/abap/OO/

For understanding COntrol Frameworks in OO ABAP, check this.

http://www.sapgenie.com/abap/controls/index.htm

ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course

ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course

ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course

ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course

ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course

ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course

DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects

DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen

DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects

DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration

DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects

DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects

DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen

You can get nice docs regarding OO ABAP from these links also...

http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf

Read only

uwe_schieferstein
Active Contributor
0 Likes
2,021

Hello Yuval

With this statement you check whether a reference variable holds indeed an instance of a class. For example, when have a dynpro with a container where you display an ALV grid you should instantiate the controls (container and ALV grid) only once.


DATA:
  go_container    TYPE REF TO cl_gui_custom_container,
  go_grid            TYPE REF TO cl_gui_alv_grid.

MODULE init_controls OUTPUT.

  IF ( go_container IS NOT BOUND ).
    CREATE OBJECT go_containe
       ...

    IF ( go_container IS BOUND ).
      CREATE OBJECT go_grid
        EXPORTING
          parent = go_container
          ...
    ENDIF.

  ELSE.  " ( go_container IS BOUND ).

  ENDIF.

ENDMODULE.

Regards

Uwe

Read only

0 Likes
2,020

Hi guys

1. Thank you for the sources of information

2. As for 'bound' I understand the system just checks if the object is not null

(java idiom).

Thank you

yuval