cancel
Showing results for 
Search instead for 
Did you mean: 

Can BAPI_EMPLOYEE_ENQUEUE works in XI ?

Former Member
0 Kudos

Hello,

I have a scenario in XI which calling BAPI_ABSENCE_CREATE.

Since the employee need to be locked, so I created another scenario which is calling BAPI_EMPLOYEE_ENQUEUE, and this scenario will be called b4 BAPI_ABSENCE_CREATE scenario.

Although no error return from BAPI_EMPLOYEE_ENQUEUE scenario, but my BAPI_ABSENCE_CREATE scenario still giving me error "Employee/applicant is not locked yet". To confirm this, I go to SAP Transaction PA30 with the same Personnel Number, and yes, it seems that it didn't lock the employee.

So, I just wonder is this BAPI_EMPLOYEE_ENQUEUE works in XI ?

Or because i have miss out anything?

What is the best solution?

Please help.

Thank you.

Best regards,

Adam Lee.

Accepted Solutions (0)

Answers (3)

Answers (3)

Jallaj
Explorer
0 Kudos

my suggestion is create z programme for this

Former Member
0 Kudos

Hi,

From SAP help:

<i>Commit Control for Individual BAPI Calls

If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.

If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.

The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values “”, “S”, “I”, and “W” are displayed. All other values are regarded as errors.

To change this setting, set the indicator BAPI Advanced Mode.

In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.</i>

link to help: http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm

Regards,

Wojciech

Former Member
0 Kudos

Hi Wojciech,

Thank for your help and reply.

Do you mean even to ENQUEUE also need to commit?

Anyway, I have tried this also, but once set it as Advanced Mode, it give me an error. Please refer to below error message.

***************************

Result:

http-Status: 500 Internal Server Error

Payload:

<SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.af.rfc.util.bapi.BapiException: Parameter RETURN has type "BAPIRETURN1" which is unknown.</SAP:AdditionalText></SAP:Error>

**********************

I guess it's only support RETURN which has type BAPIRET2, and not BAPIRETURN1 which so happend the case in BAPI_EMPLOYEE_ENQUEUE.

And I can't create customzed RFC, because apparently the certification doesn't allow customized RFC.

Do you have any idea?

Thank you.

Best regards,

Adam Lee.

Former Member
0 Kudos

Hi,

Try to reimport this BAPI. You should have in XI correct structure.

Regards,

Wojciech

Former Member
0 Kudos

Hi,

Sorry, I don't understand, can you please explain why re-import will have in XI correct structure?

Regards,

Adam Lee.

Former Member
0 Kudos

hi Adam,

were you able to resolve this problem ?

Former Member
0 Kudos

Hi,

It can work but you need to call explicity commit. Either using parameter in Communication Channel or creating RFC wrapper in your R/3 which will make a commit.

Regards,

Wojciech