on 03-17-2018 6:21 PM
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.
Hi All,
This question is resolved as i was miising one line in my code.
START OF SELECTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you try to capitalize the screen field name "Status"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.