Tuesday, May 29, 2012

MM Reopen posting period - MMPI transaction

MM posting period re-open issue. Problem: User was opened by mistake period 06 year 2005 but they still had documents for posting in period 04. Solution: The solution is running the MMPI transaction and read note 48781. I found this post on sap.ittoolbox.com SAP forum which explain some basic steps to reopen the MM period.

1. Lock all users out of PRD

2. Take snapshot of MB5L for all materials at company code for current and previous periods

3. Add User parameter MMPI_READ_NOTE with value = current date in this format YYYYMMDD

4. Stop all processing that updates inventory values

5. Run t-code MMPI with correct period

6. Run Z_DEl_HIST_ENTRIES program

7. Take MB5L snapshot for all materials at company code fs01 for current and previous periods

8. Validate that values match on MB5L pre-post snapshots or are appropriate.

9. Unlock all users in PRD

10. Remove User parameter MMPI_READ_NOTE from user ID

Please be carefully if you want to reopen a period that is far in the past!!!!

Wednesday, November 30, 2011

Physical Inventory Process

Physical Inventory Process

This process captures different ways of carrying out physical inventory count in a plant / storage location. Depending upon the number of materials and company’s inventory norms, a physical inventory procedure is adopted. Following two procedures are more commonly used in industry:

•Cycle Counting
•Periodic Inventory (usually Annual Inventory count)
In Annual physical inventory, all materials are counted once in a year on a pre-determined date. On this date, all materials are blocked for any inventory movement till the physical inventory count is complete. This is more common for Plant / Storage locations which do not hold too much inventory. For warehouses with a lot of inventory, this method tends to become impractical to implement.

In cycle counting, all materials need not be treated the same way. It allows fast moving materials to be counted more frequently than slow moving materials or high value items to be counted more frequently than low value items. A cycle counting indicator is set in material master which determines for a given plant, how frequently the material has to be counted, as in, once a year, twice a year, thrice a year and so on.

SAP process flow:
1. MI01 – Create Phsical inventory document : Initial screen
2. MI22 – Display Physical Inventory Documents for material
3. MI21 – Print physical inventory document
4. MI04 – Enter inventory count: Initial screen
5. MI20 – List of Inventory Differences
6. MI11 – Enter recount: Initial screen
7. MI22 – Display Physical Inventory Documents for material
8. MI21 – Print physical inventory document
9. MI04 – Enter inventory count: Initial screen
10. MI20 – List of Inventory Differences
11. MI07 – Post inv. Differences: Initial screen

While creating physical inventory document in Step 1, material can also be blocked for posting. Otherwise transaction MI32 can be used after Step 1 to block the materials.

Steps 6 to 10 above are optional. If re-count is required then only these steps need to be carried out. Step 11 creates a material document, which leads to updating of SAP book inventory. In other words Step 11 leads to write-on or write-off of inventory based on physical inventory count.

SAP also provides T Codes to automate the process carried out in Step 1. By these transactions Physical Inventory Documents can be created in background in batch processing mode. MI31 enables creation of Physical inventory documents in bulk based on selection parameters for Periodic Inventory Count. Similarly MICN enables bulk creation of physical inventory documents for Cycle Counting.

There is an alternate ways of processing inventory count, where inventory data can be entered without reference to any physical inventory document, as mentioned below:

•MI09 – Enter count w/o reference to document: Initial screen
•MI20 – List of Inventory Differences
•MI07 – Post inv. Differences: Initial screen
Master Data Setting – Cycle Counting

•In Material Master Plant data / stor. 1 view maintain the “CC phys. inv. Indicator”.
•MIBC – “ABC Analysis for Cycle Counting (Phys. Inv.) can be used to assign materials to different cycle counting categories viz. A, B, C and D. This transaction analyses the materials based on the configuration of category A, B, C and D and proposes / assigns a corresponding cycle counting indicator.
•If “CC fixed” indicator is checked in Material Master Plant data / stor. 1 view, “CC phys. inv. Indicator” cannot be changed by running MIBC.
Master Data Setting – Periodic Inventory

•In Material Master Plant data / stor. 1 view, “CC phys. inv. Indicator” should be blank.
The above two processes can also be used to count physical inventory of special stocks such as Consignment Material as well as different stock types like Quality Inspection Stock and Blocked stock.

To count physical inventory for say consignment material, maintain “K” in special stock field in the physical inventory document. To include different stock types like Quality Inspection Stock and Blocked stock in physical inventory process, you need to enter a new line for the same material in physical inventory document for each stock type.

Friday, November 25, 2011

Info for SAP Release Strategy

The release strategy for purchase requisitions or purchase orders is not determined.

Other terms
T16FS, T16FG, T16FC, frgzu, frgrl, M06E0005, FAQ.

Reason and Prerequisites
1. Settings in Customizing
a) Release group:
For every release object (1=PReq, 2=Purchase order) only one class may be used.When you use the overall release (as of Release 4.0A), only one class may be used for the overall or individual release.If you use the overall release for purchase requisitions, this must be marked for document type (TA:OMEB, flags at V_T161-GSFRG) and release group (TA:OMGQ, flags at V_T16FG-FRGFG).In the overall release, the system only takes the characteristics into account which are identical for all items.If, for example, item 10 of a purchase requisition contains material group 001 and item 20 material group 002, the material group is set to BLANK for the strategy determination.

a) Release indicator:
A release strategy must contain two release indicators at least.The first indicator must be defined as blocked, the last release indicator as released.If this is not the case, the release status is not displayed correctly.If a value is entered in field 'Value changes' (V_161S-TLFAE), only a check for value increases is performed.

a) Release statuses:
A release indicator must be assigned to every theoretically possible release status.That is, for example you have to maintain 32 entries for 5 release codes which can be released in any sequence. Caution:If the release strategy contains many release codes, not all statuses are displayed in the window.In order to display these release statuses, you have to use the page down or page up keys on the keyboard since the window has no scroll bar.

1. Settings in the classification
a) The characteristics of the class used must all be linked to the corresponding fields of structure CEBAN or CEKKO (for purchase orders).
b) The characteristics must be entered as they are specified on the database, that is, the item category must be entered in the internal format, for example (value 0-9), cost centers or material numbers must be entered with leading zeros.
c) If intervals are used for the characteristics, the corresponding characteristic must be marked as multiple value in the classification.
d) If a characteristic is nonvaluated (blank entry), this field must actually be filled with blanks in the document.A blank entry can be useful when the overall release is used. A blank entry is not to be seen as a wildcard (*). If, for example, all material groups of a release strategy should be subject to an update strategy, these must be entered explicitly in the classification. It is not possible to use a placeholder (wildcard).
A blank entry can be maintained as follows:
- Enter the characteristic in Transaction CT04 (for releases < 4.6, Transaction CT02)
- Select 'Value'
- do not maintain any entry in column 'Characteristic value'
- in the column 'Characteristic name', enter a text such as, for example, 'Blank entry' and save the settings
- the blank entry that is maintained as such can now be selected from the F4 help in the Customizing of the release strategy (Button: Classification).
e) If you make changes to the class (Add or delete characteristic) no determination of the release can occur for this class.Then you must adjust all release strategies correspondingly (new characteristic was added = characteristic value must be maintained!)
f) A working strategy must have classification status '1' (active) in Transaction CL24 or CL24N.If release strategies are deleted, ensure that the strategy is also deleted in Transaction CL24 with the deletion in Customizing.
You can use Transaction CL30 to execute an object search using the data of the purchase requisition/purchase order.Here, it is important that the object search determines exactly one strategy.If this is not the case, this indicates that overlapping strategies exist in the system or that the release strategies in Customizing do not correspond with those from Transaction CL24. See the preceding point.If the object search returns more than one result, the system subsequently determines no or the incorrect release strategy.
2. User Exit
During the individual release for purchase requisitions, the user exit is called in function module ME_REL_STRATEGIE_EBAN, in the overall release, it is called in function module ME_REL_GENERAL_STRATEGY_EBAN.
(Enhancement M06B0002, EXIT_SAPLEBND_001, ZXM06U13)
During the release for purchase orders the user exit in function module ME_REL_STRATEGIE_EKKO is called, in releases > 3.1X in program MM06EF0S_STRATEGIE_CEKKO (Enhancement M06E0004, EXIT_SAPLEBND_002, ZXM06U22).
The data is available in the user exit in structure I_CEBAN or I_CEKKO.The transfer from this structure to the calling program runs via structure E_CEBAN or E_CEKKO.In the user exit, I_CEBAN must be copied to E_CEBAN or I_CEKKO must be copied to E_CEKKO anywhere in the user exit, for example E_CEBAN = I_CEBAN.

3. Important notes in connection with a non-working release strategy:
Note 117391 --> as of Release 4.0, for the release of purchase requisitions; Release strategy does not work sporadically.
Note 378718 Symptom: Release strategy works depending on the user.
Documents which are created by users who have no authorization for class type 032(object:C_TCLA_BKA) are not subject to any release strategy.
Note 086900 -> Instruction for the transport of Release strategies
Note 010745 -> Copying class data to other client
Note 045951 -> Transport of class data: System / client.
Note 435150 -> User exit deactivated after importing R/3 Support Packages
4. Deletion of release strategies:
In the tables T16FK, T16FV, T16FS, T16FC and T16FG, entries from the former Customizing
settings (for example, old release groups)
can exist although already deleted in the Customizing, but that do not exist in the tables. This is an inconsistency.

To eliminate the inconsistency, proceed as follows:
Carry out all the deleted release settings in the Customizing again, save them, and then make a deletion in the following sequence:

1. Delete the release strategies
2. Delete the release indicators
3. Delete the release codes
4. Delete the release group
5. Delete the class (Transaction CL02), provided a new one was created for the new
release strategies.

Then use Transaction SE16 to check as to whether the entries in the tables mentioned above were deleted. Execute the check report in Customizing (Transaction OMGQCK or OMGSCK)
and make sure that no red traffic light is displayed. Also consider Note 350703 in connection with this.

Monday, July 27, 2009

TSM SQL Statement

TSM SQL Statement

Show the number of scratch volumes in the library
SELECT COUNT(volume_name) AS Number_of_scratch FROM libvolumes WHERE STATUS='Scratch'

Show the storage pool name, volume name, percentage utilized and percentage reclaimable for all volumes in copy storage pools. Useful if you have lots of offsite volumes and wish to reclaim some
select a.stgpool_name,a.volume_name,a.pct_utilized,a.pct_reclaim from volumes a,stgpools b where a.stgpool_name=b.stgpool_name and b.pooltype='COPY' order by a.stgpool_name,a.pct_utilized

Show percentage utilization of each volume in each storage pool
SELECT a.volume_name, b.stgpool_name, b.pct_utilized FROM libvolumes a, volumes b WHERE a.volume_name=b.volume_name ORDER BY b.stgpool_name, b.pct_utilized

Show volumes that are not in readwrite status
select VOLUME_NAME, ACCESS from volumes where access !='READWRITE'

Show volumes in the library that are less than 20% utilised
SELECT volume_name, stgpool_name, pct_utilized FROM volumes WHERE pct_utilized <20AND devclass_name !='DISK' AND access !='OFFSITE'

Show volumes in a specified storage pool
SELECT volume_name, stgpool_name, pct_utilized FROM volumes WHERE stgpool_name='storage pool name' AND access !='OFFSITE' ORDER BY pct_utilized

Monday, May 25, 2009

Change Request Management (ChaRM)

Change Request Management (ChaRM) is an SAP tool to manage all those activities performed between the design of a change and the final promotion to a productive system.

ChaRM can:

- Improve efficiency and transparency of change management processes
- Minimize business disruptions
- Store documentation of implemented changes
- Track and monitor changes
- Improve audit process
- Reduce risk of correction and project failures

ChaRM benefits include:

- Allow the Organization to control and manage changes in the SAP system effectively
- Guarantee that any change to the SAP system follows the standard process flow and procedures with mandatory controls and documented steps
- Effectively adheres to requirements for SOX compliance

Convert Quick View into a Query

The Quick View reports can easily be converted into SAP Queries. To do this, choose first the query group that you are assigned to and that you will want to assign your query to. If the QuickView you want to convert is based on an InfoSet, that InfoSet must be assigned to your query group.

Navigate to the main screen of the Query tool with SQ01 transaction and select “Query” –> “Convert QuickView”. On the dialogue-box, select the QuickView you want to change, as in figure 1. Click the green check mark and add the name of the Query and define an InfoSet on the following dialogue-box (figure 2), to proceed with the query. Then select “enter”. The Quick View is now converted into a query, and can be shared with other users.

Tuesday, May 12, 2009

SAP Purchasing Configuration Tips and Tricks

SAP Purchasing Configuration Tips and Tricks

Goods Receipts/Invoice Receipts for Purchase Order

Transaction OMW1 allows you to set whether the Price Control is a mandatory "S" or "V".

V indicate that you want the system to value the stocks with the latest price.
S indicate that you want the system to value the stocks with a fixed price method.

Price Control V - Moving Average Price

Assume Material Master current price is 10

Goods Receipts for Purchase Order - Movement Type 101

Material Document Posting created - inventory increases
Accounting Document Posting created
Debit 12345 Inventory 12
Credit 67890 GR/IR 12
New Moving Average Price = ( GR value + Total value ) / ( GR quantity + Total stock )
Invoice Recipts for Purchase Order - MR01
Accounting Document Posting created
Debit 67890 GR/IR 12
Debit 12345 Inventory 3
Credit 45678 Vendor 15
New Moving Average Price = ( Inventory difference of 2 + Total value ) / ( Total Stock)
Price Control S - Standard Price
Material and Accounting Document is the same.
The one with the lower value will be posted with a price variance entry.

Goods Receipts for Purchase Order - Movement Type 101

Material Document Posting created - inventory increases
Accounting Document Posting created
Debit 12345 Inventory 10
Debit 23456 Price Variance 2
Credit 67890 GR/IR 12
No change in Standard Price
Invoice Recipts for Purchase Order - MR01
Accounting Document Posting created
Debit 67890 GR/IR 12
Debit 23456 Price Variance 3
Credit 45678 Vendor 15
No change in Standard Price
General Ledger Account Configuration
Transaction OMWB - Automatic posting for inventory
Inventory posting BSX
Goods receipt/inv.receipt clearing acct WRX
Cost (price) differences PRD
Transaction XK03 - Account Payable Vendor Master
Tick Accounting info. and hit the Enter key
Field name Reconcil.acct 45678
Vendor Returns Without PO Reference

You can used Return Purchase Order, transaction code ME21N

At the item details, look for the Return columns and tick it.

MIGO_GR - Goods Receipt for Return Purchase Order
Movement type will be 161 to deduct the stock and 162 for reversal.
During Goods Receipt for Return Purchase Order, you do not have to change the movement type from 101 to 161 as the system will automatically assign the movement type to 161 upon saving the postings. However, before saving, check if there is a tick in the Return Column to ensure that it is a return Purchase Order.

Create a new Purchase Order Number range to differentiate
OMH6 - Define Number Ranges

Create a new Purchase Order Type to differentiate e.g ZB
OMEC - Define Document Type

Changing the PO Layout sets
OMFE - Messages: Output Programs

/: IF &EKKO-BSART& = 'ZB'.
/ RETURNED PURCHASE ORDER
: ELSE.
/ PURCHASE ORDER
/: ENDIF.

Purchasing List for Open Purchase Order, Goods Receipt, Invoices

Open Purchase Order = Open Goods Receipts ( Selection parameters WE101)

This two parameters determined what information is shown:

selection parameter
scope-of-list parameter
The configuation transaction code is OMEM
You can define additonal selection parameter for your users as well as untick those fields which you does not want it to be printed.
Your can have the Purchasing Documents by :-

ME2L - Vendor
ME2M - Material
ML93 - Service
ME2K - Account Assignment
ME2C - Material Group
ME2B - Requirement Tracking Number
ME2N - Purchase Order Number
ME2W - Supplying Plant
Force buyers to create Purchase Order with ref. to a Pur. Req., Quotation or Pur. Ord.
Transaction OMET
Create a new entry, give it a name and tick :-
Ref. to PReq
Ref. to P.O.
Ref. to quotation
Next, you've got to associate via SU01
Click Parameters, insert a new parameter id EFB to the authorization code.
Type in Parameters value you want e.g. XX
You have to assign the control for ALL the SAP buyers via thier SAP users id.
Logoff and login again. Then try to create a Purchase Order without a reference.
Define default values for buyers
Transaction OMFI
Double click on the default values you want to change.
Save it.
Next, you've got to associate via SU01
Click Parameters, insert a new parameter id EVO to the authorization code.
Type in Parameters value you want e.g. 01
You have to assign the control for ALL the SAP buyers via thier SAP users id.
Logoff and login again. Then try to create a Purchase Order and check the default values.
In the Fast Processing button :-
you can choose whether to adopt automatically all the line items fields in the Purchaes Requisitions
Puchase Order Condition
Suppose you want to calculate the GST and DISCOUNT for a Net Value of 1000.
Net value 1000
GST 10% of 1000 100
DISCOUNT 10% of 1000 100
Final Net value 900

This is what you do :-

M/08 - Define calculation schema
First check the conditions column Steps e.g. PB00 and PBXX belongs to step 1.
Next check the last Steps after Actual Price
Now, look at the column Fro To
If you want the DISCOUNT to be calculated based on 1000, put the Steps number in the column Fro
The Fro To controls the calculation.
Information Structure
In the SAP standard info structure S012 is updated by the Purchase Order creation date, not the Goods Receipt date. e.g. a Purchase Order is created in January and good receipt is in February and March, S012 will shows the values in period January.
Transaction MC26
Info structure S012 Update group (stats) SAP
Double click on Goods received qty
In the section Date field for period determination
Purchase Order Layout Sets, Message Types
Create a new message types for a different layout of Purchase Order
M/34 - Maintain message types
Click the Partner definition button
Insert the new message type to the Partner
OMQN - Fined-tuned Message Control
Add a new Printer Operation 1 - New 2 - Change
OMFE - Layout sets for Purchase Order
Attach the new message type to the new layout sets
M/36 - Maintain message detemination schema : Purchase Order
OMQS - Assign schema to Purchase Order
OMGF - Assign Output devices to Purchasing Groups
MN05 - Assign default Message Type to Purchasing Groups
User Defaults for Purchase Order
There are some fields which you can set as defaults for the buyer in transaction ME21.
Transaction SU01
Input the user name and click Parameters

PID Parameter value
LIF - Vendor number
BES - Purchase Order Number
BSA - Order type
EKG - Purchasing group
EKO - Purchasing organization
WRK - Plant
LAG - Storage location
MKL - Material group
WAK - Promotion

PO Release Strategy

4.6x

The release code is a two-character ID allowing a person to release (clear, or approve) a requisition or an external purchasing document. The release codes is basically controlled via a system of authorizations (authorization object M_EINK_FRG).

Use SE12, structure CEKKO to check all the fields available for controlling the Purchase Order.

e.g. If the total value for the Purchase Order exceeds 10,000, release strategy 01 is assigned to the Purchase Order. There is only one characteristic created in this example. For controlling the Purchase Order type, create characteristic for CEKKO-BSTYP and the value NB.

CT04 - Create Characteristic e.g. NETVALUE

Click Additional data Table name CEKKO Field name GNETW and press enter
(for currency dependent field, you are prompt to enter the currency which the system then converts the currency of the Purchasing document into this currency)

In the Basic data (X refers to tick),
X Mutliple values
X Interval values

In the Value data, in the Char. value column, type >10000 and press enter

Save your data

CL02 - Class

Class - Create REL_PUR

Class type - 032

Click Create

Description - Release Procedure for Purchase Order

In the Same Classification section, click Check with error

In the Char. (characteristic) tab, type NETVALUE to assign your characteristics to the class

OMGS - Define Release Procedure for Purchase Order Type

Release Group - New entries
Rel.group Rel. Object Class Description
02 REL_PUR Rel. Strategy for PO

Release codes - New entries
Grp Code
02 01

Release indicators
Release indicators Release Description
0 Blocked
1 X Release

Release Strategy
Release group 02

Rel.strategy 01

Release codes 01

Release status 0
1

Classification Choose your check values

OMGSCK - Check Release Strategies
(make sure there are no error messages)

Once the Purchase Order is not release, buyers will not be able to print the Purchase Order.

Goods Receipts will be shown with Message no. ME 390 - Purchasing document XXXXXXX not yet released.

In 4.6c, Purchase Order with Release Strategy have a tabs at the end of the Header. This allowed the buyers to check the release status of the Purchase Order.

The person with the release authorization have to use ME28 to release the Purchase Order.

Prompt the last Purchase Order Price for the Material

If you want the system to take the price from the last Purchase Order, then do not maintain the conditions in the info record because it has precedence over the last PO. This means that the netprice field in the info record should be left blank.

In the case when you have already maintained the conditions in the info record (or netprice), try to delete them or make them invalid by changing the validity date.

Even though no price was maintained, the info record will still keep track of the Order price history.

To check the Order price history, go into the material info record and click Environment -> Order price history

Adopt Purchase Order Header Text

To default the Header Text into the Purchase Order

Step 1 :- Maintain text in Vendor Master

MK02 - Change Vendor
Choose Extras -> Texts - Input the text in Purchasing memo
Step 2 :- Link Text types to Header text in Purchase Order
OMFV - Define rules for copying (adoption of) text
Choose Header Text
Choose Goto -> Linkage: text types -> To vendor
Filled in the field No. (e.g. 01 - Header Text), next tick whether you want the text to be adopted or for displayed only
Choose Update to save
Create a new Purchase Order Document Type
4.6x
If you have more than one company code, you might want to define a new document type and number range to differentiate between the two company.

Define a new number range not in used
OMH6 - Number Ranges for Purchasing Documents

Copy the NB - Standard PO to e.g. ZB
OMEC - Define Document types

Maintain :
Text for Document Header/Item
Text for Document Supplement
OMF6 - Messages Header Texts

Send Purchase Order via Output Determination

Read note 191470 - Purchase order as an e-mail

From release 4.5, you can send your purchase order via output determination. This note have indicate all the requirement and settings necessary to send purchase order via the output determination once your SAP have been connected to an External Mail System.

Send Purchase Order with Microsoft Outlook

This is how it work:-

First you send the text converted Purchase Order to your SAPoffice
Sample ABAP program for sending mail to your SAPoffice
Then from Microsoft Outlook, you can send it out externally to your Vendor
Install the SAP setup program on the SAP Presentation CD-ROM under \GUI\WINDOWS\WIN32
Execute the SAPsetup program and choose the Desktop Interfaces.
Then choose the SAP MAPI Service Provider (select Change Options to display the selection)
Once the SAP MAPI is installed. You can create your logon profile for SAPoffice.
Go into your Control Panel of your windows.
Select the Mail option from the Control Panel to call the MAPI profile manager.
Choose Add to call up the new logon profile setup wizard
Select Add from the Services and select the SAP MAPI Service Provider
Type in the required R/3 information (client, sap user name, password)
The supplied PST file is sapwrk.pst

Now, logon to your Microsoft Outlook and see whether you can access all your SAPoffice folders.

If you send the file using SP01 -> System -> List -> Send, the file will have the extension ALI. Use the Windows Explorer to default open with the Windows Notepad.

Sending mail directly from SAP via Microsoft Exchange

If you want to send your mail directly via Microsoft Exchange, you have to install the SAP Exchange Connector Software on your Microsoft Exchange Server.

The setup program SETUP.EXE is located on the R/3 Presentation CD in the directory :\GUI\WINDOWS\WIN32\SXC.

Then you have to setup :-

SM59 - The RFC destination
SCOT - SAPconnect