on 06-06-2005 6:30 PM
Hi All,
I am trying to get the employye info, using the BAPI BAPI_ADDRESSEMP_GETDETAIL. But, I dont know why I always get the error:
There is not data for 0006 (in the selected period).
0006 in the infotype.
I am triying to sen all the parametres for the BAPI, but always get the same result, with or without parameters.
Somebody can help me?
Thanks in advance.
/* -
*/
function = this.createFunction("BAPI_ADDRESSEMP_GETDETAIL");
if (function == null) {
System.out.println("BAPI " +
" not found in SAP.");
System.exit(1);
}
System.out.println("BAPI=OK.....\n");
// Here we go...
function.getImportParameterList().setValue("00034797", "EMPLOYEENUMBER");
function.getImportParameterList().setValue("19000101","VALIDITYBEGIN");
function.getImportParameterList().setValue("99991231","VALIDITYEND");
function.getImportParameterList().setValue("1", "SUBTYPE");
function.getImportParameterList().setValue("","OBJECTID");
function.getImportParameterList().setValue("","LOCKINDICATOR");
// function.getImportParameterList().setValue("", "RECORDNUMBER");
// function.getExportParameterList().setActive(false, "COMPANYCODE_ADDRESS");
mConnection.execute(function);
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S")) ) {
System.out.println("DADOS= "+returnStructure.getString("MESSAGE"));
System.exit(1);
}
Hi Luis,
The BAPI_ADDRESSEMP_GETDETAIL requires exact date for validitybegin date. I would call <b>BAPI_ADDRESSEMP_GETLIST</b>
first to get the information to be passed to BAPI_ADDRESSEMP_GETDETAIL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I am still haveing problems.
I have tried using GETLIST instead of GETDETAIL,
also I use the TutorialBAPI1.java fro mthe JCO examples as reference,
but the error happends before sending parameters.
Look:
// After JCO conection
function = this.createFunction("BAPI_ADDRESSEMP_GETLIST");
if (function == null) {
System.out.println("BAPI_ADDRESSEMP_GETLIST" +
" not found in SAP.");
System.exit(1);
}
mConnection.execute(function);
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S")) ) {
System.out.println("Test BAPI1 Message: "+returnStructure.getString("MESSAGE")); // <---ERROR OCCURS HERE
System.exit(1);
}
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.