2007 Aug 28 9:56 PM
Hi,
Lets take two fields as <b>field A and Field B</b>.
Based on the input given to field A, field B will be mandatory. So if Field B is not entered then it should show error message. Its working fine. but after displaying error message, the cursor should be in field B. but the cursor is in field A.
So how should i code it to set the cursor in Field B?
the order of the fields in screen is First field A then Field B.
can someone help me in this...
Regards,
Amal
Hi,
Lets take two fields as <b>field A and Field B</b>.
Based on the input given to field A, field B will be mandatory. So if Field B is not entered then it should show error message. Its working fine. but after displaying error message, the cursor should be in field B. but the cursor is in field A.
So how should i code it to set the cursor in Field B?
the order of the fields in screen is First field A then Field B.
can someone help me in this...
Regards,
Amal
2007 Aug 28 10:21 PM
Hi Amal,
Code as below..
PARAMETERS : par1 TYPE bukrs,
par2 TYPE waers.
Now do the coding in at selection screen on field event.
AT SELECTION-SCREEN ON par2.
IF par1 EQ 'your desired value for which par2 is mandatory'
AND par2 IS INITIAL.
MESSAGE Exxx WITH 'par2 is mandatory for given value of par1'.
ENDIF.
This code will run such that when the error message is displayed, only par2 will be enebled for input, so the cursor will be in par2 only.. All other fields will be greyed..
Thanks and Best Regards,
Vikas Bittera.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
2007 Aug 28 10:34 PM
Im doing it in module pool. so iam combining the two fields using chain ... endchain. if i didnt use chain endchain then the first field only input enabled.
Regards,
Amal
2007 Aug 28 10:39 PM
Hi Amal,
In the PAI module of CHAIN... ENDCHAIN.. test you condition and set a flag..
In PBO.. check this flag, and code like this..
IF flag EQ 'X'.
LOOP AT SCREEN.
IF screen-name EQ 'your first field name'.
screen-input = 1.
MODIFY screen.
ENDLOOP.
Try to use this and let me know.. also do not forget to clear the flag after this loop, but in the same IF condition..
Thanks and Best Regards,
Vikas Bittera.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
2007 Aug 28 10:39 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |