cancel
Showing results for 
Search instead for 
Did you mean: 

How can I select field that I want from F4 help?

former_member455947
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

former_member455947
Participant
0 Kudos

Thanks for your reply to my question.

Please help me from my program code I did not understand ur ans. I donot know what is result table. and in t_return I only have text field returned. note Code field.