09-20-2018 8:58 AM - edited 02-03-2024 9:17 PM
Hello everyone,
We are trying to implement some badis in S/4HANA Public Cloud, for example, Generate Project IDs - /CPD/CL_ENGMTPROJECT_GEN_ID. To comply the requirements defined by our client, we need to verify the user ID which is creating the Project. In SAP R/3 we would use the System Variable 'SY_UNAME'. How could we get this information in S/4HANA Cloud?
Any help would be appreciated.
Thank you in advance.
Best Regards,
Anna
Hi Anna,
This variable should be available as $session.user.
rgds,
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeroen,
Thanks a million for such a quick answer.
Sadly, we don't think that variable is available in ABAP, as far as I know it's only suitable for JAVA script.
We ended up retrieving this information by using the following code:
DATA(lv_userID) = cl_abap_context_info=>get_user_technical_name( ).
We then retrieve the user logged to the system.
SELECT SINGLE PersonFullName INTO @DATA(lv_name)
FROM I_BusinessUser
WHERE userID = @lv_userID.
Hope this is useful if someone else needs to get this data.
Thanks again for your response.
Best Regards,
Anna
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.