Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Disable the container text

$
0
0

hello abapers,

 

i have use container for display the text in the screen.

now,the problem is How to make the container disable / only output / no input possible properties.

which method i should call.

 

i have used following code .

 

 

 

 

CONSTANTS:

   line_length TYPE i VALUE 254.

DATA: ok_code LIKE sy-ucomm.

DATA:

*Create reference to the custom container

   custom_container TYPE REF TO cl_gui_custom_container,

*Create reference to the TextEdit control

   editor TYPE REF TO cl_gui_textedit,

      repid LIKE sy-repid.

 

 


 

MODULE status_0100 OUTPUT.

   SET PF-STATUS 'PF01'.

   SET TITLEBAR 'T1'.

 

 

   IF editor IS INITIAL.

     repid = sy-repid.

*  Create obejct for custom container

     CREATE OBJECT custom_container

       EXPORTING

         container_name              = 'MYCONTAINER1'

       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 'I' NUMBER sy-msgno

                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

     ENDIF.

 

     CREATE OBJECT editor

       EXPORTING

         wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position

         wordwrap_position          = line_length

         wordwrap_to_linebreak_mode = cl_gui_textedit=>true

         parent                     = custom_container

       EXCEPTIONS

         error_cntl_create          = 1

         error_cntl_init            = 2

         error_cntl_link            = 3

         error_dp_create            = 4

         gui_type_not_supported     = 5

         OTHERS                     = 6.

     IF sy-subrc <> 0.

       MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno

                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

     ENDIF.

 

*toolbar and status bar of container disable

     CALL METHOD editor->set_toolbar_mode

       EXPORTING

         toolbar_mode = cl_gui_textedit=>false.

 

     CALL METHOD editor->set_statusbar_mode

       EXPORTING

         statusbar_mode = cl_gui_textedit=>false.

   ENDIF.

 

 

   SELECT * FROM zsstab INTO wa_zsstab WHERE ss_apl_no = ss_apl_no1.

 

     ss_apl_no = wa_zsstab-ss_apl_no.

     proj_name = wa_zsstab-proj_name.

     vnd_name = wa_zsstab-vnd_name.

     uname = wa_zsstab-uname.

     cdate = wa_zsstab-cdate.

     ctime = wa_zsstab-ctime.

     brief = wa_zsstab-brief.

     text = wa_zsstab-justif.

     impact = wa_zsstab-impact.

     price = wa_zsstab-price.

     ccenter = wa_zsstab-ccenter..

 

     CALL METHOD editor->set_textstream

       EXPORTING

         text                   = text

       EXCEPTIONS

         error_cntl_call_method = 1

         not_supported_by_gui   = 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.

 

   ENDSELECT.

 

 

ENDMODULE.

 

================================================================

the Whole code is working fine

i have also define the necessory details

======================================================



Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>