03-27-2007 1:40 PM
Hi Abapers,
i declared four parameters , one is assigned with one parameter is , and the other three are assigned with another parameter id , initially only one parameter has to display , if the entered parameter is valid one , then other three parameters has to be displayed, i wrote the folling code kindly make any corrections to the below code.
parameters:p_kunnr type kna1-kunnr modif id ABC.
parameters:p_vbeln type vbak-vbeln modif id DEF,
p_bukrs type bukrs modif id DEF,
p_werks type werks modif id DEF.
data: w_kunnr type kunnr,
val type i value 1.
at selection-screen .
select single kunnr from kna1 into w_kunnr where kunnr = p_kunnr.
if sy-subrc eq 0.
val = 100.
else.
message e000(0) with 'invalid '.
endif.
start-of-selection.
write:/ 'success'.
at selection-screen output .
IF VAL = 1.
loop at screen.
if screen-group1 = 'DEF'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endif.
endloop.
ENDIF.
IF VAL NE 1.
loop at screen.
if screen-group1 = 'DEF'.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
endif.
endloop.
ENDIF.
Thanks & Regards
Bhaskar Rao.M
03-27-2007 2:55 PM
hai,
Bhaskar try this code...
parameters:
p_kunnr type kna1-kunnr modif id ABC .
parameters:p_vbeln type vbak-vbeln modif id DEF,
p_bukrs type bukrs modif id DEF,
p_werks type werks modif id DEF.
data:
w_kunnr type kunnr,
val type i value 1.
at selection-screen output .
IF p_kunnr is initial.
loop at screen.
if screen-group1 = 'DEF'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endif.
endloop.
ENDIF.
at selection-screen .
select single kunnr from kna1 into w_kunnr where kunnr = p_kunnr.
if sy-subrc ne 0.
message e000(0) with 'invalid '.
endif.
start-of-selection.
if p_vbeln is initial.
message 'error' type 'I'.
else.
write:/ 'success'.
endif.
regards,
ananth
03-27-2007 1:47 PM
03-27-2007 1:50 PM
Hi ,
I am not getting any Error , But Even i give valid value , it is not giving deactivated fields.
Thanks & Regards
Bhaskar Rao.M
03-27-2007 1:53 PM
Hi bhaskar,
I think this is the error.
replace the first parameter declaration with below line
<b>parameters:p_kunnr type kna1-kunnr modif id ABC user-command RAD.</b>Please reward points if helpful
Thanks,
Suma.
03-27-2007 2:03 PM
Hi,
If you press the Enter then only it will show the Disable fields, until unless it will not trigger the Event.
Regards
Sudheer
03-27-2007 2:08 PM
Hi,
when you correct value and press <b>execcte(F8)</b> it goes to at selection screen and then start-of-selection it does not go to at selection screen output event .
so the remainng 3 are not displayed.
when you correct value and press <b>enter</b> it goes to at selection screen and then at selection screen output event then the remainng 3 are displayed.
regards,
anath.
03-27-2007 2:55 PM
hai,
Bhaskar try this code...
parameters:
p_kunnr type kna1-kunnr modif id ABC .
parameters:p_vbeln type vbak-vbeln modif id DEF,
p_bukrs type bukrs modif id DEF,
p_werks type werks modif id DEF.
data:
w_kunnr type kunnr,
val type i value 1.
at selection-screen output .
IF p_kunnr is initial.
loop at screen.
if screen-group1 = 'DEF'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endif.
endloop.
ENDIF.
at selection-screen .
select single kunnr from kna1 into w_kunnr where kunnr = p_kunnr.
if sy-subrc ne 0.
message e000(0) with 'invalid '.
endif.
start-of-selection.
if p_vbeln is initial.
message 'error' type 'I'.
else.
write:/ 'success'.
endif.
regards,
ananth