Skip to Content
author's profile photo Former Member
Former Member

Value in select options not detected

Hi all!

I have a little problem with a field that is informed in my report:

SELECT-OPTIONS: s_bukrs FOR t001-bukrs MATCHCODE OBJECT zbukrs,

s_hbkid FOR t012k-hbkid NO INTERVALS,


First of all, I inform bukrs field on screen. Eg. 1000


Afterwards,In order to enter the hbkid field, I have a matchcode that must be opened with all the values that applies with the bukrs previously selected (1000 in this case).


But, the bukrs is not registed, unless I press Enter or F8 on my select:


SELECT bukrs hbkid

FROM t012k

INTO ls_bank

WHERE bukrs in s_bukrs. ---> This value is empty, unless I press Enter or F8


As you can see, I need that my matchcode displays all values according with the bukrs selected without pressing Enter previously.

Can anyone help me to solve this issue please?

Thanks in advance!

Mario.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Jan 08, 2014 at 09:35 AM

    HI mario ,

    You can use the FM

    DYNP_VALUES_READ

    write this FM inside the POV of s_bukrs field.

    For displaying the search help use FM F4IF_INT_TABLE_VALUE_REQUEST .

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 09:37 AM


    Please read function module DYNPRO_READ_VALUE to get values of select option before the select

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 09:43 AM

    Hi there,

    You have to use AT SELECTION Event for value request.

    Try this code it will solve our need.

    TABLES: t001, t012k.

    TYPES : BEGIN OF ty_f4hbkid,
    bukrs TYPE bukrs,
    hbkid TYPE hbkid,
    END OF ty_f4hbkid.


    DATA: lt_iscr TYPE TABLE OF dynpread ,
    ls_iscr TYPE dynpread ,
    lt_ireturn TYPE TABLE OF ddshretval,
    ls_ireturn TYPE ddshretval,
    v_repid LIKE sy-repid,
    v_dynnr LIKE sy-dynnr.

    DATA: lt_f4hbkid TYPE STANDARD TABLE OF ty_f4hbkid.

    SELECT-OPTIONS: s_bukrs FOR t001-bukrs , "MATCHCODE OBJECT zbukrs,
    s_hbkid FOR t012k-hbkid NO INTERVALS.






    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_hbkid-low.

    *Here reading the select option it bit tricky better you use Parameter for Bukrs
    CLEAR lt_iscr.

    ls_iscr-fieldname = 'S_BUKRS-LOW'.
    APPEND ls_iscr TO lt_iscr.
    v_repid = sy-repid.
    v_dynnr = sy-dynnr.


    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = v_repid
    dynumb = v_dynnr
    TABLES
    dynpfields = lt_iscr
    EXCEPTIONS
    invalid_abapworkarea = 1
    invalid_dynprofield = 2
    invalid_dynproname = 3
    invalid_dynpronummer = 4
    invalid_request = 5
    no_fielddescription = 6
    invalid_parameter = 7
    undefind_error = 8
    double_conversion = 9
    stepl_not_found = 10
    OTHERS = 11.
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.


    READ TABLE lt_iscr INTO ls_iscr WITH KEY fieldname = 'S_BUKRS-LOW'.

    IF sy-subrc EQ 0.

    SELECT bukrs hbkid
    FROM t012k
    INTO CORRESPONDING FIELDS OF TABLE lt_f4hbkid
    WHERE bukrs = ls_iscr-fieldvalue.
    ENDIF.

    ** Calling F4 help function module to assign that retrieved value for that select option pernr
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'HBKID'
    dynpprog = sy-repid " Program name
    dynpnr = sy-dynnr " Screen number
    dynprofield = 'S_HBKID' " F4 help need field
    value_org = 'S'
    TABLES
    value_tab = lt_f4hbkid " F4 help values
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 09:57 AM

    Hi Mario,

    Please add some little bit modification what done in Rakesh.

    TABLES: t001, t012k.

    TYPES : BEGIN OF ty_f4hbkid,
    bukrs TYPE bukrs,
    hbkid TYPE hbkid,
    END OF ty_f4hbkid.

    DATA: lt_f4hbkid TYPE STANDARD TABLE OF ty_f4hbkid.

    SELECT-OPTIONS: s_bukrs FOR t001-bukrs , "MATCHCODE OBJECT zbukrs,
    s_hbkid FOR t012k-hbkid NO INTERVALS.



    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_hbkid-low.

    Perform fetch_data.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_hbkid-high.


    Perform fetch_data.


    form fetch_data.


    SELECT bukrs hbkid
    FROM t012k
    INTO CORRESPONDING FIELDS OF TABLE lt_f4hbkid
    WHERE bukrs IN s_bukrs.

    ** Calling F4 help function module to assign that retrieved value for that select option pernr
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'PERNR'
    dynpprog = sy-repid " Program name
    dynpnr = sy-dynnr " Screen number
    dynprofield = 'S_PERNR' " F4 help need field
    value_org = 'S'
    TABLES
    value_tab = lt_f4hbkid " F4 help values
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.


    endform.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 09:40 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2014 at 09:25 AM

    Thanks guys!

    I've solved this issue by FM dynp_values_read

    Regards and thanks again!

    Mario

    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.