ABAP Coding

Home / SAP / Archive by category "ABAP Coding" (Page 9)

Configuring Web Dynpro in SAP ERP

Well, since creating my new EHP4 system, I’ve had to do a lot of activities.  For me, the most important was getting Web Dynpro working.  I created this whole system with the intent of using it for webdynpro development.  Anyway, again, no straightforward documentation that talks about what needs to happen.  So, here’s my notes on configuring web dynpro in SAP.
First, you need to implement an OSS note:
After applying the note, go to transaction SICF and activate the following services.
Now, you can use the layout designer for Web Dynpro.  It’s that easy.
Hope this helps,

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.

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.


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.
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:


Then just enter in the path of where you want to upload the theme,
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,


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…

Select-Option in OO class

Here’s part 2 of my adventure with SELECT-OPTION. Now one of the cool things that SAP did was to move to an OO programming method. However, since I got very used to SAP forms, functions and programs, I keep finding things that aren’t as easy to do with classes. SELECT-OPTION for example.
Now, what I really wanted to do was to send the select option table into a global class, so I could use it select statements and other table functions. Sounds easy, right? Well, actually it is, once you figure out how to do it.
It turns out, all you need to do is create a global structure/table type that woks as a select-option. The new trick that I learned is that there is a special function in SE11 when creating a table type that allows you to create it as a select-option table.
All you need to do is go into SE11, enter in the name of the table type, select TABLE TYPE as the object to create. Once you are in SE11, Enter in the short text, then go to the menu: edit–>Define as Ranges Table Type. This changes the inputs you’re given for creating the table type.
Enter in the data Element (MATNR for example), then enter in the name of the structure you want to create, and press create. It will automatically create the fields for your SELECT-OPTION range.
Save and activate everything. Now all you need to do is enter it into the parameter for your public class and you’re ready to go.
One last point, don’t forget when calling the class, to send it in as a table…

SELECT-OPTION: matnr FOR mara-matnr.

call method XXXX (
IT_SO_MATNR = matnr )

Anyway, that’s one of my recent discoveries. I’m learning a lot about layouts and trees currently, so there will probably be a post about some of those tricks as well.
Thanks for reading,

SAP Report: SELECT-OPTIONS in a layout screen.

Well, today I’ll get a little more technical for a change. I’m working on generating a new dashboard for service management, and one of the challenges that I needed to overcome was using Select-options in a layout screen and then feeding those options to a global class. Let’s start with the layout issue:
1. you need to define a subscreen. I usually put this in my _TOP with all my other data declarations. It would look something like this:
vkorg FOR vbak-vkorg,
vtweg FOR vbak-vtweg,
spart FOR vbak-spart,
vkgrp FOR vbak-vkgrp,
vkbur FOR vbak-vkbur,


This has a subscreen of 1301 (and it also has a box around this data to make it look nicer.

2. Once you have this subscreen declared, you need to go to SE51 and update your layout. You will need to go into the layout screen and place the subscreen in your desired location.
in my example, I’d call it SUB_1301. Be sure to make it large enough to hold all the fields (it’ll encompass your full width of the screen to hold all the fields).

3. Finally, you need to make a declaration for the new subscreen in your flow logic. Here’s a very simple example:




Be sure to include a line for each PBO and PAI.
One of the big gotcha moments for me is that I can’t define my select-options as large as I’d like. I had to pare down my list so that i would fit int he screen. If you need everything, you would have to break it up into multiple screens. This may have to do with the fact that I’m using a tabbed layout.
Anyway, if you know of better ways to handle this, please let me know. I’m always interested in better ways code.
Happy coding,