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: 

call function and call customer function

Former Member
0 Kudos

Hi

Can anybody let me know what is the difference between CALL FUNCTION AND CALL CUSTOMER- FUNCTION .

i know call customer- function is used while we r working on user exits .

but is their any specific reason of difference ...

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

CALL CUSTOMER-FUNCTION is provided by SAP to allow the customer to add their own logic to the standard transaction. If the customer isn't using the function, nothing happens.

In CALL FUNCTION the function module has to exist, it is used more widely than CALL CUSTOMER-FUNCTION and can be coded by SAP or the customer.

Regards,

Nick

8 REPLIES 8

Former Member
0 Kudos

CALL CUSTOMER-FUNCTION is provided by SAP to allow the customer to add their own logic to the standard transaction. If the customer isn't using the function, nothing happens.

In CALL FUNCTION the function module has to exist, it is used more widely than CALL CUSTOMER-FUNCTION and can be coded by SAP or the customer.

Regards,

Nick

former_member188827
Active Contributor
0 Kudos

CALL CUSTOMER-FUNCTION function_exit parameter_list.

Effect

This statement can be used in programs delivered by SAP. It includes the function module exit specified in function_exit . The function module exit is a customer exit. In an SAP program, it enables you to call a function module provided by SAP and implemented by the customer.

The indicator function_exit must be a three-digit text field literal. A function module exit is specified by SAP using the transaction SMOD and can be activated using the transaction CMOD in customer systems.

Specifications by SAP

An empty or partly implemented function module must be assigned to the function module exit using the transaction SMOD. The name of the function module consists of EXIT_, the program name, which contains the statement CALL CUSTOMER-FUNCTION, and the three-digit indicator in function_exit. The interface of the function module is completely defined by SAP.

Activation in the customer system

The transaction CMOD enables the customer to implement the source code of the function module within an enhancement project and to activate the function module exit. If the function module exit is not activated, the statement CALL CUSTOMER-FUNCTION is ignored. If the function module is activated, the corresponding function module is called in the same way as the general function module call.

Syntax and meaning of the parameter_list for the assignment of the actual parameters to formal parameters and for the exception handling are the same as in a general function module call. It is not possible to dynamically fill the interface.

CALL FUNCTION func

Syntax

CALL FUNCTION func { parameter_list

| parameter_tables }.

Effect

This statement calls the function module specified in func. The identifier func must be a character-type data object, which contains the name of a function module in uppercase letters during the statement execution. Each function module of an SAP system has a unique name, which is why you need not specify the function group.

Use additions parameter_list or parameter_tables (as of release 6.10) to statically or dynamically assign actual parameters to the formal parameters of the function module and return values to the non-class-based exceptions.

Note

If the name of a function module is specified by a constant or as a literal, the extended syntax check can check the statement.

Exceptions

Catchable Exceptions

CX_SY_DYN_CALL_ILLEGAL_FUNC

Cause: The called function is known but not active.

Runtime Error: CALL_FUNCTION_NOT_ACTIVE

Cause: The called function is unknown.

Runtime Error: CALL_FUNCTION_NOT_FOUND

CX_SY_DYN_CALL_ILLEGAL_TYPE

Cause: The type of the actual parameter does not fulfill the requirements of the function interface.

Runtime Error: CALL_FUNCTION_CONFLICT_GEN_TYP

Cause: The actual parameter does not have the length expected by the function.

Runtime Error: CALL_FUNCTION_CONFLICT_LENG

Cause: The actual parameter does not have the type expected by the function.

Runtime Error: CALL_FUNCTION_CONFLICT_TYPE

Cause: Only those functions can be called in the update task that are intended for it.

Runtime Error: CALL_FUNCTION_NO_VB

Cause: An actual parameter does not fulfill the alignment requirements of the respective formal parameter.

Runtime Error: CALL_FUNCTION_WRONG_ALIGNMENT

CX_SY_DYN_CALL_PARAM_MISSING

Cause: The function expects a parameter, which has not been passed by the caller.

Runtime Error: CALL_FUNCTION_PARM_MISSING

CX_SY_DYN_CALL_PARAM_NOT_FOUND

Cause: The caller has passed a parameter, which is not known to the function.

Runtime Error: CALL_FUNCTION_PARM_UNKNOWN

plz reward points if it helps

0 Kudos

Can anyone tell me the complete process for doing the enhancement? I am very confused about it. If I know how the standard process work let say "Printing process" and I want to modify it so what will be the steps to follow to tell the ABAPer for changing the standard process. Can anyone explain in detail the enhancement process? I am very much new to the customisation.

Thanks,

Vis

Former Member
0 Kudos

Hi Dear,

Call Function is For Function Modules where as

Call Customer-Function Provided by SAP to implement our own logic.

Reward.

Bohra.

former_member404244
Active Contributor
0 Kudos

Hi,

CALL CUSTOMER-FUNCTION is provided by SAP inorder to enhance the functinality.it contains one zinclude where we write the code..

In CALL FUNCTION it is a normal cal to a function module ..this can be either a zfunction module or standard function module...Here we don't enhance sap functionality....

Regards,

Nagaraj

Former Member
0 Kudos

Hi,

This is basically kept for differentiating between a normal function call and a call where code has been implemented for the User Exit.

Customer here stands for SAP customer.

Thanks,

Amit

Former Member
0 Kudos

Hi Shweta,

Try this link :- http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/call_cus.htm

and reward points if found useful.

Regards,

Amit

Former Member
0 Kudos

call function means calling existing functions

call customer function is adding ur own logic to the standard functions

this comes under enhancements Customer exits