2008 Aug 04 12:18 PM
Hi Experts,
I have a parameter input field
parameters: p_saknr like skb1-saknr obligatory.
Now i want to give the condition it will accept if skb1-mitkz = 'D'. That time only it will accept the input selection. Otherwise i need a error message.
Plz help this issue.
Mohana
2008 Aug 04 12:41 PM
Hi,
Try it like this:
At selection-screen on p_saknr.
select single saknr
from skb1
into w_skb1
where saknr = p_saknr
and mitkz = 'D'.
check sy-subrc NE 0.
message 'error....'.With luck,
Pritam.
Hi Experts,
I have a parameter input field
parameters: p_saknr like skb1-saknr obligatory.
Now i want to give the condition it will accept if skb1-mitkz = 'D'. That time only it will accept the input selection. Otherwise i need a error message.
Plz help this issue.
Mohana
2008 Aug 04 12:22 PM
hiii
you can use it like below code
AT SELECTION-SCREEN OUTPUT
if skb1-mitkz NE 'D'
LOOP AT SCREEN.
IF screen-name CS 'P_NUM'.
screen-input = 0.
MESSAGE e398
WITH 'ENTER CORRECT VALUE..'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
perform accepted_value_result.
ENDIF..
regards
twinkal
2008 Aug 04 12:24 PM
hi,
In the initialzation event check this condition
if condition is false the raise error message else allow to display screen.
bcoz the initialization event triggers before the screen display.
othrwise you also use the PBO event
i.e AT SELECTION SCREEN OUTPUT.
here check condition
if it is false then raise error message
else all the screen to enter user input
hope this will help you
Regards
Jagadeesh
Edited by: Jagadeesh on Aug 4, 2008 1:27 PM
2008 Aug 04 12:26 PM
hi,
use at selection-screen on p_saknr.
and write the conditon...
2008 Aug 04 12:27 PM
Mohana,
put check for message in initialzation event or at-selection screen on field.
am not sure about at selection-screen output.
Amit.
2008 Aug 04 12:28 PM
HI,
at selection-screen.
select single * from skb1
into skb1
where mitkz = 'D'..
if sy-subrc ne 0.
message 'Enter valid num' typ 'E'.
endif.
Points if correct.
2008 Aug 04 12:29 PM
Hi,
First disable the p_sankr.
if skb1-mitkz = 'D'.
LOOP AT SCREEN.
IF screen-name = 'p_saknr'.
screen-input = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
else.
message w888(sabapdocu) with 'Check your input'.
endif.
Regards,
Harish
2008 Aug 04 12:30 PM
parameters: p_saknr like skb1-saknr obligatory.
AT SELECTION-SCREEN on p_saknr.
if p_saknr NE 'D'.
message 'Entser valid input' type 'E'.
endif.
Thanks & Regards,
Rajani MV.
2008 Aug 04 12:31 PM
Hi Vijayan,
Please check this snippet..
AT SELECTION-SCREEN ON P_SAKNR.
IF skb1-mitkz NE 'D'.
MESSAGE 'Error message' TYPE 'E'.
ELSE.
Continue. " specify the code to be performed
ENDIF.
Hope this would help you.
Good luck
Narin
2008 Aug 04 12:31 PM
See it is working code code:
parameters: p_saknr like skb1-saknr obligatory.
AT SELECTION-SCREEN.
if p_saknr ne 'D'.
message.
endif.Amit.
2008 Aug 04 12:41 PM
Hi,
Try it like this:
At selection-screen on p_saknr.
select single saknr
from skb1
into w_skb1
where saknr = p_saknr
and mitkz = 'D'.
check sy-subrc NE 0.
message 'error....'.With luck,
Pritam.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |