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

Function Module for F4 Help for stext ( table Hrp000 ) type field

Hello all,

I have defined one selection parameter as "Event_NAME FOR HRP1000-STEXT" .

But while running the program, system does not provide any drop down for Event_Name,just displaying it as a text field. I wanted a drop down that contains all entries of STEXT in Hrp1000.

For that I have written following code to make drop down available for event name in selection screen.The code is working fine.But the issue is that i can just select one value from the list on selection screen.I need multiple selections.How can i do that??

*****************

PARAMETERS : EV_NAME LIKE HRP1000-STEXT AS LISTBOX VISIBLE LENGTH 50.

PARAMETERS : EV_GRP LIKE HRP1000-STEXT AS LISTBOX VISIBLE LENGTH 50.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR EV_NAME.

SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_NAME WHERE OTYPE = 'E'.

SORT F4_EV_NAME BY EV_NAME.

DELETE ADJACENT DUPLICATES FROM F4_EV_NAME.

LOOP AT F4_EV_NAME.

LWA_VRM2-KEY = F4_EV_NAME-EV_NAME.

APPEND LWA_VRM2 TO L_VRM_VALUES2.

ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = 'EV_NAME'

VALUES = L_VRM_VALUES2

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

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

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

ENDIF.

  • For Event Group*************

AT SELECTION-SCREEN ON VALUE-REQUEST FOR EV_GRP.

SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_GRP WHERE OTYPE = 'L'.

SORT F4_EV_GRP BY EV_GRP.

DELETE ADJACENT DUPLICATES FROM F4_EV_GRP.

LOOP AT F4_EV_GRP.

LWA_VRM3-KEY = F4_EV_GRP-EV_GRP.

APPEND LWA_VRM3 TO L_VRM_VALUES3.

ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = 'EV_GRP'

VALUES = L_VRM_VALUES3

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

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

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

ENDIF.

******************************************************************

Regards,

Aisha Ishrat

ICI Pakistan Ltd.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2007 at 03:45 AM

    I have found myself.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2007 at 04:03 AM

    i have done this as following code:it appears as a range selection parameter but no options available in 2 drop downs.

    any replies??

    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-ft2.

    SELECT-OPTIONS :EV_NAME FOR HRP1000-STEXT,

    SELECTION-SCREEN END OF BLOCK b2.

    AT SELECTION-SCREEN ON EV_NAME.

    SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_NAME WHERE OTYPE = 'E'.

    SORT F4_EV_NAME BY EV_NAME.

    DELETE ADJACENT DUPLICATES FROM F4_EV_NAME.

    LOOP AT F4_EV_NAME.

    LWA_VRM2-KEY = F4_EV_NAME-EV_NAME.

    APPEND LWA_VRM2 TO L_VRM_VALUES2.

    ENDLOOP.

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

    ID = 'EV_NAME'

    VALUES = L_VRM_VALUES2

    EXCEPTIONS

    ID_ILLEGAL_NAME = 1

    OTHERS = 2.

    IF SY-SUBRC <> 0.

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

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

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:18 AM

    Resolved

    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.