Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

newbee Q: what am i doing wrong with function SO_USER_READ?

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

Not what you were looking for? View more on this topic or Ask a question