Skip to Content

My SCN friend Kumud pointed out that we know we should be programming X, but real world challenges force us to program Y.   Why is that?  Shouldn’t we have the time to focus on the “newer” / “older” to us technologies?  Wouldn’t it make sense?

All developer’s dream world

Or at least my dream world.  Time to do our very best.  Including time needed to add unit testing, new techniques, new technology.  The excellent projects / development where we can be totally creative.

Our dream world is usually Teched Innojam.  One that runs for months instead of 3 days.  But is that the real world?

Pay me now or Pay me Later

We have a saying in the United States – I am sure all languages have something similar.  “Pay me now or Pay me Later”.  What does it mean?  In this context it simply means if we continue with older programming techniques or strategies we will eventually have to upgrade.  When we upgrade the older code will most likely be supported.  SAP itself has a huge amount of code written structurally, SapScript, field exits, via function modules and more….  So of course it will be supported.

BUT once you upgrade, do you want your code to just be supported or do you want to be able to have a way of doing good solid maintenance.  If something changes would you rather look in 10 programs or one place.  What about Web applications?  They almost always use a web UI.  Most Web UIs do not support structural programming.  You can get around it by wrapping a method around a Function module.  BUT….  Is it the right, most efficient way of doing things?  Most of know we should be using objects.  We should be using Adobe.  We should be using ABAP or JAVA Webdynpro.  We still need to code function modules for RFCs.  We should not be using ABAP Dynpro instead we should replace it with function modules.  WOW!  That is a lot.  We change all the time.  This is a core ABAP programmer not a general ABAP programmer.  Most of the time you should know all these skills.

And so – do we do it all at once?  I’m laughing, no way could I have done that.

Reality check!  

Consider this:

I am working on a project.  I’ve given myself plenty of time for my program.  YES!  I can use some of those “new to me” technologies.  I have the time.  Right?  Remember we are now talking reality.  The specifications that I estimated my time on have ratically changed – the dreaded scope creep.  I now have double the work to complete in the same estimated time.  Why?  Well the end date of my project has not changed even though the scope has grown.  AHHHHHHHH!!!!

Or this:

I am happily working on an individual program for one person.  I have solid specifications.  We work off of functional specifications and not technical specifications.   (I would be bored if I worked only off of technical specifications, but agree it’s a great way to learn.)  I have AGAIN given myself plenty of time.

A different project is in trouble.  It needs more developers fast.  They have to develop the code FAST.  So what do you think I’ll use?  Newer technologies or the good old way of programming.  For that matter will I even look for objects or function modules.   For me the answer is usually yes.  I almost always look for ways to reduce my programming effort.  I do usually program in objects.  But that is familiar ground for me.  It is not for someone just learning.  Do I use the “newest to us” technology for everything?  Am I that good?    No I sure don’t.  I still use Smartforms when pressed for time.  I do still use ABAP dynpros.  Especially with our RF units.   So reality – I don’t always have the time to use something “new to me”.

Another example:
This time I very rarely will use objects.  (Or any new technology)  In fact if it is a SapScript, field exit…  Or any of those just supported technologies, I rarely will change it just for maintenance.   I am working on maintaining a program.  I have a limited time.  The change may be big or small.  But I leave everything that is working alone.

AHHHHHH!!!!  The code is aweful.  It is written so wrong.  It uses select *, it does not use forms correctly, and it isn’t up to our standards.  I have the time to change it.  However, it is a critical program.  It may even be one that I wrote.  I will not change it.  It works, and changing out all that code could easily break it.  It is one of those darned if you do, darned if you don’t moments.

Conclusion:

New techniques, New Technology, new ideas keep them coming!  Am I saying it is impossible to learn something new?  Is it impossible to use it?  NO!  I am not.  My next blog will cover some of the ways I learn and APPLY what I learned.  So stay tuned.

To report this post you need to login first.

24 Comments

You must be Logged on to comment or reply to a post.

  1. Susan Keohan
    Michelle, I am loving the debate over structural ABAP .vs. Objects.  Personally, I have no problem introducing OO functionality – but what do people have to say about the business?  Business users will rarely accept the need to test a change if it is not for a result they can see.  And woe to the programmer who applies a code change (even for the best intentions) without approval from the business owners!
    How can we accomplish this change – without resorting to truth-stretching (‘This is required for the next upgrade’).
    Sue
    (0) 
    1. Tom Van Doorslaer
      I’ve even once seen a developer forced to do a repair in standard code, even though there was a user exit, because business did not want to retest everything.

      I failed to see how a repair did not have to be tested, but then again, I rarely understand business logic.

      (0) 
      1. Former Member Post author
        I’m laughing!!!!  I sometimes wonder what they are thinking too.

        Here, if you did the repair, it would need a director’s approval.  Trust me, you don’t get an approval very often.  Even less now with enhancement framework available.  Before if there was a user exit and you didn’t use it…  Oh boy, I would not want to be the one asking for the director’s approval.

        I’m still laughing.  There is no one here, and that’s a good thing.  They would think I was crazy.  Which I am, I work with SAP.  But still… 

        Usually you would think more testing for a repair than a user exit.  Right? Right.  I know you agree.   Business logic – go figure!

        Nice laugh in the morning – I love it!

        Thank you for a fun example!

        Michelle

        (0) 
    2. Former Member Post author

      I guess when you think about it, the business does not care what we do just so long as it works.  With that thought in mind OO is not something they would notice.  BOR vs. class/method.  Trust me I never make that change.  A new WF, yes, I use class/method.  an old one, no way.   So the business people wouldn’t care as long as they got their expected result.  An application that worked well or gave them extra functionality they were not expecting.  Very cool if I can do that.Michelle

      (0) 
  2. Tom Van Doorslaer
    Hi Michele,

    On TechEd, I’ve attended a hands on session about ABAP in Eclipse. There’s some really nice refactoring options in there, to quickly and easily convert structural code into OO.

    Yet again, the future looks bright.

    Cheers,
    Tom

    (0) 
  3. Stephen Johannes
    Michelle,

    Early this year I also faced the issue of whether to patch or conduct a spring cleaning on some code that needed a production fix.  Unfortuantely I put on my haz mat suit, removed the old duct tape and put a new piece of duct tape on the code.

    Not enough time to clean up the code “hoard” and call in the folks from 1-800-got-junk to clear it out and the risk would be too high.  I just can’t let go of another set of code that calls the SO function module for sending an e-mail.  How would I fill the empty space between my step-loop collections and BDC’s?

    Take care,

    Stephen

    (0) 
    1. Former Member Post author

      Smile.  BDCs and step loops.  We still have them in our “older” code.  We are still producing ABAP dialog programs for our hand held units.  Michelle

      (0) 
  4. Tom Cenens
    Hello Michelle

    Interesting blog. The reality can differ strongly and depends on many factors like the requirements that the business has and to what extent the customer is leading innovation or to what extent the customer is addicted to the latest gimmicks.

    Some are going strong on the latest available development techniques and others are holding on to the core development that has been around for years and I don’t think that should be a problem.

    Personally I have seen more of the old being around than the new.

    Kind regards

    Tom

    (0) 
    1. Former Member Post author
      Ahhhhhh…  You are so right.  I didn’t think of it from that angle.  A customers skill level would dictate how the consultant programs.  Great point!

      If I can’t support something like Adobe forms then I don’t want the consultant to use them. 

      My personal preference – leading edge, and not bleeding edge.  I am always hopefull the consultant can put together some great code that we can use as examples.  In fact you’ll see more of that thought in my next blog.

      But if I didn’t want to move forward, I wouldn’t want you to use anything I didn’t understand.

      Blows my mind this morning!  I can just imagine if they didn’t have standards getting to the point where you are ready to implement.  They look at your code, and stop the implmentation because it is code they can’t support.  Yuck.  Hopefully, a code review is done before that point.  Or you are smart, like I know you are, and ask about the different type of coding you can use.

      Great point,

      Michelle

      (0) 
  5. Kumud Singh
    Hello Michelle,
    Somehow the blog depicts mind of many developers out here.Thanks a ton for writing this.
    I would say that all and many more circumstances leading to fast delivery provokes the thought -‘Just get it done’. I remember an incident wherein I was in favour of searching a standard FM/BAPI to do a fetch rather than select statement. Owing to timelines I was given a mocking look.
    Also different team follow different process/standards. So even if I could find a standard FM for fetching data ,which was unreleased I would have to take an approval to use it. Out of scope!
    Are standards always useful?

    Regards,
    Kumud

    (0) 
    1. Former Member Post author

      Yes, for us we have found standards useful.  I’ve found while working for the same company that the standards are second nature to me.  Also it’s hard to find the time to revise them.  So yes, standards are useful when kept up to date.  (We need to revise again soon.)

      (0) 
  6. Former Member
    I’ve been working as SAP developer for 8 years and have seen tons of code. I think that developer should not distinguish ways of solutions new from old techniques. Rather he/she should consider what I call “elegancy”. If there is no sence to use OOP does it make sence to do it in OOP? If there is no other need than just to simply notify person about somehting it is really necessary to build WorkFlow for that or a Workplace mail is enough? I say NO!. Keep it simple, efficient and elegant (not elephant ;-).

    Use the proper techniques where they fit. Don’t be fascinated by new techniques just because they are fancy and new and your colleagues don’t know them.

    And, regarding the question about touching someting old just to make it better… Well in our company this would mean to smuggle my sophisticated code into something old using some other CSR which has really “visible” effect for business owner which need to grant approval for change. Therefore I say NO! once again. I don’t change what is working if nobady reports any problems with it. Even if the code would be like from 1 year old child (very offen the case :).

    (0) 
    1. Former Member Post author
      Great points!  I would change old code for different reasons: new techniques that would speed it up, it is a maintenance nightmare, or there are some obvious flaws for example error messages that should be there and aren’t.  Checks on things like sy-subrc that are missing.  And yes, some of my older code is like that.

      KISS – Keep it simple because I’m “stupid”.  It is a phrase to live by.  Agreed, you don’t always need objects.  Sometimes you can’t even use them.

      Now why would I use them even if I wasn’t sure of the fit?  It would be because of the way SAP is moving.  Want to go to that next training class?  It probably involves objects.  You need to know the basics just to follow the instructor.  Want to use things like ABAP Webdynpro?   Then again you have to know objects.  Why do an ABAP Webdynpro instead of an ABAP Dynpro?  Ease of use for your business.  I had a group of people that had never been on SAP before.  They never wanted to be on SAP.  I wrote a Webdynpro for printing labels.  Yes, they have to sign on to SAP, but they never knew they were using it.  Instead they were using something like Amazon.

      Yes, I have been a developer since ’98.  Hence some of my bad code select/endselect.  I always look for a reason to grow.  

      No, I don’t code in objects just so my coworkers can’t fix it.   I do because, I am well aware of the future direction.  Objects are not new.  They have been around a long time.  They are not going away. 

      Using objects correctly and you can really make a difference in maintenance.  We all have that code that is in a function module.  Then we find we need something a little different.  We might write another function module.  We might put an if / case or something similar that will make the maintenance harder.  Or we might make the change in our code.  Wouldn’t it be nice to have ONE place to make that change?

      Just think, if you’ve been programming for 8 years, I bet you started on a different language than ABAP.  You changed because you implemented SAP.  I started with RPG, CL, and COBOL.  (And Basic.)  I changed with our SAP implementation.  Boy was that hard.  Objects – well when you get to the bottom of them it’s just plain old ABAP code. 

      New techniques, we have already weathered the change from a different language to ABAP.  Why not learn something else new?  You can keep it in your toolbox.   Pull it out and use it.

      I’ve heard everything looks like a nail when all you have is a hammer.

      So stop, and really look at that code you are designing, would it be better to use OOP?  Structural programming, workflow, BPR, Sapscript, smartforms, Adobe, ABAP dynpro, ABAP Web dynpro…  The list goes on.  All of these are not “new”.  But a lot of them are “new to me”.

      Efficient and elegant.  Wow!  That would be great.  Really once you start with OOP, you’ll find it can be very elegant.

      And if you haven’t already, investigate the ALV OO that is supplied by SAP.  Very cool.  Very easy to use.  Much more options than the function module.  It also will give you ideas on how your code could be better.

      OK – another book is written.  I hope I didn’t get on my soapbox too much.  The idea is not to use new techniques because you can, but use them because they are more effective.  (And if you’ve looked at any of the SAP Teched sessions for LV, I usually try to give a session on old techniques that are useful in the new world.)

      Another thought, the more I talk with people, the more I hear OOP is not what they are doing.  So you may be able to do structural programming for the rest of your career.  But I enjoy front end programming more than back end.  I think once your users find out what they can have, they’ll be asking for it.

      Great response!

      Michelle

      (0) 
      1. Former Member
        Well, it seems you didn’t see my point :). Yes, my programming backgroud is C and C++. Believe me or not I understand and many times used the OOP. Also in ABAP (and not only by implementing BAdIs ;-)). But I need to be sure that it brings me a benefit. The principles as encapsulation, polymorphism or heritability brings definitelly benefits but not always for all types of tasks in SAP. I know also WebDynpro technologies both ABAP and JAVA based. In this case it is  smething else – you just need to use it since it definitelly make sence because the OOP is fundamental principle which these tech. are built on. But look on typical work-shop warehousing transaction (ABAP Dynpro) in which I program WM order creations and confirmations, material movements etc. I simply stay with structural approch since either the work with WM order is enough encapsulated by mean of function modules themselve or because it is nothing else than reading entries from different tables and using the data for some functional calls. I say that OOP is not just the coding. More important part is to be able to design the architecture (what will be objects, what will be interfaces, what will be methods, how the object communicate with each other and so on). If someone is making OOP code without seeing the benefit from the design phase then I guess it’s not beneficial at all. Another example is: if business runs smootly on SapScript invoices, should you change them into Adobe form just because you know the technology and it fun for you?
        (0) 
        1. Former Member
          Well, it seems you didn’t see my point :). Yes, my programming backgroud is C and C++. Believe me or not I understand and many times used the OOP. Also in ABAP (and not only by implementing BAdIs ;-)). But I need to be sure that it brings me a benefit. The principles as encapsulation, polymorphism or heritability brings definitelly benefits but not always for all types of tasks in SAP. I know also WebDynpro technologies both ABAP and JAVA based. In this case it is smething else – you just need to use it since it definitelly make sence because the OOP is fundamental principle which these tech. are built on. But look on typical work-shop warehousing transaction (ABAP Dynpro) in which I program WM order creations and confirmations, material movements etc. I simply stay with structural approch since either the work with WM order is enough encapsulated by mean of function modules themselve or because it is nothing else than reading entries from different tables and using the data for some functional calls. I say that OOP is not just the coding. More important part is to be able to design the architecture (what will be objects, what will be interfaces, what will be methods, how the object communicate with each other and so on). If someone is making OOP code without seeing the benefit from the design phase then I guess it’s not beneficial at all. Another example is: if business runs smootly on SapScript invoices, should you change them into Adobe form just because you know the technology and it fun for you?
          (0) 
      2. Former Member
        Well, it seems you didn’t see my point :). Yes, my programming backgroud is C and C++. Believe me or not I understand and many times used the OOP. Also in ABAP (and not only by implementing BAdIs ;-)). But I need to be sure that it brings me a benefit. The principles as encapsulation, polymorphism or heritability brings definitelly benefits but not always for all types of tasks in SAP. I know also WebDynpro technologies both ABAP and JAVA based. In this case it is smething else – you just need to use it since it definitelly make sence because the OOP is fundamental principle which these tech. are built on. But look on typical work-shop warehousing transaction (ABAP Dynpro) in which I program WM order creations and confirmations, material movements etc. I simply stay with structural approch since either the work with WM order is enough encapsulated by mean of function modules themselve or because it is nothing else than reading entries from different tables and using the data for some functional calls. I say that OOP is not just the coding. More important part is to be able to design the architecture (what will be objects, what will be interfaces, what will be methods, how the object communicate with each other and so on). If someone is making OOP code without seeing the benefit from the design phase then I guess it’s not beneficial at all. Another example is: if business runs smootly on SapScript invoices, should you change them into Adobe form just because you know the technology and it fun for you?
        (0) 
  7. Former Member
    Yeah, as  a consultant this scenario is literally a tough compromise when you are aware that a object could be delivered in a better way rather than stick to the same old approach which have been done many times.

    Actually a quick question which I would like to know from community guys reg one of the queries which I had on  ‘Webdynpro and Data storage handling’. 

    whats the best way to store data,attachments where we have a custom web form followed by workflow approvals .

    1) Store data in tables
    2 )Store data in workflow container

    3 ) How about Case management  ? Stuff.. any ideas on this .please update my thread :

    Webdynpro application – save data and attachments

    apologies for adding this in the comment.
    Thanks
    Saujanya

    (0) 
  8. Suhas Saha

    These were the exact words i heard from my manager when i had mailed him my UML diagram for a utility tool he had asked me to work on!Suhas

    (0) 
    1. Former Member Post author

      OH NO!!!!  What a horrible story.  I hate to hear things like this.  But I believe they are completely true.  And there are probably more out there.

      (0) 
      1. Suhas Saha
        Hey Michelle,
        Thanks for sharing your story. FYI i’m now happily engaged in an IS-Banking project where everything is OO 🙂

        So, do i need to complain? – No. (All’s well that ends well)

        But do i need to bother about my previous project – YES!! I am still not able to understand the rationale behind my manager’s response.

        Cheers,
        Suhas

        (0) 

Leave a Reply