01-16-2015 11:00 AM
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.
01-16-2015 11:06 AM
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
01-16-2015 11:13 AM
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.
01-16-2015 11:24 AM
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.
01-16-2015 11:25 AM
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.
01-16-2015 11:28 AM
Hi,
Loop at SCREEN.
if screen-name eq 'xyz'.
screen-invisible = 1.
modify screen.
endif.
endloop.
01-16-2015 11:37 AM
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.
01-16-2015 12:00 PM
Hi Praveer
It will work for the normal fields but for custom container it is not working.
01-16-2015 12:13 PM
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.
01-16-2015 1:09 PM
01-16-2015 1:24 PM
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.
01-16-2015 12:10 PM
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
01-17-2015 4:08 AM
01-17-2015 4:25 AM
Hi Sagar,
Happy to help , Close the thread..
Happy Learning..
Praveer.