11-21-2007 8:04 AM
a classical report shud show Material No., Storage Location, Unit of Measure and Description in addition to group totals.
can anyone help me in this as these are from difernt table i dnt know how to do
i wud like to devlop a standard reprt
pls pls help me
11-21-2007 9:05 AM
Hi jaya,
I can develop a code for ur problem.U can go for subtotals only for NUMC fields only.plz know it once.
If u are satisfy with this code plz give me REWARD POINTS.
i can execute below code.i.e is executed successfully..
code:
----
Tables
----
tables:mara,mard,makt.
----
Internal Table
----
data: begin of itab occurs 0,
matnr like mara-matnr, "material no
meins like mara-meins, "unit of measure
lgort like mard-lgort, "storage location
maktx like makt-maktx, "material description
end of itab.
----
selection screen ----------------------------------------------------------------------
select-options: s_matnr for mara-matnr.
----
Fetch Data ----------------------------------------------------------------------
start-of-selection.
select a~matnr
meins
lgort
maktx
from mara as a
inner join mard as b on amatnr = bmatnr
inner join makt as c on amatnr = cmatnr
into table itab
where a~matnr in s_matnr.
----
Display Data
----
end-of-selection.
sort itab by matnr.
write:/ 'MATNR', 20 'MEINS', 30 'LGORT', 45 'MAKTX'.
loop at itab.
write:/ itab-matnr,
20 itab-meins,
30 itab-lgort,
45 itab-maktx.
endloop.
11-21-2007 8:10 AM
Refer table MAKT for Material description based on MATNR.
Refer table MARD for remaining fields.
11-21-2007 8:10 AM
Hi,
MARA--->Material number (MATNR Field)
MARA---> Units (MEINS Field)
MARD--->Storage Location(LGORT Field)
MAKT--->Material Description(Maktax Field)
11-21-2007 8:33 AM
as there are three different tables.
so first select material , quantity from mara as
select matnr meins from mara into table it_mara
where matnr in s_matnr.
then further select lgort from mard on the basis of all material of it_mara.
if sy-subrc = 0.
select matnr lgort from mard into table it_mard
for all entries in it_mara
where matnr = it_mara-matnr.
then further select description from makt.
select maktx from makt into table it_makt
for all entries in it_mara
where matnr = it_mara-matnr.
endif.
hope this will work for you.
plz reward if it helps.
11-21-2007 8:45 AM
Hi,
Select Material data from
<b>MARA</b> General Material Data
and its descriptions from
<b>MAKT</b> Material Descriptions
after that for each material get storage location details from
<b>MARD</b> Storage Location Data for Material
finally get UOM details for particular materials from
<b>MARM</b> Units of Measure for Material or can get from <b>MARA</b> table itself
<b>Reward Points if useful.</b>
Regards,
Vimal
11-21-2007 8:53 AM
HI jaya,
Check this..
REPORT zreport NO STANDARD PAGE HEADING.
TABLES : mara, mard, makt.
*Data Declaration.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mard-matnr, "material number
meins LIKE mara-meins, "Unit of measure
lgort LIKE mard-lgort, "Storage location
maktx LIKE makt-maktx, "material description
END OF itab.
SELECT-OPTIONS: s_matnr FOR mard-matnr.
START-OF-SELECTION.
SELECT mard~matnr mard~lgort mara~meins INTO CORRESPONDING
FIELDS OF TABLE itab FROM mard
INNER JOIN mara ON mard~matnr = mara~matnr
WHERE mard~matnr IN s_matnr.
LOOP AT itab.
SELECT SINGLE maktx INTO itab-maktx FROM makt
WHERE matnr EQ itab-matnr.
MODIFY itab INDEX sy-tabix.
ENDLOOP.
*write list.
ULINE /(82).
WRITE 😕 sy-vline,
(18) 'Material No.', sy-vline,
(5) 'Loc.', sy-vline,
(6) 'Unit', sy-vline,
(40) 'Description',sy-vline.
ULINE /(82).
LOOP AT itab.
WRITE 😕 sy-vline,
(18) itab-matnr, sy-vline,
(5) itab-lgort, sy-vline,
(6) itab-meins, sy-vline,
(40) itab-maktx, sy-vline.
ENDLOOP.
ULINE /(82).
11-28-2007 4:03 AM
hi,
my code has some modification.
please help me!
a classical report in Material master that outputs Material Vaulted Stock GROUPED BY mATERIAL type and plant.The output shud show Material No., Storage Location, Unit of Measure and Description in addition to group totals.
11-28-2007 4:08 AM
hi,
my code has some modification.
please help me!
a classical report in Material master that outputs Material Vaulted Stock GROUPED BY mATERIAL type and plant.The output shud show Material No., Storage Location, Unit of Measure and Description in addition to group totals.
11-21-2007 9:05 AM
Hi jaya,
I can develop a code for ur problem.U can go for subtotals only for NUMC fields only.plz know it once.
If u are satisfy with this code plz give me REWARD POINTS.
i can execute below code.i.e is executed successfully..
code:
----
Tables
----
tables:mara,mard,makt.
----
Internal Table
----
data: begin of itab occurs 0,
matnr like mara-matnr, "material no
meins like mara-meins, "unit of measure
lgort like mard-lgort, "storage location
maktx like makt-maktx, "material description
end of itab.
----
selection screen ----------------------------------------------------------------------
select-options: s_matnr for mara-matnr.
----
Fetch Data ----------------------------------------------------------------------
start-of-selection.
select a~matnr
meins
lgort
maktx
from mara as a
inner join mard as b on amatnr = bmatnr
inner join makt as c on amatnr = cmatnr
into table itab
where a~matnr in s_matnr.
----
Display Data
----
end-of-selection.
sort itab by matnr.
write:/ 'MATNR', 20 'MEINS', 30 'LGORT', 45 'MAKTX'.
loop at itab.
write:/ itab-matnr,
20 itab-meins,
30 itab-lgort,
45 itab-maktx.
endloop.
11-27-2007 4:54 AM
thank u so much.....
i am going to try this and i will need ur help if i have doubts in further reports
thakks a lot once more
11-28-2007 4:08 AM
hi,
my code has some modification.
please help me!
a classical report in Material master that outputs Material Vaulted Stock GROUPED BY mATERIAL type and plant.The output shud show Material No., Storage Location, Unit of Measure and Description in addition to group totals.