How to copy a Purchase Requisition with reference to another in SAP ?

Imagine somebody in Chicago’s HR department ordering printer supplies every week – Say some paper and some cartridges. It would always be the same set of materials and quantities. In this case, it would make sense to create a reference PR and always copying from it to create a new PR ( instead of creating a new PR from scratch every time ).

For more, visit SAP MM Training

Here is how you do it.

1. Go to ME51N and have the “Document overview” ON

a.

2. Select the PR number you would like to copy and click on the copy button.

a.

3. You can also selectively copy items by selecting only the items you want to copy ( either using Shift or Ctrl to select multiple items )

a.

Advertisements

What is the difference between Purchase Requisition and Purchase Order in SAP ?

SAP MM Training

Purchase Requisition ( PR ) Purchase Order ( PO )
Internal Document. Doesn’t leave the company. Informal. Goes out to the vendor. Formal/Legal document.
Represents an internal requirement for goods or services. Ex., the legal department needs 10 new chairs. Represents a legally binding document that is sent to the vendor for goods or services. Ex., A PO is sent out to a vendor – “ABC Furniture” for 10 new chairs.
Typically automatically created via MRP. Ex., MRP run in Toyota creates PRs for tires for the next batch of cars. Typically created manually either with reference to a PR or with reference to a contract. Ex., somebody in the Purchasing department of Toyota looks at all the requests for tires, and sends them to a Vendor – say Bridgestone tires.
Purchase Requisition typically doesn’t bother too much about vendors. Ex., when creating the PR for new chairs, you don’t need to specify the vendor. PO is always created with a particular vendor. Ex., when creating a PO for the chairs, you should be sure whom ( vendor ) it should be sent to.

 

Can you create a Purchase Order without a Plant ?

No – you can’t. This applies to Purchase requisitions also. Irrespective of what you are creating ( purchase orders or purchase requisitions ) , what you are procuring ( services or physical materials ) and why you are procuring ( for stock or for expense ), you would always have to enter the plant. This especially causes confusion when procuring services – imagine entering a plant when purchasing “legal services” from a lawyer. There is no “inventory” to stock or receive. Still, SAP forces you to use the plant. It is hard coded in SAP. For more on SAP MM, visit SAP MM Training

What is “Creation Indicator” in SAP Purchase Requisition ?

Purchase Requisitions ( PR ) are mostly created automatically. This field identifies the process through which the PR was created. You can find this indicator at the item level.

If you are looking for full-fledged training, visit SAP MM Training

If the PR was created manually the Creation indicator would be “R – Realtime”. Another common way of creating PRs is via the MRP process. If the PR was created via the MRP process, the creation indicator would be “B – Material Requirement Planning”

Number range for trans./event type WE in year 2015 does not exist

This error comes up when you try to post a goods movement, but the corresponding physical inventory documents do not have number ranges for the fiscal year. As SD or MM consultants, You typically encounter this while doing a PGI of outbound deliveries (VL02N – Goods Issue against a delivery document) or posting inbound receipts against a PO (MIRO – Goods Receipt against a Purchase Order ).

Here is an example of an error.

What is this error ?

This error crops up when number ranges does not exist for the corresponding document type / fiscal year combination.

How to fix it ?

Simple – Create number range for the combination.

Step 1 – Go to OMBT and click on the “Groups” icon.

Step 2 – Select the correct checkbox – For example, our error was related to the goods receipt material documents, of type “WE” . So select the checkbox as shown below and click on the pencil icon.

Step 3 – As you can see, number range does not exist for fiscal year 2015.

Let’s create one – Select ‘Insert Year’

And make an entry for FY 2015 and click on the “plus” button.

Now you have made a number range entry for 2015 for document type WE.

Save it. You get the message saying number ranges are not transportable – That’s fine – Just hit OK.

That it. That should solve your problem.

Java Serialization

Serialization.java
01

02

03

04

05

06

07

08

09

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

import java.io.*;

public class Serialization {

public static void main(String[] args) {

apple app1 = new apple();

app1.color = "Red";

app1.type = "Red Delicious";

try {

FileOutputStream fos = new FileOutputStream("/Users/workshop/app1.dat");

ObjectOutputStream os = new ObjectOutputStream (fos);

os.writeObject(app1);

System.out.println (" Apple Object wrote to the file app1.dat" );

os.close();

} catch ( Exception e)

{

e.printStackTrace();

}

/* Look at the content of the file.

* It will contain some characters that will not make sense.

* Now, let's try to read it back.

*/

Exercise 1 : Develop a small class which implements serializable and has ( apart from other variables/methods ) a String which gets the current time-stamp using the Calendar or Date Object. ( Use Java Calendar or Java Date ) . Serialize it and un-serialize it . Is the date stamp from the un-serialized object the same as system date ?

More Questions

1. What is SerialVersionUID in Java ?

2. Explain some real-time scenarios where you have used Java Serialization

3. Serializable is a Class or Interface ?

4. Can you serialize a static variable in the class ?

5. How do you declare the variable as NOT relevant for Serialization ?

6. What happens when you serialize an object that has references to non-serializable objects ?

7. After de-serialization, what will be the value of a transient variable ?

8. Objects are de-serialized in the order in which they were serialized – TRUE or FALSE ?

9. Can you serialize an object to any other medium other than files ?

10. What is the difference between Serialization and Externalization ?

package com.mt;

import java.io.*;

public class Serialization {

/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

apple app1 = new apple();

app1.color = “Red”;

app1.type = “Red Delicious”;

try {

FileOutputStream fos = new FileOutputStream(“/Users/workshop/app1.dat”);

ObjectOutputStream os = new ObjectOutputStream (fos);

os.writeObject(app1);

System.out.println (” Apple Object wrote to the file app1.dat” );

os.close();

}

catch ( Exception e)

{

e.printStackTrace();

}

/* Look at the content of the file.

* It will contain some characters that will not make sense.

* Now, let’s try to read it back.

*/

apple app2 = new apple();

try {

FileInputStream fis = new FileInputStream (“/Users/workshop/app1.dat”);

ObjectInputStream is = new ObjectInputStream (fis);

/* If you try to read the object, it will give you an error saying

* “Cannot convert from object to apple.

* apple app2 = is.readObject();

* So, cast the object into an apple as follows

*/

app2 = (apple)is.readObject();

System.out.println(” Read the apple object back”);

/* Print out the values in the apple object and see if they are correct

*

*/

System.out.println( ” The color of the apple is “ + app2.color +

” and the type of the apple is “ + app2.type );

} catch ( Exception e)

{

e.printStackTrace();

}

/*

* What is you want to serialize more than one object, say 10 objects

* Can you do that to a single file ? – YES

* Let’s see it now

*/

app1.color = “Red”;

app1.type = “Red Delicious”;

app2.color = “Green”;

app2.type = “Granny Smith”;

try {

FileOutputStream fos = new FileOutputStream (“/Users/workshop/apples.dat”);

ObjectOutputStream os = new ObjectOutputStream ( fos ) ;

os.writeObject ( app1 ) ;

os.writeObject ( app2 ) ;

System.out.println( ” Apple 1 and Apple 2 written to apples.dat file “ );

} catch (Exception e)

{

e.printStackTrace();

}

try {

FileInputStream fis = new FileInputStream (“/Users/workshop/apples.dat”);

ObjectInputStream os = new ObjectInputStream ( fis ) ;

apple temp ;

while ( ( temp = (apple) os.readObject() ) != null )

{

System.out.println( ” The color of the apple is “ + temp.color +

” and the type of the apple is “ + temp.type );

}

} catch (EOFException eof)

{

System.out.println( ” The file has been fully read” );

}

catch (Exception e)

{

e.printStackTrace();

}

/*

* What if there is a static variable/method in your class ?

* Can you serialize it ?

* Let’s see it in action. We have defined a new apple_static class with a

* static variable – shape – remember the shape of all apples is always round

*/

// Serializing apple_static

apple_static as = new apple_static ();

as.color = “Red”;

as.type = “Red Delicious”;

// Look at the way in which we are setting the static variable’s value

// without using the object – but rather using the class.

apple_static.shape = “Round”;

try {

FileOutputStream fos = new FileOutputStream(“/Users/workshop/app_static.dat”);

ObjectOutputStream os = new ObjectOutputStream (fos);

os.writeObject(as);

System.out.println (” Apple Object wrote to the file app_static.dat” );

os.close();

}

catch ( Exception e)

{

e.printStackTrace();

}

// Deserializing apple_static

apple_static as2 = new apple_static();

apple_static.shape = “Not so Round anymore”;

try {

FileInputStream fis = new FileInputStream (“/Users/workshop/app_static.dat”);

ObjectInputStream is = new ObjectInputStream (fis);

/* If you try to read the object, it will give you an error saying

* “Cannot convert from object to apple.

* apple app2 = is.readObject();

* So, cast the object into an apple as follows

*/

as2 = (apple_static)is.readObject();

System.out.println(” Read the static apple object back”);

/* Print out the values in the apple object and see if they are correct

*

*/

System.out.println( ” The color of the apple is “ + as2.color +

” and the type of the apple is “ + as2.type +

” and the shape of the apple is “ + as2.shape );

} catch ( Exception e)

{

e.printStackTrace();

}

/*

* What’s the result ? The value of the shape parameter is ‘Not so Round anymore’. Isn’t it ?

* Explain the reason why to the Java Training students

*/

/*

* Use of the keyword ‘transient’

* Go to the apple_transient class and explain why you would want to use

* the transient keyword . Here is the example.

*/

apple_transient at = new apple_transient ();

at.color = “Red”;

at.type = “Red Delicious”;

try {

FileOutputStream fos = new FileOutputStream(“/Users/workshop/app_transient.dat”);

ObjectOutputStream os = new ObjectOutputStream (fos);

os.writeObject(at);

System.out.println (” Apple Object wrote to the file app_transient.dat” );

os.close();

// Read the Object back and see what is the value of the transient variable

FileInputStream fis = new FileInputStream (“/Users/workshop/app_transient.dat”);

ObjectInputStream is = new ObjectInputStream (fis);

at = (apple_transient)is.readObject();

System.out.println(” Read the transient apple object back”);

System.out.println( ” The color of the apple is “ + at.color +

” and the type of the apple is “ + at.type );

}

catch ( Exception e)

{

e.printStackTrace();

}

}

}

/* The class that you wish to serialize SHOULD implement Serializable interface

* If a superclass implements Serializable, then you do NOT need to

* implement it again.

*/

class apple implements Serializable {

public String color ;

public String type ;

}

class apple_static implements Serializable {

public String color ;

public String type ;

public static String shape;

}

class apple_transient implements Serializable {

/*

* Let’s say the color of the apple could change and it doesnt

* really make any sense to serialize it.

* A more realistic example is OS/Network resources like

* 1. FileHandlers

* 2. Network Socket Connections

* etc..

* So, if you mark the variable as ‘transient’ , Java does NOT serialize it.

* When it brings back ( de-serializes it ), it brings a null value for transient variables

*/

public transient String color ;

public String type ;

}

class grape_apple implements Serializable {

public String color ;

public String type ;

/*

* Any classes that are referenced in a class that is meant to be serializable

* should be serializable as well.

* So, in this case, grape should implement Serializable as well

* If you don’t do it, it will throw a java.io.NotSerializableException

*

* Also, apple, refers to the grape object, grape can refer to another object.

* This way of one object referring another is called ‘Object Graph’ in Java

* This is used by JVM for GC and other system activities.

* If any object referred in the current class ( NOT inherited, just referred )

* then, ALL of them should have implemented Serializable.

* If not, make them transient. Otherwise you get the java.io.NotSerializableException

*/

public grape gr;

}

class grape implements Serializable {

public String color ;

public String type ;

}

class apple_fruit extends fruit implements Serializable {

/* If a class apple extends a generic class ‘fruit’ which did not implement Serializable

* thats not a problem.

*/

public String color ;

public String type ;

}

class fruit {

public String tropic ;

public String edible ;

}

TH_POPUP

This FM can be used to send a quick message to another user on any system in the landscape. This can be used when other users are locking certain transactions and not releasing them for a long time. Here are the steps. However, please use this judiciously and do NOT spam other users when not required.

Step 1 : Go to Txn [ SE37 ] .

Step 2 : Enter TH_POPUP in the Function module and click on the Test button as shown below.

Step 3 : Enter the client Number ( In our case its 800 , since this is an IDES client ) , user id that has locked your Txn and the Message. An example is shown below.

Result : The targeted user gets the message as shown below as a pop-up .

SAP Job Market

SAP job market is currently in a state of flux just like any other IT job. Where there used to be 10 jobs there are 4 or may be 5. Post-recession, the reasons are obvious – Lack of budgets, postponing new implementations, general market slump etc.

However, all is not lost yet. There are still jobs. And more are going to come up as the economy slowly takes roots again and boomtown comes along.

SAP SD Training

Where are the jobs

It is wiser to go to greener lands than search for jobs in a desert. Knowing the market well can make all the difference. So, where are the jobs now? In no particular order, the following modules of SAP are still in demand based on our training and the jobs our students get. We are also basing the list based on industry news.

1. SAP Security and Basis

2. SAP FICO

3. SAP CRM Techno functional

4. SAP IS Retail (Yes Retail is booming again believe it or not. First to suffer is probably the first to benefit )

5. SAP Adobe Interactive Forms

6. SAP GRC

7. Vistex, Vendavo and other bolt-ons

This list is not complete but is just to remind you to go in the direction where the jobs are.

But I don’t know these!!

That’s always a problem. Upgrade your skills. There is fewer alternatives if you don’t. Try to look for modules that are closer to your domain. For example, an SD consultant can go for upgrading to SAP CRM. To an SD consultant with a good knowledge of Pricing, Customer master, order management and OTC cycle , CRM feels like an extension. Similarly, an MM consultant with good knowledge of the P2P cycle, upgrading to eProcurement or SRM would make much more sense. Invest in training. It will pay you back.

Also, follow the wikis , articles and discussions in SDN and other forums. It is not necessarily the case that might gain any knowledge on the actual module itself, but you will understand trends that need to be latched on to.

The Power of Networking

Networking is everything. I personally know people who have absolutely no skills and have been hanging on to jobs for 10 years or more. They just know the right people in the organization. That is definitely not an excuse for not learning though. Be well connected with your network of hiring managers. You might be surprised how much the recruiters pay to get an account at LinkedIn (hunderds of dollars a month per login).

Important sources of SAP Networking are

1. LinkedIn

2. LinkedIn Groups

3. Other social networking sites.

4. Personal Networking.

Of all the above, personal networking is the most important. Without a personal network of friends, ex-colleagues, project managers, recruiters the odds of a getting a job decrease considerably.

Imagine yourself as a recruiter and looking out for positions. You have a position at hand you want to close and it’s a regular SAP position. You just have hours of time before your competitors pour in their bait. It’s a race against time. Searching immediately for candidates that suit the requirements is a time-consuming job and expensive as well (Searching for resumes cost money). So you pull out your references in the database and start sending emails and making calls.

This is not just a hypothetical scenario. It is how the business of recruiting runs. So if you are not in the grind of the recruiters, the chances of getting a job decrease by quite a bit(unless you have special skills that are not generally and easily available in the market in which case you already understand the content of the article and need no longer read it

What is SAP ?

SAP stands for Systems Applications and Products in Data Processing. Designed and developed by 5 IBM engineers during the 1970s as a standards based software alternative to custom built ERP software, SAP has come a long way. SAP has been in the forefront of ERP software ever since.

SAP develops ERP products to be used by companies to manage their enterprise. This includes managing their day to day operations, logistics, finances, month end, quarter end and yearly activities, reporting, HR etc. Although there are a couple of other ERP vendors who do the same, the key differentiator for SAP is the way in which SAP integrates all these operations and makes for a seamless system that is both easy to use and at the same time sophisticated enough to include all kinds of complex activities that are needed for any kind of enterprise. Examples of some of these activities could, be running Material resource planning, recruiting and managing an employee’s lifecycle, disbursing payrolls, recording all financial transactions and drawing balance sheets and P/L statements of the company etc. Now imagine a single system that takes care of all these diverse activities and still keep them well integrated.

SAP was initially designed to be run on the mainframe and was called that release was called R/2 (Release 2). SAP quickly caught on to the client server model with a later release called R/3 and this was the most popular version of SAP. After R/3, later versions of their core software were launched called Enterprise Central Component (ECC).

The automation needs of an enterprise are endless. SAP soon realized that corporations needed business intelligence to mine data from their daily operational data and extract meaningful trends that could enable further business opportunities. SAP BW was born and morphed into BI after buying out Business Objects (BO).

After the hugely successful R/3, SAP created more and more niche software like Customer Relationship Management (CRM), SRM, XI (now called Process Integration or PI) and once again living up to the standards of SAP by maintaining tight integration with their core ECC software.

Through the process of developing these software components, SAP has slowly moved from standard client server architecture to a completely web-based architecture where every transaction can be run from just a browser. These new dimension products developed on the web standards based framework (NetWeaver) are all under new umbrella called mySAP.

What’s in it for me ?

SAP is all-powerful software and everything, but you might ask “How does it help me?” Roughly more than 70% of all Fortune 100 and more than 50% of all Fortune 500 companies use SAP as their core ERP software.

What this gives you is tremendous job opportunities with these companies. These companies have enormous appetite for qualified IT consultants in the field of SAP. These jobs are not just for computer engineers or the likes of them. There are multiple tiers of consultants working in SAP for these companies. SAP is one of the very few software’s where there is a clear distinction between functional and technical areas of expertise. For companies, this means that there is a clear and logical division of the type of work performed and hence leads to increased productivity and efficient implementation and maintenance lifecycles. For individuals like you, this means more jobs and more specialization required for the same.

We can classify them as

1. Functional Consultants: These are folks who have tremendous industry experience in their respective area (Like HR, Finance, Logistics modules like Sales, Procurement etc ) . An example would be a hard-core sales manager with extensive Sales domain experience, working as an SAP SD functional consultant. Another example would be a CPA working to configure an SAP FICO system in a company. The strength of these consultants would like in their deep understanding of the core business processes that are key to the enterprise. A CPA would understand the General Ledger, Balance Sheet or a reconciliation account more than somebody with just pure technical knowledge.

2. Technical Consultants: These are folks who have very good engineering or other academic backgrounds and have a very strong understanding of programming languages. SAP’s own 4th General Programming language is called ABAP. ( Advanced Business Application Programming). In the mySAP suite of products, programming can be done in Java as well. Also there are specialized skills like configuring and customizing SAP’s own middleware XI(Exchange Infrastructure), MDM ( Master Data Management) etc.

3. System Administration: This is managing the SAP software itself (The Netweaver Core ). These folks are called SAP Basis consultants and they come from some kind of System Administration background (*NIX, Windows or Database Administrators). The job includes, installation, upgrades, patching and general maintenance of the SAP system. They also take care of maintaining the entire system landscape.

Get more information on the SAP job market from http://www.magnatraining.com/sap-job-market.