Application Development 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: 

Considering other input fields in f4 help abap

Hello experts,

I have a problem.

I want to do a f4 Help for an input field.

Now I want the programm to consider what is in the other inputfields.

Basically like a join. So that only options are available where the other fields match.

I hope that made sense.

Kind regardes and a huge thanks.

2 REPLIES 2

Hi,

Below code may help you.

PARAMETERS: p_werks TYPE marc-werks,

p_matnr TYPE marc-matnr.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

DATA: lt_dynpfields TYPE TABLE OF dynpread.

lt_dynpfields = VALUE #( ( fieldname = 'P_WERKS' ) ).

CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = lt_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
IF ( lt_dynpfields[ 1 ]-fieldvalue ) IS NOT INITIAL.
****Your logic here
ELSE.
****Your logic here
ENDIF.
ENDIF.

Sandra_Rossi
Active Contributor

It's a basic feature of search helps. Have all these screen fields named with same DDIC structure/table, and link a search help in that DDIC structure/table with all fields linked to the input parameters.