Sunday, September 15, 2013

RFC Method, SAP ABAP to HR Reports

Getting description of RFC method arguments

-----Original Message-----
Subject: HR: Getting description of RFC method arguments
Is there some documentation out there for translating the arguments for the
RFC methods after COM-enabling them via the DCOM connector? An example is, I
have created a COM object with, amongst others, the BAPI_PERSDATA_GETLIST
RFC. The second, required, argument for the GETLIST method is displayed as
personaldatakey - I have no idea what this argument translates to in SAP. Is
it an infotype? A data field? any help would be greatly welcome.
Regards,

-----Reply Message-----
Subject: RE: HR: Getting description of RFC method arguments
All RFCs and BAPIs (a form of RFCs) have IMPORTING, EXPORTING and TABLES
parameters.  I believe, that is what you refer to when you speak of
arguments.  Use transaction SE37 in SAP to display the function module.
Enter the name (in your case BAPI_PERSDATA_GETLIST) and select documentation
somewhere in the menu.  If you are lucky, you will find helpful hints.  If
not - and not all modules are documented well - you can look at the
parameters in the respective section, e.g., IMPORTING.  You will find a
reference variable or domain there.  You can probably double-click on it or
use SE11 (data dictionary) to find out the purpose of the variable.  Again,
if you are lucky you find a description or even documentation.  If you are
totally unlucky and nothing yields a result, go into the source code.  You
will see a comment block of all the parameters.  You can look through the
code to see, how it is used.  This requires a little bit of understanding -
both ABAP and the functionality, but if you are programming for RFCs you
should be somewhat familiar and able to understand the overall meaning of
the parameters by reading through it.  Don't worry about the detail level,
just get the big picture.  There is a good chance you find some comments in
the source code, too.  If you are lucky, they are in English.
You see that a lot depends on the grace of SAP as far as explanations and
documentation are concerned.  But you will always have the source code to
look at, which is only helpful in understanding what the call does.  I
generally recommend looking at the code you want to call on a high level
anyway.
Hope this gets you started.
Best regards,

-----End of Message-----
   

No comments:

Post a Comment