Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

get cursor module pool

Former Member
0 Likes
778

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
460

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

2 REPLIES 2
Read only

Former Member
0 Likes
460

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.

Read only

Former Member
0 Likes
461

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