cancel
Showing results for 
Search instead for 
Did you mean: 

Approve notification of absence over a RFC call

Former Member
0 Kudos

Hello,

i would approve notfication of absence over a RFC call. I use SAP JCo to run a RFC. In the Transaction SE37 on SAP R/3 System, i found the RFC SWF_DEMO_FORMABS_PROC_WRITE. The import parameters are: I_FORMNUMBER, I_PROCSTATE, I_APPROVBY and I_APPROVDATE. In the discription of this RFC stand, that the values for the import parameter I_PROCSTATE are: character A to approved and character R to rejected. But when I run this RFC in my Java application, it nothing happens. Can anybody help me?

Exist a other RFC to approve a notification of absence, which run over SAP JCo?

Accepted Solutions (0)

Answers (5)

Answers (5)

darren_hague
Contributor
0 Kudos

Hi Christoph,

I have solved this problem now - see my post at

Hope this helps,

Darren

Former Member
0 Kudos

Hi,

I think a HR Functional Consultant can help in understanding the possible values of Object Key for a specific Object Type.

Former Member
0 Kudos

Hello,

i made more investigation to approve a absence. So i have found, that i must set in table SWXFORMABS the parameter PROCSTATE to A (approve) or R (reject) from the absence. After this i can use the RFC SAP_WAPI_WORKITEM_COMPLETE to commited and then the RFC SAP_WAPI_WORKITEM_CONFIRM to end the workitem. But i haven't possibility to set the parameter PROCSTATE in the table SWXFORMABS over a RFC.

darren_hague
Contributor
0 Kudos

Hi Christoph,

Did you get any further with this? I have discovered that SWK_DEMO_FORMABS_PROC_WRITE will allow you to update the form, but when I tried with COMPLETE & CONFIRM the workitem came back to the initiator with not very much information - I thought I had rejected the item, but it didn't look like that in the Inbox.

Do let me know if you figured out the right sequence of RFC calls to Approve or Reject a FORMABSENC.

Best regards,

Darren

Former Member
0 Kudos

>>>SAP_WAPI_CREATE_EVENT. But my problem are the import parameters from this RFC. I don't know which content must be have the values from the parameters?

Hi,

OBJECT_TYPE has a a value table 'TOJTB'

OBJECT_KEY could be the Absence Object Code

EVENT could be a event on the Object.

I am not clear on the values for this.

Former Member
0 Kudos

I tested the RFC SAP_WAPI_CREATE_EVENT on the SE37 with the following value for the import parameters:

OBJECT_TYPE = FORMABSENC

OBJECT_KEY = FORMABSENC0000001966 or 0000001966

EVENT = APPROVED or REJECTED

The result was nothing. When i use other values, then i became a error.

I think the value for the OBJECT_KEY is false. The other values are correct. My question is, how i get the OBJECT_KEY from the object?

Former Member
0 Kudos

Hi,

I checked the RFC "RFC SWF_DEMO_FORMABS_PROC_WRITE" in SE37 under the Tab "Source code" there was no code to perform any function. So check for yourself in SE37.

The Function Module's Function group 'SWF_WSDEMO 'description says 'Function Module for Web Services Demo Workflows'. So try with some other RFC for your scenario.

Former Member
0 Kudos

Yes. I checked also the RFC SWF_DEMO_FORMABS_PROC_WRITE in SE37 and see that no scource code exist.

Perhaps i found a other RFC to approve a absence: SAP_WAPI_CREATE_EVENT. But my problem are the import parameters from this RFC. I don't know which content must be have the values from the parameters?

OBJECT_TYPE = FORMABSENC

OBJECT_KEY = ?

EVENT = ?

Former Member
0 Kudos

check this RFC hope this may helps

BAPI_ABSENCE_APPROVE

but this API method only writes the Absences infotype 2001

you can check its bapi and documentation by tx:bapi

path:

personnal time mgmt->employee abscence->approve

regards.

Former Member
0 Kudos

Unfortunately, the RFC BAPI_ABSENCE_APPROVE wasn't the RFC which I search. Because the IMPORT parameters don't agree with my dates which i have to approve a absence. So i can't test it.

Perhaps i explain my hole problem. I read the object information from a workitem to approve notification of absence of the workplace inbox. I use this information to run the RFC SWF_DEMO_FORMABS_READ to read all information of a notification of absence. Yet I would like this absence to approve or reject over a RFC.