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: 

Update field value in screen

Former Member
0 Kudos

Hello,

I have a screen with some input fields in the header (e.g. input field s1) and a tree below them. Using a modal dialog box, I add new values in the tree. My problem is that after I enter a specified value (x1) in the input from modal dialog box and I press 'Save', except adding the new node to the tree, I want to update the value from the header (s1 = s1 + x1). I tried to make update on input field, but the value still remains the old one (s1 from the beginning). Could you please give me some suggestions to solve this situation?

Thanks in advance,

Alexandra

5 REPLIES 5

former_member1245113
Active Contributor
0 Kudos

Hi

If you are passing a value to a screen field in PBO and change the value in either PBO or PAI it passes the same old value which is in PBO. so

case first_time.

when ' '.

input_value = 'AAAA'.

first_time = 'X'.

endcase.

from second time onwards it will take the updated value only

and make sure your variables are declared in TOP Include

Hope this will serve your purpose.

Regards

Ramc

0 Kudos

I'm sorry, but could you specify where I should insert this (in PAI or PBO)?

0 Kudos

PBO

0 Kudos

Unfortunately, it doesn't seem to work.

Former Member
0 Kudos

Finally I found a solution that works fine for me. I use

CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'SAVE'.

and for ok_code with value 'Save' I recalculate values from header and then the refresh is done.

Hope this will help somebody in the future.

Thank you all for your answers!