Skip to Content

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

Next input field is not populating the values of previous input field

Hi

Pleae see this scenario

I have 2 input fields(say F1 & F2) on my screen. These 2 fields doesn't have any check table. I've created Search Help for the first field and using Match Code object it's displaying the input help for the first field. My requirement is, the second input field should have a restriction so that it should display only the values that are relevant to the value currently available in the first input field.

But, the issue is, using F4 i fetch a value for the 1st input field. And, when I comes to the next input field and presses the F4 button it displays all the values instead of displaying values relevant to the 1st input field. The problem is, when I come to 2nd input field, the 1st input field is empty. So the SELECT query doesn't fetch the relevant data.

Please see the code.

"

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

SELECT-OPTIONS : so_idnorm FOR zcmd_config-idnorm NO INTERVALS OBLIGATORY MATCHCODE OBJECT zsde_configid.

PARAMETERS : p_value LIKE zcmd_config-val OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_value.

SELECT idnorm val INTO TABLE it_config FROM zcmd_config

WHERE zcmd_config~idnorm IN so_idnorm.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'VAL'

dynpprog = 'SY-REPID'

value_org = 'S'

TABLES

value_tab = it_config

return_tab = it_return_tab.

IF sy-subrc = 0.

READ TABLE it_return_tab INDEX 1.

p_value = it_return_tab-fieldval.

ENDIF.

ENDIF.

"

Please guide me to solve this

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