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

Collective search on the Select-options field on the selection screen

Hello experts,

I have a Y program and a selection screen for it. I have to get the BKPF-BELNR in the search help list. Since the table is too bulky to get all the documents form it. I thought I might need a condition of company code for fetching the documents. I have company code on the selection screen, but if I press F4, on the BELNR, my select-options internal table for <b>company code</b> is remains initial. I think for F4 events the values doesn't get populated in the internal tables, not sure.

Can you tell me, how to get the company code entered on the selection screen, on the F4 event. Or If this doesn't work, will collective search help solve my problem? If yes, Please let me know, which function module I can use to add a collective search to my select-options on the selection screen.

Thanks,

Ganesh Khumse.

Points will be rewarded!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 23, 2007 at 07:17 AM

    Hi ganesh,

    to capture the BUKRS value entered on selection screen you can try with FM : DYNP_VALUES_READ , and after this you can use this BUKRS for limiting the F4 values.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Sandeep Kumar

      Hi Sandeep,

      I tried that already. It doesn't work. I have found out that you can not pass the select-options field to the function module for getting those values. You can only get one value in return for that field i.e. like a parameters. If we pass the S_BUKRS-LOW instead of S_BUKRS, that will work.

      I thought, this will also add to your knowledge.

      But thanks for your help !!

      Regards,

      Ganesh V Khumse

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

    Hi

    do like this

    TYPES : BEGIN OF ST_OBJID_SH,

    OTYPE TYPE HRP1000-OTYPE,

    OBJID TYPE HRP1000-OBJID,

    END OF ST_OBJID_SH.

    DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.

    DATA : WA_OBJID_SH TYPE ST_OBJID_SH.

    ***********SELECTION SCREEN DESIGN***********************

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    *SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .

    SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .

    SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.

    SELECTION-SCREEN END OF BLOCK B1.

    **********END OF SELECTION SCREEN DESIGN*****************

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.

    • IF S_OBJID IS NOT INITIAL.

    SELECT OTYPE OBJID FROM HRP1000

    INTO TABLE IT_OBJID_SH

    WHERE OTYPE = 'D'.

    IF SY-SUBRC EQ 0.

    • SEARCH HELP FOR QUALIFICATION.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'OBJID'

    • PVALKEY = ' '

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'S_OBJID'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_OBJID_SH

    • FIELD_TAB =

    • RETURN_TAB = RETURN_TAB

    • DYNPFLD_MAPPING =

    • 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.

    ENDIF.

    .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 12:46 PM

    I have found out that you can not pass the select-options field to the function module for getting those values. You can only get one value in return for that field i.e. like a parameters. If we pass the S_BUKRS-LOW instead of S_BUKRS, that will work.

    I thought, this will also add to your knowledge.

    Please read the whole thread for details.

    Thanks SDN.

    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.