Month: January 2015

Home / 2015 / January

Variant Configuration – Disassociate Material Variants

This is a fun little trick, that I will probably never use.  This came from my friend Rama.  If you’re like me, when you create material variants, I’m sure you wondered why you cannot disconnect the materials from the KMAT.  For some reason, this field becomes locked as soon you save the material.  In my normal process, I tell businesses to obsolete the material if they screwed it up, assigned the wrong KMAT or just want it to no longer be connected.  Well, it seems that SAP has come up with a  process to disassociate the material from the KMAT.

OSS Note 941004 – FAQ: Configurable materials and Variants in Configuration
Topic 1.  (so this is the SAP “Approved” method to handle this).


1) Use SE16 to edit the MARC record in the database.  Change the STDPD to the new KMAT and change the CUOBJ to zero.


2) Run the RCU_DEL_CONF_FOR_ARCHMATVAR program to delete the instance from the CBase


3) Edit the material master and maintain the material variant configuration


OF COURSE you must be careful to avoid creating database inconsistencies


ALSO, if there are any existing sales orders for the material variant, then the CUOBJ for those line items must be changed in the database from the old cuobj (of the mv) to the new cuobj (of the mv).  After that, it is necessary to update the pricing for




REPORT zlogic_mv_change_kmat NO STANDARD PAGE HEADING.


* Declare variables

DATA: lt_marc type marc occurs 0 with header line.


s_werks FOR marc-werks.

PARAMETERS:     p_stdpd LIKE marc-stdpd.


* Select material variants to change the KMAT

SELECT * FROM marc into table lt_marc

WHERE matnr IN s_matnr AND werks IN s_werks and stdpd ne space.




WRITE:/ marc-stdpd, marc-cuobj.


IF p_update = ‘x’ OR p_update = ‘X’.


SET stdpd = p_stdpd

cuobj = 0

WHERE matnr = marc-matnr

AND werks = marc-werks.


SUBMIT rcu_del_conf_for_archmatvar

WITH matnum = marc-matnr

WITH testmode = space







Now, for my disclaimer.  While this is a nice trick, I still most likely won’t use this myself.  The process I preach is to disassociate the material number in SAP from any logic, or any reason to worry enough about 1 exact number to go through this hassle.  Make your materials internal only, so they mean nothing to customers, distributors, vendors, etc…  if you do this, you never need to do DB updates to fix things.  Thanks my opinion.

thanks for reading,

Looking for Help… Service Testing and Documentation

Well, this is actually a call for help to any of my service colleagues looking to make a few dollars on the side by helping me test and document some of my products.  One of the largest areas I’m deficient on is documentation.  Like any developer, documentation is my least favorite task.  So i’m reaching out to any of you that might have some free time to help me out.

If you might be interested, send me an email:

We can work out the details, I’ll set you up with a system login.

I’m really looking for someone WITHOUT intimate product knowledge to start using my stuff, and let me know where things are unclear or if you encounter any issues.  If things look good, take some screen shots and develop the equivalent of a BPP for each different function/feature.

Like so many thing, it’s not hard work, but I struggle to find the time to do many of these tasks, so I’m happy to pay someone to help me.

I hope to hear from some of you soon,


Service Management – Setting up the Work Center

On my most recent assignment, I learned a lot about setting up the service work center properly.  One of the biggest take aways from this that I learned is that the formulas for service orders are very particular.  In particular, there is one field that is essential if you wish to see the planned cost show up in the service order.


The highlighted field above needs to be SAP008, or something using the following data.


This becomes very important, because production orders have a far greater range of formula variables that work than service (or network) orders.

So, if you find that planned costs just aren’t showing up in your service order, take a look at the formula assigned to the routing.

Thanks for reading,

Notification Execution – Creating a Notification w/Multiple Serial Numbers

Now, I’m pretty excited, because this is an idea I’ve been toying with for quite some time.  And recently, I’ve finally devoted some resources to making it real.  The concept is simple, allowing a user to enter multiple technical objects onto a single notification.  While SAP doesn’t give you an option this simple, I’ve come up with a way to utilize standard SAP functionality (along with my new Renovation tool) to accomplish this.  While the overall concept isn’t overly complex, dealing with it isn’t easy.

First, let me explain the concept.  The idea is using a parent notification, and then a create w/reference for each serial number.  The concept is that you can provide a parent notification to your customer, all the child notification will house the individual serial numbers.  The problem with this approach is keeping everything in sync, and then of course moving all that data to the next round…  like a return or repair sales order.

This is where Renovation comes in.  Step 1 is to first create a notification.


What you are looking at is one possible configuration for Renovation to create a notification, along with all of the children.  With our configuration, we allow you to pick and choose the fields you want shown and the sequence to show them.  You can add objects and even see the warranty status of each individual object.  You can enter Items, Tasks, Activities or Causes.  You can even select what values to pass to the child notifications.

If this sounds like something you might be interested in or would like to know more about, feel free to ping me and I can setup a demo.  If you have suggestions on how to make it even better, please let me know.

thanks for reading,

GUI Scripting: A how to guide

I think this might have been one of my most popular posts.  GUI script is one of my favorite tricks.  If you haven’t used it before, you really need check this out.  It’s easy and slick.

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


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.


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


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

Then proceed to execute the transaction you wish to record.


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

Enter in the document number and press Operations Button.


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


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.
I encourage you to press the green arrow back on every recording at the end.  This just helps to avoid incorrect loading of data.
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:

The parts of this file you care about are the lines that start:
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:


MS 2007

Be sure to enable macros.
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 (

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

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


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

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

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 Script will always give you a chance to check the results of the FIRST record.


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.


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.


SAP SM: Quoting In-House Repairs

For those you that have been reading my stuff for a while, this might be a repeat, but I think I’ve picked up a lot of readers since I originally posted this, so I thought it could be good to post it again.  One issue I’ve found in SAP Service Management (Customer Service) is that most companies want to quote the repairs they perform in house.  The problem is that the standard repair process doesn’t give a good alternative to handle this.  You can only use the DP80 functionality if you use a service order that is non-revenue bearing, but you must use a revenue bearing service order to perform in-house repairs.

Up until now, I’ve always handled it manually.  Simply creating a quotation with reference to the repair sales order.  The problem is that the connection to the process is loose at best, and you cannot use the information from planned service order to automatically update the quote.

Recently I found the following OSS notes.

Note 153869 – Creation of quotation after goods receipt for repair

Note 204874 – Settled costs in resource-related billing

This OSS note maps out a process that uses the original repair sales order as both the quote and the order.  Through the use of different item categories, we can use DP90 to perform quoting functions, as well as the actual billing.  Now, several things needs to be taken into account for this process to work.  The first is that you will need to add some addition item categories and item category usages.

I recommend you create Item category Usage, ZEIN & ZENI so you can control the quotation item categories.  Then you can leave SEIN & SENI for use in the billing items.  Be sure to add these new usages to the item category determination for your repair sales orders.

The next step is to properly setup the DIP profile in order to accommodate the new changes. What you need to do is change the billing portion of the profile to include the planned costs.  This will allow DP90 to pull in all of the planned costs, which can be used for quoting. DIP 1.jpg

The other thing you need to decide is if the quotation items will be statistical or not.  This depends on if you want all of the items to be displayed to the customer on the quotation, or if you plan to simply roll the items up for easy calculation of your quotation price.    The basic code provided by SAP assumes that quoting will be actual pricing, and billing will be statistical.  In order to provide some additional flexibility in the solution provided by SAP, I included a check in the code to look at the materials of the quotation usage to determine if each was statistical or not.

DIP 2.jpg

In my code below, if the Material Determination for an item was set to C: Transfer qty only, then it was statistical.  In all other options, it was normal pricing.  This does require you to maintain the items in both the quotation and the invoicing portion of the DIP profile, but the flexibility was worth the one time maintenance.

Be sure to setup ODP4 to show the cost in the sales order.  Be sure the condition you use (EK01 is recommended) is also a part of the pricing procedure for the repair.

Finally, the biggest thing to consider is the output changes that will be required for this process to work. I encourage you to create a new quotation Smartform.  It can be similar to your current quote or order confirmation, but you will want to handle the item categories appropriately for your customers.  For example, you may want to show the itemized quotation costs, but not show any of the repair process items like the inbound delivery.  You will also need to setup the form to show your pricing at the appropriate level.

Here’s the code I used in the exit: V46H0001 ->EXIT_SAPLV46H_001

data: da_vbak like vbak.
data: da_vbkd like vbkd.
data: lv_quant type AD01INVQUA.


= 1.


* only in repair environment
check da_vbakvbklt ca ‘FG’.

* read billing form of repair main item
= da_VBKD.

WHEN ’01’ or .                      “resource related quotation
CASE da_vbkdFAKTF.                 “billing form
WHEN ’01’.                        “fixed rate
select SINGLE INV_QUANT from AD01C_MAT into lv_quant
= ’11’ and       ” quotation
if sysubrc  <> 0.
select SINGLE INV_QUANT from AD01C_MAT into lv_quant
= ’11’ and       ” quotation
= ‘X’.
case lv_quant.
when ‘C’.
VWPOS = ‘ZENI’.       “statistical
when others.
VWPOS = ‘ZEIN’.       “not statistical
*         C_VBAPKOM-VWPOS = ‘SEIN’.       “not statistical
WHEN ’02’.                        “costs
*         C_VBAPKOM-VWPOS = ‘SENI’.       “statistical
VWPOS = ‘ZENI’.       “statistical

WHEN ’04’.                            “resource related invoice
CASE da_vbkdfaktf.
WHEN ’01’.                        “fixes rate
VWPOS = ‘SENI’.       “statistical
*       when ’02’.                        “costs
*         no change at the moment, because no change necessary
*         – item with service product   => SENI statistical
*         – items from costs            => SEIN non statistical
*         c_vbapkom-vwpos = ‘SEIN’.       “non statistical

Evolution of an Idea

As I dive head first in creating my Renovation product, I can really see the evolution of myself and my applications.  Back in 2006 when I first got the idea to build my own product, I never could’ve predicted all the skills I need to acquire to get me to where I am today.  Just to begin my own concepts I needed to learn to install and administer my own SAP system.  My hats off the basis guys out there…  I got a new appreciation for what they go through in a “simple upgrade”.

I finally designed my first product, originally called Rapier.  The idea behind Rapier was to deliver an out of the box customer portal geared toward aftermarket business (Returns, repairs, call center, etc..).  I spent a lot of time learning BSP (a now obsolete technology) to design this product.  I even had to start over a few times because of HDD failures (this taught me a lot about backing up my stuff to multiple places.  ha ha ha).

Next I went through and converted Rapier to ABAP Web Dynpro, the next generation of SAP Web tools.  This taught me yet another skill.  And now finally, this very old idea is paying dividends 🙂  All of these skills (and thankfully much of the code) are being reused in my new application to help customer service/call center employees.  While I still have a lot of cool ideas to put into Renovation, I couldn’t have done it without my first idea of building a product.  The good news is that “Rapier” hasn’t gone away, but I’ve since turned it into part of Renovation.  An idea that has given me so much co be couldn’t be retired that easy 🙂

What’s the point of this story?  Run with your ideas.  If you just have an idea, but don’t act on it, you’ll never evolve to the REALLY good ideas… and more importantly, you’ll never gain the skills you need to take you to the next level.

thanks for reading,

Web Dynpro – Setting a Default Select-Option

Well, there are some things I take for granted, and that’s how easy things seem to be inside of standard ABAP programming.  I come realize this whenever I try to do one of these “simple” activities in Web Dynpro.  Take today’s adventure.  I had some select-option fields, and I just wanted to default a value in there.  Sounds so easy.  And eventually it was.  here’s what I finally found.

I had a select option for ERDAT (creation date).  I’m not going to go into the select option creation.  I think I talked about that a while ago, so just search my blog if you need more info.  SERDAT is the ID of my option that I want to default a value for.

DATA lo_nd_range_erdat TYPE REF TO if_wd_context_node.
DATA lt_range_erdat TYPE wd_this->Elements_range_erdat.
DATA ls_range_erdat TYPE wd_this->Element_range_erdat.
*** here’s the magic ***


*** end the magic ***

*** this code is just setting the value back to my context node.
* navigate from <CONTEXT> to <RANGE_ERDAT> via lead selection
lo_nd_range_erdat wd_context->get_child_nodename wd_this->wdctx_range_erdat ).
ls_range_erdatsign ‘I’.
ls_range_erdatoption ‘BT’.
ls_range_erdathigh sydatum.
ls_range_erdatlow sydatum 30.
APPEND ls_range_erdat to lt_range_erdat.
lo_nd_range_erdat->bind_tablenew_items lt_range_erdat set_initial_elements abap_true ).
*** back to the default ***
*** notice I needed to set the value to the DATA field symbol.
APPEND ls_range_erdat to <LT_RANGE_ERDAT>.

*** end the default code


I hope you can find a use for this,
Thanks for reading,

Getting Over the Hump

I don’t know about you, but the Holiday season always seems to leave me more exhausted than refreshed.  It’s only wednesday, and I’m already struggling to keep myself going. For those of you with kids, I’m sure you know exactly what I’m talking about.  Keeping your young children entertained for two straight weeks is not only a challenge, but it requires a lot of energy 🙂

Now, I’m good at the “Just keep swimming” mentality, but I’m finding as I get older, that it takes it’s toll on me.  I know that by next week, I’ll be back in the groove, and ready to rock ‘n roll again.  But that first week after a “vacation” is certainly a transition for me.  So, I’d love any advise y’all might have for me.  So far, it’s been lots of coffee and a couple of walks around the house to keep the blood flowing.  Also, for those of you with older kids, do the “vacation” weeks get easier?

For my SAP folks out there…  I promise to start getting back into the swing of things soon.  Lately, just been too focused on marketing, and web dynpro development (which has been nice to sit back in the developer world again, even if only for a few hours at night).

Thanks for reading,

Switching Things Up – Going to ASUG/Sapphire

Well, after two years of attending the SAP Manufacturing conference, this year JaveLLin will officially be a vendor at ASUG/SAPPHIRE in Orlando this year.  It wasn’t an easy choice.  There was a lot of give and take between the two conferences (I went into it in a previous post).  At the end of the day, we decided that booth “size doesn’t matter”.  I’m bringing in a new face this year to help me.  Not only is he a great friend, but he’s a dynamic personality and quite possibly the piece we’ve been missing at a conference.

The other defining factor was the fact that we haven’t got a sale in 2 years from SAP MFG conference.  This is partially due to the fact that we split between Production Execution and Service Management.  A detail we are fixing this year.  But it may also be the people that attend this conference.  The SAP MFG conference did seem to be a lot more of the people that “need” the solution, rather than the people that can “purchase” the solution.  We are hopeful that Sapphire will bring more of the people with the checkbooks to our booth 🙂

So what does all of this mean?  it means that we will be focusing heavily on getting the word out about ourselves, finding a customer or two to implement our Proximity solution.  On the development side, we will be focusing on the Field Service portion of Proximity and the new Renovation product, which will be bring needed tools to the call center/customer service groups.

It’s going to be a busy 4 months…  but aren’t they all 🙂  I’d love any feedback you could provide on my existing tools.

Thanks for reading,