Skip to Content
avatar image

Do you use abap update function modules?

I was wondering whether to ask or to blog this. Then I discovered the coffee corner.

I spent decades writing programs that scrub the data base with inserts and updates (and yes - also with modifies). One day, I heard a voice saying "Thou shalt use call function ... in update mode".

Well - I tried it out and it works fine, but still I'm wondering if this voice was of an Angel of Robust Programming (ARP) or a Demon Of Over-ruling (DOO).

What do you think? Is ist ok to do updates in "normal" programs or should we always use function modules? Usually, I avoid FM calls completely in my coding...

* Please Login or Register to Comment on or Follow discussions.

6 Comments

  • Feb 25 at 05:55 PM

    There are places (like SD user exits) where we have to use update FMs. In a custom program, unless it's a similar scenario, I just don't see a reason for that. Simple is usually better.

    And yes, even I'm moving away from FMs too. :)

  • Feb 26 at 07:28 AM

    Hi Jörg,

    there are two aspects.

    First is about organization of code for understandability and maintainability. Twenty years ago (when I was programming CO-PC-Code in R3 at SAP) it was best practice to separate code into three layers: UI, functionality and persistence. Layers where mostly equivalent with function groups.

    This kind of layering makes a lot of sense with larger development projects. But today you would use some other means to build layers. And layers get blurred with HANA.

    Second is "in update task" (I guess that is what you meant with "in update mode"). call <function module> in update task was a tool to queue updates that generate huge processing load. It was meant to keep dialog processes free for user interaction. Due to it's asynchronous processing it can only be used when all functionality around it can cope with this.

    I seldom used a strict layering concept in customer projects after I left SAP. And I never ever used "in update task" again.

    So these concepts were valid ARPs on the day before yesterday. But today I would classify them as DOOs (nice acronyms!).

    Cheers, Lutz

  • Feb 27 at 11:01 AM

    The worst thing is when two update methods (in update task, in dialog) get mixed together. It is a potential data inconsistence (been there, sigh.)).

  • Add comment
    10|10000 characters needed characters exceeded