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

Problem with Long text in Module pool custom screen in IW21

former_member185978
Active Participant
0 Likes
2,599

Hi Experts,

I have a requirement to have custom screen in IW21 with 10 Long text in it.

When I enter data and saves, its saving correctly, but when I enter data in Custom tab, and goes to another tab and comes back to Custom tab, it is not appearing properly when scrolls down or up.

But data is saving correctly when I do Display Notification.

Attaching the screenshots and program for your reference.

Please see and advice.

With Regards,

Bala M

1 ACCEPTED SOLUTION
Read only

former_member185978
Active Participant
0 Likes
2,119

Hi All and Bhaskar,

Problem resolved by debugging. while reloading the Tab ( PBO ) program is creating object for Long text again and again.

So, If you see my initial program and here is the change.

LV_CHECK is checked when first time Long text are loaded and then it will not create any TEXT EDITORs using Create Object.

   if lv_check = ''.
    PERFORM create_object using 'TEXTEDITOR1'.
  endif.

if lv_check = ''.
    PERFORM create_object using 'TEXTEDITOR2'.

  endif.

So... on.....

Anyhow I got helpful answers.

With Regards,

Bala M

Hi Experts,

I have a requirement to have custom screen in IW21 with 10 Long text in it.

When I enter data and saves, its saving correctly, but when I enter data in Custom tab, and goes to another tab and comes back to Custom tab, it is not appearing properly when scrolls down or up.

But data is saving correctly when I do Display Notification.

Attaching the screenshots and program for your reference.

Please see and advice.

With Regards,

Bala M

11 REPLIES 11
Read only

arindam_m
Active Contributor
0 Likes
2,119

Hi,

Chance are you will have to refresh or reread the data when come back to your custom screen.

What might be happening is in you PBO block you just Initialize the screen but that Initialization part should have some logic to read the any text if that exists in DB for that scenario.

Cheers,

Arindam

Read only

0 Likes
2,119

Hi Arindam,

Can you please alobrate / give some sample.

Here there is no need to go to DB to get the text, becos I have not yet saved the Notification, Just Entered Long text and when to any other tab and come back to this long text tab. and try to enter few more data in long text by scrolling down.

Please help.

Read only

arindam_m
Active Contributor
0 Likes
2,118

Hi,

If you have not saved then that tab is actually a Subscreen so see if the Hold data checkbox is checked.

Cheers,

Arindam

Read only

0 Likes
2,118

Hi arindam,

I did the check on Hold, Still problem exits.

With regards,

bala

Read only

arindam_m
Active Contributor
0 Likes
2,118

Hi,

Along with hold data I think any clear of initialization statements in PBO is to be avoided to clear the screen contents.

Cheers,

Arindam

Read only

Former Member
0 Likes
2,118

Hi Bala,

I faced this issue many times while using custom container displays.

I solved this by flushing the gui and loading it up every time when you come to the screen.

Technically, flushing means you are deleting the existing contents on the screen and traces in background. there after you need to built it up again with your screen requirements.

flush the gui( cl_gui_cfw=>flush( ) ).

fetch the required data.

populate the data in required fields.

This 3 steps should happen every time the screens loads up.

Thanks and Regards,

Bhaskar

Read only

0 Likes
2,118

Hi Bhaskar,

I have used cl_gui_cfw=>flush in PBO, Please check my initial attachment PAI_PBO_IW21.txt ( Code exists ).

Please correct me where I need to apply this flush?

please help me in correcting the attached code and paste here.

With Regards,

Bala M

Read only

0 Likes
2,118

Yes Bala,

I see it. please follow below order.

flush the gui.

free all text editor objects.(you can free the text editor objects directly and dont free the custom containers again, they will be automatically freed. if you try to free the custom containers also seperately then some times you get dumps).

create the custom container objects.

map them with the respected test editor objects.

map the data to text editors and do the next required operations like read only..

Let me know if you find any further problems with it.

Thanks and Regards,

Bhaskar

Read only

0 Likes
2,118

Hi Bhaskar,

Thanks for your reply.

I tried to Flush this before and free the object, but not working. Even long text disappeared.

Please send me the code if possible.

With Regards,

Bala

Read only

0 Likes
2,118

Hi Bala,

I can see that there are 10 containers are being created and displayed on the GUI. I below mentioned one container creation and its code. Please repeat this for each container as in your requirement.

After DAta declaration.

cl_gui_cfw=>flush( ).

if text_editor1 is not initial.

     call method text_editor1->free.

     clear: text_editor1, container1(object type ref to CL_GUI_CUSTOM_CONTAINER).

endif.

create object container1

     exporting

          container_name = 'CONTAINER1'.

create object text_editor1

     exporting

          parent = container1.

call method set_text_as_R3table() to display the data in the text_editor1 object.

set text_editor1 as read only according to your requirement.

You dont need to flush the GUI every time for each container. once in the PBO is enough that to at the initializing stage.

Let me know if you find any issues with this.

Thanks and Regards,

Bhaskar

Read only

former_member185978
Active Participant
0 Likes
2,120

Hi All and Bhaskar,

Problem resolved by debugging. while reloading the Tab ( PBO ) program is creating object for Long text again and again.

So, If you see my initial program and here is the change.

LV_CHECK is checked when first time Long text are loaded and then it will not create any TEXT EDITORs using Create Object.

   if lv_check = ''.
    PERFORM create_object using 'TEXTEDITOR1'.
  endif.

if lv_check = ''.
    PERFORM create_object using 'TEXTEDITOR2'.

  endif.

So... on.....

Anyhow I got helpful answers.

With Regards,

Bala M