Updating (CHECKIN) a document in DMS
I have opened an existing document from DMS (from SAP database) using Office Integration(OI) into an URL. I then open a OI Document on that URL and replace a part of the Word document using the Word Interface. Now I am saving this changed document back to the URL with:
CALL METHOD document->save_document_to_url
EXPORTING
no_flush = ' '
url = l_url
user_info = ' '
data_type = ' '
data_subtype = ' '
IMPORTING
error = error
retcode = retcode
CHANGING
document_size = l_docsize.
That seems to work fine because when closing and releasing the OI document and opening again with the OI method open_document usinf the same URL I see the correct changed document. So I am quite sure that the URL contains the correct data.
Now my problem: I am trying to checkin the document again to the DMS and the methods run without error but in the DMS the old version of the Word file remains. What am i doing wrong?
ps_doc_file-url = l_url.
ps_doc_file-fileno = '1'.
ps_doc_file-dttrg = 'SAP-SYSTEM'.
ps_doc_file-dappl = 'WRD'.
ps_doc_file-filename = XXX'
ls_cin_def-replace_file = 'X'.
ls_cin_def-content_provide = 'URL'.
CALL FUNCTION 'CV120_DOC_CHECKIN_FROM_URL'
EXPORTING
ps_cin_def = ls_cin_def
pf_storage = 'SAP-SYSTEM'
ps_doc_file = ps_doc_file
PS_FRONTEND =
TABLES
PT_DRAZ =
PT_COMPONENTS =
ptx_drao = lt_drao
PTX_DRAOZ =
PTX_ARCHIVE_CONN =
CHANGING
ps_draw = ps_draw
PS_AUDITS =
PS_PHIO =
EXCEPTIONS
error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Seems like i cannot paste the complete code with correct line breaks. From a certain number of characters onwards all line breaks disappear. Sorry cannot display the code here. Have to cancel my question.
Sensational editor
Edited by: SamCooke on May 20, 2009 1:26 PM
Similar Messages
-
Need to create the document with originals and checkin that document
HI Guys,
My requirement is to write a method to create the document with originals and checkin that document of DMS.
Plz suggest the approach to get this requirement solved.
Regards,
RSKHi Bala,
Thanks for the reply.
Iam writing the code under method like below.
Importing:
ls_doc type bapi_doc_draw2.
APPEND is_files TO it_files.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_doc
IMPORTING
documenttype = iv_doctype
documentnumber = iv_docnumber
documentpart = iv_docpart
documentversion = iv_docvers
return = iv_return
TABLES
documentfiles = it_files.
Iam checking with document number , document type, document part, document version... it is throwing error message as
error while checking in and storing: version number(25).
Please advice whether it is correct approach?
Regards,
RSK
Edited by: shravan kumar ravula on Dec 22, 2011 11:24 AM
Edited by: shravan kumar ravula on Dec 22, 2011 1:26 PM
Edited by: shravan kumar ravula on Dec 22, 2011 1:26 PM -
WF_DOC or SOFM to document in DMS.
Hello all.
I have a workflow that at some point has an instance of a workflow document (MS Word), Object type WF_DOC. It is possible to convert that to a SOFM object instance.
I want to be able to create a document in DMS and place this MS Word file in the DMS document. It is possible to use function module BAPI_DOCUMENT_CREATE2 to create documents in DMS, but this function module expects that any files that will be part of the document, come from a local or network drive.
Any ideas?
Thanks
LandeJust for the record, I will give the highlights of the way the problem was solved.
I did not find a way to checkin the word file in WF_DOC format into the DMS document. I had to save it in a local drive and use this saved file to checkin.
1. Get the contents of the file in WF_DOC format using SWUO_GET_DOCUMENT_CONTENT.
2. Prepare table with binary contents of Word document
FORM prepare_contents .
DATA: w_contents TYPE LINE OF solix_tab,
w_target TYPE sdokcntbin.
LOOP AT lt_contents INTO w_contents.
MOVE w_contents-line TO w_target-line.
APPEND w_target TO lt_target.
ENDLOOP.
ENDFORM. " prepare_contents
3. Download file to local drive using METHOD cl_gui_frontend_services=>gui_download
4. Create the DMS document using BAPI_DOCUMENT_CREATE2
5. Check in the file in the local drive using BAPI_DOCUMENT_CHECKIN2
6. Delete the file in the local drive with METHOD cl_gui_frontend_services=>file_delete. -
Document in DMS can not be printed using FM CVAPI_DOC_VIEW
Hi Experts,
We've been using FM CVAPI_DOC_VIEW in the program to get the document in DMS and set value of import parameter 'PF_APPTP' to 3 to make the document to be printed.
But after our system upgraded to ECC6.0, the document could not be printed, only displayed in the screen.
Could you please tell me anything has changed to cause the issue?
Thanks for your time.
AnnaI already found the reason.
Thanks -
Item text (BSEG-SGTXT) is not getting updated in Payment document generated
Hi All,
Item text (BSEG-SGTXT) is not getting updated in Payment document generated through F110.
After generating the payment document via Transaction Code u2013 F110, system is not updating the
Text field (BSEG-SGTXT) in the payment document with the text that we have entered in the Invoice (MIRO or FI Invoice).
In case of manual payment (F-53) we can input the text manually hence that will get updated in
payment document but this thing is not possible with F110.
How can I update it?
Is there any configuration for that?
Thanks
Daniel DortaHi All,
I've applied the two notes as recommended. However, when I run FBL3N for payment run items, the Text field is update with wrong data, i.e. not from the Text field in FB60
Thus, I'll like someone to help me with what should exactly be done on the 'Step', 'Pre-requisite' and 'Substitution' side of the Substitution rule (TCode GGB1), I did not fill anything in the Pre-requisite box - is this right?
Thanx in advance. -
Item text is not getting updated in Payment document generated through F110
Hi all,
After generating the payment document via Transaction Code u2013 F110, system is not updating the Text field in the payment document with the text that we have entered in the Invoice (MIRO or FI Invoice).
While processing the document via transaction code u2013 F110, in the layout shown for the Invoices to be considered for payment (screen of u201CEdit Proposalu201D), text is not getting updated. When we pressed F1 at the Text field (Which is blank) we came to know that it is a u201CItem Textu201D with u201CTable u2013 REGUEu201D / u201CField u2013 SGTXTu201D.
In BSEG (SGTXT field) as well as BSIK (SGTXT field) we are getting the Invoice document with the text maintained in it via MIRO or FI invoice.
But while processing the invoices through Tcode - F110, in the layout of Edit Proposal (Table - REGUE / Field - SGTXT) we are not getting the u201CText fieldu201D but getting the other data such as Doc. No.( Table - REGUE / Field - BELNR), Fiscal Year (Table - REGUE / Field - GJAHR) etc for processing the proposal which is getting shown in BSEG as well as BSIK.
In case of manual payment (F-53) we can input the text manually hence that will get updated in payment document but this thing is not possible with F110.
Can anybody guide me on getting the ItemText (Not Doc. Header text) in FI payment document after F110 execution?
Regards,
ShridharHi Suresh,
Thanks for the prompt reply. We will be obliged if you guide us in that respect since F110 is a Std. SAP code.
Have you refer OSS before arriving at the conclusion of developing ABAP program since the Item Text is a std. field of Std. Tcode - F110. Same should had been get updated while making the payment in reference to the Invoice which haves item text in it ?
Regards
Shridhar
FICO -
Encountered error while updating the payment document
Hi Guys,
I encountered an error while updating the payment document of one of our bank account. See below error message:
Error: Unable to lock the record. Cause: The record is being modified by another user
thanks,
gracieHi Vikas,
Repeat the changes you are trying to make one step at a time and make sure you click on update in both the series screen and the document numbers screen every time.
I've faced this issue and doing this helped.
Regards,
Hamsa -
How to restrict update to a document in state release to the contribution g
How to restrict update to a document in state release to the contribution group.
Hi I’m working with UCM 10g and I want to know if it is possible to restrict the update over a document that is on state release for the group of users that made the check in of the document ?
thanksYes, it is, but IMHO in a rather complicated way:
- you could change the security settings (security group, or more likely, accounts) during the life cycle, or
- you could implement collaboration management, and change security settings via ACLs
Alternatively, depending on what you mean by "updating" documents you could also:
- check-out the document by a system account (if you want to prevent your users to check-in a new version)
- modify the GUI so that Update (metadata) action is not available to users (in theory, they could still access it via a direct service call) by a custom component
- introduce a Java event filter (enhancing the UPDATE service) where you will implement whatever logic you want
I would probably opt for the last options as it seems to me to be the cleanest solution (but yes, it requires some coding). -
Profit center document created but profit center not updated in FI document
Hi Experts,
I have a strange issue; we created FI document via billing document (SD) where in profit center document got created but profit center is not updated in FI document.
We have separate table to identify the profit center by customer.
Please let know what could be the cause or reason for this kind of scenario
Thanks,
VKHi Krishna,
Though ur question seems very old, but now i got the same requirement as like you.
So if you remeber what needs to be done for this issue thats very good help to me.
My Requirement is : I have created Service Entry Sheet by referring PO and while releasing this Service Entry Sheet system is generating MIGO Doc and FI documents in background.
And I have updated PERNR (Persnoal No.) in MSEG-SGTXT by using enhancment but it's not populating in BSEG-SGTXT.
And I found an internal table while debugging i.e ; like ACCIT (not exactly ,similar to this ) where i have updated pernr and sgtxt but same thing will not available in FI Doc display (BSEG-PERNR or BSEG-SGTXG)
So could you plz suggest what needs to be done to achieve this. Im assuming that, is it possible through BTE (Business Transaction Events) ?. if yes, plz tell me how to proceed.
Thanks
Madhan -
Check in new documents in DMS with specific access permissions
Hi,
we have an RFC which creates new documents in DMS.
This calls one after another these FBs:
- CVAPI_DOC_CREATE
- CVAPI_DOC_CHECKIN
- BAPI_DOCUMENT_CHANGE2 for a additional classification of the new document
Now we have a new request from our customer: to give the document specific access permissions.
We try the following:
- manually check in a document template with the necessary permissons.
- the permissions are given in a classification ("O,MW-T-D*,IB,02/03/52/53")
- This is named "authority characteristic" and is checked somewhere else, I do not really know how this works in detail ( but it works)
- check in a new document with a reference to the template and in expectation that the new document has the same classification and therefore the same access permissions
- If I do this manually in CV03N is does work
- We do this with CVAPI_CHECK_IN_WITH_TEMPLATE - but this FB does not copy the classification ( only the description and the attached original documents , and the documentnumber of the new document is an mandatory parameter which is not allowd in our case since we use internal creation of document numbers)
My question is: Is this a possible way to create new documents with specific permissions
Is there a possibility to give the permissions to the documenttype instead of give them to every single document of this documenttype ?
Thanks
KerstinMy guess is that at some point you propagated the ACL entry for "everyone deny delete" to all your folders and sub-folders and their contents by selecting Apply to All in a GetInfo window. Try doing a search in the Leopard forums for
ACL chmod
and you'll find a whole raft of discussions about the problem and suggestions for fixes.
Francine
Francine
Schwieder -
Best practice for securing confidential legal documents in DMS?
We have a requirement to store confidential legal documents in DMS and are looking at options to secure access to those documents. We are curious to know. What is the best practice? And how are other companies doing it?
TIA,
Margie
Perrigo Co.Hi,
The standard practice for such scenarios is to use 'authorization' concept.You can give every user to use authorization to create,change or display these confidential documents. In this way, you can control access authorization.SAP DMS system monitors how you work, and prevents you from displaying or changing originals if you do not have the required authorization.
The below link will provide you with an improved understanding of authorization concept and its application in DMS
http://help.sap.com/erp2005_ehp_04/helpdata/en/c1/1c24ac43c711d1893e0000e8323c4f/frameset.htm
Regards,
Pradeepkumar Haragoldavar -
Unable to checkin a document using 'CHECKIN_UNIVERSAL" service through java
Hi All,
I am trying to checkin a document through java code and following is my code part for the same( UCM 11g)
But whenever i run this code part, it throws the following exception
intradoc.common.ServiceException:csUnableToCheckin,<null>!csUnabletoExecMethod,populateMissingDocumentValues
Can anyone help me with this?
Code part
private void checkinDoc()
File f=new File("D:/testfolder/BPEL.pdf");
System.out.println(" absolute path :"+f.getAbsolutePath());
String filePath = f.getAbsolutePath().replace("\\", "/");
checkedOutDataBinder.putLocal("IdcService", "CHECKIN_UNIVERSAL");
checkedOutDataBinder.putLocal("dDocTitle","test");
checkedOutDataBinder.putLocal("dDocAuthor", "weblogic");
checkedOutDataBinder.putLocal("dDocType","Document");
checkedOutDataBinder.putLocal("dSecurityGroup","public");
checkedOutDataBinder.putLocal("doFileCopy", "1");
checkedOutDataBinder.putLocal("primaryFile", filePath);
checkedOutDataBinder.putLocal("xCollectionID", "425180507509000004");
checkedOutDataBinder = executeService(checkedOutDataBinder,
"weblogic");
private DataBinder executeService(final DataBinder binder,
final String userName) throws DataException, ServiceException
// obtain a connection to the database
Workspace workspace = getSystemWorkspace();
// check for an IdcService value
String cmd = binder.getLocal("IdcService");
if (cmd == null)
throw new DataException("!csIdcServiceMissing");
// obtain the service definition
ServiceData serviceData = ServiceManager.getFullService(cmd);
if (serviceData == null)
throw new DataException(LocaleUtils.encodeMessage(
"!csNoServiceDefined", null, cmd));
// create the service object for this service
Service service = ServiceManager.createService(serviceData.m_classID,
workspace, null, binder, serviceData);
// obtain the full user data for this user
UserData fullUserData = getFullUserData(userName, service, workspace);
service.setUserData(fullUserData);
// binder.m_environment.put(REMOTE_USER, userName);
ServiceException error = null;
try
// init the service to not send HTML back
service.setSendFlags(true, true);
// create all the ServiceHandlers and implementors
service.initDelegatedObjects();
// do a security check
service.globalSecurityCheck();
// prepare for the service
service.preActions();
// execute the service
service.doActions();
// do any cleanup
service.postActions();
// store any new personalization data
// service.updateSubjectInformation(true);
//service.updateTopicInformation(binder);
catch (ServiceException e)
error = e;
e.printStackTrace();
finally
// Remove all the temp files.
service.cleanUp(true);
workspace.releaseConnection();
// handle any error
if (error != null)
// throw new ServiceException(error.m_errorCode, error
// .getMessage());
return binder;
}I have been running into the same exception, albeit with UCM 10g:
Content item 'xxx' was not successfully checked in. Unable to execute service method 'populateMissingDocumentValues'. (System Error: Runtime error: java.lang.NullPointerException
at collections.CollectionMetaHandler.validateMetaDataDates(CollectionMetaHandler.java:771)
at collections.CollectionMetaHandler.fillInUndefinedMeta(CollectionMetaHandler.java:806)
at collections.CollectionUserHandler.setUndefinedMetaData(CollectionUserHandler.java:1353)
at collections.CollectionUserHandler.populateMissingDocumentValues(CollectionUserHandler.java:1275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
at intradoc.server.Service.doCodeEx(Service.java:490)
at intradoc.server.Service.doCode(Service.java:472)
at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
at intradoc.server.Service.doAction(Service.java:452)
at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
at intradoc.server.Service.doActions(Service.java:447)
it seems to have something to do with the xCollectionID.
If I don't set this, it works fine (checking in and out, checking in new revision). If I set it I can check in a new item using CHECKIN_NEW but I am unable to use CHECKIN_UNIVERSAL to check in a new revision.
Any pointers would be appreciated.
Edited by: Jaap on 6-jun-2011 2:41
Edited by: Jaap on 6-jun-2011 3:09 -
Updating a XML document with a processing instruction
Greetings Guru's
I have a fully functional XML database solution for our new system. The only thing left is for me to update a xml document in the database with a processing instruction to find the style sheet (JAXB strips it out when the XML must go back into the database).
I can update complete nodes and node elements in the xml document using updateXML in a regular update statement, but I do not know how to add the following processing instruction to my documents.
<?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
[pre]
Thanks in advance
DerrickSQL> var xmltext varchar2(4000)
SQL> --
SQL> begin
2 :xmlText := '<Hello>World</Hello>';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> drop table t
2 /
drop table t
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> create table t of xmltype
2 /
Table created.
SQL> set long 10000
SQL> --
SQL> insert into t values (xmltype(:xmltext))
2 /
1 row created.
SQL> select *
2 from t
3 /
SYS_NC_ROWINFO$
<Hello>World</Hello>
SQL> update t set object_value = updateXML
2 (
3 object_value,
4 '/',
5 xmlconcat
6 (
7 xmlpi("xml-stylesheet",'type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"'),
8 object_value
9 )
10 )
11 /
1 row updated.
SQL> select * from t
2 /
SYS_NC_ROWINFO$
<?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
<Hello>World</Hello>
SQL> -
Hello,
does anyone know how to get the document from DMS to a local drive, while using VB Code (with SAP Connector) or .NET?
I tried to use the 'CVAPI_DOC_CHECKIN' but it didn't work.
maybe it's the wrong function to use...
I've also tried to examine the 'CVAPI_DOC_GETDETAIL' but got an error.
does anyone has a sample code in VB or .NET to get the document from a DMS to a local file?Try BAPI_DOCUMENT_CHECKOUTVIEW2.
Remember to reward points if this solves ur problem. -
Type of the document the DMS & individual repository?
Whether it is possible to define for each type of the document the DMS individual repository on Content Server?
try again
Maybe you are looking for
-
One of the main reasons I purchased the iMac was to transition from my PC video editor to FCP. Now three issues have come up suggesting I have made a bad purchase. 1. The iMac is set up to run on a FAT32 hard drive, yet I have just read that the FAT3
-
Hello, In case of rejections of material which are excisable, How do we raise a rejection invoice to the vendor so that he can avail Cenvat credit on the rejected items. Also the rejection invoice is required for physical movement of materials. The r
-
USB modem???
anyone installed a USB modem on Solaris 8 IA ??? please advice...Thanks in advance
-
Info about Flash Lite on SE phones
For more information about which phones support Flash Lite and implementations such as browser, wall paper, screensaver take a look at the following page and read both the Guidelines and Getting started articles. http://developer.sonyericsson.com/sit
-
Why am I unable to use Hasselblad Flexcolor .fff with Adobe Photoshop CC?
Why am I unable to use Hasselblad Flexcolor .fff? When the other use of .fff from Hasselblad's digital range is accessable. Please dont kill off those still dedicated to using film.