cancel
Showing results for 
Search instead for 
Did you mean: 

How to attached document to sap object using FM.

dipak_khatavkar
Participant
0 Kudos

Hi all,

i am creating custom application of DMS . first ,I have created documen Create mode using kpro using  'BAPI_DOCUMENT_CREATE' without SAP OBJECT(KNA1).

and i want in edit mode create document attached to SAP objetc(KNA1) through FM, i tried FM   'CVAPI_DOC_CHANGE', but it cant work showing error message 'link SAP object ''1111' is not allowed for Document Type 'ZDK'.

So is their another FM for connecting Object i have used Content server???

Please help!!

Dipak.

Accepted Solutions (1)

Accepted Solutions (1)

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Dipak,

normally the BAPI_DOCUMENT_CHANGE2 should enable you to add object links to a document

info record. Therefore the correct data needs to be filled in table OBJECTLINKS. Please note that after a DMS BAPI always the BAPI_TRANSACTION_COMMIT has to be executed to store the changes in the database.

For information on the DMS BAPIs please see also the documentation attached to SAP note 766277 or the information in transaction BAPI directly in your SAP system.

Best regards,

Christoph

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Dipak,

Could mention what entries are u passing in the FM?

Specially for the following:

DOKOB

OBZAE

Best Regards,

Simran

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Simran,

the field DOKOB and OBZAE is used for creating an object link between the document info record and some SAP object (e.g. material master). Normally you have to fill the field DOKOB with the object table (e.g. MARA for material master) and the field OBJKY (object key - material number).

In SAP note 766277 you will find an attachment with the complete BAPI documentation for DMS. There is also some sample coding included for each BAPI.

Best regards,

Christoph