2010 Dec 13 2:28 PM
Hi All,
We have a very complex requirement on project:
We have an ABAP Report, which generates some files and we have to save the file into DPF(Digital Personnel File) where SAP saves the file created using HCM Forms and Processes.
We have the customizing in place and everything works fine with HCM forms and Processes( HCMPF ).
However, when I try doing the same stuff with my program it fails.
SAP uses class
CL_HRASR00_DIGITAL_PERS_FILE
and method
IF_HRASR00_DIGITAL_PERS_FILE~ADD_DOCUMENT
.
I have tried replicating the same code from the method since I am not able to call the same method due to technical reasons that I dont have instance of HCMPF which is required by this class to create a file and record in DPF.
My steps are:
1. Create a file ID using GUID
GUID_CREATE
2. Call FM
SRM_DOCUMENT_CREATE
- Create file in SAP Record Management.
3. Call FM
SRM_DOCUMENT_CHECKIN_VIA_TAB
to Check-in the file data in Binary format.
4. Call FM
SRM_DOCUMENT_EXISTENCECHECK
to check if the file exists and yes file is available.
5. Call FM
SRM_RECORD_CREATE
to create a record
Till here everything is fine and working.
6. Call
BAPI_RECORD_ADDELEMENT
- here i get an error 820 - Internal Error.
When I tried debugging the same there is a runtime exception getting generated while generating an instance.
I also tried debugging and checking how SAP does it, and there I seems to be having all the correct data only except the fact that SAP does not create any record as record and it uses the reference from HCMPF.
I am stuck and not able to figure out what exactly the issue is.
Appreciate any help.
Cheers,
Kunjal
2010 Dec 13 2:42 PM
Hi Kunjal,
maybe too simple, but did you try a COMMIT WORK after step 5 (srm_record_create)?
Regards
Marcus
2010 Dec 13 3:33 PM
Hi Marcus,
Yeah, I tried COMMIT WORK... yet same error
Any idea what might be wrong...
Cheers,
Kujal
2010 Dec 13 5:30 PM
Hi Kunjal,
could you show how you call BAPI_RECORD_ADDELEMENT? The variable-names are a bit misleading:
Do you fill
objectid = record-guid
documentclass = record-class
sps_id = element_to_be_added_sps_id
and fill the table ELEMENT_SP_POID with the right poid, e.g for documents:
DOC_ID = yourdocclass(10)yourdocid(32)
VARIANT = 0
VERSION = 0
?
It could also be that you have to provide a specific place where to put the element with the parameter insertion_by...
Hope it helps
Marcus
2010 Dec 16 5:43 PM
Hi Marcus,
That was a helpful pointer....
I thought I was doing it in the right way but I was not actually pointing the record OBJID...
Now I am doing it correctly... The entry has started appearing in the DPF for the concerned employee but when I try to open the file by double clicking it. It does not open the file on the right hand pane...
The space for opening the document is created but it remains empty and I do get a success message which says "& bytes transfered".
I tried checking the attributes that I am updating using the program and everything seems to be fine but since the file is not opening I know there is something wrong somewhere....
Thanks,
Kunjal
2011 Jan 25 6:48 AM
Solved using Archive Link to save the file and link it to DPF
2013 Apr 09 2:04 PM
2013 Nov 20 5:48 PM
Hi Kunjal,
I have a requirement to Develop the custom program for Bulk Extraction of DPF's .
By passing the Employee Number, i need to download the documents on desktop.
Can you please help me to build a program in step wise.