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: 

Hide an object of class CL_DD_DOCUMENT in a screen

Former Member
0 Kudos

Hello all,

I am working on a program running with the following steps :

- Selection-screen

- Display ALV number 1

- When double click on a line in the ALV number 1, a screen 100 is displayed with :

  • 1 ALV number 2 (object from class CL_GUI_ALV_GRID in a custom container O_CUST_CONT)
  • 1 text box (object from class CL_DD_DOCUMENT)
  • 1 other ALV number 3

- The ALV number 2 is editable, the user should enter some value and save

- The user go back (F3) to the ALV number 1

- Then he can double click on the same line and display again the screen 100.

The problem is that at this step, according to the value the user has entered in screen 100, we must only display the ALV number 3, but not the ALV number 2 and not the text box.

For ALV number 2, no problem. I do :

CALL METHOD o_cust_cont->free.

CLEAR o_cust_cont.

CLEAR o_alv_number_2.

And it works fine, the ALV is not displayed.

But for the text box, I can't find any solution. (CLEAR o_text_box...)

The text box is still displayed with the old text inside.

Please advise me how I could do.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

To clear text box, you need to free the custom container that is inside it.

If lo_document is object of class cl_dd_document, code to be called in PBO would be:

lo_document->custom_container->free( ).

2 REPLIES 2

Former Member
0 Kudos

To clear text box, you need to free the custom container that is inside it.

If lo_document is object of class cl_dd_document, code to be called in PBO would be:

lo_document->custom_container->free( ).

0 Kudos

Thanks Manish, this works perfectly !