cancel
Showing results for 
Search instead for 
Did you mean: 

FM F4IF_INT_TABLE_VALUE_REQUEST not working programme stucks at selection screen.

0 Kudos

Hi Experts,

Below is my code which is not working. when i execute the code it stucks at selection screen only. Please suggest me the corrections required.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE Job_a.

PARAMETERS Buffer_t type timestamp OBLIGATORY.

PARAMETERS Status TYPE BTCSTATUS.


SELECTION-SCREEN END OF BLOCK b1.

* F4 suggestion entry for job status.

AT SELECTION-SCREEN on VALUE-REQUEST FOR status.
PERFORM F4_help.

form F4_help.
SELECT status from tbtco INTO TABLE IT_S.
SORT IT_S.
delete ADJACENT DUPLICATES FROM IT_S.

TYPES:
BEGIN OF lty_char100,
status TYPE char100,
END OF lty_char100.
DATA: lt_values TYPE STANDARD TABLE OF lty_char100.
DATA: ls_values LIKE LINE OF lt_values.
DATA: ls_s LIKE LINE OF it_s.


DATA: lt_ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
ls_ret_tab LIKE LINE OF lt_ret_tab.

LOOP AT it_s INTO ls_S.
ls_values = lS_S-STATUS.
APPEND ls_values TO lt_values.
ENDLOOP .


call FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'status'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'status'
VALUE_ORG = 'S'
TABLES
value_tab = lt_values

RETURN_TAB = lt_ret_tab

EXCEPTIONS
parameter_error = 1
no_values_found = 2.
if sy-subrc = 0.

status = lt_ret_tab-fieldval.


endif.
ENDFORM.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi All,

This question is resolved as i was miising one line in my code.

START OF SELECTION.

Answers (2)

Answers (2)

badan
Explorer

Have you try to capitalize the screen field name "Status"?

0 Kudos

Hi

Thanks for your input. As per my understanding ABAP is not case sensitive and i tried to capatilize also.

Thanks

raymond_giuseppi
Active Contributor
SELECT status from tbtco INTO TABLE IT_S.

Can be expensive in many systems...

To fill an internal table (with text) look at source of form outputlist_build of function group BTCH, if you only want code look at include LBTCHDEF, look for tbtco-status in the source.