Skip to Content
avatar image
-1
Former Member

How to define null or empty value in BAPI_PERSDATA_CHANGE

The following java code return an error message saying "Make an entry in all required fields"

How can i set empty values for mandatory fields ? 
...

SAPConnectionImpl con = new SAPConnectionImpl();
JCoDestination dest = con.createUserConnection(userId, password, null);
JCoRepository repo = dest.getRepository();
JCoFunction changeFunc = repo.getFunction("BAPI_PERSDATA_CHANGE");
				
JCoParameterList changeParams = changeFunc.getImportParameterList();
changeParams.setValue("EMPLOYEENUMBER",	"00000901");
changeParams.setValue("SUBTYPE", "");
changeParams.setValue("OBJECTID", "");
changeParams.setValue("LOCKINDICATOR", "");
changeParams.setValue("VALIDITYBEGIN", "19610215");
changeParams.setValue("VALIDITYEND", "99991231");
changeParams.setValue("RECORDNUMBER", "000");
changeParams.setValue("LASTNAME", "TEST");
changeFunc.execute(dest);
...
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 24, 2017 at 01:28 PM

    I finally found the solution. Here it's:

    http://www.sapfans.com/forums/viewtopic.php?f=13&t=121874

    Add comment
    10|10000 characters needed characters exceeded