‎2007 Oct 03 8:01 AM
hi all
i need to display all the field from a table with search help.
User can enter a table name in the input box1. Input box2 will display all the table fields using search help? What must i do ?
‎2007 Oct 03 8:10 AM
Hi Gary,
Use the FM DB_GET_TABLE_FIELDS for this purpose.
Pass the table name in TABNAME parameter and it will return a table (thru the TABLES parameter) which u can capture in an internal table with structure DBFIELD.
Hope i am clear.
Reward points if helpful.
Regards,
Harini.S
‎2007 Oct 03 8:41 AM
let say my studenttable gt studentname, adminno, contactno.
how to define the structure for the DBFIELDS . How to create the internal table for this?
CALL FUNCTION 'DB_GET_TABLE_FIELDS'
EXPORTING
FIELD_INFO = 'A'
TABNAME = studenttable
IMPORTING
SUBRC =
TABLES
DBFIELDS =
.
‎2007 Oct 03 8:14 AM
You can create box1 as
PARAMETERS: box1 type RSRD1-TBMA_VAL.
And box2 as:
PARAMETERS: box2(20) type c.
In INITIALIZATIOn event, fetch all the table fields using the function module CACS_GET_TABLE_FIELDS, and save this in a internal table and then use F4 related function module to attach the search help to box2 field.
Hope this helps..
Reward if useful..
Cheers
Shakir
‎2007 Oct 03 8:44 AM
‎2007 Oct 03 8:15 AM
at input box2 write a function modue.
at selection screen on value-request for input2.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = input1
RETFIELD = '
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = '1000'
DYNPROFIELD = 'INPUT1'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = <b>itab</b>
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
‎2007 Oct 03 8:24 AM
Hi..
1) Call the FM DDIF_FIELDINFO_GET
to get the List of Fields for a DB table and returned to an ITAB.
2) Call the FM
POPUP_WITH_TABLE_DISPLAY
to display this Internal table ITAB in a Pop up.
You can also call the FM
F4IF_INT_TABLE_VALUE_REQUEST
<b>REWARD IF HELPFUL.</b>
‎2007 Oct 03 8:53 AM