How to create an UI view in Extension collection.
Convert Docx to PDF and generate a new contract document version
Hi Experts,
We try to convert the final contract document docx type conversion become pdf type,and then upload the file to generate a new contract document version.But we encountered the following problems:
1.We use Jacob to do the type conversion,but the program at the time of new ActiveXComponent is not error termination,but in a server directly use Java operation is no problem.We do not konw the reason.
ActiveXComponent app = null; try { debugMessage = "Debug:chengxi4:start" ; logMsg(debugMessage); app = new ActiveXComponent("Word.Application"); debugMessage = "Debug:chengxi4:new ActiveXComponent" ; logMsg(debugMessage); app.setProperty("Visible", false); Dispatch docs = app.getProperty("Documents").toDispatch(); Dispatch doc = Dispatch.call(docs,// "Open", // docFilename,// FileName false,// ConfirmConversions true // ReadOnly ).toDispatch();
2.We use the following code to generate a new contract document version,but did not success.
public void addAtta(){ //1. get document version DocumentVersionIBeanImpl docVersionBean = (DocumentVersionIBeanImpl)doc.getDocVersions().get(0); //DocumentVersionIBeanImpl docVersionBean = null; //AssociativeCollectionIfc colli = doc.getDocVersions(); //docVersionBean = (DocumentVersionIBeanImpl) colli.create(); // AttachmentIfc attachment = docVersionBean.getDoc(); //2.create empty New Attachment AttachmentIfc newAttachment= TypeFactory.createAttachment(); //3. read file to inputstream InputStream is = null; try { is = new FileInputStream("E:\\usr\\sap\\deve_file\\0000449270.pdf"); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } //4. get ParentObjectReference ParentObjectReferenceIfc parentRef = TypeFactory.createParentObjectReference(doc); //5. set context for new attachment newAttachment.setFileData("chengxi.pdf", is, parentRef, session); //6. set new version docVersionBean.setDoc(newAttachment); } addAtta();
It only covers the last version of the file,and can not save this change.
Please help to answer the following code what the lack or what is wrong,and how to generate a new version of document in clm(SAP Sourcing) system and save.
Convert Docx to PDF and generate a new contract document version
Hi Experts,
We try to final contract document docx type conversion become PDF type,and then upload this file(PDF) to generate a new contract document version.But we encountered the following problems:
1. We use the Jacob to do the type conversion,
ActiveXComponent app = null; try { debugMessage = "Debug:chengxi4:start" ; logMsg(debugMessage); app = new ActiveXComponent("Word.Application"); debugMessage = "Debug:chengxi4: ActiveXComponent" ; logMsg(debugMessage); app.setProperty("Visible", false); Dispatch docs = app.getProperty("Documents").toDispatch(); Dispatch doc = Dispatch.call(docs,// "Open", // docFilename,// FileName false,// ConfirmConversions true // ReadOnly ).toDispatch(); // Dispatch doc = Dispatch. File tofile = new File(pdfFileName); if (tofile.exists()) { tofile.delete(); } Dispatch.call(doc,// "SaveAs", // pdfFileName, // FileName 17); Dispatch.call(doc, "Close", false);
how to pass date parameter in URL in system date format
Hi All,
I am working on a requirement where I need to pass the date parameter in URL. Where date format needs to be system default date format. How can we format date without providing specific date format.
Also, I got some post which had below example. Can you let me know what this format does.
'/analysis/report?queryGroupName=Custom-ProjectInfo&TimePeriodBeginning=', <%+%> FCI_CHARFMT(TIME_PERIOD_START_DATE),' <%+%>
'&TimePeriodBeginning_format=17&link_crumb=true'
Waiting for response.
Thanks,
Saloni
Location not in Alphabetical order
HI All,
I tried to import location using Workbook and it was successful but they do not appear in alphabetical order.
Also there is not such option to order them.
Please let me know if i am missing something.
Thanks
Kanchan
Reson behind SAP sourcing user used to get new password always for access.
Hi All .
Can some one help me for the the above topi.
Details are:
For One user SAP sourcing Refused and needs to ask a new password. Then he succeeds in accessing the system but then the day after he no longer can access andHas to ask a new password and then he can access and so and so on and so on….
Please suggest me actually where did it go wrong.
Thanks
Peeyush ranjan
Error: Vendor and Material Import tasks fail
Hi gurus.
Our CLM Vendor and Material imports tasks have been working fine until recently when we experienced the error:
Data Import Service: File: Material20150401-101647-817.xml is corrupt and cannot be imported |
We have not done changes to either CLM/PI/ERP. Please can you shed some light what's causing this error? Thanking you in advance.
Global Search SAP E Sourcing
Hi Folks,
Our Global Search is not working, any ideas.
PS: ScreenShot attached
Thanks
HM
E sourcing Monitoring and Maintenance
Hi Folks,
Is there any recommended approach by SAP for Monitoring and Maintenance of E sourcing application (cloud hosted).
Do we have any SAP documentation on this subject ?
Thanks,
HM
How can we compare collection extension values?
Business Requirement:
Collection Field (REGION) has below values:
EMEA
APAC
If duplicate values are added should error out at the time of save e.g,
EMEA
EMEA
Tried with the below document level script to error it out but is not working.
import com.sap.odp.api.ibean.common.AbsExtensionCollection.*;
geoCol = doc.getExtensionCollection("COLLGEOGRAPHY");
if (!(geoCol.size() == 0)) {
geography = geoCol.get(0);
regionNew = geography.get("REGION");
}
iter = geoCol.iterator();
while(iter.hasNext())
{
nextItem = iter.next();
region = nextItem.get("BLPREGION");
if(! (hasValue(region))) {
throw doc.createApplicationException("COLLGEOGRAPHY", "PROJERROR_REGION");
}
if (!(regionNew.equals(region))) {
throw doc.createApplicationException("COLLGEOGRAPHY", "PROJERROR_REGION");
}
}
Any idea will be appreciated.
Thanks,
Ramesh
Need to do one field as non editable once a document is moved to 'executed' phase.
Hi All,
I have a field called 'comment' in Contract document. And once the document is moved to Executed phase all the fileds becomes non editable. And since 'Comment' is free text my user wants to do it as editable even when the document is in executed phase.The phases include
1.Draft
2.Budget Owner Approval
3.Financial Approval
4.Procurement Approval
5.Approved
6.Digital Signature
7.Executed
I tried this both in post phase script as well as pre phase script and found it's not working. Please suggest your ideas. Is there any other place I need to add code.
Postphase
if (phase.equals("Executed"))
{
logMsg.setLogMessage(" Executed START ");
Logger.info(logMsg);
/************************************************************************/
//Changes done by me
comments = doc.getExtensionField("NON_DIGSIG_COMMENT").get();
logMsg.setLogMessage(" Comments are " + comments);
Logger.info(logMsg);
IapiDocumentLockManager.unlockField(session,doc,"NON_DIGSIG_COMMENT");
//Changes ended
parent = doc.getParentIBean();
if (hasValue(parent))
{
// get associated vlv value for phase
ValueListValueIBeanHomeIfc vlvHome = IBeanHomeLocator.lookup(session, ValueListValueIBeanHomeIfc.sHOME_NAME);
if (classinfo == 1004)
{// parent is Master Agreement
vlvBean = vlvHome.findUniqueByNameType("Executed Agreement",10);
} // end if classinfo == 1004
else
{
vlvBean = vlvHome.findUniqueByNameType("Executed Agreement",1);
} // end else
if (hasValue(vlvBean))
{
vlvLocalizedRef = vlvBean.getLocalizedObjectReference();
// set parent status
parObjRef = doc.getParentIBean().getObjectReference();
parentHome = IBeanHomeLocator.lookup(session, parObjRef);
parentHome.upgradeToEdit(doc.getParentIBean());
doc.getParentIBean().setStatusRef(vlvLocalizedRef);
logMsg.setLogMessage(" Parent Status updated to " + vlvLocalizedRef.getDisplayName() + " ");
Logger.info(logMsg);
parentHome.save(doc.getParentIBean());
logMsg.setLogMessage(" Parent saved ");
Logger.info(logMsg);
}
} // end if hasValue(parent)
logMsg.setLogMessage(" Executive Summary Approval END ");
Logger.info(logMsg);
}
Prephase
if (hasValue(other_phase) && hasValue(phase) && phase.equals("Approved") && other_phase.equals("Executed"))
{
logMsg.setLogMessage("Entering comment block");
Logger.info(logMsg);
//Changes by Lakshmi
comments = doc.getExtensionField("NON_DIGSIG_COMMENT").get();
logMsg.setLogMessage(" Comments are " + comments);
Logger.info(logMsg);
IapiDocumentLockManager.unlockField(session, doc, "NON_DIGSIG_COMMENT");
if (!bypassCheck)
{
ae.chainAtEnd(doc.createApplicationException("NON_DIGSIG", "zclm.contractdocument.advancetoexecutedfromapproved"));
}
} // end if (hasValue(other_phase) && hasValue(phase) && phase.equals("Approved") && other_phase.equals("Executed"))
/******************************************************************************************************************/
//Block added my me
if (hasValue(other_phase) && hasValue(phase) && phase.equals("Digital Signature") && other_phase.equals("Executed"))
{
logMsg.setLogMessage("Entering comment block");
Logger.info(logMsg);
comments = doc.getExtensionField("NON_DIGSIG_COMMENT").get();
logMsg.setLogMessage(" Comments are " + comments);
Logger.info(logMsg);
IapiDocumentLockManager.unlockField(session, doc, "NON_DIGSIG_COMMENT");
}
Master Agreement Validate Script
Dear Team,
Do we have any method that can be used in Master Agreement Validate Script to capture the action, once Delete document button is hit in Master Agreement.
Thanks,
Rajesh
Some Key thing required for knowledge perpose.
HI All
Can some one help me fr the following topic related to CLM mentioned below.
- Project Management capabilities
- Robust RFI / RFP / Auction capabilities
- Contract authoring capabilities
- Integration with SPM (Spend Performance Management)
Thanks
Peeyush Ranjan
Configure master data element sync between ECC and SAP CLM
Hi,
Please suggest me for the above topic that how I will do. It is very urgent to understand for me as I am New to SAP Sourcing and CLM.
Please response me imideately.
Thanks
Peeyush ranjan
Regarding SAP Note 175547
Can some one tell how to use the above note for modification in ECC,and where to use .
Differance between SRM contracts and Sourcing CLM
Hi
Please provice me the clear picture fro the above request .
If possible please provide me an example.
Thanks
Peeyush Ranjan
Selective impersonation?
Hello experts-
We have found many potential benefits of the buy-side impersonation feature for functional power users in non-prod environments of ESO such as quick troubleshooting, etc. But there is one glaring problem with it-- a non-administrator is able to their permissions by impersonating an administrator.
Is there a way to control the visibility of or disable the "Log on as this user" button according to the user that is being viewed on the User Setup form via scripting or some other way? (To clarify, I'm not talking about basing the ability to do it off the current logged on user-- I know how to do that.)
So basically, it would be the best of all worlds, if we could have a script that would check if the user being displayed is a member of "ESO Administrators" and then not allow impersonation of that user, but allow it for any other non-administrator user that may be displayed.
I've thought of making a custom button and simply hiding the standard one. I think this would be fine, but I haven't figured out how to impersonate a user through script yet... If someone could point me at the correct IAPI object to do this, I'd appreciate it.
If any ideas, please let me know. Thanks in advance.
Mike
Exception on iBeanHome.find() in the prescript of workflow
Hi Experts,
I am developing workflow for Contract Document. The prescript get the endorser from the extension collection and try to get the iBean from iBeanHome.find() method. I got exception on the 'iBeanHome.find()' from the following code.
endorserHome = IBeanHomeLocator.lookup(session, endorser); endorserBean = endorserHome.find(endorser);
The exception ocuured from 'endorserBean = endorserHome.find(endorser);'. I have no ide how to solve this. Could you please advise.
Below is the stack trace.
Facility=local4;sessionid=odp_event_workflow_engine;tenantid=#system#;username=daemon;exception=com.sap.odp.api.common.exception.ApplicationException: You cannot view the document because you do not have sufficient permissions. Contact the document owner to request access to it.;stacktrace=ValidatingParent=-2147483346:104:Noppong Jinbunluphol - com.sap.odp.api.common.exception.ApplicationException: You cannot view the document because you do not have sufficient permissions. Contact the document owner to request access to it.
Facility=local4;sessionid=odp_event_workflow_engine;tenantid=#context.gemsclm#;username=daemon;exception=Sourced file: inline evaluation of: ``import com.sap.odp.api.common.exception.*; import com.sap.odp.api.common.log.*; . . . '' : Method Invocation endorserHome.find : at Line: 25 : in file: inline evaluation of: ``import com.sap.odp.api.common.exception.*; import com.sap.odp.api.common.log.*; . . . '' : endorserHome .find ( endorser ) Called from method: wfApprove : at Line: 90 : in file: inline evaluation of: ``import com.sap.odp.api.common.exception.*; import com.sap.odp.api.common.log.*; . . . '' : wfApprove ( endorser ) Target exception: com.sap.odp.api.common.exception.ApplicationException: You cannot view the document because you do not have sufficient permissions. Contact the document owner to request access to it. ;stacktrace=Sourced file: inline evaluation of: ``import com.sap.odp.api.common.exception.*; import com.sap.odp.api.common.log.*; . . . '' : Method Invocation endorserHome.find : at Line: 25 : in file: inline evaluation of: ``import com.sap.odp.api.common.exception.*; import com.sap.odp.api.common.log.*; . . . '' : endorserHome .find ( endorser ) Called from method: wfApprove : at Line: 90 : in file: inline evaluation of: ``import com.sap.odp.api.common.exception.*; import com.sap.odp.api.common.log.*; . . . '' : wfApprove ( endorser ) Target exception: com.sap.odp.api.common.exception.ApplicationException: You cannot view the document because you do not have sufficient permissions. Contact the document owner to request access to it.
Noppong Jinbunluphol,
Thank you in advance
How to Hide Form Library under Enterprise Sourcing Menu
Hi Experts,
I am using SAP Sourcing 10.0 and trying to hide the option " Form Library" in Buyside portal which appears under
Enterprise Sourcing-->Library--> Form Library (Attached)
I tried it via Toolbar Customization; however this particular Library section is dynamic hence no action ID present. (See Attached)
Please provide your guidance. What toolbar customization ID can be used for it? or Any other way?
Thanks
Dhananjay
SAP SRM main topics
hi
I want to learn SAP SRM, can anybody tell me about the basic as well as main topics in SRM