cancel
Showing results for 
Search instead for 
Did you mean: 

String to SY-UNAME

former_member300754
Participant
0 Kudos

hi all,

I'm new to Java WD. As my scenario, i implement GetSAPUser() then i already get a USER NAME. Firstly, i convert the user name to String. After that, i want to call bapi which imports SY-UNAME to SAP. In other word, from userName(type String) to sy-uame (type Syuname).

Please help me to figure out the solution.

Thanks a million in advance.

Peerasit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

you can pass the string value as input.

Before that you check the RFC in se37 by giving the string input

Thanks and Regards

shanto aloor

Answers (2)

Answers (2)

former_member300754
Participant
0 Kudos

Normally, User id from WD Java is a string. Just follow the code below:

String user = wdThis.getUser();

wdContext.currentXXXX.setIv_User(user);

Then, Iv_User is set by 'user'.

Former Member
0 Kudos

Hi,

Could you please clarify the type of the input used in the Function module specified?

If that is String you can pass without any typecasting otherwise typecast is needed.

Kind regards,

Saravanan K