‎2011 Sep 28 5:57 AM
hi,
i am create document data for material using "BAPI_DOCUMENT_CREATE2" this BAPI , I got a dump error:
"Version assigned automatically for document type DRW"
i am also hide DOCUMENTVERSION / DOCUMENTPART then again same dump is comming.
Allcoate document data
LS_DOC-DOCUMENTTYPE = 'DRW'.
LS_DOC-DOCUMENTNUMBER = 'JU52'.
*LS_DOC-DOCUMENTVERSION = '00'.
*LS_DOC-DOCUMENTPART = '000'.
Regards,
Smruti Ranjan
‎2011 Sep 28 6:42 AM
Hi,
Don't provide the LS_DOC-DOCUMENTNUMBER value, make it blank, when any document is created the document number will be generated by SAP. Also check whether 'DRW' document type is available in your system. Open CV01N transaction and click F4 on the Document type to see what all document types are available.
You can see the sample code in BAPI itself, open the BAPI in SE37 and click on Function Module documentation.
Thanks & Regards
Bala Krishna
‎2011 Sep 28 7:28 AM
Mr. Bala Krishna
Thanks for reply my isuue allmost slove. can you tell me any BAPI for assign existing document number ,document type to Material Creation in MM01 (Document Tab).
Thanks and Regards
Smruti
‎2011 Sep 28 7:34 AM
Hi,
Try the BAPI 'BAPI_DOCUMENT_CHANGE2'.
Thanks & Regards
Bala Krishna
‎2011 Sep 28 8:10 AM
you mean to say first create and then Change as per our requirement...
No BAPI is available for assign Document data to Material Number.
Thanks and Regards
smruti
‎2011 Sep 28 8:21 AM
Hi,
I am not getting your requirment, are you creating a Document which has a Object links from MARA? can you post your requirment little bit in detail.
Thanks & Regards
Bala Krishna P
‎2011 Sep 28 8:52 AM
i am writing a Custome BAPI for Material Create uisng "BAPI_MATERIAL_SAVEDATA " and also i assign an Existing Document Number ,Document Type to the Material Number which is Created using "BAPI_MATERIAL_SAVEDATA".
so, i need a one SAP Standard BAPI which is assign an Existing Document Number ,Document Type to Material Number and the Document number and Document type is available Input Parameter of my Z BAPI.
Thanks and Regards.
Smruti
‎2011 Sep 28 10:31 AM
Hi,
In Document Management System, you can assign materials as Object Links to a Document, So create a Document with 'BAPI_DOCUMENT_CREATE2', providing the required material details in 'OBJECTLINKS' tables parameter of the BAPI, when the Document is created, you can see that material in the 'Object links' tab in CV03N transaction.
You said you are using it for creating a Material, is the material number or value will be system generated or user provided, if the created material number is system generated then, you have to call the 'BAPI_MATERIAL_SAVEDATA' twice,
a) Createnew material with 'BAPI_MATERIAL_SAVEDATA'.
b) Create Document with 'BAPI_DOCUMENT_CREATE2'.
c) Call again 'BAPI_MATERIAL_SAVEDATA' for changing the created material for updating the Document.
Thanks & Regards
Bala Krishna.
‎2011 Sep 28 11:04 AM
we can't cange Document Number/Document Part/Document Version
using "BAPI_MATERIAL_SAVEDATA" because in " BAPI_MARA" strcture having three variable
which not related to Document Management System.
DOCUMENT DZEINR CHAR 22 0 Document number (without document management system)
DOC_TYPE DZEIAR CHAR 3 0 Document type (without Document Management system)
DOC_VERS DZEIVR CHAR 2 0 Document version (without Document Management system)
any othere solution?
Thanks and Regards
Smruti