Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

Former Member
0 Likes
803

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

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

2 REPLIES 2
Read only

Former Member
0 Likes
701

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
701

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?