on 01-25-2023 2:30 PM
Dear SAP Experts,
I have a requirement to have a data extract fro belwo requirment. It would be great if you can help me how can I get it as I am not able to think much on this.
We need an extract of FERT-Materials with procurement type F which having Total shelf life maintained (You can . These FERT material should be with procurement type F in all plants i.e should not have been extended to any plant with procurement type E. I have tried with Making Query with table joinn MARA, MARC and different other options but cant get the desired results.
I will be very thankful if you can let me know how can I make this extract.
Regards,
Rohit
To extract the FERT materials with procurement type F that have a total shelf life maintained, you can use the following steps:
Join Tables: You can join the Material Master (MARA) table with the Material Plant (MARC) table and the Material Valuation (MBEW) table.
Filter Criteria: In the MARA table, filter for the procurement type F. In the MARC table, filter for the total shelf life maintained. In the MBEW table, filter for procurement type F in all plants, ensuring that the material is not extended to any plant with procurement type E.
Extract Data: You can extract the relevant data, such as the material number, material description, total shelf life, procurement type, and plant, into an Excel or other desired format.
REPORT z_fert_materials.
TABLES: mara, marc, mbew.
DATA: lt_mara TYPE TABLE OF mara,
lt_marc TYPE TABLE OF marc,
lt_mbew TYPE TABLE OF mbew.
SELECT-OPTIONS: so_matnr FOR mara-matnr,
so_werks FOR marc-werks.
SELECT *
FROM mara
INTO TABLE lt_mara
WHERE ekgrp = 'F'.
SELECT *
FROM marc
INTO TABLE lt_marc
WHERE vstel IS NOT INITIAL.
SELECT *
FROM mbew
INTO TABLE lt_mbew
WHERE ekgrp = 'F'.
LOOP AT lt_mara.
LOOP AT lt_marc.
IF lt_marc-matnr = lt_mara-matnr.
LOOP AT lt_mbew.
IF lt_mbew-matnr = lt_mara-matnr AND lt_mbew-werks = lt_marc-werks.
WRITE:/ lt_mara-matnr, lt_mara-maktx, lt_marc-vstel, lt_mara-ekgrp.
BREAK.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.