Application Development and Automation 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: 
Read only

Call Back Function

Former Member
0 Likes
2,231

Hi,

Can anyone tell me what is a call back function?

Regards

Ravi

8 REPLIES 8
Read only

suresh_datti
Active Contributor
0 Likes
1,167

Hi Ravi,

Pl check this <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/22/042a91488911d189490000e829fbbd/frameset.htm">SAP Help</a>

~Suresh

Read only

0 Likes
1,167

hi Ravindra,

Check this Link out

<b>http://help.sap.com/saphelp_nw2004s/helpdata/en/22/042a91488911d189490000e829fbbd/frameset.htm</b>

Regards,

Santosh

Read only

Former Member
0 Likes
1,167

HI

GOOD

GO THROUGH THESE LINKS

http://docsrv.sco.com/cgi-bin/man/man?SAPNotifyOfChange+3sapd

http://search.cpan.org/~piers/SAP-Rfc-1.43/Rfc.pm

BAL_DSP_LOG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS)

BAL_DSP_MSG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)

-


SAP Management

The ESROP-User calls ESROP SAP management functions to register or deregister as an ESROS service user.

Bind an ESROP-User

Int

ESROP_sapBind (ESROP_SapDescsapDesc,

ESROP_SapSelsapSel,

ESROP_FunctionalUnit functionalUnit,

int (*invokeInd)(ESROP_SapSel,

ESROP_SapSel,

T_SapSel */

N_SapAddr */

ESROP_InvokeDesc,

ESROP_OperationValue,

ESROP_EncodingType,

DU_View),

int (*resultInd) (ESROP_InvokeDesc,

ESROP_UserInvokeRef,

ESROP_EncodingType,

DU_View),

int (*errorInd) (ESROP_InvokeDesc,

ESROP_UserInvokeRef,

ESROP_EncodingType,

ESROP_ErrorValue,

DU_View),

int (*resultCnf) (ESROP_InvokeDesc,

ESROP_UserInvokeRef),

int (*errorCnf)( ESROP_InvokeDesc,

ESROP_UserInvokeRef),

int (*failureInd)(ESROP_InvokeDesc,

ESROP_UserInvokeRef,

ESROP_FailureValue))

This function binds an ESROP-User at the ESROP layer by creating an ESROP-SAP.

The sapSel argument specifies the ESROP-SAP Selector Address to be associated with this service user. The ESROP-SAP descriptor value is returned to the caller through sapDesc argument.

The functionalUnit argument specifies the method of handshaking used by the SAP.

The remaining arguments specify the addresses of the callback functions (and their arguments) that the SAP should invoke upon the occurrence of specific events. For instance, invokeInd points to the function that is executed when a performer ESROP receives an invocation.

ESROP_sapBind returns 0 on successful completion. It returns a negative value if unsuccessful.

THANKS

MRUTYUN

Read only

Former Member
0 Likes
1,167

hi ,

You can check this wikipedia link...it gives a very generic explanation for callback function

http://en.wikipedia.org/wiki/Callback_(computer_science)

but worth giving a read ...

Read only

Read only

Former Member
0 Likes
1,167

Hi,

example of call back function

The following programming example shows you how to use this feature:

RFC client program

Function module in an R/3 System

rfc_rc = RfcOpen(...);

FUNCTION ABC.

rfc_rc = RfcInstallFunction(‘XYZ’, xyz_function,...);

rfc_rc = RfcCallReceive(‘ABC’,...);

-


>

...

CALL FUNCTION ‘XYZ’ DESTINATION ‘BACK’

If(rfc_rc==RFC_CALL)

<-----

...

{

rfc_rc = RfcDispatch(...);

if(rfc_rc!=RFC_OK)

exit(1);

-


>

...

}

rfc_rc=RfcReceive(...);

<-----

ENDFUNCTION

...

/* RFC function: ‘ABC’ */

static RFC_RC xyz_function(RFC_HANDLE rfc_handle)

{

rfc_rc = RfcGetData(...); /* Get RFC data */

... /* Process RFC data */

rfc_rc = RfcSendData(...); /* Report result to ABAP */

return 0;

}

Sameena

Read only

Former Member
0 Likes
1,167

Hi ravindranath,

1. As the name suggests,

its a function (subroutine)

which is CALLED

when some specified event occurs.

2. A Simple example is of ALV.

3. We can write program for INTERACTIVE ALV.

4. In that we specify the CALL BACK FORM NAME.

5. So when the user DOUBLE-CLICKS on any row on the alv,

the system,

CALLS OUR FORM (SUBROUTINE)

and passes some parameters to it.

6. In that form, we handle the further reaction.

regards,

amit m.

Read only

Former Member
0 Likes
1,167

Hi Ravi ,

If u r asking in ALV means,

In the EXPORTING parameters the Naming starts with CALLBACK means, u have to pass the Subroutine name.

In FMs: REUSE_ALV_LIST_DISPLAY AND REUSE_ALV_GRID_DISPLAY.

if it is Module pool programming,

This is releated to Update techniques.

Call function <Function Name> in UPDATE TASK.

Call function <Function Name> in Background Task.

Hope this will help you.

- Selvapandian Arunachalam