Skip to Content
0
Former Member
Jun 06, 2005 at 05:30 PM

BAPI Employee Info

119 Views

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);

}