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: 

How to make custom container text field invisible in modulepool programming

0 Kudos

Hello Abapers,

My requirement is when change button is pressed custom container text field should be seen and when create button is pressed custom container text field should be invisible .So help me in solving the problem .Correct answer will be rewarded with points.

13 REPLIES 13

Former Member
0 Kudos

Hi Krishna,

In BPO module,

loop at screen.

  if screen-name = 'XXX' " the text field must have name, right?

      screen-output = '0'.

      modify screen.

  endif.

endloop.

regards,

Archer

ipravir
Active Contributor
0 Kudos

Hi Krishna,

User below code to make invisible the any of the Fields from the Screen.

Loop at SCREEN.

     if screen-name eq 'FIELD_NAME'.

          screen-active = '0'.

          modify screen.

     endif.

endloop.

Regards,

Praveer.

0 Kudos

Thanks for your replies.

I am using custom container as a text field.

i want to make custom container invisible when i click on create button.

it is possible with the above solution.

0 Kudos

Thanks for your replies.

I am using custom container as a text field.

i want to make custom container invisible when i click on create button.

it is not possible with the above solution.

0 Kudos

Hi,

Loop at SCREEN.

     if screen-name eq 'xyz'.

         screen-invisible = 1.

          modify screen.

     endif.

endloop.

0 Kudos

Hi Sagar,

Pass the Container name and check, it will work.

We use the same methods to make input field hide from the screen.

Regards.

Praveer.

0 Kudos

Hi Praveer

It will work for the normal fields but for custom container it is not working.

0 Kudos

Hi,

Please find the below code.

here con is CL_GUI_CUSTOM_CONTAINER

CALL METHOD con->set_visible
     EXPORTING
       visible           = space
*    EXCEPTIONS
*      cntl_error        = 1
*      cntl_system_error = 2
*      others            = 3
           .
   IF sy-subrc <> 0.
*   Implement suitable error handling here
   ENDIF.


Regards

Praveer.

0 Kudos

Hi Praveer Kumar Sen

Its going to dump .

how to use CALL METHOD con->set_visible method.?

0 Kudos

Hi Sagar,

in PBO of the Screen.

Call the Method SET_VISIBLE. which is Custom Container (CL_GUI_CUSTOM_CONTAINER) method.

To display the Text Field, you have used class CL_GUI_TEXTEDIT.


1. You have initialize the CL_GUI_CUSTOM_CONTAINER object.

     data con      type ref to CL_GUI_CUSTOM_CONTAINER

     CREATE OBJECT con

          exporting

          CONTAINER_NAME = 'YOUR SCREEN CONTAINER NAME'.


2. To Hide the Container.

        call method con->Set_Visible

          exporting

               VISIBLE = SPACE. [pass 'X' for the Visible]


Hope you are clear, how container can be visible or invisible


Regards.

Praveer.


raymond_giuseppi
Active Contributor
0 Kudos

Many GUI object classes (many container classes as well as class cl_gui_textedit) support the method set_visible, did you try toi call this one in PBO?

Regards,

Raymond

0 Kudos

Hi Praveer Kumar Sen,

Its working.

Thank u so much my issue has solved

0 Kudos

Hi Sagar,

Happy to help , Close the thread..

Happy Learning..

Praveer.