‎2010 Sep 04 9:42 AM
hi gurus,
IF ztpvsigm-drino IS NOT INITIAL.
SELECT SINGLE igmno FROM ztpvsigm
INTO v_igmno1
WHERE drino = ztpvsigm-drino AND
rdats >= ztpvsigm-rdats AND
rdate <= ztpvsigm-rdate.
IF sy-subrc = 0.
set CURSOR field ZTPVSIGM-DRINO LINE 14.
MESSAGE 'The driver resource already blocked' TYPE 'W'.
CALL SCREEN 9000.
ENDIF.
In the above code when record exits in the table then it has to give the error message and cursor should be place at the field .
but here its giving message but screen get disabled.
So how can i place the cursor at the field.
‎2010 Sep 04 10:24 AM
Hi Phani,
For this to happen you need to declare a module in the PAI of your Screen like as below :-
FIELD (your field name goes here MODULE (some module name) ON INPUT.
Double click on the module name & it will direct you to the SE38 & there you can right the above code.
Also refer the bow wiki link for module pool notes.
[Module Pool Notes|http://wiki.sdn.sap.com/wiki/display/Snippets/ModulePoolNotes]
Close the thread if this solves your query. =>Please leave that to the OP.
Regards
Abhii
Edited by: kishan P on Sep 4, 2010 6:10 PM
‎2010 Sep 04 10:21 AM
Hi Phani Chowdary,
You have to write the code in chain module to get the required functionality, i.e, system should throw error message and screen element shouldnot get disabled.
PROCESS AFTER INPUT.
CHAIN.
FIELD S_SCRFLD MODULE CHECK_SCRFLD."Give your screen field in place of S_SCRFLD
In your code, you are issuing a warning message, replace W with E :
MESSAGE 'The driver resource already blocked' TYPE 'W'."Remove W and put E in "TYPE 'W'"
Hope this helps.
Thanks & Regards,
Rock.
‎2010 Sep 04 10:24 AM
Hi Phani,
For this to happen you need to declare a module in the PAI of your Screen like as below :-
FIELD (your field name goes here MODULE (some module name) ON INPUT.
Double click on the module name & it will direct you to the SE38 & there you can right the above code.
Also refer the bow wiki link for module pool notes.
[Module Pool Notes|http://wiki.sdn.sap.com/wiki/display/Snippets/ModulePoolNotes]
Close the thread if this solves your query. =>Please leave that to the OP.
Regards
Abhii
Edited by: kishan P on Sep 4, 2010 6:10 PM