03-19-2012 11:19 AM
Hi ,
I am trying to create a new entry in infotype 2001 for absences.
The FM is being called indirectly from sharepoint through a web service.
I have performed ENQUEUE ,DEQUEUE before and after calling the HR_INFOTYPE_OPERATION FM.
The FM executes fine, without any error messages.
But no data is created. Everything works fine when tested from sap itself.It fails only when calling from sharepoint.
i have already tried commit work and bapi_transaction_Commit. Doesnt help.
Is there any limitation when calling from external webservice?
_
03-19-2012 11:37 AM
Hi,
FM HR_INFOTYPE_OPERATION is not Remote-Enabled Module. It does not work for Web Service
Instead use FM BAPI_ABSENCE_CREATE.
Hope this helps.
Pradeep.
03-19-2012 11:40 AM
The FM is being called in a Z RFC. It doesnt help.
I have tried bapi_Absence_create also.Same outcome. No errors no update.
03-20-2012 3:17 PM
Did you check if it was an authorization problem? Check if the RFC user ID is authorized to create infotype records.
03-20-2012 3:53 PM
must work with HR_INFOTYPE_OPERATION and BABI_EMPLOYEE_ENQUEUE / DEQUEUE
Did ist several times.
Authorization issue?
03-21-2012 7:00 AM
Hi All,
No its not an authorization issue. The same user can update in other scenarios.
The weird part is, it doesnt work only from sharepoint.But works from WS navigator.
Any limitations on infotype updation? Refered to this thread, but doesnt help.:(
03-21-2012 7:44 AM
did you check the return key?
What message do you get?
May be there is a functional error. Infotype 2001 goes to several different screens depending on SUBTY/AWART.
03-21-2012 8:03 AM
Hi Volker,
The return message is initial. No errors are encountered.
Please find my code snippet below:
CALL FUNCTION 'HR_INITIALIZE_BUFFER'
EXPORTING
tclas = 'A'
pernr = it_ absence-pernr.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = it_absence-pernr
IMPORTING
RETURN = wa_return
.
IF wa_return-type = ' '.
CLEAR wa_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = it_absence-pernr
record = wa_pa2001
operation = 'INS'
validityend = it_absence-endda
validitybegin = it_absence-begda
nocommit = ''
IMPORTING
return = wa_return
KEY = PERSONALDATAKEY.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = '5'
"IMPORTING
. " RETURN = wa_Return
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = it_absence-pernr.
03-21-2012 8:40 AM
you don't have to pass a PAxxxx but a Pxxxx structure to the fm, mind the difference.
03-21-2012 8:43 AM
Hi,
The structure is defined as:
DATA: wa_pa2001 TYPE p2001.
Its correctly declared.
01-06-2015 12:25 PM
Hey Meghna!
I'm having one error like this... How do you solve this problem? Can you share with me?
01-07-2015 8:36 AM
please check if structure P2001 is filled correctly, particularly fields INFTY and SUBTY
and check OSS notes
I found a solution there for a different problem by simply adding a "do nothimg" statemnet:
load-of-program.
perform do_nothing(sapfp50p).
01-07-2015 12:54 PM
Where did you put it? My problems is different, I have problem with infotype 9001, when I execute in report is ok, but after, I create a function and call this funtion in another report, the infotype 9001 is not added! Why? only this infotype is not added!!!
Thanks.