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

ABAP Objects-Initialising

Former Member
0 Likes
830

Hi,


IF cc_txt IS INITIAL.

      CREATE OBJECT cc_txt
        EXPORTING
*      parent                      =
          container_name               = 'CC_TXT'
*      style                       =
*      lifetime                    = lifetime_default
*      repid                       =
*      dynnr                       =
*      no_autodef_progid_dynnr     =
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6
          .
      IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

cc_txt is declared as below.

data:cc_txt TYPE REF TO cl_gui_custom_container.

I am displaying some text at two levels of a report using the same cc_txt.If it is working at the Primary level it is not working at the secondary level and vice versa.New to ABAP Objects,can anyone here let me know how to INITIALIZE this CC_TXT.

Thanks,

7 REPLIES 7
Read only

Former Member
0 Likes
806

try to use clear or free .

regards

prabhu

Read only

0 Likes
806

Prabhu,

I tried but in vain.

cc_txt is still having

Any clue ?

Thanks.

Read only

0 Likes
806

use different conatiner names.it should work..

Read only

Former Member
0 Likes
806

try to change the container name.

use diferent containers for different levels.

Read only

uwe_schieferstein
Active Contributor
0 Likes
806

Hello

I doubt whether anybody else except you understands what is your problem.

Is it too difficult to pose a comprehensible question???

What could be meant by primary and secondary level?

Two different screens at the same screen level (e.g. level '0' for main screens)?

A main screen (level=0) and a popup (level=1)?

Here are my answers to this incomprehensible question:

If you want to use the same container on two different main screens (e.g. screen 100 and 200, both having level=0, i.e . neither of them is displayed as popup) then use the LINK method of the container.

If you want to use the same container on two different screen levels (e.g. main screen and popup) then I think this is not possible and you need to define a second container.

Regards

Uwe

Read only

0 Likes
806

Dear Uwe....

i totally agree with you , sorry , i havent seen it properly.....

regards

Prabhu

Read only

matt
Active Contributor
0 Likes
806

CC_TXT needs to be the name of a controller defined on a screen.

matt