cancel
Showing results for 
Search instead for 
Did you mean: 

0MAT_PLANT_ATTR enhancement issue

Former Member
0 Kudos
1,663

Hi All,

I am working on the 0MAT_PLANT_ATTR  datasource enhancement wherein I am extracting data for fields like

  1. Reorder Levels – MINBE – (BIW_MARC_S)
  2. Safety Stock  - EISBE - (BIW_MARC_S)
  3. Min. Lot Size – BSTMI – (BIW_MARC_S)
  4. Rounding Value - BSTRF –(BIW_MARC_S)
  5. Lot Size Key - DISLS  - (BIW_MARC_S)
  6. Plant Mat Status – MMSTA - 0MAT_PLANT_ATTR - - present in the DS
  7. Cross Plant Mat Status – MSTAE- 0MATERIAL_ATTR (ES - BIW_MARA_S)

--The issue is I have written a code in cmod -EXIT_SAPLRSAP_002 - to fetch data for field no. 1-7 as they are hidden in the datasource and also use MEINS (Base unit of measure) field of table MARA as reference.

In RSA3, when i execute I am unable to see the data for MEINS and MSTAE - Cross Plant Mat Status fields. both the fields are part of MARA table and not MARC which is the base for 0MAT_PLANT_ATTR datasource.

--Also could you please tell me about the delta functionality of this? I went through some posts which tell me to add field entries to BD52. In ROOSGEN table the message no. is RS0127. I am unable to understand the relevance.

Code:

DATA : wa_mara type mara,

         C_T_DATA_TAB TYPE TABLE OF BIW_MARC_S,

         C_T_DATA_WA TYPE BIW_MARC_S.


WHEN '0MAT_PLANT_ATTR'.

LOOP AT C_T_DATA_TAB INTO C_T_DATA_WA.

        L_TABIX = SY-TABIX.

 

        select single * from mara into wa_mara

          where matnr = C_T_DATA_WA-matnr.

        IF SY-SUBRC = 0.

          C_T_DATA_WA-zzmeins  = wa_mara-meins.

          C_T_DATA_WA-zzeisbe = C_T_DATA_WA-eisbe.

          C_T_DATA_WA-ZZMINBE = C_T_DATA_WA-MINBE.

          C_T_DATA_WA-zzBSTMI  = C_T_DATA_WA-BSTMI.

          C_T_DATA_WA-zzBSTRF  = C_T_DATA_WA-BSTRF.

          C_T_DATA_WA-zzMMSTA  = C_T_DATA_WA-MMSTA.

          C_T_DATA_WA-zzMSTAE  = wa_mara-MSTAE.

          MODIFY C_T_DATA_TAB FROM C_T_DATA_WA INDEX L_TABIX .

        ENDIF.

      ENDLOOP.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for the help, issue has been resolved.

I had to change the code and change the append structure. I found a field AUSME (Quantity field) in the BIW_MARC_S structure which has the domain MEINS and used this as a reference field for all the newly added fields mentioned in the first post.

Answers (2)

Answers (2)

sander_vanwilligen
Active Contributor
0 Kudos

Hi,

The fields MINBE, EISBE,  BSTMI and BSTRF are hidden by SAP although they are available in the Extract Structure. In table ROOSFIELD you can see the field SELECTION is 'A' (Field in OLTP and BW hidden by SAP). There might be a reason why SAP decided to hide those fields (maybe problematic during extraction or provided by another extractor).

The fields DISLS and MMSTA should be available. You might have to unhide them in t/code RSA6.

I cannot find field MSTAE in my ECC system.

As a work-around you can indeed enhance the Extract Structure. If those (standard) fields are not filled in t/code RSA3 (I expect that you checked it during debugging), then you have do program also a look-up on table MARC.

From a performance perspective, please avoid using SELECT SINLGLE. A better approach is to do an array fetch for all Materials in the Data Package and select the entries from MARA and MARC in one go and make them available in an internal table. From here you can READ the data during the LOOP.

Best regards,

Sander

Former Member
0 Kudos

Hi Sander,


Thank you for your reply.

I had one more question regarding the delta, when i have extracted the initialization data from 0MAT_PLANT_ATTR, and then I go back to rsa3 and try extraction again, it does not fill data for the enhanced fields. Is there a setting I need to do in BD52 as I have mentioned in my first post?

"--Also could you please tell me about the delta functionality of this? I went through some posts which tell me to add field entries, the one i have enhanced, to BD52. In ROOSGEN table the message no. is RS0127. I am unable to understand the relevance."


the same is mentioned on the below pages too:

http://help.sap.com/saphelp_nw74/helpdata/en/d3/4f6e52c72d7b6ae10000000a423f68/content.htm

http://scn.sap.com/people/simon.turnbull/blog/2010/04/08/bw-master-data-deltas-demystified

Please let me know. Thanks.

former_member182997
Contributor
0 Kudos

go to rsa6 --> edit the datasource,
and unhide the fields  of the datasource and then generate the datasource.
fields will be available.