cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Checkin any document in DMS

Former Member
0 Kudos

Hello,

I am working on standard IDES 6.0 System and want to attach an incoming PDF(via mail) to DMS.

Based on other posts in this forum, I downloaded the PDF on Application Server. After this I called the BAPI_DOCUMENT_CREATE2. The BAPI gives me error

Error while checking in and storing:
<servername and path>\BOM.PDF
Message No 26253

If I do not specify the storage category 'DMS_C1_ST, the document gets created with the open lock against the file. In CV03N when I click on the document it gives the error:

File could not be accessed

However I have checked that the file does exist on server path using AL11 transaction.

After this I tried to upload the document in CV01N. Here also I am unable to checkin file for any document type even from Local PC. I get the error :

This change is not allowed. Message No 26455

I checked some older documents in CV04N. I am able to open the same.

What could possibly be wrong here? I think some issue in DMS Config. But have no idea where to start with.

Please help

Regards,

Jai

Threads Referred

-

-

Accepted Solutions (1)

Accepted Solutions (1)

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Jai,

based on error message 26253 please see the following link to the SDN WIKI area:

http://wiki.sdn.sap.com/wiki/display/PLM/26253-Reasonforthiserror

Further please check if the server path is accessible from Windows too and that the user has read- and write permission for this directory, because this is necessary.

Regarding the second error message it seems that this is caused by some missing authorization. Please use transaction ST01 to execute an authorization trace which will help to find out if any permission check fails.

Best regards,

Christoph

Former Member
0 Kudos

@Ravindra,

Thanks for your response. I checked the settings and they are all fine. Also I checked space is not a problem

@Christoph,

Thanks for your help. I was able to overcome my second problem. After assigning some missing authorizations, I was able to successfully create and checkin a PDF file using CV01N.

However, the other problem still remains. Here is the RFC Call that I make


  CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
      documentdata         = wa_doc_data
      hostname             = '192.168.2.3'
      pf_http_dest         = 'SAPHTTPA'
    IMPORTING
      documenttype         = lv_doctype
      documentnumber       = lv_docnum
      documentpart         = lv_docpart
      documentversion      = lv_docver
      return               = ls_return
    TABLES
      characteristicvalues = it_doc_char
      classallocations     = it_doc_class
      documentfiles        = it_documentfiles

I did some debugging and the error is coming from this FM CV120_KPRO_CHECKIN --> Routine KPRO_PHIO_CHECKIN --> Routine kpro_phio_checkout_user_set --> Following line


    UPDATE dms_ph_chko_cd1
    SET chko_user = pf_user
    WHERE ph_class = ps_object_id-class AND
          phio_id  = ps_object_id-objid.

Also the following FM call in routine KPRO_PHIO_CHECKIN fills the lt_bad_obj table


    CALL FUNCTION 'SDOK_PHIOS_CHECKIN'
         TABLES:  components   = pt_comp
                  bad_objects  = lt_bad_obj.

I am trying to understand the flow. However if you have any idea, please help.

Regards,

Jai

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Jai,

For checking in originals in background, API functions are much more

flexible. Therefore please see also SAP note 504692, which includes several

sample programs which could be helpful by checking in original files in

background.

The document BAPIs always require a SAPGUI or an open RFC connection,

because this channel is required to start the program SAPHTTP (or

SAPFTP) on the client for the check-in. When the BAPI is used in

background, the system doesn't know where to get the original files

from.

Please note that the functionality you would like to realize is a very

special one for which no standard solution exists. However, API-s are

more flexible in some cases, i.e. CVAPI_DOC_CHECKOUTVIEW with RFC

destinations defined as SAPHTTPA/SAPFTPA could fulfill your

requirements.

Further please see also the SAP note 796709 which contains also necessary information for this action too.

Another useful note for BAPI issue is 766277 which contains a complete documentation on all available DMS BAPIs.

Best regards,

Christoph

Former Member
0 Kudos

Thanks a ton Christoph. The Note 504692 solved my problem. Full points to you.

Regards,

Jai

Former Member
0 Kudos

Hi Jai,

I have now the same problem,  Could you tell me, how you solved it?

Regards,

Answers (3)

Answers (3)

0 Kudos

Hi All,

I have a small question on DMS.

While creating the document via FM ‘BAPI_DOCUMENT_CREATE2’ its goes into error “document category and documetn discpline required, we have customize the DMS as these two are always to be put as manadtory , how to handle this in progrm.

Please suggest.

Thanks & Regards,

Raj Singh

Former Member
0 Kudos

Hi all,


Similar kind of issue occurred in one of our webdynpro applications of SAP NetWeaver Portal-
The error message "Error while checking in and storing" was returned by the BAPI while trying to replace documents in the DMS Server via portal.
But the documents were getting stored in the back end by the use of standard T-Codes.
Later it was found that ABAP tables COMPONENTS & COMPONENT_DATA are inconsistent by looking into the HTTP trace file.
The HTTP patch "http.c#21" was being used in our server.
SAP suggested the below mentioned steps-
-->Download the most recent SAPHTTP version & install it.
-->Then delete the RFC connections SAPHTTP & SAPHTTPA through T-Code SM59
-->Regenerate them again with report RSHTTP05

They were carried out in our ECC server & the issue was resolved.
Please try them out if applicable in your case & let us know.

Thanks & Regards,
Shreyashri Kar

Former Member
0 Kudos

Hi,

Check in OAC0 and OACT that storage category is defined properly and activated. Also check the space availability if using

'DMS_C1_ST as storage location. and lastly check that mime type is defined in DC30 for .pdf application.

If file is not checked-in then it can't be accessed i.e. will not open.

Hope this will help.

Regards,

Ravindra