cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to check in a document

Former Member
0 Kudos

Hi everybody,

I'm currently working on some document management. My purpose is to implement the modification of documents.

I found out some BAPI such as BAPI_DOCUMENT_CHANGE2 but I'm having some troubles when I want to modify the status.

Using cv02n, it seems like checking in the original makes my BAPI works fine. I found some functions for that such as BAPI_DOCUMENT_CHECKIN2 but it raises the message error E 26 253 : Error while checking in and storing:
xxx\xxx\xxx.xxx

I checked in OACT transaction and my storage category is assigned.

Does anybody have ever faced this problem? Maybe there is an easier way to modify documents using fonctions?

Best regards,

Sebastien

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Please check your entry once again,

    • Allocate document data

lf_doctype = 'DRW'.

lf_docnumber = '4711'.

lf_docversion = '000'.

lf_docpart = '00'.

lf_status = 'RE'. note: u are not enterd, status i guess, while u chek in the status should be changed from old to new.. try out by entring status,

    • Error occurred ??

IF ls_return-type CA 'EA'.

ROLLBACK WORK.

MESSAGE ID '26' TYPE 'I' NUMBER '000'

WITH ls_return-message.

Also,

Note: in DC10, at define status, u select field, No entry, and run Bapi.

Benakaraj

??P

christoph_hopf
Advisor
Advisor
0 Kudos

Dear Sebastian,

regarding the usage of BAPI_DOCUMENT_CHANGE2 and CHECKIN2 I would recommend you to use BAPI_DOCUMENT_GETDETAIL2 before and then hand over all the received data to the CHANG2 or CHECKIN2 BAPI. This will grant the the necessary data is handed over completely and correctly.

Best regards,

Christoph