Subcontractor Stock and Availablilty Check.
Good Day All,
We are encountering an issue when using ME2O to do the Goods Issue to Subcontractor. It appears our system is not taking into account other requirements on the components. For instance if we have Component A with 10 in stock and a SO for 4 and a Subcontractor Requirement for 10, the system will currently not give a warning or error saying there is not enough based on 4 being committed to the SO. We do availability checks in the SO and the Production Order.
My question to you is: is there a setting in the IMG that will force ME2O to look at material committed to other requirements and then show the quantity not committed to other Orders (SO, or Prod Order)? We only want to send out material to the subcontractor it it is not a requirement on another order.
Please help.
Thank you
Vickie S
The indicator w/o subcontractor is checked because whe there is a production order or SO I do not want the system looking at subcontractor stock as available stock.
In ME2O I am trying to find out if it is possible to set an indicator so when performing PGI in ME2O the system will look at only available stock - in other words it will only look at stock that is not already committed to another order. Currently it only looks at Total Stock in the SLoc and does not take into consideration if the material is committed or not. I need to get this working so our material handlers are not stealing from committed material to send to the subcontractor.
Thank you for your input to date, any other comments are greatly appreciated
We are using scope of check 02 and checking rule ZP - a copy of PP
Similar Messages
-
Availability check for Make to stock and Make to Order
Dear All,
Client is selling Make to stock and make to Order material.
How and what settings need to do for Avaialbility check.or we can use standard one.
I hope in case of Make to Order availability check may not happen.
Please correct me.
Thanks in advance.
Regards,
Shrikanthi,
yes for make to order we dont have AvChk. for make to stock items u need to follow the
below configuration.
Availability check
1. Availability check is an integral part of the business process that determines if the required delivery quantity can be met on a required delivery date. For this purpose the system takes into account pre-delivery activities such as scheduling for picking or packing times and the time taken to produce or obtain the material. It also performs several background functions such as Backorder processing, rescheduling and ATP quantities.
2. Backorder processing: processing of a sales order that has not been fully confirmed or not confirmed at a certain delivery date.
3. Rescheduling: is a proposal of how u2013 confirmed quantities already assigned to a sales order can be reassigned to other sales orders that have a higher priority.
4. Available to promise (ATP): is a process of checking the available quantities of a material. The ATP quantity consists of warehouse stock + planned receipts (incoming stock) u2013 planned issues (outgoing stock). to examine stock on hand (CO09) proceed to logistics u2013 sales & distribution u2013 sales u2013 environment u2013 availability overview.
5. Replenishment lead time (RLT): is the time taken for the material to become available either internally (in house production) or externally (from a vendor). The most important things to consider during an external procurement are purchasing and MRP 2 (procurement) views of MMR where the processing time for purchasing, planned delivery time and goods receipt processing time are taken into account. On the other hand internal procurement is based on in house production time (MRP 2 view) goods receipt processing time or alternatively RLT time, which is found on MRP 3 view.
6. RLT (Replenishment Lead Time) is the time taken for the material to become available. RLT is only used when doing an ATP check (Available To Promise). The value of RLT for a material is specified on material master record.
7. There are three types of availability checks u2013
Check on basis of ATP quantities.
Check against product allocation.
Check against planning.
Configuring Availability check through Checking Groups u2013
1. The checking group + checking rule determine how the availability check is to be performed.
2. The checking group determines whether and how the system checks the stock availability and generates requirements for material planning. The checking group defines what type of requirements will be passed on i.e. summarized requirements (daily/weekly) or individual requirements for each sales order.
3. The checking rule applies to how the availability check is to be carried out at the transaction level. Note that you must define checking rules for each individual application such as for production orders for example. In Sales and Distribution, the checking rule is specified internally within the system and cannot be changed.
4. The checking rule, in conjunction with the checking group, determines the scope of the availability check for every business operation; that is, which stocks, receipts and issues are to be included in the availability check and whether the check is to be carried out with or without the replenishment lead time.
5. Briefly explaining the above u2013 checking group determines which type of requirement to be passed on to MRP whether it be individual or summarized and checking rule which is at the transaction level and can be configured independently for each application module, determines which stocks, receipts and issues to be taken into account. For performing an availability check checking group has to work in conjunction with checking rule.
6. Advantages of individual processing over summarized processing u2013
Backorder processing is possible.
You can access (MD04) order, line and schedule line individually which gives a greater control on available stock and requirements placed on stock.
The system automatically uses individual requirements in case of special stock items.
7. Required data for the Availability check to be carried out u2013
The Availability check must be switched on at the requirement class level.
The Availability check must be set at the schedule line level.
A requirements type must exist by which the requirements class can be found.
A plant must be defined in the sales order for each schedule line item (in other words plant must be defined for every material in MMR).
A checking group must be defined in the material master record in the MRP3 screen in the availability check field.
8. Configuring Availability check and defining Checking Groups u2013
Checking groups are introduced into the sales order based on the setting in the material master record.
SAP standard checking groups are 01 u2013 summarized requirements and 02 u2013 individual requirements or you can create your own by copying the standard ones.
Total sales and total deliveries columns are there to configure a checking rule to sum up requirements to post to MRP either individually or by day or week.
Block quantity required can be set if you want several users to be able to process the material simultaneously in different transactions without blocking each other.
The no check indicator is CHECKED when you DO NOT want the system to carry out ATP check.
9. Defining material block for other users u2013 the block check box is an indicator that enables you to block material master records of a particular material during the availability check and restrict other users from accessing same master record and reserve the material. If the block is not set, two users can confirm the same material at the same time for two different orders, not knowing if the stock is available or not. If you select this field, the material is blocked during the availability check and other users cannot: a) Make changes in the material master record. b) Create purchase orders for the material. C) Create orders for the material.
10. Defining default values for checking groups - Checking groups are introduced into the sales order based on the setting in the material master record.
However if there is no entry present in the material master record for the checking group, a default value can be set here, depending on material type and plant.
This default value will be used by the system depending on the material type mentioned in MMR and plant in sales order.
If an entry exists, this default value is over written by MMR.
11. Controlling Availability Check u2013 in this section, you tell the system what stock on hand and what inward and outward movements of stock it must take into account when performing the availability check in addition to whether or not to consider the replenishment lead time.
12. These settings are based on the checking group that is assigned to the material master record and the checking rule that is predefined and assigned to the sales and distribution transaction.
13. These settings carry out control both for sales order and delivery as well. This is due to the fact that you may want to include specific stock or incoming stock for the sales order, yet at the time of the delivery only include physical stock on hand waiting to be shipped.
14. It is possible to indicate to the system that you would like the availability check NOT TO CHECK the stock at the storage location level. This indicator is used to set the scope of the availability check.
15. It is used to switch off the check at storage location level. You create a reservation for a particular storage location. However, the scope of the availability check is set in such a way as to exclude the storage location. In this case, the system carries out the check at plant level only and does not take the storage location into account that is specified in the reservation.
16. Should you not want the system to automatically check RLT, you may indicate so here. RLT is the time taken for a material to become available. It is only used when doing an ATP check and is taken from MMR.
17. Defining the elements in the availability check entirely depends on the business needs, but a few tips are given under u2013
When controlling the Availability check at the time of the sales order, a purchase requisition does not necessarily indicate by it is going to come into the plant.
A shipping notification on the other hand - a confirmed purchase order u2013 is a good indicator of receiving stock on a specified date.
It is always recommended not to select the shipping notifications for the delivery requirements type as you may not actually receive the stock into plant or warehouse for which you are creating a delivery.
regards
anand -
Hi SAP Experts,
I have a question about MRP.
Can we work MRP with subcontractor stock?
Let me explain, the MRP could not to generate new planning orders if I have subcontractor stock. For example:
In MD04 transaction
MtlRes 100- units
MtlRes 100- units
MtlRes 100- units
SubcSt 300 units
If I have this situation, the MRP run could not to generate planning orders because the subcontractor stock recover the quantity.
This problem (almost) drive me crazy. I really appreciate any help.
Thanks in advance.Dear Demetrio
Please note that the logic for subcontracting was changed as of release
4.0A.
As of release 4.0 the net requirements calculation for components to be
provided in subcontracting takes into account that the provision stock
can only be used to cover the corresponding requirement of material
provided. The provision stock that is already available from a
subcontractor (vendor) can only therefore be used to cover the
requirements of material provided at this subcontractor.
The system uses only the stock that has not been assigned to a
subcontractor as unrestricted-use stock to cover all requirements.
For further information about this issue please consider the below QA. With the modification of note 170597 the old logic can be achieved. Please notice that it is a modification note.
1. Question
Why does the MD04/MD05 display an own segment for subcontracting as of Release 4.0B and how does the materials planning work with this new logic?
Answer
The logic regarding the subcontracting was changed as of 4.0. This is explained in detail in the release notes for 4.0A:Planning of the components to be provided for subcontracting
Material Requirements Planning -> Planning Execution -> Material Requirements Planning: Planning of the components to be provided for subcontracting
2. Question
Why does the third-party order processing for subcontracting work differently as of Release 4.0B?
Answer
The (Pseudo) Third-Party Order Processing for parts provided together with the own segment for subcontracting results in problems and can result in inconsistencies. This is described in detail in Note 214298.
As of Release 4.5A you can implement the third-party order processing with subcontracting MRP areas (refer to the corresponding documentation).In addition you can use a modification to reset the system to the behavior before 4.0A, refer to Note 388479. As of Release 4.7, BAdI 'MD_SUBCONT_LOGIC' allows this without a modification.
3. Question
Why does the discontinued part for subcontracting not work?
Answer
You cannot divert requirements of material provided to the follow-up material. The reasons are described in detail in Note 43636, section 6.
4. Question
Why does the system not display the requirements of material provided in the storage location MRP area, as expected?
Answer
Requirements of material provided (subcontracting requirements, material staging requirements) never reach a storage location MRP area, because later you cannot post the withdrawal from this MRP area.
The withdrawal of the components (to be provided) during the goods receipt for an SC procurement proposal occurs always from the stock with subcontractor, which is managed - from the viewpoint of the inventory management - on plant level and has no storage location reference.Refer to Note 503497 for details.
5. Question
Why does a requirement move from the subcontractor segment into the plant segment and is covered there although it appears already to be covered in the subcontractor operation segment by a receipt element (Pseudo third-party order processing for the subcontractor)?
Answer
The corresponding receipt element must standardly always be within the rescheduling horizon. This is required (due to technical reasons) even then when the input itself does not have to be rescheduled, so that the net invoice can deliver consistent results for the subcontractor segment together with the rescheduling check.
If the receipt element occurs after the requirements date, the corresponding element must participate in the rescheduling check (Transaction OMDW).
Regards
Soundar -
Report on current stock and safety stock
Hi,
I want to have the report on current stock and safety stock.
In MC.9 it gives wrong safety stock. When I go to cross check the safety stock in material master & in MC.9 I see differences.
Thanks,
KiranYou can user tcode MC.9 or MC.5 to know valuated stock available at given plant. Stock lying in Returns (MB52) will not be a part of this report as it non-valuated stock.
The stock in the accounting view of the material master considers stock at plant level including stock in Transit (Intra & Inter plant stock trasnfers) & special stock like stock issued to vendor , consigment stock etc which is valuated at plant level.
whereas and stock in the plant stock view of the material master does not consider such special stocks hence there will always difference in both veiws.
For Physical stock as on particular date you can consider MB5B report with radio button "Storage location/Batch Stock" wherein you will get Quantity issued & Qunatity received in those SLOC along with Opening stock & Closing stock for the specified period.
use tcode
MBLB to know stock at vendor.
MB54 - Consignment Stock. -
Opening Stock and Closing Stock
Hi,
I have one requirement to get a opening stock and closing stock of all materials, based on the plant date and mat type.
Could u tell me the flow of tables one by one
Its is possible to get the opening stock and closing stock of all materials.
Please Guide Me.
Thanks & Regards,
Dhanush.S.Tgo through this....
*& Report Z_OPEN_CLOSE *
REPORT Z_OPEN_CLOSE MESSAGE-ID YW2 LINE-SIZE 231 LINE-COUNT 45
NO STANDARD PAGE HEADING.
Type Declaration *
TYPE-POOLS SLIS.
Tables *
TABLES: MKPF, " Material Document: Header Data
MSEG, " Material Document: Item Data
MARA,
MARD,
S031,
EKKO,
EKPO,
LIKP,
MAKT,
J_1IWRKCUS,
T001W,
WB2_V_MKPF_MSEG2,
MMIM_REP_PRINT,
YW2_STKMOVEMENTS,
YPLNT,
MARDH.
Internal Tables *
DATA: I_WERKS LIKE J_1IWRKCUS OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF I_YPLNT OCCURS 0,
PPLNT LIKE YPLNT-PPLNT,
WPLNT LIKE YPLNT-WPLNT,
END OF I_YPLNT.
DATA: BEGIN OF I_MKPF OCCURS 0,
MBLNR LIKE MKPF-MBLNR,
MJAHR LIKE MKPF-MJAHR,
BUDAT LIKE MKPF-BUDAT,
VGART LIKE MKPF-VGART,
BWART LIKE MSEG-BWART,
MATNR LIKE MSEG-MATNR,
WERKS LIKE MSEG-WERKS,
LGORT LIKE MSEG-LGORT,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
KUNNR LIKE MSEG-KUNNR,
ZEILE LIKE MSEG-ZEILE,
XAUTO LIKE MSEG-XAUTO,
SHKZG LIKE MSEG-SHKZG,
MATNR1 LIKE MSEG-MATNR,
END OF I_MKPF.
DATA: BEGIN OF I_MARDH OCCURS 0,
WERKS LIKE MARDH-WERKS,
MEINS LIKE MARA-MEINS,
MATNR LIKE MARDH-MATNR,
LGORT LIKE MARDH-LGORT,
LABST LIKE MARDH-LABST,
LFGJA LIKE MARDH-LFGJA, "Added -MB
LFMON LIKE MARDH-LFMON, "Added -MB
PERIO(6),
INSME LIKE MARDH-LABST,
EINME LIKE MARDH-LABST,
SPEME LIKE MARDH-LABST,
RETME LIKE MARDH-LABST,
O_STK LIKE MARDH-LABST, " Opening Stock
C_STK LIKE MARDH-LABST, " Closing Stock
END OF I_MARDH.
DATA: BEGIN OF I_MARD OCCURS 0,
WERKS LIKE MARD-WERKS,
MATNR LIKE MARD-MATNR,
LGORT LIKE MARD-LGORT,
LABST LIKE MARD-LABST,
INSME LIKE MARD-LABST,
MEINS LIKE MARA-MEINS,
EINME LIKE MARD-LABST,
SPEME LIKE MARD-LABST,
RETME LIKE MARD-LABST,
END OF I_MARD.
DATA: I_MARD1 LIKE I_MARD OCCURS 0 WITH HEADER LINE.
DATA: I_MARDH1 LIKE I_MARDH OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF I_MKPF1 OCCURS 0,
MBLNR LIKE MKPF-MBLNR,
WERKS LIKE MSEG-WERKS,
MATNR LIKE MSEG-MATNR,
BUDAT LIKE MKPF-BUDAT,
BWART LIKE MSEG-BWART,
MJAHR LIKE MKPF-MJAHR,
VGART LIKE MKPF-VGART,
LGORT LIKE MSEG-LGORT,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
XAUTO LIKE MSEG-XAUTO,
SHKZG LIKE MSEG-SHKZG,
END OF I_MKPF1.
DATA: BEGIN OF I_MKPF2 OCCURS 0,
WERKS LIKE MSEG-WERKS,
MATNR LIKE MSEG-MATNR,
BUDAT LIKE MKPF-BUDAT,
BWART LIKE MSEG-BWART,
MJAHR LIKE MKPF-MJAHR,
VGART LIKE MKPF-VGART,
LGORT LIKE MSEG-LGORT,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
XAUTO LIKE MSEG-XAUTO,
END OF I_MKPF2.
DATA: BEGIN OF I_FINAL5 OCCURS 0,
WERKS LIKE MSEG-WERKS, " Plant
MATNR LIKE MSEG-MATNR, " Material
LGORT LIKE MSEG-LGORT, " Storage Location
BUDAT LIKE MKPF-BUDAT, " Posting Date
MTART LIKE MARA-MTART, " Material Type
SPMON LIKE S031-SPMON, " Month
MAKTX LIKE MAKT-MAKTX, " Description
meins(3), " UOM
MEINS LIKE MSEG-MEINS,
O_STK LIKE MARDH-LABST, " opening stock
TRECEP LIKE MARDH-LABST, " total receipts
PRODU LIKE MARDH-LABST, " Net Receipts - Production
RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
TDISP LIKE MARDH-LABST, " total dispatches
CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
TLOSS LIKE MARDH-LABST, " Total Loss
TRLOSS LIKE MARDH-LABST, " Transit Loss
WHLOSS LIKE MARDH-LABST, " Warehouse Loss
C_STK LIKE MARDH-LABST, " Closing Stock
TRFSTK LIKE MARDH-LABST, "Transfer stock
MENGE LIKE MSEG-MENGE,
OTHADJ LIKE MARDH-LABST,
END OF I_FINAL5.
DATA: BEGIN OF I_FINAL OCCURS 0,
WERKS LIKE MSEG-WERKS, " Plant
MATNR LIKE MSEG-MATNR, " Material
BUDAT LIKE MKPF-BUDAT, " Posting Date
MTART LIKE MARA-MTART, " Material Type
SPMON LIKE S031-SPMON, " Month
MAKTX LIKE MAKT-MAKTX, " Description
meins(3), " UOM
MEINS LIKE MSEG-MEINS,
O_STK LIKE MARDH-LABST, " opening stock
TRECEP LIKE MARDH-LABST, " total receipts
PRODU LIKE MARDH-LABST, " Net Receipts - Production
RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
TDISP LIKE MARDH-LABST, " total dispatches
CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
TRFSTK LIKE MARDH-LABST, "Material Transfer stock
TRLOSS LIKE MARDH-LABST, " Transit Loss
WHLOSS LIKE MARDH-LABST, " Warehouse Loss
TLOSS LIKE MARDH-LABST, " Total Loss
C_STK LIKE MARDH-LABST, " Closing Stock
OTHADJ LIKE MARDH-LABST,
END OF I_FINAL.
DATA: I_FINAL1 LIKE I_FINAL OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF I_FINAL_TEMP OCCURS 0,
WERKS LIKE MSEG-WERKS, " Plant
MATNR LIKE MSEG-MATNR, " Material
MTART LIKE MARA-MTART, " Material Type
MAKTX LIKE MAKT-MAKTX, " Description
MEINS LIKE MSEG-MEINS,
O_STK LIKE MARDH-LABST, " opening stock
TRECEP LIKE MARDH-LABST, " total receipts
PRODU LIKE MARDH-LABST, " Net Receipts - Production
RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
TDISP LIKE MARDH-LABST, " total dispatches
CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
TRFSTK LIKE MARDH-LABST, "Material Transfer stock
TRLOSS LIKE MARDH-LABST, " Transit Loss
WHLOSS LIKE MARDH-LABST, " Warehouse Loss
TLOSS LIKE MARDH-LABST, " Total Loss
C_STK LIKE MARDH-LABST, " Closing Stock
OTHADJ LIKE MARDH-LABST,
END OF I_FINAL_TEMP.
For Materials
DATA: BEGIN OF I_MARA OCCURS 0,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MEINS LIKE MARA-MEINS,
LABST TYPE MARD-LABST,
MAKTX LIKE MAKT-MAKTX,
END OF I_MARA.
DATA: BEGIN OF I_STKMVMNTS OCCURS 0,
BWART LIKE MSEG-BWART,
SHKZG LIKE MSEG-SHKZG,
VZBEW LIKE YW2_STKMOVEMENTS-VZBEW,
END OF I_STKMVMNTS.
DATA: BEGIN OF I_FINALT OCCURS 0,
WERKS LIKE MSEG-WERKS, " Plant
MATNR LIKE MSEG-MATNR, " Material
BUDAT LIKE MKPF-BUDAT, " Posting Date
MTART LIKE MARA-MTART, " Material Type
SPMON LIKE S031-SPMON, " Month
MAKTX LIKE MAKT-MAKTX, " Description
meins(3), " UOM
MEINS LIKE MSEG-MEINS,
O_STK LIKE MARDH-LABST, " opening stock
TRECEP LIKE MARDH-LABST, " total receipts
PRODU LIKE MARDH-LABST, " Net Receipts - Production
RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
TDISP LIKE MARDH-LABST, " total dispatches
CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
TRFSTK LIKE MARDH-LABST, "Material Transfer stock
TRLOSS LIKE MARDH-LABST, " Transit Loss
WHLOSS LIKE MARDH-LABST, " Warehouse Loss
TLOSS LIKE MARDH-LABST, " Total Loss
C_STK LIKE MARDH-LABST, " Closing Stock
OTHADJ LIKE MARDH-LABST,
MONTH(8) ,
END OF I_FINALT.
DATA: IMKPFT LIKE I_MKPF OCCURS 0 WITH HEADER LINE.
DATA: IMKPFT1 LIKE I_MKPF1 OCCURS 0 WITH HEADER LINE.
DATA: IMARDT LIKE I_MARD OCCURS 0 WITH HEADER LINE.
DATA: IMARDHT LIKE I_MARDH OCCURS 0 WITH HEADER LINE.
DATA: T_FINAL LIKE I_MKPF OCCURS 0 WITH HEADER LINE.
DATA: IMKPFT2 LIKE I_MKPF OCCURS 0 WITH HEADER LINE.
FCAT is used for the field catalog
DATA: FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
for excluding the ICONs from the application toolbar
FEXC TYPE TABLE OF SLIS_EXTAB WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FS_LAYO is used for Grid Layout
FS_LAYO TYPE SLIS_LAYOUT_ALV,
FEVENTS to handle the events TOP OF PAGE & USER_COMMAND
FEVENTS TYPE TABLE OF SLIS_ALV_EVENT WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FHEADER is used for List header
FHEADER TYPE TABLE OF SLIS_LISTHEADER WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
sort is used for sorting
FSORT TYPE TABLE OF SLIS_SORTINFO_ALV WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FCAT1 TYPE TABLE OF SLIS_FIELDCAT_ALV WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FS_LAYO1 TYPE SLIS_LAYOUT_ALV,
GT_LIST_TOP_OF_PAGE1 TYPE SLIS_T_LISTHEADER,
FEVENTS1 TYPE TABLE OF SLIS_ALV_EVENT WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
FHEADER1 TYPE TABLE OF SLIS_LISTHEADER WITH NON-UNIQUE DEFAULT
KEY WITH HEADER LINE INITIAL SIZE 0,
G_STATU_071 TYPE SLIS_FORMNAME VALUE 'Z_PFSTATUS',
ALV_VARIANT1 LIKE DISVARIANT.
Variable Declaration *
TYPES: TRFF_TYPE_DEC_6_5(6) TYPE P DECIMALS 5.
DATA: FYEAR(4),
MON(2),
FYEAR1(4),
MON1(2),
OBAL LIKE MARD-LABST,
CBAL LIKE MARD-LABST,
INDEX TYPE I,
COUNT,
COUNT1 TYPE I,
O_STK TYPE P DECIMALS 3,
C_STK TYPE P DECIMALS 3,
V_MJAHR LIKE MKPF-MJAHR,
MONTHS TYPE TRFF_TYPE_DEC_6_5,
MONTH TYPE I.
Global variables for handling ALV functionality
DATA: ALV_KEYINFO TYPE SLIS_KEYINFO_ALV,
ALV_VARIANT LIKE DISVARIANT,
ALV_LAYOUT TYPE SLIS_LAYOUT_ALV,
ALV_REPID LIKE SY-REPID,
ALV_PRINT TYPE SLIS_PRINT_ALV,
ALV_DETAIL_FUNC(30),
ALV_DEFAULT_VARIANT LIKE DISVARIANT-VARIANT,
ALV_COLOURIZE_FIELDS LIKE MMIM_REP_PRINT-COLOR.
RANGES: R_BUDAT FOR MKPF-BUDAT.
*Added by Prabhu for year on 26.4.05.
DATA: IDATE LIKE R_BUDAT OCCURS 0 WITH HEADER LINE.
Selection Screen Elements *
SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_WERKS FOR MARD-WERKS OBLIGATORY NO INTERVALS.
PARAMETER: P_SPMON LIKE S031-SPMON NO-DISPLAY .
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY,
S_LGORT FOR MSEG-LGORT NO-EXTENSION NO INTERVALS,
S_MBLNR FOR MKPF-MBLNR,
S_BUDAT FOR MKPF-BUDAT OBLIGATORY .
SELECTION-SCREEN END OF BLOCK BLK.
SELECTION-SCREEN BEGIN OF BLOCK BLK3 WITH FRAME TITLE TEXT-004.
PARAMETER : MTART LIKE MARA-MTART DEFAULT 'FERT' NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK BLK3.
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN END OF BLOCK BLK2.
ADDED BY PRABHU FOR DAY-WISE REPORT.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-007.
PARAMETERS: D1 RADIOBUTTON GROUP P1 DEFAULT 'X',
M1 RADIOBUTTON GROUP P1,
Y1 RADIOBUTTON GROUP P1.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-006.
PARAMETERS: ALV_DEF LIKE DISVARIANT-VARIANT.
SELECTION-SCREEN END OF BLOCK B2.
DATA: S_BUDAT1 LIKE S_BUDAT OCCURS 0 WITH HEADER LINE."prabhu
Initialization *
INITIALIZATION.
PERFORM ALV_INIT.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ALV_DEF.
PERFORM ALV_F4.
At Selection Screen
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_spmon.
PERFORM monat_f4.
At Selection Screen *
AT SELECTION-SCREEN.
checking for the layout
PERFORM ALV_CHECK.
authorisation check for the Plant
PERFORM auth_check.
Validation for the Plant
PERFORM VALIDITY_CHECK.
IF MTART NE 'FERT'.
MESSAGE E041 WITH 'Material Type must be FERT Only...'.
ENDIF.
IF D1 = 'X'." On 26.4.05.
P_SPMON0(4) = S_BUDAT-LOW0(4).
P_SPMON4(2) = S_BUDAT-LOW4(2).
ELSE.
P_SPMON0(4) = S_BUDAT-LOW0(4).
P_SPMON4(2) = S_BUDAT-LOW4(2).
ENDIF.
LOOP AT S_BUDAT.
IF S_BUDAT-HIGH IS INITIAL.
S_BUDAT-HIGH = S_BUDAT-LOW.
MODIFY S_BUDAT.
ENDIF.
ENDLOOP.
IDATE-LOW = S_BUDAT-LOW.
IDATE-HIGH = S_BUDAT-HIGH.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
I_DATE_FROM = IDATE-LOW
I_DATE_TO = IDATE-HIGH
IMPORTING
E_DAYS =
E_MONTHS = MONTH
E_YEARS =
DATA: I(3) TYPE C.
I = S_BUDAT-LOW+4(2).
CLEAR: R_BUDAT.
REFRESH: R_BUDAT.
*added by Prabhu for Only for Oneday.on 18.5.5
IF MONTH EQ '0'.
MONTH = MONTH + 1.
ENDIF.
*added by Prabhu for Only for Oneday.on 18.5.5
DO MONTH TIMES.
R_BUDAT-LOW = S_BUDAT-LOW.
APPEND R_BUDAT.
ENDDO.
I = 0.
LOOP AT R_BUDAT.
R_BUDAT-LOW4(2) = S_BUDAT-LOW4(2) + I.
I = I + 1.
R_BUDAT-LOW+6(2) = '01'.
MODIFY R_BUDAT.
ENDLOOP.
LOOP AT R_BUDAT.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = R_BUDAT-LOW
IMPORTING
LAST_DAY_OF_MONTH = R_BUDAT-HIGH
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2
MODIFY R_BUDAT.
ENDLOOP.
LOOP AT R_BUDAT.
IF R_BUDAT-LOW4(2) = S_BUDAT-LOW4(2).
R_BUDAT-LOW = S_BUDAT-LOW.
MODIFY R_BUDAT.
ENDIF.
IF R_BUDAT-HIGH4(2) = S_BUDAT-HIGH4(2).
R_BUDAT-HIGH = S_BUDAT-HIGH.
MODIFY R_BUDAT.
ENDIF.
For Summary on 26.4.05.
IF Y1 = 'X'.
CLEAR R_BUDAT.
REFRESH R_BUDAT.
R_BUDAT-LOW = S_BUDAT-LOW.
R_BUDAT-HIGH = S_BUDAT-HIGH.
APPEND R_BUDAT.
CLEAR R_BUDAT.
ENDIF.
ENDLOOP.
At Selection Screen *
AT SELECTION-SCREEN OUTPUT.
Start of Selection *
START-OF-SELECTION.
V_MJAHR = P_SPMON+0(4).
Get plant distinction warehouse/production
PERFORM GET_PLANT_DISTINCTION.
Collect the data from various tables
PERFORM GETDATA_FG_STOCK.
here the number of rows in the output table is found
PERFORM OUTPUT_TABLE_CHECK.
here the top of the page code is written, that is to be displayed
in the output
PERFORM Z_TOP_OF_PAGE.
here ALV layout properties are set
PERFORM Z_LAYOUT_SETTINGS.
ALV EVENTS for TOP OF PAGE and for USER COMMAND
PERFORM Z_ALV_EVENTS.
The field catalog is defined for the Primary List is defined in
the subroutine CREATE_FIELD_CATALOG include program ZPRRDOCR_FCAT
PERFORM Z_CREATE_FIELD_CATALOG.
This is for displaying the output
PERFORM Z_REUSE_ALV_GRID_DISPLAY.
*& Form getdata_fg_stock
Getting data from standard tables
FORM GETDATA_FG_STOCK.
For getting the Start date & end date of the month
PERFORM get_month_dates.
Getting the Opening Stock from MARDH table
IF MON EQ '01'.
MON1 = MON.
FYEAR1 = FYEAR.
MON = '12'.
FYEAR = FYEAR - 1.
ELSE.
MON1 = MON.
FYEAR1 = FYEAR.
MON = MON - 1.
FYEAR = FYEAR.
ENDIF.
PERFORM GET_RECORDS_FROM_DB.
*added for Month Summary on 26.4.05.
LOOP AT R_BUDAT.
S_BUDAT-LOW = R_BUDAT-LOW.
S_BUDAT-HIGH = R_BUDAT-HIGH.
*for Month
P_SPMON0(4) = S_BUDAT-LOW0(4).
P_SPMON4(2) = S_BUDAT-LOW4(2).
*for summary.
IF Y1 = 'X'.
LOOP AT S_BUDAT.
S_BUDAT1-SIGN = 'I'.
S_BUDAT1-OPTION = 'NB'.
S_BUDAT1-LOW = S_BUDAT-LOW.
S_BUDAT1-HIGH = S_BUDAT-HIGH.
APPEND S_BUDAT1.
CLEAR S_BUDAT1.
ENDLOOP.
ENDIF.
IMKPFT[] = I_MKPF[].
IMKPFT2[] = I_MKPF[].
IMARDT[] = I_MARD[].
IMARDHT[] = I_MARDH[].
PERFORM MONTH_WISE.
PERFORM PROCESS_MOVEMENTS.
PERFORM CALCULATE_OPENING_STOCK.
PERFORM UPDATE_NON_TRANSACTION_ITMS.
PERFORM DELETE_EMPTY_RECORDS.
CLEAR: IMARDHT,IMARDT,IMKPFT1,IMKPFT,I_FINAL,I_FINAL5.
REFRESH: IMARDHT,IMARDT,IMKPFT1,I_FINAL,I_FINAL5,IMKPFT.
ENDLOOP.
CLEAR: R_BUDAT.
REFRESH: R_BUDAT.
*end of changes for month.
ENDFORM. " getdata_fg_stock
FORM MONAT_F4 *
F4-Hilfe für Monat *
FORM MONAT_F4.
DATA: BEGIN OF MF_DYNPFIELDS OCCURS 1.
INCLUDE STRUCTURE DYNPREAD.
DATA: END OF MF_DYNPFIELDS.
DATA: MF_RETURNCODE LIKE SY-SUBRC,
MF_MONAT LIKE ISELLIST-MONTH,
MF_HLP_REPID LIKE SY-REPID.
FIELD-SYMBOLS: .
Wert von Dynpro lesen
GET CURSOR FIELD MF_DYNPFIELDS-FIELDNAME.
APPEND MF_DYNPFIELDS.
MF_HLP_REPID = SY-REPID.
DO 2 TIMES.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = MF_HLP_REPID
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = MF_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 01
INVALID_DYNPROFIELD = 02
INVALID_DYNPRONAME = 03
INVALID_DYNPRONUMMER = 04
INVALID_REQUEST = 05
NO_FIELDDESCRIPTION = 06
UNDEFIND_ERROR = 07.
IF SY-SUBRC = 3.
Aktuelles Dynpro ist Wertemengenbild
MF_HLP_REPID = 'SAPLALDB'.
ELSE.
READ TABLE MF_DYNPFIELDS INDEX 1.
Unterstriche durch Blanks ersetzen
TRANSLATE MF_DYNPFIELDS-FIELDVALUE USING '_ '.
EXIT.
ENDIF.
ENDDO.
IF SY-SUBRC = 0.
Konvertierung ins interne Format
CALL FUNCTION 'CONVERSION_EXIT_PERI_INPUT'
EXPORTING
INPUT = MF_DYNPFIELDS-FIELDVALUE
IMPORTING
OUTPUT = MF_MONAT
EXCEPTIONS
ERROR_MESSAGE = 1.
IF MF_MONAT IS INITIAL.
Monat ist initial => Vorschlagswert aus akt. Datum ableiten
MF_MONAT = SY-DATLO(6).
ENDIF.
CALL FUNCTION 'POPUP_TO_SELECT_MONTH'
EXPORTING
ACTUAL_MONTH = MF_MONAT
IMPORTING
SELECTED_MONTH = MF_MONAT
RETURN_CODE = MF_RETURNCODE
EXCEPTIONS
FACTORY_CALENDAR_NOT_FOUND = 01
HOLIDAY_CALENDAR_NOT_FOUND = 02
MONTH_NOT_FOUND = 03.
IF SY-SUBRC = 0 AND MF_RETURNCODE = 0.
ASSIGN (MF_DYNPFIELDS-FIELDNAME) TO <MF_FELD>. " ==>> note 148804
<MF_FELD> = MF_MONAT.
CALL FUNCTION 'CONVERSION_EXIT_PERI_OUTPUT'
EXPORTING
INPUT = MF_MONAT
IMPORTING
OUTPUT = MF_DYNPFIELDS-FIELDVALUE.
COLLECT MF_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = MF_HLP_REPID
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = MF_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 01
INVALID_DYNPROFIELD = 02
INVALID_DYNPRONAME = 03
INVALID_DYNPRONUMMER = 04
INVALID_REQUEST = 05
NO_FIELDDESCRIPTION = 06
UNDEFIND_ERROR = 07. "<<== note 148804
ENDIF.
ENDIF.
ENDFORM. "MONAT_F4
*& Form get_month_dates
Calculating the Month Start & End Date
FORM GET_MONTH_DATES.
IF M1 = 'X'.
FYEAR = P_SPMON+0(4).
MON = P_SPMON+4(2).
CONCATENATE FYEAR MON '01' INTO R_BUDAT-LOW.
R_BUDAT-SIGN = 'I'.
R_BUDAT-OPTION = 'BT'.
CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
EXPORTING
I_DATE = R_BUDAT-LOW
IMPORTING
E_DATE = R_BUDAT-HIGH.
APPEND R_BUDAT.
CLEAR S_BUDAT.
REFRESH S_BUDAT.
S_BUDAT-SIGN = 'I'.
S_BUDAT-OPTION = 'BT'.
S_BUDAT-LOW = R_BUDAT-LOW.
S_BUDAT-HIGH = R_BUDAT-HIGH.
APPEND S_BUDAT.
ELSE.
FYEAR = P_SPMON+0(4).
MON = P_SPMON+4(2).
CONCATENATE FYEAR MON '01' INTO R_BUDAT-LOW.
R_BUDAT-SIGN = 'I'.
R_BUDAT-OPTION = 'BT'.
CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
EXPORTING
I_DATE = R_BUDAT-LOW
IMPORTING
E_DATE = R_BUDAT-HIGH.
APPEND R_BUDAT.
ENDIF.
ENDFORM. " get_month_dates
*& Form output_table_Check
checking for records for output
FORM OUTPUT_TABLE_CHECK .
DESCRIBE TABLE I_FINALT LINES INDEX.
IF INDEX EQ 0.
MESSAGE I041 WITH TEXT-005.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. "OUTPUT_TABLE_CHECK
*& Form Z_TOP_OF_PAGE
for setting the details in the top of page *
has no formal paramters *
FORM Z_TOP_OF_PAGE.
DATA: V_MON(2),
V_YR(40),
V_FIN(18),
V_FIN1(48),
LOW(10),
HIGH(10).
V_MON = P_SPMON+4(2).
V_YR = P_SPMON+0(4).
FHEADER-TYP = 'H'.
FHEADER-INFO = 'Stock Register Report (FG Stock)'.
APPEND FHEADER.
CLEAR FHEADER.
*if m1 = 'X'.
CONCATENATE 'Month = ' v_mon '.' v_yr INTO v_fin.
fheader-typ = 'H'.
fheader-info = v_fin.
APPEND fheader.
CLEAR fheader.
*endif."prabhu on 18.5.5
IF D1 = 'X'.
CLEAR S_BUDAT.
LOOP AT S_BUDAT.
CONCATENATE S_BUDAT-LOW6(2) '/' S_BUDAT-LOW4(2) '/'
S_BUDAT-LOW+0(4) INTO LOW.
CONCATENATE S_BUDAT-HIGH6(2) '/' S_BUDAT-HIGH4(2) '/'
S_BUDAT-HIGH+0(4) INTO HIGH.
CONCATENATE 'Date = ' LOW ' - ' HIGH INTO V_FIN1.
FHEADER-TYP = 'H'.
FHEADER-INFO = V_FIN1.
APPEND FHEADER.
CLEAR FHEADER.
ENDLOOP.
ENDIF.
ENDFORM. " Z_TOP_OF_PAGE
*& Form Z_LAYOUT_SETTINGS
this is done for setting the properties for the layout of the *
grid *
has no formal paramters *
FORM Z_LAYOUT_SETTINGS.
FS_LAYO-ZEBRA = 'X'. " Output in Zebra pattern
FS_LAYO-DETAIL_POPUP = 'X'. " A popup window appears to give
FS_LAYO-DETAIL_TITLEBAR = TEXT-022.
FS_LAYO-COLWIDTH_OPTIMIZE = 'X'.
ENDFORM. " Z_LAYOUT_SETTINGS
*& Form Z_ALV_EVENTS
This is used for handling the events TOP OF PAGE and the USER *
COMMAND event *
has no formal paramters *
FORM Z_ALV_EVENTS.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = FEVENTS[].
READ TABLE FEVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC = 0.
FEVENTS-FORM = 'Z_TOPOFPAGE'.
MODIFY FEVENTS INDEX SY-TABIX.
CLEAR FEVENTS.
ENDIF.
READ TABLE FEVENTS WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC = 0.
FEVENTS-FORM = 'Z_USER_COMMAND'.
MODIFY FEVENTS INDEX SY-TABIX.
CLEAR FEVENTS.
ENDIF.
ENDFORM. "Z_ALV_EVENTS
*& Form Z_CREATE_FIELD_CATALOG
here the field catalog is created for the primary list *
no formal parameters *
FORM Z_CREATE_FIELD_CATALOG.
for the Plant
FCAT-FIELDNAME = 'WERKS'.
FCAT-KEY = 'X'.
FCAT-OUTPUTLEN = '000005'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Plant'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'C'.
FCAT-DATATYPE = 'CHAR'.
APPEND FCAT.
CLEAR FCAT.
for the Material Type
FCAT-FIELDNAME = 'MTART'.
FCAT-KEY = 'X'.
FCAT-OUTPUTLEN = '000006'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'MatTyp'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'C'.
FCAT-DATATYPE = 'CHAR'.
APPEND FCAT.
CLEAR FCAT.
for the Material No.
FCAT-FIELDNAME = 'MATNR'.
FCAT-KEY = 'X'.
fcat-hotspot = 'X'.
FCAT-OUTPUTLEN = '000018'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Material'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'C'.
FCAT-DATATYPE = 'CHAR'.
APPEND FCAT.
CLEAR FCAT.
for the Material Description
FCAT-FIELDNAME = 'MAKTX'.
FCAT-KEY = ''.
FCAT-OUTPUTLEN = '000040'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Description'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'C'.
FCAT-DATATYPE = 'CHAR'.
APPEND FCAT.
CLEAR FCAT.
for the Unit of Measure
FCAT-FIELDNAME = 'MEINS'.
FCAT-KEY = ''.
FCAT-OUTPUTLEN = '03'.
FCAT-JUST = 'C'.
FCAT-SELTEXT_M = 'UOM'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'C'.
FCAT-DATATYPE = 'UNIT'.
APPEND FCAT.
CLEAR FCAT.
for the Plant
FCAT-FIELDNAME = 'MONTH'.
FCAT-KEY = 'X'.
FCAT-OUTPUTLEN = '08'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'MONTH'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'C'.
FCAT-DATATYPE = 'CHAR'.
APPEND FCAT.
CLEAR FCAT.
for the Opening Stock
FCAT-FIELDNAME = 'C_STK'.
FCAT-HOTSPOT = ' '.
FCAT-OUTPUTLEN = '000016'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Opening Stock'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'Q'.
FCAT-DATATYPE = 'QUAN'.
fcat-do_sum = 'X'.
FCAT-JUST = 'R'.
FCAT-NO_ZERO = 'X'.
APPEND FCAT.
CLEAR FCAT.
for the Total Receipts
FCAT-FIELDNAME = 'TRECEP'.
FCAT-HOTSPOT = ' '.
FCAT-OUTPUTLEN = '000016'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Total Receipts'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'Q'.
FCAT-DATATYPE = 'QUAN'.
FCAT-DO_SUM = 'X'.
FCAT-JUST = 'R'.
FCAT-NO_ZERO = 'X'.
APPEND FCAT.
CLEAR FCAT.
for the Production
FCAT-FIELDNAME = 'PRODU'.
FCAT-HOTSPOT = ' '.
FCAT-OUTPUTLEN = '000016'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Production'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'Q'.
FCAT-DATATYPE = 'QUAN'.
FCAT-DO_SUM = 'X'.
FCAT-JUST = 'R'.
FCAT-NO_ZERO = 'X'.
APPEND FCAT.
CLEAR FCAT.
for the Other Plant Receipts
FCAT-FIELDNAME = 'RECEP'.
FCAT-HOTSPOT = ' '.
FCAT-OUTPUTLEN = '000016'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Othr Plnt Recpts'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'Q'.
FCAT-DATATYPE = 'QUAN'.
FCAT-DO_SUM = 'X'.
FCAT-JUST = 'R'.
FCAT-NO_ZERO = 'X'.
APPEND FCAT.
CLEAR FCAT.
Sales Return
FCAT-FIELDNAME = 'SAL_RET'.
FCAT-HOTSPOT = ' '.
FCAT-OUTPUTLEN = '000016'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Sales Return'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'Q'.
FCAT-DATATYPE = 'QUAN'.
FCAT-DO_SUM = 'X'.
FCAT-JUST = 'R'.
FCAT-NO_ZERO = 'X'.
APPEND FCAT.
CLEAR FCAT.
Total Dispatches
FCAT-FIELDNAME = 'TDISP'.
FCAT-HOTSPOT = ' '.
FCAT-OUTPUTLEN = '000016'.
FCAT-JUST = 'L'.
FCAT-SELTEXT_M = 'Total Dispatches'.
FCAT-DDICTXT = 'M'.
FCAT-INTTYPE = 'Q'.
FCAT-DATATYPE = 'QUAN'.
FCAT-DO_SUM = 'X'.
FCAT-JUST = 'R'.
FCAT-NO_ZERO = 'X'.
APPEND FCAT.
CLEAR FCAT. -
Request for help on Vendor Consignment stock and Customer Consignment Stock
HI Experts,
We have a requirement to segregate the Customer Consignment stock and Vendor consignment stock from the total Consignment stock available in the BW report.
Currently in the report the calculation of total consignment stock is based up on Issued consignment stock and Received consignment stock .
The calculations of the Issued and Received consignments stocks are specified below.
Issued consignment Stock
The below following parameters are checked when the quantity is considered as Issued consignment Stock
Transaction or Process keys : 100, 101, 104, 105, 106, 110
Application : MM
Stock relevance : 1
Adding to the above conditions,
u2022 When the stock category is u2018Ku2019, the Quantity in Base Unit of Measure is assigned to Issued Consignment Stock. or
u2022 When the stock category is blank and the stock type is u2018Eu2019 or u2018Ku2019 or u2018Lu2019 then also the Quantity in Base Unit of Measure is assigned to Issued Consignment Stock.
Received Consignment Stock :
The below following parameters are checked when the quantity is considered as Issued consignment Stock
Transaction or Process keys : 000, 001, 004, 005, 006, 010
Application : MM
Stock relevance : 1
Adding to the above conditions,
u2022 When the stock category is u2018Ku2019, the Quantity in Base Unit of Measure is assigned to Received Consignment Stock. or
u2022 When the stock category is blank and the stock type is u2018Eu2019 or u2018Ku2019 or u2018Lu2019 then also the Quantity in Base Unit of Measure is assigned to Received Consignment Stock
Only stock category and stock type are available in the BW report for determining the type of consignment stock . So, with respect to stock category and stock type, could you please kindly advise if it is possible to determine the Customer consignment stock and Vendor consignment stock in the report
Thanks a lot
Warm Regards,
Jeswanth
Edited by: jeswanth kadali on Jun 23, 2009 4:10 PMHi,
We can settle consignment goods to vendor through MRKO transaction.Even user transafers consignment stock to own stock through MB1B transaction.We can use same document to settle vendor through MRKO transaction.
What is implications of such Action (like Goods issue, 1 step transfer) on SAP.
Nothing will happpen after after stock converted to own stock.
Regards,
JS -
Back Date Storage location Stock / Subcontractor Stock
Dear SAP Guru (s)
Please confirm can we get back date stock at storage location with value and quantity. Also tell me how can we take one subcontractor stock at any particular date.
We are using MB5B, but it is giving only quantity at storage location level and value at plant level.
Full points if problem solved.
Regards
IshuExecute MB5B with special stock and O for special stock indicator, and then double click the material number, you can get all the material document NO.
-
SAP tables for stock and batch
hi MM guys
I have a requirement to check stock of the material before issuing to Process order. Can anybody pl.tell me the exact table for the stock and batch for that material.
Regards
LaxmikanthHi,
Thanks to all.I am getting the stock and batch but my requirement is to check total stock which is available on the day of posting.
Actually in COR6N in PP when they do goods movement even stock is not avilable still system is allowing to post the materials .And in MMBE it is showing negative stocks.
So pl.send the table which can give me total stock on a given date.
Regards
Laxmikanth -
Blocked Stock and Frlag material for Deletion
What is the diffrence between blocked stock and flagging material for deletion.
Thank youHi,
Difference between Block stock and flag material for deletion is:
Block stock will only come into picture if your client says that when ever they receive stock, before quality and physical check it should not create any accounting document..So what you will do is, you will receive stock as block stock with mvt 103...Once Check is done you will release your block stock with 104....
Say for an e.g. Vendor has supplied you goods in your premises...Same time you have noticed that goods are damaged o rare of poor quality...So you will post the stock as block stock...So once you post as a block stock, there won't be any accounting documents generated....
Material flad for deletion means: That particluar material can not be used for further procurement..E.g.. may be client has stopped using that material....
Hope it clears
Utsav -
Stock Status of meterial is set as 'blocked stock' and 'unrestricted"
Any Standard Report Stock Status of meterial is set as 'blocked stock' and 'unrestricted"?
Hi,
You can check the stock status using transaction mmbe......
Regards,
Noopur -
Subcontracting for Sales Order Stock and collective Transfer Posting
Dear Expert,
We have a scenario in subcontracting wherein the sales order the customer also wants to see the components and as such along with the Header item of subcontracting ,we also mention the components as another line item in the sane Sales Order.
Now from the sale sorder two Po's are created onr for the subcontractor and one for the compnens to be procured.
Since the components are procured on sales order stock there is noway we can issue it to the Vendor stock through Movt .Type 541.
As per SAP AG WE CAN:
"ubcontracting is also possible in conjunction with sales order stocks and project stocks. The subcontracting orders are account-assigned to a sales order or a WBS element. Thus, the components are not transferred (using a transfer posting) to the u201Cstock of material provided to vendoru201D but are directly withdrawn from the sales order stock or the project stock at the time of the goods receipt. The material manufactured is also posted to the sales order stock or to the project stock. The cost of subcontracting is then debited to the sales order or WBS element.Since the components are not transferred to the u201Cstock of material provided to vendoru201D, we recommend that you use a transfer posting to transfer the provided components to a new storage location (for example, 9999). This enables you to obtain an overview of those stocks that are physically located at the subcontractor.This information is particularly important when you carry out a physical inventory of the sales order stocks and project stocks."
But my query is that how many such storage locations will be created for the subcontracting vendors.
Secondly for the stock transfer from sales to storage location , we have lots of sales order, is dera way through which we can do bulk transfer rathar than clicking at new item everytime and then doing the transfer posting.
your expert advice shallbe helpful in resolving a longtime pending issue , waiting for the response.
Regards
JabeenThis is a known issue, the system doesnt allow stock to have two special stock statuses at the same time.
Your concern of having to make multiple storage locations is valid (since this is a configuration).
I suggest you do the following
- Configure a warehouse and a single storage type (say 001). Allow mixing of materials in a single bin
- Assign this warehouse to a new storage location.
- Create a bin for every sales order number in the warehouse.
- When goods are moved to subcontractor, perform a transfer posting to the storage location, and perform a putaway to the respective bin. The putaway strategy can be tweaked using a user exit to go to the relevant bin. This way you do not have to enter the WM transaction for putaway.
- To consume the stocks, you can use 231E movement (MB1A). On the WM side, the picking strategy can be enhanced so that the picking TO is generated with the correct source bin. Make sure the GL account and CO objects are as per FICO requirements.
This way you can track the stocks binwise (bin level reports are available in WM), perform physical inventory and also consume the stocks from the relevant bin automatically.
We had faced the same situation, and we ended up not having sales order stock at all.
Hope this helps.
Regards,
Aroop -
MRP planning and Availability check
Dear Friends ,
We are updating Availablity check in the MRP view for all materials in materials master , While running MRP system is considering ATP check as per SPRO settings defined for Availablity check group .
Weare not conclude what is the relation for MRP run and availablity check , or any seperate SPRO settings available for MRP on availablity.
If we not assigned the Availablity check in MRP view what will happen if during MRP run ?
thanks & regards
Suresh Babu.SSuresh,
MRP does not look at what you have configured for Availability check. These two are independent from each other.
As given in Help,
In the planning run, the system carries out the following partial processes:
1. The system checks the planning file entries. Here, the system checks to see whether a material has been changed in some way relevant to MRP and should therefore be included in the planning run (see Checking the Planning File Entries).
2. The system carries out a net requirements calculation for every material. Here, the system checks to see whether the requirement quantity is covered by available warehouse stock and fixed receipts from Purchasing or production. If the requirement quantity is not covered, the system creates a procurement proposal (see Net Requirements Calculation).
3. Then the system carries out the lot-sizing calculation. Here, the system takes the lot-sizing procedure and, if necessary, the rounding up or down values into account (see Lot-Sizing Calculation).
The system carries out scheduling to calculate the start and finish dates of the procurement proposals (see Scheduling).
4. The system determines the type of procurement proposals. Depending on the settings, the system creates either planned orders, purchase requisitions or schedule lines for a material (see Determining the Procurement Proposal). If you have maintained the necessary specifications for procurement quota arrangements, the system determines the source of supply which it assigns to the procurement proposal (see Quota Arrangements).
5. The system recognizes critical situations which the planner has to processes manually in the planning results. For this purpose, the system creates exception messages and carries out a rescheduling check (see Creating Exception Messages and Rescheduling Check).
Availability check is not a planning process, it is basically a CHECK, based on the Scope of check derived for that Particular transaction, system check the availability of a material and it can confirm or propose the possible availability date.
In short if a material is defined with Check Group "KP", but with MRP type PD, still MRP would creates procurement proposals if the demand is more than the stock+recipets.
Regards,
Prasobh -
Hi,
During MRP run for a FG will Availabilitycheck be carried out..??
I have a FG with MRP type ND(No Planning) and Availability check KP(No Check) with these settings if I run MRP I know that Material will not be considered for MRP run, but will Availability check carry..??
For which strategies (MTS and MTO) will AV check be carried..??
Please teach me.
Regard's,
Uday.hi,
As MRP run is concerned it will take all stok into account, except the settings in OPPI for stock-in-transit, blocked and restricted.
Availability check is to check the availability of components for Planned orders and production orders.
For planned orders you can check the availabilty collectively in MDVP.
and prod orders check in COHV.
If you put ND as mrp type, system will not take it for planning.
Normally for pipematerials we put KP as availabilty check.
Thanks,
JK -
Dear gurus,
We use subcontracting procedure.
We send semifinished product to sucontractor and get FG. *The subcontractor (vendor) is a plant having different company code.
we dont send semifinished product wrt purchse order but we send bulk quantity of semi finished material at a time.
While running MRP system does not consider subcontracter stock and create planned orders for semi finished products.
I tried this by using MRP area but system is NOT allowing me to use SPK 45 as the vendor is a differnt plant.
So please help me to map this scenario.
ThanksDear,
In MRP system never consider subcontracting stock as its comes under special stock type O.
If you want then you need to create MRP area as vendor subcontracting area then it will work for you.
For Suncontracting with vendor you can use special procurement key 45 i.e. stock transfer from Plant to MRP area in MRP area segment. This SP key is used to provide components to the suncontractor i.e. vendor.
For the assembly that you getting from vendor, you can maintain SP key 30 i.e. Subcontracting.
Please refer this useful link,
http://help.sap.com/saphelp_47x200/helpdata/en/8c/0d7bb4d43b11d1a69d0000e83235d4/content.htm
Regards,
R.Brahmankar
Edited by: R Brahmankar on Apr 16, 2009 3:04 PM -
Negitive stock and Non valuated stock
Dear Gurus
please give me over view of my below stock. provide with example and situation.
Negitive stock and Non valuated stock
Best regards
srinivas.Hi
For Negative stock
http://www.sap-basis-abap.com/mm/how-to-use-negative-stocks-and-its-purpose.htm
For Non Valuated Stock
UNBW (non-valuated materials)
Non-valuated materials are managed on a quantity basis, but not by value.
Check it out
Regards,
Raman
Maybe you are looking for
-
I have the latest generation Ipod Touch with Version 3.1.2 on it and also an Iphone 3G. When I tried to sync my ipod touch tonight it removed applications from it first saying they were not compatible with my Ipod touch. When I hit sync again it said
-
Had operational Goflex - plugged in USB WD MyBook, cannot boot & no IP
Hello Archers! Situation; Arch Linux Seagate Goflex Home (SG-GFH) was fully operational but now not getting IP address after plugging in USB Western Digital My Book Essentials (USB-WD-MBE) and restarting. Environment; 1 NetGear WND3700 v2 router. 1 L
-
How to connet a g5 with a pc server
Hi i have a proline server & want to connect my Mac G5 with this server is any way to do this?
-
Oracle inventory location Help
I am facing some issues with oracle inventory locatoin on a 2 node rac setup. The ORACLE_BASE in my .bash_profile is pointing to /u01/ mount point - which is a NFS mounted volume. clusterware installation went sucesful and now when i am trying to ins
-
How to clear Cache in application module
Hi, i am using jDeveloper 10.1.3.4 ADF BC after executing ADF search form, i want to clear Cache. how can i do it. Pl. help Thanks Ajit