Skip to Content

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

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 07:35 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 06:07 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.