2006 Dec 12 1:16 PM
Hi all,
I have 2 parameters in selection screen.
Ex:
parameters: p_vkorg like vbak-vkorg,
p_kunnr like vbak-kunnr.
So if the enterd value in p_vkorg does not exist in vbak i want to disable p_kunnr..
How can we do this?
2006 Dec 12 1:18 PM
Hi,
You can use the event 'AT SELECTION SCREEN ON OUTPUT'.
And use the propperty of the SCREEN table field INPUT set to 0.
Regards,
Vivek Kute.
See the example here.
http://www.sap-img.com/abap/change-the-input-fields-dynamically-in-a-screen.htm
Regards,
Ravi
Note - Please mark all the helpful answers
2006 Dec 12 1:18 PM
Hi,
You can use the event 'AT SELECTION SCREEN ON OUTPUT'.
And use the propperty of the SCREEN table field INPUT set to 0.
Regards,
Vivek Kute.
2006 Dec 12 1:19 PM
See the example here.
http://www.sap-img.com/abap/change-the-input-fields-dynamically-in-a-screen.htm
Regards,
Ravi
Note - Please mark all the helpful answers
2006 Dec 12 1:21 PM
Thanks for replies.
But how you validate the entry for p_vkorg..
<b>We have to validate only in At selection-screen event.</b>
So after validationg how can we disable next paramater?
2006 Dec 12 1:24 PM
2006 Dec 12 1:20 PM
I dont know whether i got you right
normal you do tis validation
At selction-screen on p_vkorg
IF NOT S_PERNR IS INITIAL.
SELECT SINGLE VKORG
FROM VBAK
INTO VBAK-PERNR
WHERE VKORG = P_VKORG.
IF SY-SUBRC NE 0.
MESSAGE E000(ZMESS).
ENDIF.
ENDIF.
If you want to validate two fields then put else condition
and write seond v alidation
2006 Dec 12 1:21 PM
AT SELECTION_SCREEN OUTPUT.
select single vkorg from <tab1> where vkorg = p_vkorg
if sy-subrc NE 0.
loop at screen.
if screen-name = p_kunnr.
screen-input = '0'.
screen-visible = '0'
modify screen.
endif.
endif.
Regs
Manas Ranjan Panda
2006 Dec 12 1:21 PM
Hi,
you can use like this..
Parameters p1 as checkbox modif id z1.
at selection-screen output.
loop at screen.
if screen-group1 = 'Z1'.
screen-input = 0.
modify screen.
endloop.
you can check for p_vkorg is exist in vbak or not.. and disable p_kunnr..
Regards,
Srini
2006 Dec 12 1:23 PM
Initially you can hide the parameter P_KUNNR and when the user enters a value in P_VKORG, it can be enabled :
parameters: p_vkorg like vbak-vkorg,
p_kunnr like vbak-kunnr.
AT SELECTION-SCREEN OUTPUT.
if p_vkorg is initial.
loop at screen.
if screen-name = 'P_KUNNR'.
screen-input = 0.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-name = 'P_KUNNR'.
screen-input = 1.
modify screen.
endif.
endloop.
endif.
Regards,
Deepa
2006 Dec 12 1:24 PM
REPORT YCHATEST LINE-SIZE 350.
TABLES : VBAK.
PARAMETERS: P_VKORG LIKE VBAK-VKORG,
P_KUNNR LIKE VBAK-KUNNR.
AT SELECTION-SCREEN OUTPUT.
SELECT SINGLE VKORG FROM VBAK INTO VBAK-VKORG WHERE VKORG = P_VKORG.
IF SY-SUBRC NE 0.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_KUNNR'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_KUNNR'.
SCREEN-INPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Reward if helpful
2006 Dec 12 1:28 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |