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

RFC_GET_FUNCTION_INTERFACE_P

Former Member
0 Likes
778

Is the following statement true or false?:

"For every RFC function that you can call,

you can also access its signature

(using RFC_GET_FUNCTION_INTERFACE_P)"

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
665

Sure......why? You got an argument against that statement?



report zrich_0002 .


data: signature type table of rfc_fint_p with header line.


parameters: p_func type tfdir-funcname.


call function 'RFC_GET_FUNCTION_INTERFACE_P'
  exporting
    funcname            = p_func
*   LANGUAGE            = SY-LANGU
  tables
    params_p            = signature
* EXCEPTIONS
*   FU_NOT_FOUND        = 1
*   NAMETAB_FAULT       = 2
*   OTHERS              = 3
          .
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.


loop at signature.

  write:/ signature-paramclass,
  signature-parameter,
  signature-tabname,
  signature-fieldname,
  signature-exid,
  signature-position,
  signature-offset,
  signature-intlength,
  signature-decimals,
  signature-default,
  signature-paramtext,
  signature-optional.


endloop.

Regards,

Rich Heilman

Read only

0 Likes
665

I'm not SAP insider. So, I'm not aware of possible pitfalls, sorry. Typical C-Java guy think that in &#1057; you can not ask function signatures in run-time, in Java, you can.

1. How is this implemented in SAP?

2. If my external RFC server registers function using RfcInstallFunction(), how RFC_GET_FUNCTION_INTERFACE_P would know its signature?

3. Calling RFC_GET_FUNCTION_INTERFACE_P for itself in QEC (non Unicode) expose extra parameter <b>NONE_UNICODE_LENGTH</b> in my RFC application (Unicode) but do not expose it in my SAPGUI (non Unicode?). Where can I read about this?

4. What about Unicode and RFC_GET_STRUCTURE_DEFINITION_P?

Sorry for too many questions - expect many bonus points!

Read only

0 Likes
665

I don't know how to answer your questions. RFC_GET_FUNCTION_INTERFACE_P just gives you the import/export/tables parameters of the function module that specified thru its own IMPORT parameter. It returns a list of the parameters.

See the above ABAP code.

Regards,

Rich Heilman