<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAP Record Management - Saving a file using program to DPF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481716#M1556360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a very complex requirement on project:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have the customizing in place and everything works fine with HCM forms and Processes( HCMPF ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try doing the same stuff with my program it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP uses class &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CL_HRASR00_DIGITAL_PERS_FILE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and method &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF_HRASR00_DIGITAL_PERS_FILE~ADD_DOCUMENT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My steps are:&lt;/P&gt;&lt;P&gt;1. Create a file ID using GUID &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GUID_CREATE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_DOCUMENT_CREATE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; - Create file in SAP Record Management.&lt;/P&gt;&lt;P&gt;3. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_DOCUMENT_CHECKIN_VIA_TAB&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to Check-in the file data in Binary format.&lt;/P&gt;&lt;P&gt;4. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_DOCUMENT_EXISTENCECHECK&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to check if the file exists and yes file is available.&lt;/P&gt;&lt;P&gt;5. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_RECORD_CREATE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to create a record &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Till here everything is fine and working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Call &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BAPI_RECORD_ADDELEMENT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;STRONG&gt;- here i get an error 820 - Internal Error.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried debugging the same there is a runtime exception getting generated while generating an instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck and not able to figure out what exactly the issue is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Dec 2010 14:28:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-13T14:28:00Z</dc:date>
    <item>
      <title>SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481716#M1556360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a very complex requirement on project:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have the customizing in place and everything works fine with HCM forms and Processes( HCMPF ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try doing the same stuff with my program it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP uses class &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CL_HRASR00_DIGITAL_PERS_FILE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and method &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF_HRASR00_DIGITAL_PERS_FILE~ADD_DOCUMENT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My steps are:&lt;/P&gt;&lt;P&gt;1. Create a file ID using GUID &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GUID_CREATE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_DOCUMENT_CREATE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; - Create file in SAP Record Management.&lt;/P&gt;&lt;P&gt;3. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_DOCUMENT_CHECKIN_VIA_TAB&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to Check-in the file data in Binary format.&lt;/P&gt;&lt;P&gt;4. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_DOCUMENT_EXISTENCECHECK&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to check if the file exists and yes file is available.&lt;/P&gt;&lt;P&gt;5. Call FM &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SRM_RECORD_CREATE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to create a record &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Till here everything is fine and working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Call &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BAPI_RECORD_ADDELEMENT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;STRONG&gt;- here i get an error 820 - Internal Error.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried debugging the same there is a runtime exception getting generated while generating an instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck and not able to figure out what exactly the issue is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 14:28:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481716#M1556360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-13T14:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481717#M1556361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kunjal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe too simple, but did you try a COMMIT WORK after step 5 (srm_record_create)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 14:42:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481717#M1556361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-13T14:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481718#M1556362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, I tried COMMIT WORK... yet same error &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea what might be wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kujal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 15:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481718#M1556362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-13T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481719#M1556363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kunjal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you show how you call BAPI_RECORD_ADDELEMENT? The variable-names are a bit misleading:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you fill &lt;/P&gt;&lt;P&gt;objectid = record-guid&lt;/P&gt;&lt;P&gt;documentclass = record-class&lt;/P&gt;&lt;P&gt;sps_id = element_to_be_added_sps_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and fill the table ELEMENT_SP_POID with the right poid, e.g for documents:&lt;/P&gt;&lt;P&gt;DOC_ID = yourdocclass(10)yourdocid(32)&lt;/P&gt;&lt;P&gt;VARIANT = 0&lt;/P&gt;&lt;P&gt;VERSION = 0&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It could also be that you have to provide a specific place where to put the element with the parameter insertion_by...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 17:30:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481719#M1556363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-13T17:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481720#M1556364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was a helpful pointer....&lt;/P&gt;&lt;P&gt;I thought I was doing it in the right way but I was not actually pointing the record OBJID...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The space for opening the document is created but it remains empty and I do get a success message which says "&amp;amp; bytes transfered".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Dec 2010 17:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481720#M1556364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-16T17:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481721#M1556365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved using Archive Link to save the file and link it to DPF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jan 2011 06:48:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481721#M1556365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-25T06:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481722#M1556366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 13:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481722#M1556366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T13:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Record Management - Saving a file using program to DPF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481723#M1556367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kunjal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to Develop the custom program for Bulk Extraction of DPF's .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By passing the Employee Number, i need to download the documents on desktop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me to build a program in step wise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 17:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-record-management-saving-a-file-using-program-to-dpf/m-p/7481723#M1556367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-20T17:48:04Z</dc:date>
    </item>
  </channel>
</rss>

