Month: March 2013

Home / 2013 / March (Page 2)

ABAP – Refresh ALV Grid

I recently had to go through and add a button to refresh ALV grid in a custom transaction.  I initially expected this to be easy.  And looking back, it actually is pretty easy, if you kept your program modular.  However, I had to handle things differently than I expected.

I thought I would need to do something with the refresh button that comes with the standard ALV grid.  However, after a some extensive google digging, I couldn’t find anything that told me how I could do that.  Everyone else took care of the issue by creating their own button.  Here’s the basic steps to do it yourself.

You will need to setup the following 2 handlers.  I created a local class to house these methods.  You can take care of it anyway you prefer.

DATA: l_event_receiver_grid TYPE REF TO lcl_event_receiver.
(where lcl_event_receiver is the local class)

SET HANDLER l_event_receiver_grid->on_toolbar_add_button
FOR grid.
SET HANDLER l_event_receiver_grid->on_user_command
FOR grid.

For the add_button:

DATA: ls_toolbar TYPE stb_button.
MOVE ‘ZRFO’ TO ls_toolbar-function.
MOVE ICON_REFRESH TO ls_toolbar-icon.
MOVE ‘Refresh’ to ls_toolbar-quickinfo.
MOVE ‘ ‘ TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
this adds a button that looks exactly like the standard refresh button.  You can feel free to play around with the look and feel, but this will get your started.

In the on_user_command, you will need to look at sy-ucomm, and find when it matches ZRFO (in this example).

refresh grid table.
rebuild the grid table

then call the display method.  For me, I uised the set_table_for_first_display method.  So updating the grid table and calling this is enough to perform the refresh.

This will give you a great start if you want to add a refresh button your custom transaction.

I hope you find this helpful.

Network – Changing Internet Providers

Well, I discovered a whole new challenge recently.  We changed cable providers, and upgraded our internet.  It all seemed so easy.  A couple of minor tweaks, and everything would just keep working, right???  not so much.  Here’s what I discovered you need to remember when changing internet providers and still keep your SAP system exposed to the outside world…

Even if you don’t change providers, they might change the box for your signal.  In my head, that meant nothing.  When I went to connect to my SAP systems, it meant everything.  Here’s what I found.

1.  Changing providers or even changing modems can change your IP address.  So, if you’re changing things,  make sure you check this right away.  My previous post on this stuff talks about some of the steps. is your quick check.

2.  Now, a changed IP address unfortunately means that if you are using subdomains (like I am), you need to go to your host provider and change the IP address they are pointing to.  I hate this part because it can take up to 24 for the changes to circulate through the internet.

3.  Next up, I lost all of my expections.  So I needed to go into my router configuration and create/add the firewall expections (80XX & 32XX) for the web and for the gui connections.

4.  While you are in there, double check that the static IP addresses are still connected to your machines.  If you lost those too, re-add them.

Now, if you’re lucky, everything will be back to normal in a day.  For me, it took 2, because I didn’t catch that the IP address changed until a day later.  Short story, be sure to test right away from outside of your network to make sure everything is still working.  Good luck, and try not to change your internet provider if you can avoid.  ha ha ha

Variant Configuration – Replacing a Characteristic that is in Use

Something I’ve been dealing with quite a bit lately is remove or replacing a characteristic that is in use in a model.  Now I hope that this only occurs in your development environment, but regardless, the same rules apply.  So I just wanted to outline the basics of accomplishing this removal/replacement of characteristics.

1.  Txn CT12 – this is your best friend in this instance.  Using CT12, and selecting all of the options, will show you where it has been used.  One bad thing about CT12 is that enter in the value doesn’t necessarily work, at least in my opinion.  I tend to get a lot more results than just the cstic using that value.

2.  CU22 – this one is optional, but if your where used shows a constraint or constraint net, this is the next thing you’ll need to do.  Go into the CNET, and lock any constraints that use the characteristics.  This process is a bit tedious, but it’s the only way to accomplish it.

3.   CU50 – Interface design – again, you might not be using this feature, but if you are, you’ll see it in your where used.  Be sure to remove the characteristic from every interface design it exists in.  You won’t be able to delete this from the class if it’s still used in the ID.

4.  CL02 – now once these steps occur, you finally go into the class and remove the characteristic.  Just a note, if you already have configurations out there using the cstic or if the class is part of a class hierarchy, you will need to use CL6K in order to remove the characteristic.

5.  CU02 – now you can change all the standard dependencies to either remove the cstic or replace it.  Now remember, you need to pay attention to the logic here because it might not be a simple replacement.  Only you can determine this.

6.  CU22 – change and release the constraints that used the old cstic.  (steps 5 & 6 are interchangeable).

These are the big pieces.  Keep in mind, you may also have tables or functions.  In that event, you will need to update CU60 & CU62 for the tables, and CU66 for the functions.  But only after you’ve done steps 5 & 6.  Then you might need to revisit steps 5 & 6 based on your table/function changes.

I hope this is useful for you.

Web Dynpro – Visible Binding

Ok, I confess, I’m writing this in advance, because I’m sure the trade show will keep me busy… and afterall, I am in Vegas as you read this =)  Now that’s out of the way, I still wanted to give you something to learn.  So, today I picked up a new trick.  I wanted to make an element dynamically appear or disappear depending on what happens in the application.  The concept is called Visible Binding.  Every element has an attribute called visible, and you can dynamically change the value by binding a variable to that attribute.

It turns out, it’s pretty easy, with just a little bit of effort.  So, here’s what you need to do…

1.  Create a context attribute.  it should be of data type wdui_visibility (I think wdy_boolean would also work).2.  Next, for every element you want to dynamically control, be sure to bind this context attribute.
3.  in your method, you simply need to set the value of the context attribute to 1 for invisible, 2 for visible.

This last part was the part that threw me off, I kept trying 0 & 1.

Have fun… and wish me luck.  If all goes well, I’m making sales right now =)


Preparing for the First Real Tradeshow

Since yesterday was our day of prep for our first real trade show, I thought I’d talk about some of the hard work that goes into getting ready for your first one.  First off, I really need to thank my parnter, Mike Golden.  He took care of so much of this, so I could keep rolling on our never ending development list.

So first lets talk about the obvious stuff, the table…  if you’ve ever been to a trade show, you know that they normally have a fancy table covering with their logo, or slogan or something like that.  Now it sounds easy, but it still requires the design and getting the logo into the correct format and getting it all ordered a few weeks in advance.

Next, to up the level of our professionalism, we wanted a couple of banners to advertise for our “heavy hitting” products.  Renovation for all our service management stuff, and proximity for all our production execution stuff.  Now, this needed all the same stuff and then some marketing content.  Let me tell you, coming up with marketing content is no walk in the park for a couple of engineers 🙂  Now, not only did I need to come up with some good descriptive stuff, but it needs to fit in a confined space.  Up till now, I’ve been working with a web page that has limitless space.  On the up side the marketing blueprint class I did helped a lot, but it still takes time.

And all this work was just to get the table and a couple of banners to sit on the table…  Next up we needed some takeaways for people who visit the conference.  The first, and probably easiest was the pens.  Mike got some pens with the JaveLLin Solutions logo made up, so we can give those away at the table.  But a pen alone is unlikely to have anyone remember us…  This leads me to the biggest chunk of work, the brochure.

Again, my hat is off to Mike.  He took the lead on this, learned MS publisher and put together a great layout.  Then came the hard part again.  Content.  Only this time we needed written text, AND a demo.  So that meant for all our products we needed to put together a decent demo highlighting enough features of our products to get people attention without overwhelming or boring them with details.  Not as easy as it sounds for me.  Simply because I designed all this stuff, and I want to show off all the bells and whistles.  For me, it came down to writing a script and giving myself a deadline.  So I aimed for a 5 minute demo, and recorded over and over again until it finally worked =)  Check them out if you get a chance.  Each of the product pages now has a full demo for it.  Mike then took the video and even gave it a QR code and slapped it on our brochure.

Last but not least, I’ve been working to have systems up and running so that we can give live demo’s to anyone “really” interested after watching the 5 min demo’s we put together.

Amazing how much work this first tradeshow has been, but I trust all this up front work will pay off and get us multiple leads, and make life MUCH easier the next show we present at.  Wish us luck, or if you happen to be in Vegas, come find us at the Mirage. =)

Web Dynpro – Invisible Element

Well, since I’ve been spending a lot of time lately doing my Web Dynpro conversion, it’s time for another lesson I learned 🙂  Today I want to talk about the Invisible Element (InvisibleElement).  It’s a pretty handy little unit that I was always looking for in my  BSP design.

Often times, if you are using a grid layout or matrix layout, you need a placeholder.  In my case, I had a whole list of input fields to show on a screen, but I wanted to skip some rows between certain elements.  In the BSP world, you were stuck using a text field with a period or something, so it took up the space in the row, but was “nearly” invisible.  Now Web dynpro provides you an element to do exactly this.

The big trick to remember is if you are using the Matrix Data, make sure that the Invisible Element is Matrix Head Data, so it will skip the entire row.  Otherwise, there really isn’t anything fancy, except knowing that it exists. =)

Alright, there’s today’s tip.

SAP Manufacturing Conference 2013

Well, it’s finally here.  Our first big conference.  We actually sprung for a vendor booth (545 if you happen to be in Vegas next week 🙂 ).  It’s really exciting.  I’ve wanted to be a vendor at one of these big conferences for over a year now, and it’s finally going to happen.

I’m hoping some of you might be going to conference next week, and if you are, I hope you come check out our booth and say hi.  I’d love to meet you.

Going to keep this one short, since there is still a lot of work to be done.  Can’t wait to tell you all about it in the coming weeks.