Skip to Content

Calling a standard SAP's function module?

Hello

Pl. let us know can we call a standard SAP's UPDATE function module (FM --> Attributes --> Processing Type --> Update radio button selected) in a normal way, I mean, currently we are calling a standard SAP's update FM with out adding IN UPDATE TASK extension syntax in our Z report program and its working fine, pl. let us know is it OK/safe to call it with out extension?

Thank you

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Feb 16, 2016 at 10:41 AM

    Calling the FM not in update task, may trigger invalid database if a simple database commit (implicit or not) is triggered before a transaction commit the work, but this is one customer program, so that part is not a true problem if program correctly coded.

    But those standard update FM usually update database almost whatever parameter you pass (just the records to update must exist or any error that trigger an error in open-sql execution, so raising an Abort message with the most beautiful effect) but usually using those (unreleased) update task FM to prevent usage of BAPI, IDoc, BDC or other tool is bad practice, those FM usually don't check data validity, no insure database consistency, usually SAP transactions perform some checks and calculations then trigger a batch of such FM IN UPDATE TASK and finally COMMIT the WORK. So YOU must do the whole job as the SAP transaction, and of course, in case of problem you are on your own, SAP will ask for "consulting service" (pay for it) - 7 - Error caused by customer modification/development with reference to 415983 - Modification/customer developments of SAP function modules

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

    • Thank you Roberto.

      Thank you Raymond,

      I totally agree with you bcz when I checked the said UPDATE FM, its the same as you said in your reply that its not released for customers, its directly updating the DB with out any validations/checks, they wrote below code in the FM,

      IF it_itab[] IS NOT INITIAL.

      UPDATE std_sap_tbl FROM it_itab
      ENDIF.

      But, in our case/requirement, we don't need any kind of validations/checks/data consistency checks bcz we want to UPDATE a single field on bunch of recs as one-time mass update, hence I guess I am OK

  • Posted on Feb 15, 2016 at 05:07 PM

    Hi.

    In UPDATE TASK means your FM sit and wait for a COMMIT WORK, before execution. When COMMIT arrives, the processing does not continue until the function module has finished.

    Then Processing Type --> Update Immediately means in the same LUW (logic unit of work), committed together. Delayed means in separate LUW , committed in a separate way.


    What are you trying to obtain?


    Hope to help

    Bye

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi.

      You need to verify well your request. I don't know what's the process that you're executing and what's your function's purpose.

      For example, suppose your function module do a COMMIT instruction. That's a bad thing if you're inside a "PO creation" process. So you'll need "IN UPDATE TASK.

      An other example would be if you have 3 steps to complete a process and you want to commit only when all 3 steps are successfull. In this case you'll need CALL FM .. IN UPDATE TASK for all 3 of them. Once the 3rd step is successfull you'll do a COMMIT WORK statement to COMMIT all your changes to the database.

      I hope it's clear.

      Bye

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.