SAP

Home / Archive by category "SAP" (Page 44)

SAP Webgui – Turning it on

Well, now that I have someone else working with me, I needed to be able to get the system up and running so he can help with testing and data stuff.  Since logging into SAP doesn’t always work behind a firewall, I figured I should get the SAP webgui turned on.  Well, I stumbled upon a blog: (I just subscribed to his RSS, since I can always use extra basis help).

https://sapbasis.wordpress.com/

Anyway, here are the simple steps to turning on the SAP webgui (provided your server is available to the outside world.  See my previous post: http://paperstreetenterprises.com/networking-sap…l-server-world/

Check if you have activated:
1) With transaction SICF and locate the services by path
/sap/public/bc/its/mimes
/sap/bc/gui/sap/its/webgui

2)With Transaction SE80 locate from the menu, Utilities –> Settings–>Internet Transaction Server (Tab)–>Publish (Tab) and set “On Selected
Site” = INTERNAL.
This restricts the publication in the next step to the integrated (internal) ITS.  Please note, on my ERP 6.0 SR3 system I didn’t need to do this.  My system was already set to INTERNAL.

3)In SE80 only, Locate the Internet Services: SYSTEM and WEBGUI.
Publish these services with the Context Menu -> Publish -> Complete Service

4)Now Browse to http://<server>:<icmport>/sap/bc/gui/sap/its/webgui/! and login to the webgui.

Thanks for reading…

Creating the printer LOCL

I know this is an easy one for most basis folks, but I had to do some hunting to find it.  So, maybe it’s useful for you too.
This is the guide to creating a local printer LOCL on your SAP system.  Pretty easy.  enjoy:

Follow the procedure below to create a device definition for frontend printing:
1.      Call transaction SPAD, and choose Output Devices.
2.      If you are not in change mode, switch to this mode by choosing This graphic is explained in the accompanying textChange.
3.      You can now do the following:  Create a new entry
4.       Fill out the mandatory fields of the device definition as follows for frontend printing:

Device Attributes Tab Page

Output device

Enter a name for the output device that makes it clear to your users that this is the frontend printer, such as Locl.

Device Type

We recommend that you use the device type  SWIN, SAPWIN, or a language-specific version for Microsoft Windows PCs. However, you can use any device type.

Use the device type pdf1 or a language-specific version for Frontend Printing Using SAP GUI for HTML.

Host Spool Access Method tab page

Access Method

Specify the access method F for frontend printing.

Host Printer

Enter the name __DEFAULT to use the default printer at a Microsoft Windows system.

If you specify __DEFAULT as the host printer, and the user enters the name of the output device, such as LOCL, in the print window and chooses enter, the system displays other printers defined on his or her work station PC. However, you can deactivate this list for users by selecting No Device Selection at Frontend on the Host Spool Access Method tab page.

4.      Save your entries.
Result

When you save the device definition, it is available for your users’ use. To print documents using their frontend, users must enter the name of the output device that you have just created in the Output Device field of the print window.
Example

 

Networking your SAP Virtual Server to the outside world

What can I say?  this one has been on my wish list for a VERY long time, and thanks to a new friend of mine, Brent Brunner, I can finally see my BSP’s/web applications somewhere beyond my local machine.  It is so cool, for first time I know that my Rapier BSP doesn’t work on the Safari browser (not great, but now I can address it).  So for anyone out there, here are the basic steps to accomplish this:

On the Virtual Machine
1.  be sure the network is setup as a bridged adapter.
2.  for that adapter, you need to set the network to be a static IP address.  It doesn’t really matter what address you pick, but you don’t want it changing.  So go into your network adapter and specifically enter the IP address/gateway/etc…  If not sure of all these values, use the CMD prompt and the command:  ipconfig -all  This will give you all the network numbers you need.
3.  find out what port SAP is expecting for <HTTP Port>.  You can use transaction SMICM.  by default, the value is 8000.

On your router settings:  (I’m not going into much detail here since very router is different).
1.  find your primary machine.  You need to set this as a static IP address.  It should match the IP address you chose on the virtual machine.  On my AT&T Uverse box, I went to LAN–>IP Address Allocation.  I found my actual computer, and set it to the IP address from step 2 above.
2.  you need to define some exception ports.  Is should be the same port you found in transaction SMICM.  For this I went to Firewall–>applications and I clicked add a new application.  Then I filled in TCP/IP and the ports I wanted to exempt.  Then I selected my main system, and attached the applications.

Find your public IP address
1.  You can use the website:  www.whatismyIP.com  this is now the IP address that the outside world can use to connect to your system.

On your hosting site (for me it was hostgator).
1.  create a subdomain = to your virtual system name.
2.  Create a DNS entry for your subdomain.domain = your public IP Address
3.  Wait 12 – 24 hours for the changes to propogate through the web.  (this was the part I hated, because I didn’t know if it was working).

Accessing your stuff.
now any BSP’s or anything like that, you’ll need to first give the server, so it will be the subdomain.domain:<HTTP port>/sap/bc/…

I hope I’m not forgetting any steps.  I don’t pretend to be an expert about this, but I’ve spent the last 24 hours learning from Brent and trying to make it all work.  Now as of tonight, it’s all working.  Very exciting to a geek like me.  Here’s my disclaimer.  I’m fairly sure my network is still secure, but like anything, when you open doors, someone could get in.  Make sure your anti-virus software is up to date, and keep on the lookout for anything strange.  Who knows?  I might have to turn it off at some point and pay the $$$ for a VPN to do the same stuff, or other such fancy networking stuff.

Thanks for reading…

And a special thanks to Jeremy Meier…  without your connection, i’d still be stuck with a local machine 🙂

GUI Scripting: A how to guide

Using SAP GUI Script

SAP GUI Script is a fantastic tool that can be used to create transactional testing data, Change existing master or transactional data, create master data in mass or even just data conversion for certain tasks that LSMW can’t handle.  GUI Script has been around for a while, but it always surprises me that so few people are familiar with it.
The basic concept around GUI script is that you can load information into an Excel worksheet, and using a macro, allows you to load data into SAP.  This document is going to walk you through creating your own GUI scripts and using them effectively.

Turning on GUI Scripting

Tranaction: RZ11
Param. Name: sapgui/user_scripting

Press Display
gui-01
If current value is not set to TRUE, press the Change Value and set the value = TRUE.
Please note, typically this a basis function, so if you don’t have access to transaction RZ11, please contact your basis team.
As an additional hint, if you want to have GUI Scripting always active, it is encouraged to activate it in RZ10 (this adds it to the startup profile).

Recording the Transaction

When you are ready to perform the recording,  be sure you know the transaction you want to execute and the data that you can use.  You should also know the screens you plan to visit and the fields that you will be filling in.  Keep in mind, you can always update the recording file, but the better your recording, the less errors you will encounter.
The important thing to remember is that GUI script can NOT perform any logic.  it only works for repeating the same steps over and over again.  This means that if you receive an error on some records, but not others, you will need to execute 2 different scripts.  One script will do the non errors, and other script will do the errors.  You can cut down a lot of time if you can segregate the data early.

gui-02

Activate the recorder.  It is encouraged to always start the main screen in SAP.  This prevents weird things that happens if an error occurs during the playback.

gui-03

Press More if you want to control where the file is saved.

gui-04

When you are ready to start, press the record button (Red Dot Button).

Then proceed to execute the transaction you wish to record.

gui-05

Be sure to use ‘/N’ in front of the transaction code.

gui-07
Enter in the document number and press Operations Button.

gui-08

Please note, when I added a new operation, I entered it on the bottom of the screen.  This allows you to avoid the risk of overriding exisitng data.

Press Enter.
Press Components Tab

gui-09

Again, add the data to the bottom of the screen.
Press Enter
Press Save
Note:  sometimes there will be errors.  If errors occur, you need to remember that maybe not Every order you change will have the error.
gui-10
I encourage you to press the green arrow back on every recording at the end.  This just helps to avoid incorrect loading of data.
gui-11
Press stop.
Now, go find the file.  Be sure to RIGHT click on it.  If you double click on it, it will attempt to execute the exact same transaction again.
You should see something similar to this:

gui-12
The parts of this file you care about are the lines that start: session.xxx
I encourage you to skip the first line that resizes your screen.  and copy all of the remaining lines in the file.
Next up, add this information to the excel file.

Gui Script

This will depend on your version of excel, but what you need to do is find the macro button:
MS 2003:

gui-13

MS 2007

gui-21
Be sure to enable macros.
gui-14
When the macro window opens, be sure to select the correct view on the left hand side of the screen.  Then move to the code section and find the area shown that says “Paste your recorded script below”.
If there is anything currently in this section, be sure to remove it, and replace it with the information from your recording (session.xxx).
gui-15

Now, I’m going to show you how to point this to your excel document.
session.findById(“wnd[0]/tbar[0]/okcd”).text = “/niw32”

session.findById(“wnd[0]”).sendVKey 0

Change:
session.findById(“wnd[0]/usr/ctxtCAUFVD-AUFNR”).text = “4000000”
To:
session.findById(“wnd[0]/usr/ctxtCAUFVD-AUFNR”).text = A

session.findById(“wnd[0]/tbar[1]/btn[17]”).press

Change:
session.findById(“wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1107/tabsTS_1100/tabpVGUE/ssubSUB_AUFTRAG:SAPLCOVG:3010/tblSAPLCOVGTCTRL_3010/txtAFVGD-LTXA1[7,8]”).text = “my test op”
To:
session.findById(“wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1107/tabsTS_1100/tabpVGUE/ssubSUB_AUFTRAG:SAPLCOVG:3010/tblSAPLCOVGTCTRL_3010/txtAFVGD-LTXA1[7,8]”).text = B

Since this can get long, I’ll jsut show you the first 2 changes.  You’ll notice that I found the first two lines where I entered in data.  I changed it to a single letter (no quotes).  This is the excel column where you enter in the data.  It’s that simple.  If anything is a constant, just leave it as it is.
When you’re done, press save and you’re ready to execute.

Executing the Script

Now, the first step before executing the script is gathering all the data.  Typically, this is done using SE16, SE16N, or certain reports (IW73, VA05, COOIS, etc).  As always, be careful with the data you enter.  It’s your user id that will be assigned to the change :).

Once you have the data you wish to execute, simply go the excel worksheet and execute the macro
*** NOTE:  Remember, when the script is running you can’t do anything with Excel.  You can continue working in SAP, but Excel will be locked for the duration of the script.

gui-16
**** NOTE ***
This is a VERY important one.  Be sure that the first SAP window open on your screen is the client you wish to change.  If you are doubt, be sure to logout of any client/system you do not want to change.  For example, if you are logged into production and QA.  You want to make the change to QA, I encourage you to log out of production.

gui-17
Press Run
Note:  if you have multiple excel windows open, be sure the correct macro name is highlighted.  If you aren’t sure, close the other excel documents.

gui-18

Gui Script will always give you a chance to check the results of the FIRST record.

gui-19

I encourage you to always check and make sure it saved properly before pressing ok.  If it did not, press cancel.  Otherwise the script will go all the way to the end.

Once you are done, it will return control back to excel.

gui-20

As long as you see OK in the row, the record processed.  if you don’t see ok, you’ll need to check that record and possibly reprocess it.

 

WMIGO is ready for the next phase – MIGO + WM is a winning combination

For anyone that’s been reading, you’ll know that I started a tool that would allow you to do a material movement and create the transfer order in a single step.  Well, I’m excited because last night, I put the finishing touches on that tool.  I still need to do some full scale testing and create the documentation for it, but round one is done.  It uses the idea of transaction MIGO and incorporates the WM pieces into it.

Some of the lessons I learned while building this, don’t clone transactions, and even be careful cloning screens.  I ran into this when I began to set up the serial number entry screen.  At first, I started by just copying the screen from MB1B.  Nice and easy, right?  not so much.  I quickly  came to the same realization as I did when I copied the MB1B transaction completely.  It works, but it opens the door to a lot of potential headaches.  So, like the main transaction, I looked at what was happening in MB1B, and took the important pieces.  Now there may still be things that will need to be added into future releases.  For example, at this time I’m not covering the user exits and enhancement points that the standard material movement have built into them.  This may be a requirement for some of my future customers, and if so, at that time I’ll work on building those into my solution.  IN the meantime, the functionality works, and I’ve created a pretty slick tool.

Finally, big thanks go out to Jeff Bass, without whom none of this would’ve been possible.  Jeff is quite possibly the best WM teacher out there.  Certainly the best I’ve ever met.  I knew very little about WM before sitting down with Jeff for an hour.  After that, I have a very solid grasp of how it works (and at least enough to set up a simple WM configuration).  So thanks Jeff…  couldn’t have done it without you…

as always, I keep learning the hard way so you don’t have to.

Upgrading the SAP Kernel

You never know what I’m going to talk about next.  Even I wonder if there is a method to my madness (I hope so 🙂 ).  Anyway, today’s task is to update the SAP kernel on my ERP 6.0 EHP4 system.  I can’t get the crazy thing to start, so one of the suggestions online was to upgrade to the latest kernel, so here I am.

Step one.  Download the files.  YOu need the database file, the database independent file, and of course SAPCAR.EXE.  You can find all this on service.sap.com.  Normally, I just do a search and look for Kernel and my version.  In this case, I needed to find Kernel 7.01.  From here, SAP will guide you down the path depending on your OS and your DB type.  Look for the file with the biggest number or latest date.

Next up, save all these files to a location, and extract them.  This is what SAPCAR is for.  Since I’m on windows, I use the cmd.exe and navigate to where I saved the files.  I then use the command sapcar -xvf *.SAR.  The only catch is that once you start the extract, make sure and move SAPCAR.EXE to a different directory.  It gets extracted out the files you are extracting and will dump when it encounters the same file.  You can also extract to a different directory, which probably the better approach.

Next, save a copy of your current kernel, just in case.  For me, the path is:  c:\usr\sap\<SID>\SYS\exe\us\NTAMD64\.   I’ll just grab all of these files and save them somewhere else.  If things go horribly wrong, I’ll just wipe out the changes and paste these files back in.

So obviously, I copy the extracted files to the kernel location.  Be sure to leave all of the existing files in the directory.  Depending on the Kernel, not everything gets updated.

Now test.  I usually restart my system, just to be safe and then fire up SAP. in general, it’s that’s easy…  Hopefully this gets my EHP4 system working so I can take advantage of the new testing and debugging tools not available in kernel 7.00.  Unfortunately, for me, my Kernel doesn’t seem to be the issue.  So back to the drawing board.  It might mean a new install 🙁

Thanks,

Mike

Installing SAP – What do you need?

Well, for the small business person, the task of installing SAP can be quite daunting.  Take me for example, when I first tried to install SAP it took me a couple months.  Here’s why:

1.  I had to learn how to use virtual server
2.  I didn’t have CD/DVD’s of the SAP software, so I had to download everything
3.  I didn’t have an appropriate operating system.
4.  I didn’t have the first clue about settings for the SAP installation
5.  Woefully deficient hardware

So, those 4 minor points, made things go a little slower.  Luckily, SAP has provided some Netweaver trial systems that I could use while I figuring this all out.  Well, Step 1 I talked a lot about yesterday, so I won’t go into too much detail.  Just remember, VirtualBox is far better than Virtual Server (in my humble opinion).  Step 2…  This was just time consuming.  Downloading SAP 1 file at a time from service.sap.com was quite an ordeal.  Then to make things worse, I would often encounter an error half way through my installation because one of my downloads was corrupt.
The next thing I quickly found is that SAP can’t run on the standard windows software.  So I had to go get a license for Windows Server.  Initially, I chose 2003 (32 bit) because it was affordable, and for running a 4.7 SR2 system, it worked.  Not a huge deal, but it did require me to start my whole virtual system over again, since I originally installed it with Windows XP (I’m sure many of you are laughing at me right now wondering how the hell did this guy ever make it this far).  Like I mentioned in earlier posts, I learn really wall the HARD way.
Next, my hardware is way underpowered.  I was running off my laptop (I still am today, but I’ve since bought a much better laptop).  So I only had 4GB of memory to run my laptop and my entire SAP system.  Needless to say, an installation would run for 5 days, if it didn’t encounter an error forcing me to start over.  It could be painful, including waking up in the middle of the night, just see if things had failed, so I could start the install again with slightly different settings.

Eventually, it did all happen and my 4.7 system has been happily running ever since…  well, I did learn some valuable lessons about backing up…  but I’ll save that for a another time.

Thanks for reading,

Mike

Mime Repository – Good and Bad

Well, yesterday I spent dealing Eclipse, today’s challenge is with the Mime Repository.  It seems that no matter what I do, certain logo’s won’t show on the BSP.  I’ve tried different folders, different sizes, and even reloaded it, still no luck.

It seems there may be a glitch with the way I uploaded the transports when I rebuilt the system a few weeks ago.  It seems that in ERP 6.0, the package won’t allow me to create a new Mime folder, but if I go to the Mime repository, I can see a folder there.  Unfortunately, I don’t seem to be able to link it using my BSP application.  After scouring the internet, and OSS with no luck, a new idea hit me.  What if the name of the document is what is causing the issue?  So I uploaded the logo with a new name, and it worked.  So somehow, in my transport, the file was corrupted and has a bad link.  Just one more lesson learned.  Be very careful transporting Mime objects.

Now, back my testing.  Thanks for reading.

Mike

Eclipse – Editing your SAP Themes

Well, today has been a big relearning experience for me. When I originally designed Rapier, I played around with Eclipse. With is a piece of software that has partnered with SAP that allows you to edit your SAP theme for a BSP or WebDynpro application. If you’re not familiar with a SAP theme, it’s basically all of the colors, fonts, and styles for your web page.
Well, the last time I used Eclipse, it was a almost 2 years ago. So today I had to go through and relearn how to install and use it. IN fact, I’m still playing with it as we speak. What I wanted to talk about today is the basic process for editing your SAP theme and testing it.
Step one is get it installed. You’ll need to download a few things to make this all work properly:
SAP Install Files
This link will give you the SAP specific files you need to edit themes.
http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/b08a05ec-e24a-2d10-189e-f5c6bcbf39a5
This link gives you the how to of installation and how to get started.  This guide is good, but most of the Eclipse is trial and error.  As far as Rapier is concerned, this is the only time consuming part of the whole installation process.  You have infinite colors and a LOT of areas that can be customized.

Finally, once you have something to play with, go back into SAP and execute the program:

BSP_UPLOAD_MIMEREPOS

Then just enter in the path of where you want to upload the theme,
/SAP/PUBLIC/BC/UR/Design2002/themes/
is the default area SAP keeps it’s themes .  Select upload, and all the files will be pulled in.

Finally, point your application to the new theme and give it a try.  If you are using Rapier, just go to /ZPSE/CONFIG transaction and enter in your new theme.

So, get ready to do a lot of trial and error, but before you know it, your website will look awesome.

Thanks for reading,

Mike

Cloning is bad… and I’m not talking about Sheep, SAP transaction cloning

Alright, well, I just learned something the hard way. For those of you that know me, you’ll know I’m good at that =). Anyway, a few days ago I talked about the new SM/WM integration product I was working on. I was all excited because I almost finished a replacement for the MB1A, B & C transactions to perform material movements and auto generate the transfer order. Well, I took a short cut. I copied the transaction MB1A, and did my updates to that. Well, I finished my development, got it all working in my 4.7 development system. So, as my usual process, I moved the code to my ERP 6.0 system. Well, I got instant syntax errors because things have changed a lot between those versions. Naively, I thought this old transaction will never change. SAP transaction cloning certainly bit me in the butt.  It’s been around forever, so I can just copy it. WRONG!!! The code had a lot of enhancements (included enhancement points, changed forms, etc…). So… I’m back to the drawing board. I’m still going to generate the transaction, but now I need to build the entire front end.
Short story, there are no short cuts in solid developments. Anyway, I’ll keep you in the loop for my continued progress.
Thanks for Reading…