‎2005 Apr 28 8:42 AM
Hi~
let me ask you something.
I want to get some information about users. so, I tri to
use cfuntion 'ThUsrInfo'.
I found some example like this.
data: begin of list occurs 0.
include structure uinfo.
data: end of list.
call 'ThUsrInfo' id 'OPCODE' field opcode_list
id 'TAB' field list-*sys*.would you explain how to use this. and
what does "list-sys" mean? when I look at the structure
list... there is no field like that~~
‎2005 Apr 28 9:16 AM
Hello Kyung Woo Nam,
You <b>MUST</b> not use the C - Functions in your program. SAP mentions the fact very very clearsly in the Online Documentation as well as in the Key Word Documentation.
I can see that you have obtained this piece of code from the Function Module THUSRINFO. Why don't you use the function module instead ?
Now, if you are asking this just for the sake of curiousity, then you must refer to the Keyword documentation in SAP. Just place your curcor on the word CALL and hit F1.
Regards,
Anand Mandalika.
‎2005 Apr 28 9:16 AM
Hello Kyung Woo Nam,
You <b>MUST</b> not use the C - Functions in your program. SAP mentions the fact very very clearsly in the Online Documentation as well as in the Key Word Documentation.
I can see that you have obtained this piece of code from the Function Module THUSRINFO. Why don't you use the function module instead ?
Now, if you are asking this just for the sake of curiousity, then you must refer to the Keyword documentation in SAP. Just place your curcor on the word CALL and hit F1.
Regards,
Anand Mandalika.
‎2005 Apr 28 10:15 AM
Of course, I know that... and I read the document for it.
I try to check out who's come and out in my system.
so, I am tring to proram using customer exit, "SUSR0001".
and I need some information about user.
that's why I try to call 'THUSRINFO'.
anyway, I want to know what does "list-sys" mean?
I've never seen like this. please, if you know this,
explain to me~~^^
regards
kyung woo
‎2005 Apr 28 10:50 AM
Okay...got that...but I would still recommend that you use the FM(s).
Coming to your question, I hope this answer will be satisfactory...
CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE
ID 'TAB' FIELD USR_TABL-*SYS*.The above statement, as you know is a direct call to the SAP Kernel. There will be a Function that is written in C somewhere deep inside the kernel and the above statement is going to call that function and get you the result.
Now, if you have consider the part <b>ID 'TAB' FIELD USR_TABL-SYS</b>, USR_TABL is a tables parameter for a function module in this case. So USR_TABL itself actually stands for the header line of the table.
But the C function that you are calling is going to return you a <i>table</i> of users. So you will have to specify a table in your C-Call too.
Normally, you will refer to the table part as <b>USR_TABL[]</b>. And here, that works equally well. In fact, in your own program, you can actually replace USR_TABL-SYS with USR_TABL[].
USR_TABL-SYS is just another way of referring to the body of an internal table, exclusively for the purposes of the C-Function call. You can see some other examples like :
CALL 'ThSysInfo' ID 'OPCODE' FIELD OPCODE_SEND_ADM_MSG
ID 'LEVEL' FIELD ILEVEL
ID 'SEND_MODE' FIELD SEND_MODE
ID 'SERVER_NAME' FIELD SERVER_NAME
ID 'TYPES' FIELD SERVER_TYPES
ID 'WAIT' FIELD WAIT
ID 'REQ_TBL' FIELD IN_DATA-*SYS*
ID 'RSP_TBL' FIELD OUT_DATA-*SYS*.You do not find it documented because it is not supposed to be used by a programmer. Personally, I had done some research some time back (when I got the same doubt as you have got now) and have shared with you what I found.
Regards,
Anand Mandalika.
‎2005 Nov 03 12:48 AM
This is an old post by now; but thanks Anand for posting the extra info. It really helped answer a curious question of mine also