‎2006 Dec 05 11:10 AM
Hi Fellow Abapers,
I have a peculiar problem. I have done a Module pool program as below.
PROCESS AFTER INPUT.
CHAIN.
FIELD ztrsc_histh-trptr.
MODULE user_command_0100.
ENDCHAIN.
CHAIN.
FIELD ztrsc_fibld-fidocamt.
MODULE user_fidocamt ON CHAIN-REQUEST.
ENDCHAIN.
MODULE user_command_0100.
CASE sy-ucomm.
WHEN 'NEXT'.
CLEAR ztrsc_fibld-fidocamt.
GET NEXT RECORD AND DISPLAY.
ENDCASE..
ENDMODULE.
Input FIELD ztrsc_histh-trptr is display only after Transporter Code is entered and we press "ENTER" key.
Input FIELD ztrsc_fibld-fidocamt is enabled. I enter some value "10".
i have a button as next. When the next record is shown the next record shows but although I clear FIELD ztrsc_fibld-fidocamt, in the debug mode it clears THE FIELD VALUE ztrsc_fibld-fidocamt AND THEN GETS THE NEXT RECORD AND PUTS THE CORRECT NEXT AMOUNT OF THE NEXT RECORD INTO ztrsc_fibld-fidocamt, but when it appears on the Statement FIELD ztrsc_fibld-fidocamt as per the below code.
CHAIN.
FIELD ztrsc_fibld-fidocamt.
MODULE user_fidocamt ON CHAIN-REQUEST.
ENDCHAIN.
the old value of "10" re-appears although I had cleared it in the previous Module program. What could be the reason.
Regards
Yao Chhang
‎2006 Dec 05 11:16 AM
‎2006 Dec 05 11:18 AM
Hi,
If this is a selection parameter then u can clear the field in pBO module of screen 100.
Hope this helps.
‎2006 Dec 05 11:20 AM
the clear code needs to be written in PBO, as this will trigger and the value gets cleared and the next value gets appeneded.
‎2006 Dec 05 11:20 AM
Is that field declared globally in the program or locally on the screen??
Declare it globally in the program and checkout
‎2006 Dec 05 11:23 AM
HI,
Write a Module in the very first of PBO and Clear this field in that module, seems, it is filling in the TOP include, so write it in Very first in PBO
Regards
Sudheer
‎2006 Dec 05 12:09 PM
Thanks a lot for your prompt answer. Well yes if i clear in the PBO the value gets cleared, but then i wanted to get the next records value into the value field, well the problem got solved in a much easier way i put everything into one chain endchain statement.