08-15-2005 8:55 PM
Hello folks,
Here is my requirement.
If field1 is '01' then gray out field2 and field3 else if field1 is '02' then edit the fields field2 and field3 for the user to enter some values.
I had coded the logic in PBO for the above requirement.
Now if the field1 is '02' then field2 and field3 can not be empty.
For this I am giving an error message coded in PAI.
My problem here is when the error message is displayed the fields field2 and field3 are grayed out. But I want those 2 fields to be displayed for input even after the error message. I will post the logic in my next message.
Thanks,
Naren
08-15-2005 10:13 PM
08-15-2005 8:57 PM
PBO logic
-
if vbap-zv_wc_product = '02'.
loop at screen.
case screen-name.
when 'VBAP-ZV_NC_RCODE'.
screen-input = '1'.
modify screen.
when 'VBAP-ZZV_NC_RCODE_DET'.
screen-input = '1'.
modify screen.
when others.
do nothing
endcase.
endloop.
else.
*disable the fields if the waived charged product is not equal to '02'
loop at screen.
case screen-name.
when 'VBAP-ZV_NC_RCODE'.
screen-input = '0'.
modify screen.
when 'VBAP-ZZV_NC_RCODE_DET'.
screen-input = '0'.
modify screen.
when others.
do nothing
endcase.
endloop.
endif.
endif.
PAI logic
-
*NCR code and NCR detail should not empty when the charge product
*is equal to 02
if vbap-zv_wc_product = '02' and
VBAP-ZV_NC_RCODE is initial and
VBAP-ZZV_NC_RCODE_DET is initial.
message e206(zsd).
endif.
08-15-2005 9:02 PM
use on-input event for field2 and field3. this will make the field2 and 3 turn on in turns. an example code will be like this.
FIELD field2 MODULE chk_field2 ON INPUT.
FIELD field3 MODULE chk_field3 ON INPUT.
08-15-2005 9:27 PM
Hello Arpit,
Thanks for the reply.
But I already coded that for field1. I dont think I need to do that for field2 and field3.
(I tried ur logic...but it didn't worked)
Is there any other way we can get that done.
Thanks,
Naren
08-15-2005 10:07 PM
08-15-2005 10:13 PM
08-15-2005 10:28 PM
Hello,
Very grateful for the responses.
1. I had those three fields in chain and endchain.
module check_fields on chain-input.
I tried it using in PAI and PBO both.
In PAI is doesn't work. But in PBO the problem is when ever the error message is triggered a pop uo window comes up with an EXIT button it. and when we click EXIT it exits the screen which should not happen.
I am still trying various methods.
Thanks,
Naren
08-15-2005 10:54 PM
Let me bring down my requirement a bit now.
When I give an error message in PBO why an error window with EXIT button is coming up.
I dont want that to happen. I want my error message to be displayed on the status bar.
This will solve my problem. Any ideas are most welcome.
Thanks,
Naren
08-15-2005 11:54 PM