Application Development 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: 

help me pls report

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

10 REPLIES 10

former_member223537
Active Contributor
0 Kudos

Refer table MAKT for Material description based on MATNR.

Refer table MARD for remaining fields.

former_member188829
Active Contributor
0 Kudos

Hi,

MARA--->Material number (MATNR Field)

MARA---> Units (MEINS Field)

MARD--->Storage Location(LGORT Field)

MAKT--->Material Description(Maktax Field)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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).

0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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.