Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

input help

Hi all.

I got this working code in selection screen. How can i convert this to a dialog screen? This code is for input help.

REPORT ZGARY_SEARCH_HELP.

Data : Begin of li_address,

STRAS type ZSTUDGARY-ADMINOGARY,

ORT01 type ZSTUDGARY-FNAMEGARY,

ORT02 type ZSTUDGARY-LNAMEGARY,

end of li_address.

Data : it_addr like table of li_address.

DATA: progname TYPE sy-repid,

dynnum TYPE sy-dynnr,

dynpro_values TYPE TABLE OF dynpread,

field_value LIKE LINE OF dynpro_values.

Parameters : p_pernr type ZSTUDGARY-ADMINOGARY,

p_addr type ZSTUDGARY-FNAMEGARY.

INITIALIZATION.

progname = sy-repid.

dynnum = sy-dynnr.

  • Search-help for P_WERKS-Low

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_addr.

CLEAR: field_value, dynpro_values, it_addr.

REFRESH dynpro_values.

field_value-fieldname = 'P_PERNR'.

APPEND field_value TO dynpro_values.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = progname

dynumb = dynnum

translate_to_upper = 'X'

TABLES

dynpfields = dynpro_values.

READ TABLE dynpro_values INDEX 1 INTO field_value.

  • Select data to be display on Search Help

Select ADMINOGARY FNAMEGARY LNAMEGARY

into table it_addr

from ZSTUDGARY

where ADMINOGARY = field_value-fieldvalue.

SORT it_addr BY STRAS.

DELETE ADJACENT DUPLICATES FROM it_addr

COMPARING stras ort01 ort02.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'P_ADDR'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'P_ADDR'

value_org = 'S'

TABLES

value_tab = it_addr.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question