‎2006 Dec 13 10:24 AM
Hi
What is the OK_CODE for enter?
I have ALV Grid Report with one fld in edit mode. If I enter wrong input it should goto selection screen.
I have ONLI/ENTR/ENTE/space but not working.
Please help me
‎2006 Dec 13 10:25 AM
It might be different for different transactions.
Try looking into the GUISTATUS of the screen for which you want to identify the ok_code. Check under the Function keys section what has been assigned to the Green OK button.
In some cases it might be 'ENTE'.
‎2006 Dec 13 10:39 AM
‎2006 Dec 13 10:41 AM
hi
do like this
go to se80.
give function group name SALV.
in guistatus of that copy STANDARD status to ZSTANDARD for your program.
now assign the gui status in the program for alv assign the OK CODE for ENTER
because in STANDARD GUI status no fn code is assign to save and enter button.
regards
shiba dutta
‎2006 Dec 13 10:43 AM
‎2006 Dec 13 10:52 AM
Hi,
I think the best thing ia to check out what is the User command that is being triggered for enter in Debug mode and use that in your program. It may differ for different purposes. Check out SY-UCOMM field in Debug mode and try to use that in your code.
Regards,
Vijay
‎2006 Dec 13 11:02 AM
HI
if u using report program
ex :
REPORT ZOKCODE .
AT USER-COMMAND .
CASE SY-UCOMM .
WHEN 'DISP' .
WRITE : / ' JJDJDJ' .
WHEN 'EXIT' .
WRITE : /' JHGUU '.
ENDCASE .
suppouse u using module pool program
u can not declare in editr AT USER-COMMAND .
‎2006 Dec 13 11:05 AM
‎2006 Dec 13 11:22 AM
if u want control over selection if u give wrong I / P..
i don't know whether it is useful but,we use like this.
when ever YOUR using 2 blocks ,based on first block selection,2nd has to enable or disable.
like
after parameters:...
<b>AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF VAL = 1 .
SCREEN-INPUT = O.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ELSE.
VAL = 2 .
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.</b>
after AT SELECTION-SCREEN ON P_KUNNR(OR ANY OTHER)
SELECT SINGLE * FROM KNA1 WHERE KUNNR = P_KUNNR.
<b>IF SY-SUBRC <> 0.
MESSAGE I000(0) WITH ' ENTER CORRECT I/P '.
EXIT.
ELSE.
VAL = 2.
ENDIF.
(HERE CONTROL GOES TO SCREEN-INPUT = 1 )</b>
‎2006 Dec 13 11:56 AM
Hi,
Then try checking the OK_CODE and implement the same in your PAI module in the case endcase branching.
Regards,
vijay