abap

Home / Posts tagged "abap" (Page 2)

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.
/sap/public/myssocntl
/sap/bc/wdvd
/sap/public/bc/icons
/sap/public/bc/icons_rtl
/sap/public/bc/webicons
/sap/public/bc/webdynpro/*
/sap/public/bc/pictograms
/sap/bc/webdynpro
Now, you can use the layout designer for Web Dynpro.  It’s that easy.
Hope this helps,
Mike

Applying SAP Support Packs

I have had my basis hat on a lot lately, so I might as well cover another piece of the basis puzzle.  For anyone like me, you don’t have a lot of time to figure out exactly how to upgrade the system, but you want the stability (at least usually) that comes with an updated system.  For me, I was trying to upgrade my system to a point that my BSP application would be supported on the Mozilla Firefox browser.  I’ll talk more about this at a later time (I’m still collecting details on that portion).  Needless to say, I read an OSS message that said, get to support 19, and I was at 12.  So today I thought I’d talk about applying SAP support packs.
Step 1. Figure out the components you’ll need to update, and what your current version is.  If you go to system->status, and look at the detailed levels, you’ll see things like BASIS, ABAP, etc…  based on the OSS message, you’ll what you need to update.  Find the component, and then find the SAP naming convention.  For example the BASIS stuff is KB700<XX>.  This is important because it’s an easy shortcut to download exactly what you need.
Step 2.  go to service.sap.com and head to the software area: and select the Search for Software Downloads.  Take the naming convention from above and one by one, find the pieces you need.  If you need a lot, it’s probably faster to go to the support section.  Me, was only doing 6 files.
Step 3.  Once everything is downloaded, log into SAP (your dev system/client) and go to transaction SPAM.  Select the import and one by one, import each of the files you downloaded.  Don’t apply the packs one by one…  it’s a long enough process, so do the whole group at once.
Step 4.  Once all the pieces have been imported, press the truck to start a new “installation”.  you’ll have the options to select the area you want to update, for example BASIS.  It will show you all the new imports and will lump them into a package.  From here, just keep hitting OK.  Give yourself plenty of time to be without the system.  This could easily take several hours based on the power of your system.
***  Note:  you might have to upgrade your SAINT as well.  If this happens, you’ll get a message that support pack XXX must have SAINT version YY.  Simply repeat step 2 & 3 for the SAINT update.  There is another menu option to update the SAINT.  run this, and wait for it to finish.  It typically takes a while, and sometimes even shortdumps.  If this happens, you can generally jsut log back in and restart the process.  It will pick up where you left off and finish up the install.  Then you can go back to step 4.
Step 5.  Run SGEN.  I’ll typically pick the software component to update, but feel free to select what works best for you.  Short story, this will help compile the thousands of program that need it, and hopefully save you quite a bit of time for every transaction you visit for the first time.
If all goes well, your system is running better than ever after the update…
Good luck,

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

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 (
exporting
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,
Mike

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:
SELECTION-SCREEN BEGIN OF SCREEN 1301 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK slssel_1 WITH FRAME TITLE text-f10.
SELECT-OPTIONS:
vkorg FOR vbak-vkorg,
vtweg FOR vbak-vtweg,
spart FOR vbak-spart,
vkgrp FOR vbak-vkgrp,
vkbur FOR vbak-vkbur,
SELECTION-SCREEN END OF BLOCK slssel_1.

SELECTION-SCREEN: END OF SCREEN 1301.

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:

PROCESS BEFORE OUTPUT.
CALL SUBSCREEN SUB_1301 INCLUDING SY-REPID ‘1301’.

MODULE STATUS_0110.

PROCESS AFTER INPUT.
CALL SUBSCREEN SUB_1301.

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,
Mike