cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Joris,

welcome to the college boys' scripting community.

Others already experienced your problem. You might want to read .

Former Member
0 Kudos

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

Former Member
0 Kudos

you're welcome.

the points thing should be kinda obvious. If you're logged in and browse a thread of yours marked as a question, you have some radio boxes in every message allowing you to give various degrees of points.

regards,

anton

Former Member
0 Kudos

Anton,

Well thats what i thought, but i pnly have one radio box saying: Solved it on my own.

But i did post it as a question..

weird. Sorry guys cant reward anyone here

Joris

Former Member
0 Kudos

don'T worry, I don't care about points. it's more important that you found a solution to your problem.

hope you get some points at the world championship in june, hehehehe...