cancel
Showing results for 
Search instead for 
Did you mean: 

help for a JCO rookie: How to feed import parameter into BAPI_USER_CREATE1

Former Member
0 Kudos

Hi,

I want to use JCO and BAPI_USER_CREATE1 to create users in SAP systems, following the steps in the JCO tutorial.

I have difficulties with suppying the import parameters, for example "PASSWORD"

function.getImportParameterList().setValue("XYZ","USERNAME");

is working, but

function.getImportParameterList().setValue("SECRET","PASSWORD");
-->Cannot convert a value of 'GEHEIM' from type java.lang.String to STRUCTURE at field PASSWORD

runs into an error.

Can someone be so kind to provide a code snippet or a link to "how to deal with import structures in JCO"??

Thanx in advance, Dieter

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Moin Dieter,

the field password is of type Structure. Hence you will need to something like the following -


JCO.Structure passStructure = function.getImportParameterList().getStructure("PASSWORD");
passStructure.setValue("GEHEIM", "BAPIPWD");

That should do the trick.

T00th

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanx, this is exactly what I was looking for...!