MD04 - Display the stock on one storage location particulary.
The transaction MD04 allows seeing the stock of the plant in the first line of the Stock/requirement list.(MD04)
When the plant includes several storage location (e.g MAG1, MAG2, MAG3), we don't have the detail of the quantity one each storage location.
We can use the filter (by using SETTINGS and FILTER ON) that controls the display of the MRP list and the stock/requirements list but this function don't allows seeing only the stock on one storage location particulary. We have to go the tcode MMBE in order to know the stock on each storage location.
Thanks in advance for yours reply.
What is your real problem?
Display the stock storage location-wise is one thing and do MRP without certain storage location(s) (=exclude storage locations from MRP) might be another.
If you only want to display stock of certain storage locations in MD04 but use all you stock for planning, I think there's no reason for it.
If you really want to exclude certain storage locations, then you have to be aware that MRP won't consider that stock (for the plant segment). It will also have impact on ATP (atp won't use that stock too).
So, there's a big difference between exclude a storage location from MRP and to exclude its stock from display.
(You can exclude storage locations from MRP via material master --> MRP4 view --> you have to enter both plant/sloc as organisational level and you will see the suitable tab. It is also possible to control this indicator via config for to be created material masters - you can search and find threads)
You should describe your exact requirement and maybe forum mebers can give you advice.
Similar Messages
-
Need to display the Stock Values at storage location level - 0IC_C03
Hi All,
I am developing Stock Movent Report on 0IC_C03 - Material Stocks/Movements.
I have more than one storage location for plant. Stock quantities are calculating at storage location level and Stock Values are calculating at plant level.
I have no issues with quantities. Only problem with Values.
2LIS_03_UM is not picking the starage location, so that the revaualtion values are falling under unassigned nodes. When i set filter on storage location these values were not showing as they are under un assigned nodes (#).
I want to get the Stock Quantity and Stock Values at Storage location level in my report.
I found that soulution for that is Applying SAP Note : How to Realize summarized display of stock values on storage
I have done development as per the document. But when i run the Query it is going to debug mode first and then it saying This program cannot display the webpage
Can any one faced the same situation, Please help me if so.
Thanks in Advance.
Gopal NHi Sachein,
I am getting this An exception(CX_RSR_PROPAGATE_X) occured when debugging, and then it leads to next screen saying that:
This program cannot display the webpage
Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.
What you can try:
Check your Internet connection. Try visiting another website to make sure you are connected.
Retype the address.
Go back to the previous page.
More information
Please let me know you need any more information.
Thanks in Advance
Gopal N -
How to realize summarized display of stock values on storage location level
Hi all,
we have implemented in Release 3.5 a report to analyze Stock values on storage location level according to the "How to...realize summarized display of stock values on storage location level"- paper. The report is running witout problems.
Now we are going to upgrade our BW-system to release 7.01 in technical environment, we have not upgraded our reports.
Executing the report in release 7.01 we get an error message "Object field I_S_DATA-0TOTALSTCK not found"
The error is coming from line 14 Inc GET_FIELD_POSITION_D in Prog CL_EXM_IM_RSR_OLAP_BADI.
Unfortunately the document "How to... realize summarized display of stock values on storage location level" can no longer be found in SDN.
Is there any new How to - document for this kind of reporting?
Does anybody can give me advice for chances in coding?
Thank you for answers.
Best regards,
Andreas
Edited by: Andreas Förner on Dec 9, 2009 1:52 PM
I have got a solution from support.
The solution is described in note 924320.
AndreasHi,
I assume you have also created class "ZCL_IM_Z_MATERIAL_PRICE".
In the implementation of virtual InfoObjects
ZCL_IM_Z_MATERIAL_PRICE we have changed the method INITIALIZE:
OLD:
* fill the global variable
UNASSIGN <l_global>.
ASSIGN (l_global_name) TO <l_global>.
CHECK <l_global> IS ASSIGNED.
<l_global> = cl_exm_im_rsr_olap_badi=>get_field_position_d(
i_fieldnm = <l_s_sfk>-kyfnm <--
i_s_data = i_s_data ).
ENDLOOP.
NEW:
* fill the global variable
UNASSIGN <l_global>.
ASSIGN (l_global_name) TO <l_global>.
CHECK <l_global> IS ASSIGNED.
<l_global> = cl_exm_im_rsr_olap_badi=>get_field_position_d(
i_fieldnm =
<l_s_sfk>-VALUE_RETURNNM
i_s_data = i_s_data ).
ENDLOOP.
This solved our issue. Please regenerate the query after
implementing the correction.
Hope it solves you issue too.
Best regards, -
QI stock from one Storage location to other
I have a scenario where QM is implemented and Material is received in storage location "A" against purchase order through movement type 101.But for testing we need to send material to storage location"B"for testing. I want to send the material under inspection lying in storage location "A" to "B" for testing purpose. Is it possible to move stock under quality inspection , If yes through which movement tyep. Is there any process in QM which allows the stock under quality inspection to move.
Thanks in advance
Regards,
Jeewanhi
Goto MB1B and try with this movement types
311 Transfer posting storage location to storage location in one step
The quantity is transferred from unrestricted-use stock of the issuing storage location to unrestricted use in the receiving storage location.
Possible special stock indicators: E, K, M, Q
313 Stock transfer storage location to storage location in two steps - removal from storage
The quantity is transferred from unrestricted-use stock of the issuing storage location to stock in transfer in the receiving storage location.
Possible special stock indicators:
K Goods receipt for purchase order to consignment stock
O Goods receipt for purchase order to stock of material provided to vendor
E GR for purchase order or order to sales order stock
Q GR for purchase order or order to project stock.
Regards -
Stock Transfer between Storage Location with Order
Dear MM experts,
I am into SAP SD.
Our client wants to Transfer Stock from one Storage Location to another Storage Location of the same Plant. (This can be easily done thru MB1B via Transfer Posting)
But the unique requirement here is they require some kind of Delivery Order or Tansfer Order to be created first & only based on that document user can transfer Stock between Storage Locations of a same Plant. (Similar to Inter-Plant Stock Transfer where we create Stock Transfer PO & then move goods between plants).
Can you please suggest on how to achieve the above scenario.
Thanks,
Jignesh Mehta
Mumbaihi
Stock Transfer between Storage Locations
u2022 Function of stock transport orders between storage locations is available from ECC 6.0 onwards.
u2022 As a result of which user can input issuing storage location with supplying plant.
u2022 Facility of using different delivery types for different issuing storage locations is available.
u2022 Shipping Point data can also be determined based on the issuing storage location.
refer following
http://sapfunctional.com/MM/StockTransfer/Configure.htm
http://help.sap.com/saphelp_scm41/helpdata/EN/23/29cf20eabe094e957763a46aa5be9d/content.htm
regards
kunal -
Hi All,
we have the below warehouse structure:
Plant............................P
....................................|
Stor Loc.......................S
....................................|
WNum.........................W
Stor type...................T1..T2
I tried to do a consignment movement 411K (from special stock K to own stock), inside ONE storage location, from storage type T1 to storage type T2.
Unfortunately I have not any MM document with consignment consuption
(mov 411K).
Is it possible have this behavior ? Or not?
Thanks a lot.
Bye
MatteoHello Matteo,
If you want to change the consignment stock as your own stock then you need to transfer posting using 411 K for that consignment material which will create material document and accounting document (to make the consignment stock as valuated stock). Then you need to create the TO based on this transfer posting using LT06 with reference to material document.
If you will try to change the status of material at warehouse level then it will create discrepancy in your valuate stock at IM level and WM level.
Hope this helps.
Regards
Arif Mansuri -
How to transfer blocked stock from one storage loc to other storage loc
Hi,
Kindly let me know the procedure to transfer the blocked stock from one storage location to other storage location within a plant.
Regards
RajeshI guess you have to convert it to unrestricted type before you can transfer, then reconvert it back to blocked.
Not too sure.
Regards,
Srihari -
Consignment stock in an storage location for one customer
We have one procedure for consignment to customers. We create one sales order type KB (consignment fill up), and after receiving the material after creating PO and inbound delivery, we create the outbound delivery and then goods issue to send the material to the customer.
With the current procedure, we are not currently able to distinguish between the consignment for the sale and the consignment for maintenance purpose, as for a few customers, we want to keep the material located in one storage location created for that special customer so it appears in the inventory separated from the general current customer consignment. With the current procedure, once the GI is done, the material goes to customer consignment and does not appear in any storage location.
Do you know how we could create the new procedure?
Thanks and regards.if we want to retrieve the material from customer consignment to unrestricted
Either you can create a consignment pick up and a return delivery or reverse the original delivery so that the stock would be increased in the parent plant.
For more details, check this thread
[Return consignment stock to blocked stock|Re: Return consignment stock to blocked stock]
thanks
G. Lakshmipathi -
To stock transfer the RM to Production storage Location
Dear All,
I want to stock transfer the RM from Store to production storage location after that I have to pick the material against Production Order from Production Storage Location.
How I can carry out this scenario.
I am trying through Pull list.
please give ur valuable inputs.
Thanks in advance
Vijay Mankar.Hi Vijay,
To tranfer the stock from store to Prod storage location , u can do in two ways,
1.Pull list - By accesing the Pullist with the production order .if there is no enough stock to meet production qty at production storage location , system calculate the missing part and asks replenishment storage location. here u have to give your store as repl.storage location
2. Enter tranfer posting.( MB1B) - using this u can tranfer the stock dierctly from the store to prodution storage location. u have to use 311 Mvt type and define Rec storage location is store.
3. Enter good issue MB1A - u can pick the raw material with reference to your prodution order using 261 Movement Type.
please reward if it helps
regards
pradeep -
Opening and closing Stock report at Storage location level- date wise
Dear all
Is there any standard report to view opening and closing stock at storage location level? ( we have MB5B which resets the entry screen if we enter SLOC details).
Thanks
SamDo I have the option of selecting Storage Location wise opening and closing stock on a particular date or period, that is what I have requested? Is it possible, evenafter selecting storageloc/batch stock and entering all the SLOCs in the selection creen, the report output does not contain any SLOC, and using ctrl+F8 or display variant does not have SLOC as a field also.
pls gudie
sam -
MRP run without one storage location
Dear All,
My client's requirement is they need to run MRP on plant level without considering one storage location stock
e.g if a material is having stock of 10 in unrestricted with storage location 1104. Now when mrp is run for 100 quantity planned order is created for 90 only planning strategy is 40....they want the MRP should not consider the stock in storage location 1104.....how this can be made possibe?
Please Suggest...
Regards,
Pawan ShettyDear all,
Pl. help me which user exit implemented for MRP RUN without Storage location ,b'coz. from slandered setting we are not able to do the same
Regards
Sandeep -
The business does not want to use MRP areas to segregate materials between service part and production. What they want to do is separate service parts on deliveries at our shipping storage types (915/916) from MRP view. This requirement is primarily for our international shipping area. We may pick parts for an international shipment and the parts will sit on the delivery - not goods issued because we don't want to invoice - for up to 3 months. During that time, MRP sees the inventory so replenishment is not done in a timely fashion or parts may get stolen from the shipment for a production requirement because the inventory is seen.
Could one solution be to create a non-MRP relevant storage location (say 1200) and place the shipping storage types in this storage location? Then when the transfer order creates, the system would show the source to be from the MRP relevant SLoc (1100), stype (130), bin (A-01-A), - these are examples - with the destination to be to non-MRP relevant SLoc 1200, stype 915, bin (dynamic using the delivery number) 0080745298? Has anyone had this type of request or know of a way to satisfy the business requirements without different MRP areas? They also do not want to have two transfer orders - one with a 601 movement and one with a 311 movement.
Any known solutions or outside-the-box thinking would greatly appreciated.
MarlaI don't have the solution, just some critical questions and hints
Even a non-MRP relevant storage location can be warehouse managed.
The stock is shown in any stock list as long it is not goods issued, no matter if it is stored in a
non-MRP relevant storage location.
Stock that is picked for a delivery is not available for others, it is reserved. A delivery is a MRP element and hence should be taken into consideration in the planning run.
A non-MRP relevant storage location will only solve your planning issues if you move the material there if it is not yet picked and allocated to a delivery.
Do your thieves really use SAP to check if the stock is there, or do they just see the stock in the warehouse? As said, the non-MRP relevant storage location will not solve this issue since the stock is still visible. -
Really urgent: seperation of dates for displaying the stock
hi,
I am modifying a report in which i have to display the stock in the following way:-
1.) If P_DATE(15.03.2008) then it should display the stock of previous month as the stock it stored on always on the last date of each month.
2.) If P_DATE(16.03.2008) then it should display the stock of this month as the stock it stored on always on the last date of each month.
my requierment is how to display it?
plzz help me out as help will be deifnately rewarded.
Edited by: ric .s on Mar 15, 2008 6:09 AM
Edited by: ric .s on Mar 15, 2008 6:15 AMHI,
plz go through the code and try to analyze it ,u will not be abel to run dis code as it consist of the table which is made by the programmers.
*& Report ZPP_INV_COPY1
REPORT ZPP_INV_COPY1 NO STANDARD PAGE HEADING LINE-SIZE 150.
TABLES : MARA, MAKT, MARD, MKPF, MSEG, T001L,ZSTOCKSUM.
TYPE-POOLS : SLIS.
**DATA : BEGIN OF STIT OCCURS 0,
BUDAT LIKE MKPF-BUDAT,
MATNR LIKE MSEG-MATNR,
WERKS LIKE MSEG-WERKS,
LGORT LIKE MSEG-LGORT,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
ERFMG LIKE MSEG-ERFMG,
ERFME LIKE MSEG-ERFME,
SHKZG LIKE MSEG-SHKZG,
BWART LIKE MSEG-BWART,
DATA : BEGIN OF STIT OCCURS 0,
STLDATE LIKE ZSTOCKSUM-STLDATE,
MATNR LIKE ZSTOCKSUM-MATNR,
WERKS LIKE ZSTOCKSUM-WERKS,
LGORT LIKE ZSTOCKSUM-LGORT,
STSTOCK LIKE ZSTOCKSUM-STSTOCK,
STDEBIT LIKE ZSTOCKSUM-STDEBIT,
STCREDIT LIKE ZSTOCKSUM-STCREDIT,
MEINS LIKE MARA-MEINS,
MTART LIKE MARA-MTART,
MATKL LIKE MARA-MATKL,
NTGEW LIKE MARA-NTGEW,
GEWEI LIKE MARA-GEWEI,
WTKG LIKE MARA-NTGEW,
STOCK TYPE P LENGTH 10 DECIMALS 3,
WT TYPE P LENGTH 12 DECIMALS 3,
END OF STIT.
DATA : BEGIN OF SLIT OCCURS 0,
LGORT LIKE T001L-LGORT,
LGOBE LIKE T001L-LGOBE,
ROH TYPE P LENGTH 12 DECIMALS 3,
ZBOP TYPE P LENGTH 12 DECIMALS 3,
FERT TYPE P LENGTH 12 DECIMALS 3,
HALB TYPE P LENGTH 12 DECIMALS 3,
ZSCR TYPE P LENGTH 12 DECIMALS 3,
TOT TYPE P LENGTH 12 DECIMALS 3,
crrow type P length 3,
END OF SLIT.
DATA : ITAB LIKE STIT OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF ITAB1 OCCURS 0,
MTART LIKE MARA-MTART,
END OF ITAB1.
******************OLD ITAB2****************
**DATA : BEGIN OF ITAB2 OCCURS 0,
LGORT LIKE MSEG-LGORT,
END OF ITAB2.
*************NEW ITAB2**********************
DATA : BEGIN OF ITAB2 OCCURS 0,
LGORT LIKE ZSTOCKSUM-LGORT,
END OF ITAB2.
DATA : V_QTY TYPE P LENGTH 12 DECIMALS 3,
V_QTY1 TYPE P LENGTH 12 DECIMALS 3,
V_ALV TYPE C,
V_MAXROW TYPE P LENGTH 3.
AT LINE-SELECTION.
DATA : V_COL TYPE N LENGTH 3,
V_ROW TYPE N LENGTH 3,
V_RHDR LIKE T001L-LGORT,
V_CHDR LIKE MARA-MTART,
w_msg TYPE string.
IF SY-LSIND = 1.
V_COL = SY-CUCOL.
V_ROW = SY-CUROW.
V_RHDR = ''.
V_CHDR = ''.
PERFORM GET_PARM.
IF V_ROW <> 999.
PERFORM PRN_ITSTOCK.
ENDIF.
endif.
start-of-selection.
selection-screen begin of block par1 WITH FRAME TITLE TEXT-001.
*PARAMETERS : P_DATE LIKE MKPF-BUDAT OBLIGATORY DEFAULT sy-datum.
*PARAMETERS : P_WERKS LIKE MSEG-WERKS DEFAULT 'MFPL'.
PARAMETERS : P_DATE LIKE ZSTOCKSUM-STLDATE OBLIGATORY DEFAULT sy-datum.
PARAMETERS : P_WERKS LIKE ZSTOCKSUM-WERKS DEFAULT 'MFPL'.
SELECT-OPTIONS : MAT_TYPE FOR MARA-MTART.
****SELECT-OPTIONS : P_MATNR FOR MSEG-MATNR.
****SELECT-OPTIONS : P_STLOC FOR MSEG-LGORT.
SELECT-OPTIONS : P_MATNR FOR ZSTOCKSUM-MATNR.
SELECT-OPTIONS : P_STLOC FOR ZSTOCKSUM-LGORT.
SELECTION-SCREEN END OF BLOCK par1.
***SELECTION-SCREEN BEGIN OF BLOCK OPSC
***WITH FRAME TITLE TEXT-002.
***SELECTION-SCREEN BEGIN OF LINE.
***PARAMETERS ALV RADIOBUTTON GROUP OP.
***SELECTION-SCREEN COMMENT 4(13) TEXT-011 FOR FIELD ALV.
***SELECTION-SCREEN END OF LINE.
***SELECTION-SCREEN BEGIN OF LINE.
***PARAMETERS SCR RADIOBUTTON GROUP OP DEFAULT 'X'.
***SELECTION-SCREEN COMMENT 4(13) TEXT-012 FOR FIELD SCR.
***SELECTION-SCREEN END OF LINE.
***SELECTION-SCREEN END OF BLOCK OPSC.
AUTHORITY-CHECK OBJECT 'ZPLANT1'
ID 'WERKS' FIELD P_WERKS.
IF sy-subrc <> 0.
MESSAGE e045(zmsg) WITH P_WERKS.
ENDIF.
PERFORM GET_INI_DATA.
PERFORM GET_GRP_DATA.
V_ALV ='N'.
PERFORM PRN_SMSTOCK_TXT.
*& Form GET_INI_DATA
text
--> p1 text
<-- p2 text
form GET_INI_DATA .
******************ORG******************************************
SELECT AMATNR BWERKS BLGORT AMEINS AMTART AMATKL ANTGEW AGEWEI A~NTGEW
FROM MARA AS A INNER JOIN MSEG AS B ON AMATNR = BMATNR
INTO TABLE ITAB
WHERE B~WERKS = P_WERKS
AND A~MATNR IN P_MATNR
AND ( MTART = 'FERT' OR MTART = 'HALB' OR MTART = 'ZBOP' OR MTART = 'ZSCR' OR MTART = 'ROH' )
AND MTART IN MAT_TYPE
GROUP BY AMATNR BWERKS BLGORT AMEINS AMTART AMATKL ANTGEW AGEWEI A~NTGEW.
***************************PREV CHANGE***********************************
SELECT BBUDAT AMATNR AWERKS ALGORT AMENGE AMEINS AERFMG AERFME ASHKZG ABWART
CMTART CMATKL CNTGEW CGEWEI C~NTGEW
FROM MSEG AS A INNER JOIN MKPF AS B ON AMBLNR = BMBLNR AND AMJAHR = BMJAHR
INNER JOIN MARA AS C ON AMATNR = CMATNR
INTO TABLE STIT
WHERE AWERKS = P_WERKS AND AMATNR IN P_MATNR AND BUDAT <= P_DATE
AND MTART IN MAT_TYPE
AND ( MTART = 'FERT' OR MTART = 'HALB' OR MTART = 'ZBOP' OR MTART = 'ZSCR' OR MTART = 'ROH' )
AND A~LGORT IN P_STLOC.
*****************************NEW CHANGE AS ON 26.02.2008*********************************
*AERFMG AERFME ASHKZG ABWART
SELECT ASTLDATE AMATNR AWERKS ALGORT ASTSTOCK ASTDEBIT A~STCREDIT
CMEINS CMTART CMATKL CNTGEW C~GEWEI
FROM ZSTOCKSUM AS A
INNER JOIN MARA AS C ON AMATNR = CMATNR
INTO TABLE STIT
WHERE AWERKS = P_WERKS AND MTART IN MAT_TYPE AND AMATNR IN P_MATNR AND STLDATE <= P_DATE
AND ( MTART = 'FERT' OR MTART = 'HALB' OR MTART = 'ZBOP' OR MTART = 'ZSCR' OR MTART = 'ROH' )
AND A~LGORT IN P_STLOC.
AND
ITAB[] = STIT[].
SORT ITAB BY MATNR WERKS LGORT MEINS MTART MATKL NTGEW GEWEI NTGEW.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR WERKS LGORT MEINS MTART MATKL NTGEW GEWEI NTGEW.
SORT STIT BY MATNR LGORT.
*SHKZG
SORT ITAB BY MATNR LGORT.
LOOP AT ITAB.
V_QTY = 0.
V_QTY1 = 0.
*************************PREVIOUS**********************s*
LOOP AT STIT WHERE MATNR = ITAB-MATNR AND LGORT = ITAB-LGORT.
IF STIT-SHKZG = 'S'.
V_QTY = V_QTY + STIT-MENGE.
V_QTY1 = V_QTY1 + STIT-ERFMG.
ELSE.
V_QTY = V_QTY - STIT-MENGE.
V_QTY1 = V_QTY1 - STIT-ERFMG.
ENDIF.
ENDLOOP.
*************************NEW*****************************
LOOP AT STIT WHERE MATNR = ITAB-MATNR AND LGORT = ITAB-LGORT.
V_QTY = V_QTY + STIT-STDEBIT - STIT-STCREDIT.
ENDLOOP.
IF V_QTY <> 0.
ITAB-STOCK = V_QTY.
IF ITAB-NTGEW <> 0 AND ITAB-GEWEI <> 'KG'.
CALL FUNCTION 'ZGET_ITEM_WEIGHT'
EXPORTING
P_BUID = ITAB-WERKS
P_ITEMID = ITAB-MATNR
P_QTY = ITAB-NTGEW
P_UOM = ITAB-GEWEI
P_UOM1 = 'KG'
IMPORTING
P_RETVAL = ITAB-WTKG.
ENDIF.
ENDIF.
CONVERTING ITEM QTY IN KG
ITAB-WT = ITAB-STOCK.
IF ITAB-MEINS = 'G'.
ITAB-WT = ITAB-STOCK / 1000000.
ELSEIF ITAB-MEINS = 'KG'.
ITAB-WT = ITAB-STOCK / 1000.
ELSEIF ITAB-MEINS <> 'TO'.
ITAB-WT = ITAB-STOCK * ITAB-WTKG / 1000.
ENDIF.
MODIFY ITAB.
ENDIF.
ENDLOOP.
endform. " GET_INI_DATA
*& Form GET_GRP_DATA
text
--> p1 text
<-- p2 text
form GET_GRP_DATA .
SELECT LGORT LGOBE FROM T001L INTO TABLE SLIT WHERE WERKS = P_WERKS.
SORT SLIT BY LGORT.
SORT ITAB BY LGORT MTART.
LOOP AT SLIT.
LOOP AT ITAB WHERE MTART = 'ROH' AND LGORT = SLIT-LGORT AND STOCK <> 0.
SLIT-ROH = SLIT-ROH + ITAB-WT.
ENDLOOP.
LOOP AT ITAB WHERE MTART = 'ZBOP' AND LGORT = SLIT-LGORT AND STOCK <> 0.
SLIT-ZBOP = SLIT-ZBOP + ITAB-WT.
ENDLOOP.
LOOP AT ITAB WHERE MTART = 'HALB' AND LGORT = SLIT-LGORT AND STOCK <> 0.
SLIT-HALB = SLIT-HALB + ITAB-WT.
ENDLOOP.
LOOP AT ITAB WHERE MTART = 'FERT' AND LGORT = SLIT-LGORT AND STOCK <> 0.
SLIT-FERT = SLIT-FERT + ITAB-WT.
ENDLOOP.
LOOP AT ITAB WHERE MTART = 'ZSCR' AND LGORT = SLIT-LGORT AND STOCK <> 0.
SLIT-ZSCR = SLIT-ZSCR + ITAB-WT.
ENDLOOP.
SLIT-TOT = SLIT-ROH + SLIT-ZBOP + SLIT-HALB + SLIT-FERT + SLIT-ZSCR.
IF SLIT-TOT = 0.
DELETE SLIT.
ELSE.
MODIFY SLIT.
ENDIF.
ENDLOOP.
endform. " GET_GRP_DATA
*& Form PRN_ITSTOCK
text
--> p1 text
<-- p2 text
form PRN_ITSTOCK .
Data : hdr type c length 100,
V_PTYPE LIKE MARA-MTART,
V_PSTLOC LIKE MSEG-LGORT,
V_ITEM LIKE MAKT-MAKTX,
T_QTY1 TYPE P LENGTH 12 DECIMALS 3,
T_QTY2 TYPE P LENGTH 12 DECIMALS 3,
T_QTY3 TYPE P LENGTH 12 DECIMALS 3,
T_WT1 TYPE P LENGTH 12 DECIMALS 3,
T_WT2 TYPE P LENGTH 12 DECIMALS 3,
T_WT3 TYPE P LENGTH 12 DECIMALS 3.
hdr = 'INVENTORY REPORT '.
IF V_CHDR = 'ROH'.
CONCATENATE HDR '(RAW MATERIAL) ' INTO HDR.
ELSEIF V_CHDR = 'ZBOP'.
CONCATENATE HDR '(BOP) ' INTO HDR.
ELSEIF V_CHDR = 'HALB'.
CONCATENATE HDR '(SEMI-FININSHED GOODS) ' INTO HDR.
ELSEIF V_CHDR = 'FERT'.
CONCATENATE HDR '(FINISHED GOODS) ' INTO HDR.
ELSEIF V_CHDR = 'ZSCR'.
CONCATENATE HDR '(SCRAP) ' INTO HDR.
ENDIF.
WRITE : / HDR.
uline.
*WRITE : / ' ITEM ID DESCRIPTION UOM GRP ITEM WT (KG.) STOCK QTY. STOCK TONS'.
WRITE : / ' ITEM ID DESCRIPTION UOM GROUP NET.WT. STOCK QTY. STOCK (TONS)'.
ULINE.
SORT ITAB BY MTART LGORT MATNR.
T_QTY1 = 0.
T_WT1 = 0.
LOOP AT ITAB1.
WRITE : / 'MATERIAL TYPE : ', ITAB1-MTART.
T_QTY2 = 0.
T_WT2 = 0.
LOOP AT ITAB2.
WRITE : / ' STORAGE LOCATION : ' , ITAB2-LGORT.
T_QTY3 = 0.
T_WT3 = 0.
LOOP AT ITAB WHERE MTART = ITAB1-MTART AND LGORT = ITAB2-LGORT.
SELECT SINGLE MAKTX FROM MAKT INTO V_ITEM WHERE MATNR = ITAB-MATNR.
WRITE : / ' ' ,(8) ITAB-MATNR,(40) V_ITEM,(3) ITAB-MEINS,' ', ITAB-MATKL, ' ',(10) ITAB-WTKG,(13) ITAB-STOCK, (13) ITAB-WT.
T_QTY3 = T_QTY3 + ITAB-STOCK.
T_WT3 = T_WT3 + ITAB-WT.
ENDLOOP.
T_QTY2 = T_QTY2 + T_QTY3.
T_WT2 = T_WT2 + T_WT3.
WRITE : / ' -
WRITE : / ' TOTAL : ',(13) T_QTY3, (13) T_WT3.
WRITE : / ' -
ENDLOOP.
T_QTY1 = T_QTY1 + T_QTY2.
T_WT1 = T_WT1 + T_WT2.
WRITE : / ' ----------------------------'.
WRITE : / ' TOTAL : ',(13) T_QTY2, (13) T_WT2.
WRITE : / ' -
ENDLOOP.
*WRITE : / ' -
WRITE : / ' GRAND TOTAL : ',(13) T_QTY1, (13) T_WT1.
WRITE : / ' -
endform. " PRN_ITSTOCK
*& Form PRN_SMSTOCK
text
--> p1 text
<-- p2 text
form PRN_SMSTOCK_TXT .
DATA : Q TYPE P LENGTH 12 DECIMALS 3,
TROH TYPE P LENGTH 12 DECIMALS 3,
TBOP TYPE P LENGTH 12 DECIMALS 3,
THALB TYPE P LENGTH 12 DECIMALS 3,
TFERT TYPE P LENGTH 12 DECIMALS 3,
TSCR TYPE P LENGTH 12 DECIMALS 3,
TSL TYPE P LENGTH 12 DECIMALS 3.
WRITE : / 'INVENTORY REPORT AS ON : ', P_DATE, ' PLANT : ', P_WERKS, ' PRINTING DATE : ', SY-DATUM, ' CONTROL NO.: FM 888 REV-00'.
WRITE : / '(in Tons)', 121 'DATE : 20.11.07'.
ULINE.
FORMAT COLOR COL_GROUP ON.
WRITE : / SY-VLINE,(10) 'ST.LOC.', SY-VLINE, (25) 'ST. LOCATION ', SY-VLINE, (15) 'RAW MATERIAL', SY-VLINE, (15) ' BOP', SY-VLINE, (15) 'FIN. GOODS',
SY-VLINE, (15) 'WIP GOODS', SY-VLINE, (15) 'SCRAPS', SY-VLINE, (15) ' TOTAL ', SY-VLINE.
ULINE.
TROH = 0.
TBOP = 0.
THALB = 0.
TFERT = 0.
TSCR = 0.
FORMAT COLOR COL_NORMAL ON.
LOOP AT SLIT.
Q = SLIT-ROH + SLIT-ZBOP + SLIT-FERT + SLIT-HALB + SLIT-ZSCR.
IF Q <> 0.
TSL = SLIT-ROH + SLIT-ZBOP + SLIT-HALB + SLIT-FERT + SLIT-ZSCR.
WRITE : / SY-VLINE,(10) SLIT-LGORT, SY-VLINE, (25) SLIT-LGOBE, SY-VLINE, (13) SLIT-ROH,' ', SY-VLINE, (13) SLIT-ZBOP, ' ', SY-VLINE, (13) SLIT-FERT, ' ',
SY-VLINE,(13) SLIT-HALB, ' ', SY-VLINE,(13) SLIT-ZSCR, ' ',SY-VLINE,(13) SLIT-TOT, ' ',SY-VLINE.
ULINE.
TROH = TROH + SLIT-ROH.
TBOP = TBOP + SLIT-ZBOP.
THALB = THALB + SLIT-HALB.
TFERT = TFERT + SLIT-FERT.
TSCR = TSCR + SLIT-ZSCR.
SLIT-CRROW = SY-LINNO - 2.
MODIFY SLIT.
V_MAXROW = SLIT-CRROW.
WRITE : SLIT-FERT, SLIT-HALB, SLIT-ZSCR.
ENDIF.
ENDLOOP.
TSL = TROH + TBOP + THALB + TFERT + TSCR.
WRITE : / SY-VLINE, (38) 'T O T A L ', SY-VLINE, (13) TROH,' ', SY-VLINE, (13) TBOP, ' ', SY-VLINE, (13) TFERT, ' ',
SY-VLINE,(13) THALB, ' ', SY-VLINE,(13) TSCR, ' ',SY-VLINE,(13) TSL, ' ',SY-VLINE.
ULINE.
endform. " PRN_SMSTOCK
*& Form PRN_SMSTOCK_ALV
text
--> p1 text
<-- p2 text
form PRN_SMSTOCK_ALV .
endform.
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
Example Code
Executes a command considering the sy-ucomm.
CASE r_ucomm.
WHEN '&IC1'.
DATA: w_msg TYPE string,
w_row(4) TYPE n,
ITID LIKE MARA-MATNR.
w_row = rs_selfield-tabindex.
ITID = rs_selfield-value.
IF W_ROW <> 0.
CONCATENATE 'You have clicked row' w_row
'field' rs_selfield-fieldname
'with value' rs_selfield-value
INTO w_msg SEPARATED BY space.
MESSAGE w_msg TYPE 'S'.
PERFORM PRN_ITSTOCK.
ENDIF.
ENDCASE.
ENDFORM.
*& Form GET_PARM
text
--> p1 text
<-- p2 text
form GET_PARM .
CLEAR ITAB1.
REFRESH ITAB1.
IF V_COL > 44.
IF V_COL >= 44 AND V_COL <= 60.
V_CHDR = 'ROH'.
ITAB1-MTART = V_CHDR.
APPEND ITAB1.
ELSEIF V_COL >= 62 AND V_COL <= 78.
V_CHDR = 'ZBOP'.
ITAB1-MTART = V_CHDR.
APPEND ITAB1.
ELSEIF V_COL >= 80 AND V_COL <= 96.
V_CHDR = 'FERT'.
ITAB1-MTART = V_CHDR.
APPEND ITAB1.
ELSEIF V_COL >= 98 AND V_COL <= 114.
V_CHDR = 'HALB'.
ITAB1-MTART = V_CHDR.
APPEND ITAB1.
ELSEIF V_COL >= 116 AND V_COL <= 132.
V_CHDR = 'ZSCR'.
ITAB1-MTART = V_CHDR.
APPEND ITAB1.
ELSEIF V_COL >= 134 AND V_COL <= 160.
V_CHDR = 'TOT'.
ITAB1-MTART = 'ROH'.
APPEND ITAB1.
ITAB1-MTART = 'ZBOP'.
APPEND ITAB1.
ITAB1-MTART = 'FERT'.
APPEND ITAB1.
ITAB1-MTART = 'HALB'.
APPEND ITAB1.
ITAB1-MTART = 'ZSCR'.
APPEND ITAB1.
ENDIF.
CLEAR ITAB2.
REFRESH ITAB2.
READ TABLE SLIT WITH KEY CRROW = V_ROW.
IF SY-SUBRC = 0.
V_RHDR = SLIT-LGORT.
ITAB2-LGORT = V_RHDR.
APPEND ITAB2.
ELSE.
IF V_ROW > V_MAXROW.
IF V_CHDR <> 'TOT'.
DATA : PTXT LIKE MSEG-LGORT.
SORT ITAB BY MTART LGORT.
PTXT = ''.
LOOP AT ITAB WHERE MTART = V_CHDR AND STOCK <> 0.
IF PTXT <> ITAB-LGORT.
ITAB2-LGORT = ITAB-LGORT.
APPEND ITAB2.
PTXT = ITAB-LGORT.
ENDIF.
ENDLOOP.
ELSE.
V_ROW = 999.
ENDIF.
ELSE.
V_ROW = 999.
CLEAR ITAB1.
REFRESH ITAB1.
ENDIF.
ENDIF.
ELSE.
V_CHDR = ''.
V_RHDR = ''.
ENDIF.
endform. " GET_PARM
Edited by: ric .s on Mar 15, 2008 7:26 AM -
Unrestricted Stock of issuing Storage Location in reservation
Hi Experts,
We have a requirement, we want that unresticted stock of issuing storage location is printed on reservation (MB23) Thru MB25.
How it is possible.
Kindly help me out, can we use sqvi or something else.
Regards
GRHI ,
Just Modify this Report with the help of a Abaper and ask him to add an additional column in the report that is the Stock in the unrestricted use for this Material and Plant
combination.
TO achieve the Since we know the Material ,plant and storage location
PIck up the Material Number --RESB-MATNR
the Plant code --RESB-WERKS
the storage LOcation--RESB-LGORT
Go to Table RESB table in this table against the Feilds RSNUM -Reservation NUmber and RSPOS( Reservation item number)
IN some cases the storage location would not be entered by the user ,take care ,he enters the storage location by every user ,so make it mandatory in the screen layout.
After Picking up all the three values ,pass those values in the Table.
MARD line item vise present in the reservation (maintain a loop for the same)
in this table pick up value in the Feild MARD-LABST which is the stock in the unrestricted use.
one thing ,i dont know the exact requiremnet ,but it is to resrict the user from creation of reservation more than the stock ,it can be done by avaliability check.
hope so it helps
Regards
Anjanna. -
Material with different concentration in one storage location
We are working in a chemical industry that make caustic soda they are selling two material of caustic soda with two different concentrations (33% and 50%). Problem is that they move caustic 33% (one material) in to one storage location at the same time the move caustic 50%(second material) in the same material tank. In this way the concentrations of caustic change say 45%. If they want to increase the concentration they move caustics with greater concentration to make this stock to 50%. How to handle this situation. Every time the move these two materials in a same tank materials concentration changes.
Regards
AhmedAhmed,
Can you please let us know,
1. Is your material batch managed? If yes would you have multiple batches in the storage location?
2. How is the material transferred to the tank? Is it through manual 311 movement?
Regards,
Prasobh
Maybe you are looking for
-
What hard drives are compatible with OSX Snow Leopard Boot Camp?
Recently when the video card in my desktop Mac died, I decided to make some upgrades, one of them being the hard drive. After doing some research, I fixed on the Western Digital 3TB Caviar Green 3.5-Inch and had it installed at the same time as the n
-
Issue while invoking a BPEL process
Hi We are invoking a BPEL prcs from ESB project.The ESB project has a Oracle application adapter to read from a queue and a external soap service to invoke a BPEL process. The Oracle application adapter is working fine as it is pulling data from the
-
Dynamic Wrapping of text in Web Application Designer of BEx.
Hi Dynamic wrapping of text is to be done in Web application Designer of BEx. How is the code that was given earlier to be incorporated using stylesheets???Please explain in detail. Also if any other way is possible,plz deliberate. Thanks.
-
Problem with adobe reader while faxing a pdf document
hi all i am working with a windows application (.net windows service) to fax pdf documents periodically. when i started the service the first time the document was sent and next time onwords it is not at all sending fax . when i restarted the system
-
hi there, i having a problem, i'm not able to load data from 3rd party to bw, it is given an error, Error in ABAP application program. The current ABAP program "SAPMSYST" had to be terminated because one of the statements could not be executed. This