on 04-30-2006 6:38 PM
Hi all,
Im absolutely new to SAP and ABAP and am trying to get my first SAPRFC 'hello world' kindof thing up and running.
Ive managed to generate a list of users (SO_USER_READ_LIST). Now i want to get the details of a specific user (Fnction: SO_USER_READ). But im doing something wrong i think.
Here are the facts:
<b>SO_USER_READ</b>
[code]FUNCTION SO_USER_READ.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" USER_NAME LIKE SOUD-USRNAM DEFAULT SPACE
*" WITH_MAX_RECEIVER LIKE SONV-FLAG DEFAULT SPACE
*" EXPORTING
*" USER_DISPLAY LIKE SOUD2 STRUCTURE SOUD2
*" EXCEPTIONS
*" COMMUNICATION_FAILURE
*" SYSTEM_FAILURE
*" USER_NOT_EXIST
*"----
[/code]
<b>My Code</b>
[code]
// STRINGS holding function name and export var
$rfcfunction = "SO_USER_READ";
$resultstable = "USER_DISPLAY";
$functiehandle = saprfc_function_discover($connectie, $rfcfunction);
if(!$functiehandle)
{
echo "Functie is verkloot!".saprfc_error($rfc);
exit;
}
//Pass import parameters
saprfc_import ($functiehandle,"USER_NAME", "JORIS");
//saprfc_import ($functiehandle,"WITH_MAX_RECEIVER", 1);
saprfc_table_init($functiehandle,"USER_DISPLAY");
// execute function
$functieresultaat = saprfc_call_and_receive($functiehandle);
[/code]
<b>when i run this i get this message:</b>
[code]
Warning: CALDBG: Can't find interface name USER_DISPLAY, __cal_refresh_internal_buffer() in C:\Development\htdocs\workspace\joristest\detail.php on line 62[/code]
line 62 is the line containing:
<i>saprfc_table_init($functiehandle,"USER_DISPLAY");</i>
Can anyone help be to get back on track here?
Thanks alot
Joris Bots
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anton,
Thanks for the help!
I did dwell around the forums for quite some time before posting this question. But since i wasnt sure what i was looking for, i didnt get very far
i used
$functieresultaat = saprfc_call_and_receive($functiehandle);
$resultaat = saprfc_export ($functiehandle,"USER_DISPLAY");
instead of table_init
How do i reward points btw?
Thanks
Joris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.