2012 Mar 25 12:10 AM
Hi,
1- My requirement is to create a new version in DMS. I am using standard bapi BAPI_DOCUMENT_CREATENEWVRS2. I am giving following parameters to my bapi.
It is throwing an error document in return parameter SPE/3.1-3001-9028/000/C DOES NOT EXIST. I picked up the document number from DRAW table and I also checked that version A is in released state.
REFDOCUMENTTYPE = SPE
REFDOCUMENTNUMBER = 3.1-3001-9028
REFDOCUMENTPART = 000
REFDOCUMENTVERSION = A
NEWDOCUMENTVERSION= C
COPYORIGINALS = X
COPYOBJECTLINKS = *
Can anyone tell me where I am making a mistake?
Shilpa
2012 Mar 25 4:30 AM
Hi,
Seeing the error, it seems that it is trying to create a Document version based on 'C' not 'A'. That error which you are getting usually occurs when you try to create a new document version with a document which is not existing.
Just cross check all your values in REFDOCUMENTTYPE, REFDOCUMENTNUMBER, REFDOCUMENTPART, REFDOCUMENTVERSION and NEWDOCUMENTVERSION values are correctly passed. Only pass the above values and try.
And also try directly executing the BAPI in SE37, if there it is working correctly, then the values you are passing in the program must have not passed correctly.
Thanks & Regards
Bala Krishna
2012 Mar 25 4:30 AM
Hi,
Seeing the error, it seems that it is trying to create a Document version based on 'C' not 'A'. That error which you are getting usually occurs when you try to create a new document version with a document which is not existing.
Just cross check all your values in REFDOCUMENTTYPE, REFDOCUMENTNUMBER, REFDOCUMENTPART, REFDOCUMENTVERSION and NEWDOCUMENTVERSION values are correctly passed. Only pass the above values and try.
And also try directly executing the BAPI in SE37, if there it is working correctly, then the values you are passing in the program must have not passed correctly.
Thanks & Regards
Bala Krishna
2012 Mar 27 7:15 PM
HI,
I am executing the bapi_docuemnt_createnewvrs2 in se37 only with parameters
docuemnt type spe
document version as c (released)
document part 000
document number 3.1-2601-9027
I tried with different document number too. It is always giving me same error after executing that the docuemnt does not exist, and one more thing If I am entering the ANEER number and execute it, shows the message "change master 40 does not allow changes" and if I go back and delete the ANEER number and again execute it, it is giving me return message as 000.
Please guide.
Shilpa
2012 Mar 28 2:50 AM
Hi,
Open Include 'LCV115U12' in SE38 or function module 'CV115_DOC_OPEN_DISPLAY' in SE37 and place a break-point at line number 116 (at statement Get Document Data which calls function module 'CV200_DB_DRAW_SELECT'). Now execute the BAPI 'BAPI_DOCUMENT_CREATENEWVRS2' from SE37. The logic will get stopped at the breakpoint on function module 'CV200_DB_DRAW_SELECT'. Execute in single steps, in this function module you can see the SELECT on DRAW table with the given reference values, check whether the entry is fetched from DRAW or not. I think in your case it must be getting failed here.
One more thing, if the BAPI successfully creates a document, the Documents values will not be updated into the table. In order to get the values updated you have do a data base Commit after the BAPI execution, it can be done by BAPI 'BAPI_TRANSACTION_COMMIT'.
So execute the above 2 BAPIs in sequence, this can be done in SE37 also.
Goto SE37, give the BAPI 'BAPI_DOCUMENT_CREATENEWVRS2'.
From Menu, select Function module>Test > Test Sequences. Now give first the BAPI name 'BAPI_DOCUMENT_CREATENEWVRS2' then followed by BAPI 'BAPI_TRANSACTION_COMMIT'.
Click on Execute.
Thanks & Regards
Bala Krishna