‎2008 Aug 07 11:18 AM
Hi,
I have module-pool prg for which i have some search help.
The requirement is user should be allowed to enter from.
f4-help only.not other vaules.and after entering values the value
enter by user should display beside enter field.
can any one help me..
‎2008 Aug 07 11:21 AM
Hi
U can generate a dropdown list (if the possible hits are few) as search help for the field:
PROCESS ON VALUE-REQUEST.
FIELD T001-BUKRS MODULE F4_FOR_BUKRS.MODULE F4_FOR_BUKRS INPUT.
NAME = 'T001-BUKRS'.
REFRESH LIST.
SELECT * UP TO 10 ROWS FROM T001.
VALUE-KEY = T001-BUKRS.
VALUE-TEXT = T001-BUTXT.
APPEND VALUE TO LIST.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
ENDMODULE. " F4_FOR_BUKRS INPUTU need to set the flag for dropdown list for the field in screen-painter
Max
‎2008 Aug 07 11:21 AM
Hi
U can generate a dropdown list (if the possible hits are few) as search help for the field:
PROCESS ON VALUE-REQUEST.
FIELD T001-BUKRS MODULE F4_FOR_BUKRS.MODULE F4_FOR_BUKRS INPUT.
NAME = 'T001-BUKRS'.
REFRESH LIST.
SELECT * UP TO 10 ROWS FROM T001.
VALUE-KEY = T001-BUKRS.
VALUE-TEXT = T001-BUTXT.
APPEND VALUE TO LIST.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
ENDMODULE. " F4_FOR_BUKRS INPUTU need to set the flag for dropdown list for the field in screen-painter
Max
‎2008 Aug 07 11:21 AM
Hi...
I think you can do validation for a perticuler field in screen program...
( maintain a subroutine with validation part (like in reports with select statement), And call that routine for each action of that screen )
Then..,you need to validate.. that field wrt table, which you are using for the search help.
Or
If it is standard search help provided by SAP the values in the search help for field are defenately from the check table of that field so you can write validation code wrt that check table.
And to display the user name beside... the fild which you enter...
goto screen paintre.... arrange one input out filed just beside the above input field.
Now for that screen field you need the following setting.
>Attributes -> program -> output only check box click.
Now say the Name of this new I/O field is USER....
Fill the USER with sy-uname.. in run time.... with certain action..
Thanks,
Naveen Inuagnti.
‎2008 Aug 07 11:27 AM
hi,
check the values , which is entered in the field , with the values in the
f4 help.
if doesn't exist means , just clear that field.
if u want the value , beside the field means.
create another input field2 next to that field1 , with output only characterstics.
just populate the values in the field2 , which comes in the field1.
Regards,
Sabari
‎2008 Aug 07 11:28 AM
better if you generate Drop Down List for that field
rgds
rajesh
‎2008 Aug 08 4:09 PM
hi,
i have a field Ru there r two entries one R & U.
user must enter R or u or if other then error message.
but it is not showing any error messgae if for other
enteries .
Zacg_ru is check table.
i have coded like this..
PROCESS BEFORE OUTPUT.
MODULE STATUS_0111.
PROCESS AFTER INPUT.
FIELD WKA-RU module module_1 .
MODULE USER_COMMAND_0111.
MODULE CANCEL AT EXIT-COMMAND.
-
MODULE module_1 INPUT.
IF WKA-RU <>''.
SELECT SINGLE RU FROM
ZACG_RU INTO ZRU
WHERE RU = WKA-RU.
IF sy-subrc IS INITIAL.
MESSAGE e002(ZACG_NS) WITH WKA-RU.
ENDIF.
ENDIF.
‎2008 Aug 08 4:37 PM
Use CHAIN ... ENDCHAIN in the flow control.
PROCESS AFTER INPUT.
CHAIN. " <<
FIELD WKA-RU module module_1 .
ENDCHAIN. " <<
MODULE USER_COMMAND_0111.
MODULE CANCEL AT EXIT-COMMAND.
In Module, check the selected value in ZRU field.
MODULE module_1 INPUT.
IF WKA-RU ''.
CLEAR ZRU.
SELECT SINGLE RU FROM
ZACG_RU INTO ZRU
WHERE RU = WKA-RU.
IF ZRU IS INITIAL. " <<
MESSAGE e002(ZACG_NS) WITH WKA-RU.
ENDIF.
ENDIF.
Regards,
Naimesh Patel
‎2008 Aug 09 11:42 AM