Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PTMGRATTABS_MNGCREATION vs BAPI_ABSENCE_CREATE

Former Member
0 Kudos

Hello to the java and hr experts,

can you please help me.

I am using the following code for booking leave (infotype 2006)

static final String BAPI_ADD = "BAPI_PTMGRATTABS_MNGCREATION"; // book leave

... and so on

...

jcoUrlAdd = mRepository.getFunctionTemplate (BAPI_ADD).getFunction();

// Get results

//----


rc = jcoUrlAdd.getTableParameterList().getTable ("RETURN").getString ("TYPE");

rcMessage = jcoUrlAdd.getTableParameterList().getTable ("RETURN").getString ("MESSAGE");

retUrlAdd = jcoUrlAdd.getExportParameterList().getStructure ("HRTIMESKEY");

Now i want to do the same under the old infotype 2001

using BAPI_ABSENCE_CREATE

Can somebody tell me, where to find a description of the output (structure or table and fields) or does somebody

have some lines of code.

Thanks a lot in advance

Christian

2 REPLIES 2

Former Member
0 Kudos

>

> Hello to the java and hr experts,

>

> can you please help me.

>

> I am using the following code for booking leave (infotype 2006)

>

> static final String BAPI_ADD = "BAPI_PTMGRATTABS_MNGCREATION"; // book leave

>

> ... and so on

> ...

>

> jcoUrlAdd = mRepository.getFunctionTemplate (BAPI_ADD).getFunction();

>

> // Get results

> //----


> rc = jcoUrlAdd.getTableParameterList().getTable ("RETURN").getString ("TYPE");

> rcMessage = jcoUrlAdd.getTableParameterList().getTable ("RETURN").getString ("MESSAGE");

> retUrlAdd = jcoUrlAdd.getExportParameterList().getStructure ("HRTIMESKEY");

>

> Now i want to do the same under the old infotype 2001

>

> using BAPI_ABSENCE_CREATE

>

> Can somebody tell me, where to find a description of the output (structure or table and fields) or does somebody

> have some lines of code.

>

> Thanks a lot in advance

> Christian


*"       EXPORTING
*"             VALUE(RETURN) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
*"             VALUE(EMPLOYEENUMBER) LIKE  BAPIP2001-PERNR
*"             VALUE(SUBTYPE) LIKE  BAPIP2001-SUBTY
*"             VALUE(OBJECTID) LIKE  BAPIP2001-OBJPS
*"             VALUE(LOCKINDICATOR) LIKE  BAPIP2001-SPRPS
*"             VALUE(VALIDITYBEGIN) LIKE  BAPIP2001-BEGDA
*"             VALUE(VALIDITYEND) LIKE  BAPIP2001-ENDDA
*"             VALUE(RECORDNUMBER) LIKE  BAPIP2001-SEQNR


BAPIRETURN1


TYPE
ID
NUMBER
MESSAGE
LOG_NO
LOG_MSG_NO
MESSAGE_V1
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4

ALL OTHERS ARE SINGLE FIELDS...





Former Member
0 Kudos

Many thanks