Web Dynpro – Select-Options – writing the code

Here’s the code to do  SELECT-OPTIONS in ABAP Web Dynpro:

* Adding a block (type Tray) to the select-options
wd_this->go_so_com->add_block(
i_id         = `COM2`
i_block_type = if_wd_select_options=>mc_block_type_tray
i_title      = `Sales Selection` ).

As promised, I’ll talk about what I leaned in doing the actual method to put the select-options together for a full screen.  Everything I talk about deals with the add_selection_fields (notice the plural).  I had a bunch of fields, so I chose to do them all at once.

Here’s the basics, based on the name of the usage component.  I don’t know all the details on this portion…  but trust me, it works.  it came from SAP.  =)

DATA:
* reference to the item table for multiple lines.
lt_fields TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM,
wa_fields TYPE IF_WD_SELECT_OPTIONS=>T_SELECTION_SCREEN_ITEM,
* reference to the select option usage controller
lo_ref_cmp_usage TYPE REF TO if_wd_component_usage.

* instantiate the usage component, if necessary
lo_ref_cmp_usage = wd_this->wd_cpuse_usage_so_comm( ).
IF lo_ref_cmp_usage->has_active_component( ) is INITIAL.
lo_ref_cmp_usage->create_component( ).
ENDIF.

* determine referece to the interface controller
wd_this->go_ic_so_com = wd_this->wd_cpifc_usage_so_comm( ).
* initialize selection screen
wd_this->go_so_com = wd_this->go_ic_so_com->init_selection_screen( ).

If you want to turn off the default buttons that show up for select options.  I wasn’t a fan, but I may change my mind in the future.  Either way, you can turn it off with the following code:

* Hide the standard select-options components.
wd_this->go_so_com->set_global_options(
i_display_btn_cancel = abap_false
i_display_btn_execute   = abap_false
i_display_btn_check  = abap_false
i_display_btn_reset  = abap_false ).

If you want to add a block, here’s the code to do so.  One of the things to note, be sure to capitalize all the letters.  I also found that it worked better being 4 digits.  I tried comsel_1, and it failed, then comsel1, and it also failed.

* Adding a block (type Tray) to the select-options
wd_this->go_so_com->add_block(
i_id         = `COM2`
i_block_type = if_wd_select_options=>mc_block_type_tray
i_title      = `Sales Selection` ).

This little code snippet shows you the basics of adding a field.

*** begin building selection screen
*This is the field name
wa_fields-m_id = ‘SRV_MAT’.
* generate range table for data element.  Be sure to make this equal to the data element.
wa_fields-mt_range_table = wd_this->go_so_com->create_range_table(
i_typename = ‘MATSV’ ).
* if you choose to embed the field inside of a context block (box) you can add it here.
wa_fields-m_within_block = ‘COM1’.
* use this line to turn on the drop down for the field
wa_fields-m_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp.
* here is the search help to use for the field
wa_fields-m_value_help_id = ‘MAT1’.
append wa_fields to lt_fields.
CLEAR wa_fields.

Finally, once you have all of your fields entered, you can call the method.  If you followed all of the steps in my previous post, you should be able to see your select options showing up on the screen.

* generate field in selection screen
wd_this->go_so_com->add_selection_fields(
it_fields = lt_fields ).

Next up, I’ll talk about adding multiple Select-Options onto the same screen (if you have multiple tabs, this could come in handy).

Thanks for reading,

Mike

Web Dynpro – Select-Options – Overview of the process

Finally, I get around to my first post about Web Dynpro.  I’m starting simple and replicating the selection screen for Broadsword, my service dashboard.  So any good selection screen usually has some select options.  So I wanted to pass along my lessons learned and a little bit of code too.  For starters, how do you create the select-options.  There isn’t an object that you can drop onto the screen for SELECT-OPTIONS.  You need to put a little more effort into adding it.

1. Create a create a component on the Used Component Tab of the Web Dynpro Component.  component use:  usage_so (for example) Component: WDR_SELECT_OPTIONS
2. Add the component to the view (properties tab).  Be sure to add both options (one with the controller, one without the controller).
3.  On the layout of the View, add a ViewContainerUIElement to the screen where you want to place it.
4.  Create a method for the View, INIT_SELECT_OPTIONS.  this method is where you will define the actual fields and layout.  We’ll discuss this in more detail tomorrow.  You can use the following methods:  add_selection_field or add_selection_fields.
5.  Update the WDDOINIT method, add the line:    wd_this->init_select_options( ).
6.  Attach the component to the ViewContainerUIelement in the window.  You will embed the WND_SELECTION_SCREEN to the ViewContainer in order to make the connection.

Alright, that’s enough for this post.  Tomorrow I’ll talk about the code for INIT_SELECT_OPTIONS.  Hope this information on SELECT-OPTIONS is useful.

 

Mail Chimp – Using an Old List

Hello again,

Now that I’ve been experimenting with Mail Chimp further, I have another valuable lesson.  If you have an old list, don’t be surprised if your account is temporarily suspended.  I just had it happen to me with the last newsletter I sent out.  I imported my list into Mail Chimp to test my list.  I purposely didn’t filter out the returned names I’ve received in the past, thinking that maybe Mail Chimp could get through where I couldn’t.  Ooops.  I ended up getting 40% of my list bouncing, and instantly my account got put on hold until I could explain what happened.  I explained that it was an old list that I hadn’t really been emailing in a while.  They were ok with that.  Also, note that you get 2 warnings and then your account is shut down.  So, play by the rules.  it’s for everyone’s benefit.

The other thing I learned is that you can NOT include any names that you did not gather personally.  I recently did a marketing campaign with SAP EcoHub that resulted in some names (I’ll tell you more about that later).  Because there was a third party involved, I had to remove those names from my Mail Chimp list.  Another valuable lesson learned for me.

On the bright side, for the time ever in my newsletter I can see how many people opened it, someone else takes care of any returned mails and unsubscribes, and I can even see if they’ve clicked into my link for the rest of the article.  I love Mail Chimp, but I’m still learning.

I recommend checking them out.  Now that I’ve cleaned my list pretty well, I’m going to look at doing a pay as you go auto responder.  I need to get more details on if I still get 12,000 newsletter, and pay for the auto-responder, or if you lose that benefit when you start paying (I certainly hope not).

 

A Thank You to Murielle

Not my usual post, but this is a little thank you to a flight attendant that went the extra mile.  On the plane ride to Altanta this morning, I fell asleep after putting my notebook in the seat pocket in front of me. when I woke, I spaced out and completely forgot my journal (and my Sunshine to Dollars book).  Well, I didn’t even notice it till I got to the office, then suddenly I got an email from Murielle saying she found my journal and would mail it back to me when she got home on Wednesday.

All I can say is thanks.  I really didn’t expect to ever see it again, but I now have a new appreciation for flight attendants.

Thanks Murielle, I really appreciate it.

Mike

Service Availability

It’s been a while since I talked service, so I thought I’d start posting some simple tips and tricks again.  In case you forgot, and if you read my blog often you might have, I’m actually a functional consultant, not a basis guy =)  Service and VC are favorite areas to work in.  I think they provide an interesting set of challenges and are often areas where it is hard to find good people (which is awesome for me).  Anyway, I’m working on a 5 – 10 part course talking about the basics of service management.  I haven’t decided how long it will end up being, so stay tuned.  I have so much in the hopper, but I want to actually show you guys I do know something about SM, service availability.

Today, I want to talk about Service Availability.  I’ve seen it used sporadically in places, but never very well.  So I want to talk about the how and why.  Now, before I get into the meat of the topic, let me explain why this part is important.  Just as in sales, knowing if all of the components are available is extremely important to managing your workload.  SAP provides the same availability functionality in the service order as it does in the production (except of course, running it in mass…  but for that, check Armory by JaveLLin Solutions. couldn’t help the shameless plug).  Transaction IWBK is actually a good transaction to show you all of the availability associated with a service order, and it even gives you fancy traffic lights to let you know at a glimpse if everything is available.  In addition, the status of the service order itself lets you know if all components are available.

Now, you may be asking, why do I care?  Often you have a decent workload of service orders and you require components in order to begin work on them.  Wouldn’t it be nice to see at a glance if all the components are available to know if you should start working on the order?  Perhaps you released the order to get some MRP requirements out there for parts.  Well, if you don’t know when the parts are available, how do you know when you can start working on the order?  Meanwhile, the clock is ticking for getting this part back to the customer.  Your metrics look worse and worse, all because you don’t know if you have parts to start working on a repair.

Alright, you understand the problem, so what can you do about it?  First thing you need to do is make sure the availability check is configured the way you need it.  Just like the availability for sales and production orders, you can have a unique one for service (or more often you’ll use the same one that production uses).  The screen shot below shows you were to find the configuration to see what in the system.

If you look at the Define Checking Rules, you’ll see the following.  Please note, SM is the default.

Next go the Define Scope of Check…  this is where the real work is done.

Remember, that the scope of check can be different depending on the material availability check.

This example shows 02 – SM

Every one of these options determines things that either availability includes or excludes.  Every organization is different, so I can’t tell you there are default settings to use.  I can tell you that you should experiment with whatever you do select.  Have a service order with some components and make sure your settings do what you expect.  ATP is touchy…  powerful, but touchy…  in my e-class, I’ll go into more details about the exact settings.

finally, you need to assign the availability check to the plant/order.  And you also can change the check for creation vs. release.

Here’s the settings you can control:

Alright, now that you’ve seen where to configure the availability check, you should understand how to run it…

Well, it’s pretty simple.  SAP only offers one place to execute availability.  IW32.

Press this button to availability.  There are several important system status that relate to availability:

MANC – Availability not checked
MSPT – Missing parts
MACM – All parts Available

If you use IW38/IW39 or Iw72/Iw73 and you look at system status, this will give you the quick look to determine if you have components available or not.  Please note, this doesn’t do a hard allocation of the components.  it simply says, based on the availability check (see above) that it is in stock.

I hope this little overview gives you an understanding why availability could be an important piece of service that you’ve overlooked.

Thanks for reading,

Mike

Creating the Sales Contract

when you finally  get the pleasure of doing a sale, you need to make sure you have the right paperwork in place.  One of the key things is the sales contract.  Luckily, I had the agreement that I signed for the SAP partnership, so I was able to use that a guide for structuring my own sales Contract.  What I learned is that there are some pretty standard pieces of it…  then from there, you just need to add your own spin.

For example, here’s the main pieces of mine that I just put together.

1.  The general section.  From the ones I’ve seen, this is the easy part.  It has the name of what you’re selling with a short description, the customer’s information (name, address, etc..)  My contact info and any annexes (additional documents)

2.  Scope of the agreement.  this pretty much specifies what you are selling and what’s included/not included.  It also defines who “you” are.

3.  Next is the Renumeration…  pretty much, what’s the agreed upon price.  Any discounts, etc.  the short story behind this, what are you getting for the sale.  In my case, I gave a list price, then stated the discount the customer gets in exchange for a reference and signing the agreement by a certain date.

4.  Invoicing and Payment.  Pretty simple…  payment terms.  when will they pay by, do you offer a cash discount, do you provide the product or service before or after receiving payment.

5.  the next one was something I added in because it was a customer concern.  that was support.  Because I’m a small company, the customer is obviously concerned about how I will support the product after the sale.  The funny thing is, actually he’s likely to get much better support out of me than he is a bigger company, but regardless, it still needs to be spelled out in the agreement.  Some important things to include are also what isn’t covered in your support.  If you don’t clearly state this, you could end up providing support for things you didn’t intend.  Do your best to think like a lawyer here =)

Finally, the signature page.  Make sure to collect the customer’s PO number.  the name and title of whomever will be signing this agreement, and once again the date.  Finally, you will countersign this agreement to make it all legal like.

All and all, it was pretty painless, but I”m sure glad I had an example to start with.  If you’d like to see mine, just make me an offer on my software and I’ll be happy to send one right over to you =).

As always, thanks for reading,

Mike

Mail Chimp – Newsletters made easy

I just had my first experience with Mail Chimp, and what I can, I’m hooked. I signed up for the free version, uploaded a list of contacts from an excel sheet, put together a slick post card, and have been tracking my results. Previously, I’ve been using a hokey macro that I found online (and of course tweaked) to send emails to my contact list. Using Outlook, there was no tracking, I could only send txt or html (both of which I had to completely design).
I can’t begin to express how much easier Mail Chimp made my life. It handles the subscriptions, I can upload a list, or build a list using a form I added on the website. this was another really cool piece. Mail Chimp lets you design a subscribe form, and then gives you the HTML to put onto your website, or gives you a link to use their form. I haven’t scratched the surface yet, but now I can do newsletters/emails to my list. i didn’t even mention the many templates they have out there to make professional looking emails, newsletters, or whatever you need to send to a group.
I’ll be posting again in the new future when I start to figure out how to do the auto-responder piece. This part you have to pay for, but I do like the idea that you can do a pay as you go format, and then switch over to a monthly fee. When I figure out how it works, I’ll share it with you.
Thanks for reading… I’ll keep learning the hard way, so you don’t have to…
Mike

Trello – A new way for managing team activities

On my latest project, I got introduced to a new piece of software. It’s called Trello. It’s a rather simple simple, but it lets you quickly setup tasks into columns. Then you can quickly drag and drop the tasks for column to column. The beauty of it is that multiple can all move the task around. It keeps a record of everything that anyone did to the task. The way we are using it on this project is to track tasks that are open, in progress, on-hold or completed. This particular project has a large amount of master data that needs to be loaded. Since I’m the team lead, I needed an easy way to monitor what was being done and by whom. I highly recommend Trello.
Anyway, this one is just a quick post, but hopefully still useful.
Thanks for reading,
Mike

Basis – Changing the Instance Number of an Installed SAP system

I’m back in basis land yet again. What I discovered is that in order to connect to multiple systems existing on the same server, they must have a unique instance number. After all these years, I finally understand what the instance number does =) Since several of my SAP systems exist in the same server name, I had to make a change. I installed everything in 00, not know any better.
Well after some internet research, I discovered how to do this (at least for the ERP systems).
1. Go to the profiles directory. For me it was: C:\usr\sap\<SID>\sys\profile\
2. There are 3 files in this directory that you need to visit. (keep in mind, depending on the parameters, you may or may not have things to update).
a.<SID>_DVEBMGS<NR>_<Server name>
b. START_DVEBMGS<NR>_<server name>
c. DEFAULT.PFL
For the 3 files, replace every instance of DVEBMGS<old NR> with DVEBMGS<new NR>, sapgw with sapgw, and SAPSYSTEM = <Old NR> with <new NR>.
3. Next rename the directory DVEBMGS<old NR> with DVEBMGS<new NR>
4. open up the command prompt cmd.exe
5. Execute the following command: C:\usr\sap\<SID>\sys\exe\uc\ntamd64\sapstartsrv.exe -r -s <system> -n <NR> -p C:\usr\sap\<SID>\SYS\profile\START_DVEBMGS<NR>_<server> -U .\SAPService<SID> -P <password> -q
6. Execute: C:\usr\sap\<SID>\sys\exe\uc\ntamd64\ntenv2reg Select the new service.
7. Now restart the server, and you should be able to start the system with the new instance number.
8. Don’t forget to update your logon pad to the new instance for the system.

Now, I tried these same steps on my 4.7 system, and I couldn’t get it to work. I’ll try it again later, and if I get it working, I’ll let you know.
Good luck,
Mike

Being a Team Lead – Remembering the Basics

I’ve been spoiled for the past several years.  I’ve been listed as the team lead, but I’ve been a team of 1.  that means I haven’t had to worry about delegating work, consolidating status reports, managing work loads etc…

I just started a new contract position, and this time around, I’m managing a team of 3 consultants, and trying to keep the client on track with their information gathering. The biggest issue I encountered, and quite honestly forgot about, is when you have to lead personalities that aren’t happy you’re there.  Since I just experienced this again, I thought I’d pass on the quick lessons I had to learn the hard way…

1.  Take many conversations away from the group.  Often when you come into a new project, you have ideas, want to make changes, or just want to prove yourself.  Well, personally, I have this tendency.  What forgot, when you challenge someone that has been there for a while, they feel pretty invested/protective of their design.  the last thing they want to hear is that you disagree with it, or want to make changes.  It doesn’t matter if it’s as simple as changing the naming convention, the people that have been there believe in their design.

2.  Be open to the old design.   Start every conversation with a “gentle” question.  “Can you help me understand this better?”  “the design seems solid, but can you tell me why you did this instead of that?”  anything like that.  It’s the whole idea of making friends with the person, let them know you value their opinions.  then explain…  “I’ve seen it done differently in past projects, can you explain why you’re doing it this way?”…  always act like you’re a little behind the times.  This makes the person a lot more open to hearing your suggestions.

3.  Remember, not everyone is going to be your best friend, but you still need to make sure they at least respect you.  Remember, this doesn’t mean they fear you…  it means they understand everyone wants the best for the client.  So make sure you can show that you know what you’re talking about without sounding arrogant.  You are in charge afterall.  But don’t ram this point down anyone’s throat.  Remember to lead by example.  Do…  Don’t just Talk…

I can say the transition has been much easier because I’ve had great upper management support.  So as a side note, make a good impression with your leadership.  Be direct, be authoritative, and be confident.  But don’t BS anyone.  If you don’t know, say as much, and say that you will find out…  THEN go find out.

I’m sure I’ll have more hints coming up… as I relearn them again…

Posts navigation

1 2 3 89 90 91 92 93 94 95 96 97 98
Scroll to top