on 11-30-2007 5:43 AM
I am displaying F4 help having two fields both are text fields of length 4 and 50 respectivily. First field is key field and I want select this first field in my select-options instead of second field. please help me how can I do this?
I have follwoing program code.
report ZIFT_TEST.
TYPES: BEGIN OF DDODetail,
DDOCode TYPE ZDDO,
DDOText TYPE CHAR50,
END OF DDODetail.
tables: zptcl_hr_ddo.
DATA it_ddo TYPE TABLE OF DDODetail WITH KEY DDOText.
DATA wa_ddo LIKE LINE OF it_ddo.
DATA: t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS: ddoc FOR zptcl_hr_ddo- ddo.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ddoc-low.
PERFORM show_f4_help.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ddoc-high.
PERFORM show_f4_help.
FORM show_f4_help.
wa_ddo-DDOCode = ''.
wa_ddo-DDOText = ''.
APPEND wa_ddo TO it_ddo.
SELECT ddo text FROM zptcl_hr_ddo INTO wa_ddo.
APPEND wa_ddo TO it_ddo.
ENDSELECT.
CLEAR wa_ddo.
SORT it_ddo BY DDOCode.
CALL FUNCTION 'F4IF_INT_TABLE_ VALUE_REQUEST'
EXPORTING
retfield = 'DDOCode'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'ddoc'
value_org = 'S'
display = 'F'
TABLES
value_tab = it_ddo
return_tab = t_return
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.
ENDFORM.
I want to select DDOCode field in my select-options field instead of DDOText please help me how can i do.
Thanks
Iftikhar Ali
Islamabad.
Hi ,
Try giving 'DDOCODE' in capital letters in below code. Where ever you write in ' ' try use capital letters.
CALL FUNCTION 'F4IF_INT_TABLE_ VALUE_REQUEST'
EXPORTING
retfield = 'DDOCode'
and after the function module check , read table t_return index 1.
one more check while executing , what value are you getting in that respect field in debugging.
Regards,
Kiran I
Message was edited by:
Also check the where used list of the function module then you will get some idea of how to use this function module.
kiran i
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Iftikhar,
After the function module 'F4IF_INT_TABLE_ VALUE_REQUEST'. Read the table (Result) where in you will get both code and text . You pass the code to DDOC-low instead of text.
regards,
Kiran I
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.