‎2008 Apr 17 12:20 AM
hi friends,
i have written the below code,
everything is working fine, except that, when i press F4 and the popup appears, and when i select a KSCHL value,
in the screen it is showing the description text, instead of KSCHL value.
did anyone come across this problem.
DATA : Begin of Z_NACH2 occurs 0 ,
KSCHL TYPE NACH-KSCHL,
VTEXT type T685T-VTEXT,
End of Z_NACH2.
AT SELECTION-SCREEN on VALUE-REQUEST FOR P_OUTPUT-LOW.
select kschl from NACh into corresponding fields of table Z_NACH2.
select KSCHL VTEXT from T685T into corresponding fields of table I_T685T.
loop at Z_NACH2.
read table I_T685T with key KSCHL = Z_NACH2-KSCHL.
if sy-subrc = 0.
z_NACH2-VTEXT = I_T685T-VTEXT.
modify Z_NACH2 transporting vtext.
endif.
endloop.
sort Z_NACH2 by KSCHL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'P_OUTPUT'
PVALKEY = 'KSCHL'
DYNPPROG = sy-CPROG
DYNPNR = sy-dynnr
DYNPROFIELD = 'P_OUTPUT'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ''
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = Z_NACH2
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks.
Edited by: sanjana on Apr 17, 2008 1:21 AM
‎2008 Apr 17 12:34 AM
Hi Sanjana,
I changed ur function module part. check the below one.
I hope that it solves ur problem.
Regards,
Venkat.O
data:
i_return_tab TYPE STANDARD TABLE OF ddshretval with header line.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'KSCHL' "Field on the F4 help popup
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_OUTPUT' "Field on the selection-screen
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = Z_NACH2
return_tab = i_return_tab
* FIELD_TAB =
return_tab = i_return_tab
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
"Read retutn table and place that on low value of p_output
READ TABLE i_return_tab INDEX 1.
P_OUTPUT-low= w_return_tab-fieldval.
‎2008 Apr 17 12:34 AM
Hi Sanjana,
I changed ur function module part. check the below one.
I hope that it solves ur problem.
Regards,
Venkat.O
data:
i_return_tab TYPE STANDARD TABLE OF ddshretval with header line.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'KSCHL' "Field on the F4 help popup
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_OUTPUT' "Field on the selection-screen
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = Z_NACH2
return_tab = i_return_tab
* FIELD_TAB =
return_tab = i_return_tab
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
"Read retutn table and place that on low value of p_output
READ TABLE i_return_tab INDEX 1.
P_OUTPUT-low= w_return_tab-fieldval.
‎2008 Apr 17 12:55 AM
hi venkat,
thanks for the reply,
your suggestion working
thanks a lott