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

REGARDING SEARCH HELP

hi everybody,

i have a requirement in mm01 tr. in basic data 1,a material gropup field is there.if i press F4 in material group field,

i got three descriptions like,MATL GRO , MATERIL GROUP DESCRIPTIONS & ANOTHER ONE IS DESCRIPTION 2 FOR MAT. GROUP.MY CLIENTS WANTS TO ADD ANOTHER FIELD 'MATERIAL NUMBER' FIELD.

HOW TO ACHIEVE THIS AS A ABAPER.

PLEASE HELP ME.

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 Jan 27, 2008 at 09:43 AM

    Hi Subhasis, check this code.

    See the following ex:

    TYPES: BEGIN OF TY_MBLNR,

    MBLNR LIKE MKPF-MBLNR,

    END OF TY_MBLNR.

    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.

    data: it_ret like ddshretval occurs 0 with header line.

    At selection-screen on value-request for s_mat-low.

    Select MBLNR from mkpf into table it_mblnr.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'MBLNR'

    • PVALKEY = ' '

    • DYNPPROG = ' '

    • DYNPNR = ' '

    • DYNPROFIELD = ' '

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_MBLNR

    • FIELD_TAB =

    RETURN_TAB = IT_RET

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

    IF SY-SUBRC = 0.

    read table it_ret index 1.

    move it_ret-fieldval to S_mat-low.

    ENDIF.

    Go through the test program.

    REPORT Ztest_HELP .

    TABLES : MARA.

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

    PARAMETERS : P_MATNR(10) TYPE C.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA : BEGIN OF ITAB OCCURS 0,

    MATNR TYPE MATNR,

    END OF ITAB.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.

    SELECT MATNR

    FROM MARA

    INTO TABLE ITAB

    UP TO 10 ROWS.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'MATERIAL NUMBER'

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'P_MATNR'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = ITAB

    EXCEPTIONS

    PARAMETER_ERROR = 1

    NO_VALUES_FOUND = 2

    OTHERS = 3.

    kindly reward if found helpful.

    cheers,

    Hema.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 28, 2008 at 04:21 AM

    HI Subhasis,

    Try the following code.

    &----


    *& Report ZZ75586_TEST

    *&

    &----


    *&

    *&

    &----


    REPORT zz75586_test.

    TABLES: mara.

    DATA: BEGIN OF i_mara OCCURS 0,

    matnr like mara-matnr,

    ernam like mara-ernam,

    END OF i_mara.

    SELECTION-SCREEN: BEGIN OF BLOCK b1.

    PARAMETERS: p_matnr LIKE mara-matnr,

    p_ernam LIKE mara-ernam,

    p_mtart LIKE mara-mtart.

    SELECTION-SCREEN: END OF BLOCK b1.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ernam.

    SELECT matnr

    ernam

    FROM mara

    INTO TABLE i_mara.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'ERNAM'

    dynpprog = sy-repid

    dynpnr = sy-dynnr

    dynprofield = 'P_ERNAM'

    value_org = 'S'

    TABLES

    value_tab = i_mara.

    IF sy-subrc <> 0.

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

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

    ENDIF.

    Reward points if helpful.

    Regards,

    Vishal.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:28 AM

    Hi Subhasis, this code will help u reg. search help.

    See the following ex:

    TYPES: BEGIN OF TY_MBLNR,

    MBLNR LIKE MKPF-MBLNR,

    END OF TY_MBLNR.

    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.

    data: it_ret like ddshretval occurs 0 with header line.

    At selection-screen on value-request for s_mat-low.

    Select MBLNR from mkpf into table it_mblnr.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'MBLNR'

    • PVALKEY = ' '

    • DYNPPROG = ' '

    • DYNPNR = ' '

    • DYNPROFIELD = ' '

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_MBLNR

    • FIELD_TAB =

    RETURN_TAB = IT_RET

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

    IF SY-SUBRC = 0.

    read table it_ret index 1.

    move it_ret-fieldval to S_mat-low.

    ENDIF.

    Go through the test program.

    REPORT Ztest_HELP .

    TABLES : MARA.

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

    PARAMETERS : P_MATNR(10) TYPE C.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA : BEGIN OF ITAB OCCURS 0,

    MATNR TYPE MATNR,

    END OF ITAB.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.

    SELECT MATNR

    FROM MARA

    INTO TABLE ITAB

    UP TO 10 ROWS.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'MATERIAL NUMBER'

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'P_MATNR'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = ITAB

    EXCEPTIONS

    PARAMETER_ERROR = 1

    NO_VALUES_FOUND = 2

    OTHERS = 3.

    hope this helps.

    kindly reward if found helpful.

    cheers,

    Hema.

    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.