Skip to Content
avatar image
Former Member

how to get plant value while using customized screen on material master

I want to add customized fields on material master, I already make all settings on client level,I mean only set matnr as the unique key field .And it works. But I want it to be on plant level. So I set werks as another key field. But when the program goes through the function group I created ,it can not get the plant value from parameter ID WRK. So how can I get werks's value.Can anyone help me?Thanks.

The codes on that function group are as follows:

MODULE GET_DATA OUTPUT.
TABLES:ZPARTAPPEND.
DATA: W_MATNR TYPE MATNR.

IF SY-TCODE = 'MM02' OR SY-TCODE = 'MM03'.
GET PARAMETER ID 'MAT' FIELD W_MATNR.
SELECT SINGLE * FROM ZPARTAPPEND WHERE MATNR = W_MATNR.

ENDIF.

ENDMODULE. " GET_DATA OUTPUT

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 23, 2017 at 05:06 AM

    MODULE get_data OUTPUT.
    TABLES:zmat_cust_field.
    DATA: w_matnr TYPE matnr.
    DATA: w_werks TYPE werks_d.
    IF sy-tcode = 'MM02' OR sy-tcode = 'MM03'.
    GET PARAMETER ID 'MAT' FIELD w_matnr.
    GET PARAMETER ID 'WRK' FIELD w_werks.
    SELECT SINGLE * FROM zmat_cust_field WHERE matnr = w_matnr AND werks = w_werks.
    ENDIF.

    ENDMODULE. " GET_DATA OUTPUT

    Add comment
    10|10000 characters needed characters exceeded

  • May 23, 2017 at 11:22 AM

    Did you use 44410 - Integrating customer-specific fields in the material master to create your dynpro(s) If no could you describe first your process?

    Add comment
    10|10000 characters needed characters exceeded