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

display fields

Former Member
0 Likes
859

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 ?

7 REPLIES 7
Read only

Former Member
0 Likes
823

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

Read only

0 Likes
823

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 =

.

Read only

abdulazeez12
Active Contributor
0 Likes
823

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

Read only

0 Likes
823

do u have the fulll sample coding for this as i new to abap?

Read only

hymavathi_oruganti
Active Contributor
0 Likes
823

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

Read only

varma_narayana
Active Contributor
0 Likes
823

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>

Read only

0 Likes
823

hi do u hav the full coding for this?