Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Update Module as RFC FM

Harsh_Jain2512
Participant
0 Kudos

Hi all,

I have a simple question regarding Function module, Can I call a FM of Update module type as RFC enable function module. Let's say, for example, I have a FM 'RVXX__' of processing type  Update Module with Start immediately in Dev system ABC.

Can I call the FM RVXX__ as below:

CALL FUNCTION 'RVXX__'

                      DESTINATION 'NONE'

                      EXPORTING:

                         *Exporting Params.

i.e. Can we call a Update Function module as call to a RFC enabled FM???

Moderator message: the function module in question contains the following comments. Draw your own conclusions on the wisdom of attempting to call it directly.

*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

*!!!!!!! This function module is for internal purposes only and !!!!!!!!

*!!!!!!! must not be called externally.                         !!!!!!!!

*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Message was edited by: Matthew Billingham

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

No

  1. Technically update task FM are not RFC enabled
  2. Customer programs must never use standard update FM, but use some BAPI or other interface to update database (no chekc and no database consistency provided by update FM, but usually only SQL statements)

Also this exact syntax is intended for SAP internal use only.


CALL FUNCTION - DESTINATION - interner Zusatz

Dieser Zusatz ist nur zum internen Gebrauch bestimmt.
Er darf nicht in Anwendungsprogrammen verwendet werden.

Zusatz:


  ... KEEPING LOGICAL UNIT OF WORK

Regards,

Raymond

7 REPLIES 7

former_member201275
Active Contributor
0 Kudos

If you are going to have destination as "None" then what would be the point? Please also provide full name of the function.

Harsh_Jain2512
Participant
0 Kudos

Hi Anthony,

The function name is RKE_WRITE_CE4__XX00.


Former Member
0 Kudos

Hi,

you cannot use Update Function module as like RFC function module.

CALL FUNCTION 'RVXX__'

                      DESTINATION 'NONE'

                      EXPORTING:

                         *Exporting Params.

In the above query clearly mentioned that there is no destination  and it seems its not an RFC function module. if you are calling only the update FM why you need to provide the destination parameters.

if it is an RFC FM  then you must and should specify the destination parameters while calling that FM in the partner system.

Please let me know your exact issue.

Regards,

Mallikarjuna

0 Kudos

Hi Mallikaarjuna,

I was getting a runtime error as because of  this. The FM is not remotely enabled and I just wanted to know that can we call a Update module as RFC FM in the syntax that I posted below to Matthew's reply. And all these codes are from standard SAP report

matt
Active Contributor
0 Kudos

As you may see from the discussion here using an unreleased function module is risky at best. Using an update function module directly is foolhardy. When the function module contains comments like the following, foolhardy isn't enough and we have to resort to outright foolishness.

*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

*!!!!!!! This function module is for internal purposes only and !!!!!!!!

*!!!!!!! must not be called externally.                         !!!!!!!!

*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



By calling this function module directly, you are doing exactly the same as updating SAP tables directly. Stop what you are doing now, and find another way.


0 Kudos

Hello Matthew,

It was not calling this FM directly in any of my code, but I came through it while analyzing a dump of a standard report. I found that this function is not a RFC enabled function, but its a Update module and it was called as per the below syntax

  CALL FUNCTION 'RKE_WRITE_CE4__XX00'

       DESTINATION 'NONE' KEEPING LOGICAL UNIT OF WORK

       TABLES:

         ........

Even though the FM is not RFC enabled, so can we call the FM in the way as shown above.???

raymond_giuseppi
Active Contributor
0 Kudos

No

  1. Technically update task FM are not RFC enabled
  2. Customer programs must never use standard update FM, but use some BAPI or other interface to update database (no chekc and no database consistency provided by update FM, but usually only SQL statements)

Also this exact syntax is intended for SAP internal use only.


CALL FUNCTION - DESTINATION - interner Zusatz

Dieser Zusatz ist nur zum internen Gebrauch bestimmt.
Er darf nicht in Anwendungsprogrammen verwendet werden.

Zusatz:


  ... KEEPING LOGICAL UNIT OF WORK

Regards,

Raymond