‎2005 Nov 21 2:21 PM
Hi Friends,
Is there any function module available for capturing the old screen value.I mean if the change the value from GBP to KRW then it should return GBP?
Thanks,
Abdul
‎2005 Nov 21 2:24 PM
You would have to handle this manually in your program.
I would suggest having an "X" structure to hold old values. For example, say you have a structure with data, lets call it TEST. These are the fields that are presented to the user on the screen. Have an "X" version of the structure, XTEST. In your PBO, move the values from TEST to XTEST. Now you have a copy of the values that are being presented to the user, In the PAI, you can now check for any changes of the data and handle accordingly.
Regards,
Rich HEilman
‎2005 Nov 21 2:24 PM
You would have to handle this manually in your program.
I would suggest having an "X" structure to hold old values. For example, say you have a structure with data, lets call it TEST. These are the fields that are presented to the user on the screen. Have an "X" version of the structure, XTEST. In your PBO, move the values from TEST to XTEST. Now you have a copy of the values that are being presented to the user, In the PAI, you can now check for any changes of the data and handle accordingly.
Regards,
Rich HEilman
‎2005 Nov 21 2:31 PM
Hi Rich,
Actually i have problem with the table control on the screen.It doesnt have item column also.I need to know to which line the user has made changes and the corresponding old value..
Tks,
Abdul
‎2005 Nov 21 2:38 PM
Ok, in your PBO, make a copy of the entire internal table. There should be a LOOP in the PAI of your screen flow logic. Something like this...
PROCESS AFTER INPUT.
* PAI FLOW LOGIC FOR TABLECONTROL 'I_INTRCON'
LOOP AT I_INTR.
[code] CHAIN.
FIELD I_INTR-CHECK.
FIELD I_INTR-RCVQTY.
MODULE I_INTRCON_MODIFY ON CHAIN-REQUEST.
ENDCHAIN.ENDLOOP.
[/code]
Make sure that all you editable fields are part of this chain. Notice the module I_INTRCON_MODIFY. This module is fired to handle the changes to the table control fields.
NOw inside of this module you can check the old internl table and look for the changes.
*********************************************************************
* Module I_INTRCON_MODIFY INPUT
*********************************************************************
module i_intrcon_modify input.
modify i_intr index <b>i_intrcon-current_line.</b>
* Check the changes here. I believe that you can use
* i_intrcon-current_line as your index to the Old data
* table.
read table itab_olddata index i_intrcon-current_line.
if sy-subrc = 0.
* Check changes.
Endif.
endmodule.
Make Sense?
Regards,
Rich Heilman
‎2005 Nov 21 5:09 PM
Hi Rich.
I have solved the problem according to your idea..
Many Thanks,
Abdul Hakim
‎2005 Nov 21 2:24 PM
Hi Abdule,
You can use the get parameter statement.
GET PARAMETER ID pid FIELD dobj.
Regards,
Ravi