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

ABAP - read search help programmatically without popup

former_member201275
Active Contributor
1,380

How can I code in my program, to read search help H_T001 and pass BUKRS value and return the fields in the search help i.e. WAERS.

Everything I have found on here causes a popup which I don't want. The program will run and I will get the BUKRS value from another table, then I want to read the search help H_T001 and return the WAERS.

Please note I don't want to do this in foreground i.e. no popups, this should happen in the program itself.

Thank you kindly in advance. Please note I have tried googling this but to no avail. 😞

1 ACCEPTED SOLUTION
Read only

roberto_forti
Contributor
0 Likes
977

Hi Glen,

Try below example for that scenario and read FIELDNAME and FIELDVAL returned.

Regards

DATA: ls_shlp TYPE shlp_descr,
      lt_ret_ TYPE TABLE OF ddshretval.

  ls_shlp-shlpname = 'H_CREP_DSP' .
  ls_shlp-shlptype = 'SH'.
  ls_shlp-intdescr-dialogtype = 'D'.

  CALL FUNCTION 'F4IF_SELECT_VALUES'
    EXPORTING
      shlp       = ls_shlp
    TABLES
      return_tab = lt_ret_.
...
1 REPLY 1
Read only

roberto_forti
Contributor
0 Likes
978

Hi Glen,

Try below example for that scenario and read FIELDNAME and FIELDVAL returned.

Regards

DATA: ls_shlp TYPE shlp_descr,
      lt_ret_ TYPE TABLE OF ddshretval.

  ls_shlp-shlpname = 'H_CREP_DSP' .
  ls_shlp-shlptype = 'SH'.
  ls_shlp-intdescr-dialogtype = 'D'.

  CALL FUNCTION 'F4IF_SELECT_VALUES'
    EXPORTING
      shlp       = ls_shlp
    TABLES
      return_tab = lt_ret_.
...