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

at seletction sceen

hi,

i need some help the requirement is like this

i have some fields in the select-options i mean in the input screen in which one of the field has to get the values from the given inputs of the same screen, hope my point is clear, so can any body give me an example for this.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 04:01 PM

    Hi Madan,

    Please check this link. It helps you a lot.

    http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm

    Regards,

    Chandra.

    Note: Please reward if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 04:04 PM

    Hi,

    Do u mean to say u need to derive 2nd selection option field from the 1st input ??

    Sunanda

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 04:13 PM

    Hi madan,

    Here my selection screen contains werks and verno(version number).

    I am getting the version number basing upon the value entered for the werks..

    Hope this helps you....

    <b>DATA : IT_DYNPFIELDS LIKE TABLE OF DYNPREAD,

    WA_IT_DYNPFIELDS LIKE LINE OF IT_DYNPFIELDS.

    DATA: IT_RET LIKE TABLE OF DDSHRETVAL,

    WA_RET LIKE LINE OF IT_RET.

    DATA : IT_VALUE LIKE TABLE OF ZMATDISP,

    IT_DYNPFLD LIKE TABLE OF DSELC,

    WA_IT_DYNPFLD LIKE LINE OF IT_DYNPFLD.

    DATA : W_WERKS LIKE PBIM-WERKS.

    MOVE 'PR_WERKS' TO WA_IT_DYNPFIELDS-FIELDNAME.

    APPEND WA_IT_DYNPFIELDS TO IT_DYNPFIELDS.

    CALL FUNCTION 'DYNP_VALUES_READ'

    EXPORTING

    DYNAME = SY-REPID

    DYNUMB = '1000'

    TRANSLATE_TO_UPPER = 'X'

    • REQUEST = ' '

    • PERFORM_CONVERSION_EXITS = ' '

    • PERFORM_INPUT_CONVERSION = ' '

    • DETERMINE_LOOP_INDEX = ' '

    TABLES

    DYNPFIELDS = it_dynpfields

    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.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    READ TABLE IT_DYNPFIELDS INTO WA_IT_DYNPFIELDS

    WITH KEY FIELDNAME = 'PR_WERKS'.

    W_WERKS = WA_IT_DYNPFIELDS-FIELDVALUE.

    SELECT VERNO FROM ZCTM

    INTO CORRESPONDING FIELDS OF TABLE IT_VALUE

    WHERE WERKS = W_WERKS.

    SORT IT_VALUE BY VERNO.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    DDIC_STRUCTURE = 'ZMATDISP'

    RETFIELD = 'VERNO'

    • PVALKEY = ' '

    DYNPPROG = 'ZMONTHLYREPORT'

    DYNPNR = '1000'

    DYNPROFIELD = 'SO_VERNO-LOW'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_VALUE

    • FIELD_TAB =

    RETURN_TAB = IT_RET

    • DYNPFLD_MAPPING = IT_DYNPFLD

    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.</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 04:17 PM

    Hi

    AT selection-screen on value-request for s_field-low.

    Use the FM DYNP_VALUES_READ to capture the entered value on the selection screen and then populate an internal table with the restricted values and display it with the Function Module F4IF_INT_TABLE_VALUE_REQUEST.

    Regards,

    Navneet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2006 at 09:17 AM

    Hi,

    I am sorry for late reply. Pl try following code it will work. If helpful plz reward.

    REPORT Y_TEST1 .

    tables : lfa1,mara.

    SELECTION-SCREEN BEGIN OF BLOCK block1 .

    SELECT-OPTIONS: s_lifnr for lfa1-lifnr,

    s_name1 for lfa1-name1,

    s_matnr for mara-matnr .

    SELECTION-SCREEN end OF BLOCK block1 .

    initialization.

    at selection-screen.

    perform set_default_data.

    start-of-selection.

    write :/ 'Is this one u want'.

    end-of-selection.

    &----


    *& Form set_default_data

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM set_default_data .

    data: l_name1 like lfa1-name1.

    data: l_name2 like lfa1-name1.

    loop at s_lifnr.

    SELECT SINGLE name1 INTO l_name1 FROM lfa1

    WHERE lifnr eq s_lifnr-low.

    if sy-subrc = 0.

    MOVE l_name1 TO s_name1-low.

    endif.

    if s_lifnr-high <> ' '.

    SELECT SINGLE name1 INTO l_name2 FROM lfa1

    WHERE lifnr eq s_lifnr-high.

    if sy-subrc = 0.

    MOVE l_name2 TO s_name1-high.

    endif.

    endif.

    APPEND s_name1.

    endloop.

    Cheers.

    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.