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

At user command

Former Member
0 Likes
658

Hi friends,

i have two fields when enter some value in one field and press save button i should populate the other field also with the same value and display the whole screen again.

where do i write this PBO or PAI please help me

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
635

You can write this in the PAI.

Like:

CASE OK_CODE.
  WHEN 'SAVE'. 
     FLD2 = FLD1.
ENDCASE.

Regards,

Naimesh Patel

7 REPLIES 7
Read only

naimesh_patel
Active Contributor
0 Likes
636

You can write this in the PAI.

Like:

CASE OK_CODE.
  WHEN 'SAVE'. 
     FLD2 = FLD1.
ENDCASE.

Regards,

Naimesh Patel

Read only

0 Likes
635

i am doing that but the value is not getting displayed on the screen

Read only

0 Likes
635

Do an extended check on the module pool... and make sure the screen fields have the same name and format as global variables you have defined in you "top" include... the dynpro just acts as a window into your global memory, so if you fill the fields correctly then they should display OK... a break-point in PBO and one in PAI will confirm this.

Jonathan

Read only

Former Member
0 Likes
635

Hi,

Actaully the problem is before displaying the screen it executes PBO, and here the field2 value will be refresh.

IN PBO module.

case sy-ucomm.

when 'SAVE'.

temp_var = field1. " you have to define a variale temp_var.

When others.

endcase.

IN PBO module.

If temp_var = ' '.

field2 = temp_var.

clear temp_var.

endif.

Read only

Former Member
0 Likes
635

Hi,

Write the code in the PAI but be sure that the screen or fields are not getting

refreshed in the PBO because if the screen or fields are getting the refreshed in

the PBO then even though you populate the field in the PAI but after PAI when

the processing goes to PBO the value will get refreshed. So if you have the logic

of clearing data in the PBO you should built the logic such that the clearing part

is not triggered if SAVE button is clicked.

Reward points if this resolves ur query

Read only

0 Likes
635

hi,

simply write in PBO.

if sy-ucomm = 'SAVE'.

var2 = var1.

endif.

Gaurav

Read only

0 Likes
635

HI,

AND ALSO MAKE SURE,YOU ARE CALLING THIS PBO MODULE IN SCREEN FLOW!!!!!!!

Gaurav