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

pls try this

Former Member
0 Likes
823

Hello Guys.

Every one is helping me a lot, when ever iam asking doubts immediately answers are getting thanks for everyone.

Any how here is the task try to give code for this

Create a report which will give the existing stock for a material. The report should have subtotal of the stock for each storage location & grand total of the stock at the end of the plant.

Plant data should start at new page.

input: selection scree which will allow to select a range of materials.

output: plant storage loc. matl.no. description stock

(unrestricted)

i need reply very soon.

thank you.

6 REPLIES 6
Read only

Former Member
0 Likes
733

are you Giving the Specification...

regards

vijay

Read only

Former Member
0 Likes
733

Please try to start it first and then if you encounter any issues try to post the issue here. If you just paste the specification here, it will not help you in learning.

<b>You are not rewarding or closing your previous posts. The forum needs to know if their answers are helping you or not. If you are not responding back to the forum about the helpfulness of their responses and also if you are not closing them out, then people may ignore your posts. Please close all you previous posts.</b>

Read only

0 Likes
733

Look at MARD table for stock.

Read only

Former Member
0 Likes
733

Hi girish

use the following code to

<b>"Plant data should start at new page.

input: selection scree which will allow to select a range of materials.

output: plant storage loc. matl.no. description stock"</b>

tables: mara, marc, mard.

data: begin of itab1 occurs 0,

matnr like mara-matnr,

end of itab1.

select-options: userno for mara-matnr.

data: begin of itab2 occurs 0,

matnr like mara-matnr,

werks like marc-werks,

end of itab2.

data: begin of itab3 occurs 0,

matnr like mara-matnr,

werks like mard-werks,

lgort like mard-lgort,

end of itab3.

select matnr from mara into table itab1 WHERE MATNR IN USERNO .

if sy-subrc = 0.

if not itab1[] is initial.

select matnr werks from marc into table itab2

for all entries in itab1

where matnr = itab1-matnr.

endif.

endif.

if sy-subrc = 0.

if not itab2[] is initial.

select matnr werks lgort from mard into table itab3

for all entries in itab2

where matnr = itab2-matnr and werks = itab2-werks.

endif.

endif.

WRITE: /(17) 'MATNO'.

WRITE:(5) 'PLANT'.

WRITE:'STRORAGE LOC'.

WRITE:'TABIX'.

WRITE:/ .

loop at itab3.

write:/ itab3-matnr, itab3-werks, ITAB3-LGORT, sy-tabix.

endloop.

but i don understand by what u mean by

<b>"Create a report which will give the existing stock for a material. The report should have subtotal of the stock for each storage location & grand total of the stock at the end of the plant"</b>

Regards

vijay

<b>Provide points if u r satisfeied with the reply</b>

Read only

Former Member
0 Likes
733

Hi,

Are you talking about displaying the current stock of the material, there is one standard transaction in SAP MB52 that will give the Stock levels of the material, you can go thro' the report RM07MLBS associated with the transaction MB52, this might give you the logic how to query the database to get the stocks,

Rgds,

Read only

Former Member
0 Likes
733

Hoping this will help

You should also get from your functional guy what type of stock you should consider. I have given some tables below

depending on the requirement you should select from this.

The first you should get the current period from marv

then go the tables below for the current stock

mbew, ( Material Valuation )

mbewh, ( Material Valuation: History )

ebew, ( Sales Order Stock Valuation )

ebewh ( Sales Order Stock Valuation : History)

qbew ( Project Stock Valuation )

qbewh ( Project Stock Valuation : History

obew ( Valuated Stock with Subcontractor )

obewh (Valuated Stock with Subcontractor: History)

WBEW ( Active Ingredient Valuation)

i hope other things are simple like new-page etc.

Thanks,

Murali