05-01-2006 9:36 AM
Hi,
how to get help values for a field in the selection screen.?
thanks
Arjun
05-01-2006 9:56 AM
Hi Arjun
you can get possible values using 4 different ways
1. by giving fixed values in the bomain of that field
2. by creating search help in se11 and then assigning it to the data element of that field
3. through foreign key relation ship and
4. you can make your own list of possible values in the event process on value request....
Thanks
05-01-2006 9:39 AM
Dear Arjun,
There are many ways of getting value help in the selection screen.
One of it is that use the Data Element with Domain values defined or value-table defined for the field in selection screen.
Regards,
Deva.
05-01-2006 9:45 AM
Hi,
you can try with the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
try with the sample code. will get some idea.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ldf_tabname " Structure of VALUE_TAB
RETFIELD = LDF_FLDNAME "Name of return field in FIELD_TAB
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = LCF_VAL "Value return
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = TAB_TEMP " Table of Values
FIELD_TAB = LDT_FLDTAB " Fileds of the Hit list
RETURN_TAB = LDT_RETTAB " return the selected value
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE LDT_RETTAB INDEX 1.
DATA: LDT_DFIES LIKE DFIES OCCURS 0 WITH HEADER LINE.
CLEAR LDT_DFIES.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = LDF_TABNANME
FIELDNAME = LDF_FLDNAME
LANGU = SY-LANGU
LFIELDNAME = ' '
ALL_TYPES = ' '
GROUP_NAMES = ' '
UCLEN =
IMPORTING
X030L_WA =
DDOBJTYPE =
DFIES_WA =
LINES_DESCR =
TABLES
DFIES_TAB = LDT_DFIES " Field List
FIXED_VALUES =
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regs
Rakesh
05-01-2006 9:56 AM
Hi Arjun
you can get possible values using 4 different ways
1. by giving fixed values in the bomain of that field
2. by creating search help in se11 and then assigning it to the data element of that field
3. through foreign key relation ship and
4. you can make your own list of possible values in the event process on value request....
Thanks
05-01-2006 9:58 AM
Hai Arjun
Check with the following Code
----
T A B L E S *
----
TABLES : BSID,
COEP.
*Internal Table for Help Values
DATA : BEGIN OF IT_BS OCCURS 0,
UMSKS LIKE BSID-UMSKS,
END OF IT_BS.
----
S E L E C T I O N S C R E E N *
----
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_UMSKZ LIKE BSID-UMSKZ DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK B1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_UMSKS'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_UMSKS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_BS
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Thanks & Regards
Sreenivasulu P