How to use fnd_webattch.add_attachment API to attach document to an invoice?

I am trying to use fnd_webattch.add_attachment API to attach document to an invoice.
But the program seems successfully loaded  the attachment to Invoice. But when I try to open the attachment from UI, I got ORA-01403 no data found screen.
Don’t know what’s worng with code, Can someone help?
My pdf file is locate  at app  and DB servers.
Here is my sql program,
set feedback off
set verify off
set serveroutput on size 100000
set autocommit off
Declare
v_category_id              NUMBER;
v_attached_doc_id          NUMBER;
v_invoice_id               NUMBER :=2814131;
v_invoice_image_url        VARCHAR2(500) := NULL;
v_function_name            VARCHAR2(50)   := 'APXINWKB';
v_category_name            VARCHAR2(100) := 'CUSTOM291';
v_description              VARCHAR2(300) := 'Test script for attaching OB10 scanned image file to AP invoice';
v_entity_name              VARCHAR2(100) := 'AP_INVOICES';
v_file_name                VARCHAR2(100) := '/tmp/AMKOR_PRD_0000577922_20130712-151504.pdf';
v_user_id                  NUMBER               := 1234;
TYPE result_set_type IS REF CURSOR;
v_result_set_curr           result_set_type;
CURSOR  cur_cat_id
IS
    SELECT     fdc.category_id
    FROM       fnd_document_categories fdc
    WHERE      fdc.name  =  v_category_name;
BEGIN
     OPEN cur_cat_id;
     FETCH cur_cat_id INTO v_category_id;
     CLOSE cur_cat_id;
         -- Invoke the fnd_webattach api for attaching the file to the invoice
        fnd_webattch.add_attachment ( seq_num                   => 100
                                     ,category_id               => v_category_id
                                     ,document_description      => v_description
                                     ,datatype_id               => 6
                                     ,text                      => NULL
                                     ,file_name                 => v_file_name
                                     ,url                       => v_invoice_image_url
                                     ,function_name             => v_function_name
                                     ,entity_name               => v_entity_name
                                     ,pk1_value                 => v_invoice_id
                                     ,pk2_value                 => NULL
                                     ,pk3_value                 => NULL
                                     ,pk4_value                 => NULL
                                     ,pk5_value                 => NULL
                                     ,media_id                  => NULL
                                     ,user_id                   => v_user_id
                                     ,usage_type                => 'O'
        SELECT    count(fad.attached_document_id)
        INTO      v_attached_doc_id
        FROM      fnd_attached_documents fad
        WHERE     fad.pk1_value = v_invoice_id;
        IF  v_attached_doc_id > 0
        THEN
          DBMS_OUTPUT.PUT_LINE('Attached sucessfully');
        ELSE
          DBMS_OUTPUT.PUT_LINE('Failed to Link the Attacment.');
        END IF; --IF  v_attached_doc_id > 0

Hi Hussein,
Yes. I got "Attached Successfully" message at the end.
Don't know why it didn't created FND_LOBS record for it.
My sql was copied from the reference on your reply.
Thanks,
Florence

Similar Messages

  • How to trigger xml publisher API (ex:Delivering Documents via e-Mail)?

    Dear All:
    How to use xml publisher API ?
    In user's guide always talk API's code.(ex:Delivering Documents via e-Mail
    // create delivery manager instance
    DeliveryManager dm = new DeliveryManager();
    // create a delivery request
    DeliveryRequest req =
    dm.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
    // set email subject
    req.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT, "Invoice");
    // set SMTP server host
    req.addProperty(
    DeliveryPropertyDefinitions.SMTP_HOST, "mysmtphost");
    // set the sender email address
    req.addProperty(DeliveryPropertyDefinitions.SMTP_FROM,
    "[email protected]");
    // set the destination email address
    req.addProperty(
    DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS,
    "[email protected], [email protected]" );
    // set the content type of the email body
    req.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE,
    "text/html");
    // set the document file name appeared in the email
    req.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME,
    "body.html");
    // set the document to deliver
    req.setDocument("/document/invoice.html");
    // submit the request
    req.submit();
    // close the request
    req.close(); )
    Not say how to use this code to account effect !!
    Having anybody to use API before?
    Please tell me how to use that,thanks!!
    BY Emily_ye

    Hi Emily
    I had the same question. After much research and a lot of deduction I produced the following:
    import oracle.apps.fnd.cp.request.*;
    import java.io.*;
    import java.sql.*;
    import java.util.Vector;
    import oracle.apps.fnd.util.*;
    import oracle.apps.xdo.XDOException;
    import oracle.apps.xdo.common.pdf.util.PDFDocMerger;
    import oracle.apps.xdo.delivery.DeliveryException;
    import oracle.apps.xdo.delivery.DeliveryManager;
    import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
    import oracle.apps.xdo.delivery.DeliveryRequest;
    import oracle.jdbc.driver.OracleCallableStatement;
    public class RunTravProgram implements JavaConcurrentProgram {
    CpContext mCtx; // global reference to concurrent program context
    LogFile logFile; // global reference to context logfile
    OutFile outFile; // global reference to context outfile
    Connection mConn = null;
    ReqCompletion lRC;
    //File Separator
    private String mFileSeparator;
    // globals for template
    String XDOAppShortName = "";
    String XDOtemplateCode = "";
    // hard-wired constants for template addition
    final String XDOLanguage = "en";
    final String XDOTerritory = "US";
    final String XDOFinal_format = "PDF";
    final String XDOtemplateType = "TEMPLATE_SOURCE";
    String PDFFile = "";
    String outFilePath = "";
    String progShortName = "";
    String progDesc = "";
    Integer iRequestID = 0;
    String sWatermark = ""; // watermark text
    String emailAddress = ""; // Not Implemented
    String emailServer = "";
    public static final String M_SUCCESS = "SUCCESS";
    public static final String M_ERROR = "ERROR";
    public static final String M_WARNING = "WARNING";
    * Create a Java FND ConcurrentRequest objec to call fnd_request.submit_request
    * The first three parameters are:
    * Application Short Name -- Application Short name (ie. WAHC)
    * Current Program Short Name -- Concurrent Program being called
    * Current Program Description -- description for above
    * These should be the first three parameters passed by the concurrent
    * program in this order. The next two are constants set to null
    * These are followed by the parameters passed by the first concurrent
    * program that are being passed to the next concurrent program.
    * I am limiting the parameter list to ten for now.
    // Dynamic PLSQL statement used to get a concurrent request completion status
    // This is necessary because the java class does not provide this method :-(
    String mGetCompleteStatus =
    "DECLARE R_VAL BOOLEAN; " + "b_phase VARCHAR2 (80) := NULL; " +
    "b_status VARCHAR2 (80) := NULL; " +
    "b_dev_phase VARCHAR2 (80) := NULL; " +
    "b_dev_status VARCHAR2 (80) := NULL; " +
    "b_message VARCHAR2 (240) := NULL; " + "BEGIN " +
    "r_val := fnd_concurrent.wait_for_request (:1,5,1000," +
    "b_phase,b_status,b_dev_phase,b_dev_status,b_message); " +
    ":2 := b_phase; " + ":3 := b_status; " + ":4 := b_message; " + "end;";
    public RunTravProgram() {
    // no constructor necessary for now
    * Concurrent Processing provides an interface 'JavaConcurrentProgram' with abstract method
    * runProgram() which passes the concurrent processing context 'CpContext'. The concurrent
    * program developer will implement all of their business logic for a concurrent program in
    * runProgram(). The main() method, implemented by AOL, will call runProgram() after
    * performing all of the required initialization for the concurrent program, including
    * establishing a database connection, initializing the required contexts, and setting up
    * the log and output files. CpContext will have the request specific log and output
    * file input methods
    public void runProgram(CpContext pCpContext) {
    mCtx = pCpContext;
    OracleCallableStatement lStmt = null;
    boolean bCompletion = true;
    String sPhase = "";
    String sStatus = "";
    String sMessage = "";
    //get handle on request completion object for reporting status
    lRC = pCpContext.getReqCompletion();
    // assign logfile
    logFile = pCpContext.getLogFile();
    // assign outfile
    outFile = pCpContext.getOutFile();
    // assign fileseparator
    mFileSeparator = getFileSeparator();
    // get the JDBC connection object
    mConn = pCpContext.getJDBCConnection();
    outFilePath =
    ((new File(outFile.getFileName())).getParent() == null ? "" :
    (new File(outFile.getFileName())).getParent() +
    mFileSeparator);
    logFile.writeln("OutFile File Path: -> " + outFilePath, 0);
    // get parameter list object from CpContext
    // these come from the concurrent program
    ParameterList lPara = pCpContext.getParameterList();
    // create a temporary array and retrieve the parameters created by
    // the program. Currently limiting the number of parameters to 10 for now
    String pvals[] = new String[10];
    int pcount = 0;
    while (lPara.hasMoreElements()) {
    NameValueType aNVT = lPara.nextParameter();
    pvals[pcount] = aNVT.getValue();
    pcount++;
    if (pcount > 9)
    break;
    // send parameter values to the log file
    logFile.writeln("Arg 1: APPL_SHORT_NAME -> " + pvals[0], 0);
    logFile.writeln("Arg 2: CURR_PROG_SHORT_NAME -> " + pvals[1], 0);
    logFile.writeln("Arg 3: CURR_PROG_DESCRIPTION -> " + pvals[2], 0);
    logFile.writeln("Arg 4: TEMPLATE_CODE -> " + pvals[3], 0);
    logFile.writeln("Arg 5: P_PLANT_CODE -> " + pvals[4], 0);
    logFile.writeln("Arg 6: P_BATCH_NO -> " + pvals[5], 0);
    logFile.writeln("Arg 7: P_SHOW_PROMISE -> " + pvals[6], 0);
    logFile.writeln("Arg 8: P_WATERMARK -> " + pvals[7], 0);
    XDOtemplateCode = pvals[3]; // store the template name globally
    progShortName = pvals[1]; // store the program short name globally
    XDOAppShortName = pvals[0]; // store the application short name
    sWatermark = pvals[7]; // store the watermark globally
    progDesc = pvals[2];
    try {
    // create a concurrent request object
    ConcurrentRequest cr = new ConcurrentRequest(mConn);
    // use the parameters to call fnd_request.submit_request
    cr.addLayout(XDOAppShortName, XDOtemplateCode, XDOLanguage,
    XDOTerritory, XDOFinal_format);
    Vector param = new Vector();
    param.add(pvals[4]); // plant code
    param.add(pvals[5]); // batch ID
    param.add(pvals[6]); // Show SO info flag
    iRequestID =
    cr.submitRequest(XDOAppShortName, progShortName, progDesc,
    null, false, param);
    mConn.commit();
    // send the request ID to the log file
    logFile.writeln("-- Request ID: ->" + Integer.toString(iRequestID),
    0);
    // call fnd_concurrent.wait_for_request to wait until the request
    // has ended - use this to check the request status before proceeding
    lStmt =
    (OracleCallableStatement)mConn.prepareCall(mGetCompleteStatus);
    lStmt.setInt(1, iRequestID);
    lStmt.registerOutParameter(2, java.sql.Types.VARCHAR, 0, 255);
    lStmt.registerOutParameter(3, java.sql.Types.VARCHAR, 0, 255);
    lStmt.registerOutParameter(4, java.sql.Types.VARCHAR, 0, 255);
    lStmt.execute();
    // get the results of the completion
    sPhase = lStmt.getString(2);
    sStatus = lStmt.getString(3);
    sMessage = lStmt.getString(4);
    lStmt.close();
    // send the results of the request processing to the log file
    logFile.writeln("-- Phase: -> " + sPhase, 0);
    logFile.writeln("-- Status: -> " + sStatus, 0);
    logFile.writeln("-- Message: -> " + sMessage, 0);
    // test here to make sure it completed correctly
    if (sPhase.equals("Completed") && sStatus.equals("Normal")) {
    // construct the PDF file name generated by the called request
    PDFFile = progShortName + "_" + iRequestID + "_1.pdf";
    // add a watermark to the generated PDF
    // create an output stream for the existing PDF
    // and set ouput to append
    OutputStream pdfout =
    new FileOutputStream(outFilePath + PDFFile, true);
    // create an inputstream array (required by calling method)
    InputStream pdfin[] = new InputStream[1];
    pdfin[0] = new FileInputStream(outFilePath + PDFFile);
    // add the watermark passed as a parameter
    bCompletion = addWatermark(pdfin, pdfout);
    // assign the modified file to the context out
    // this will print using this request
    if (bCompletion)
    outFile.setOutFile(outFilePath + PDFFile);
    // release the connection object
    // and set the completion status for the request
    if (bCompletion) {
    pCpContext.getReqCompletion().setCompletion(ReqCompletion.NORMAL,
    } else {
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } catch (SQLException s) {
    logFile.writeln("SQL Error: Exception thrown w/ error message: " +
    s.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } catch (IOException ioe) {
    logFile.writeln("IO Error: Exception thrown w/ error message: " +
    ioe.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } catch (Exception e) {
    logFile.writeln("General Exception: " + e.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } finally {
    try {
    if (lStmt != null)
    lStmt.close();
    pCpContext.releaseJDBCConnection();
    } catch (SQLException e) {
    logFile.writeln(e.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    * addWatermark()
    * @param pdfin
    * @param pdfout
    * @return boolean
    * This method will work for an existing document or a newly generated
    * one. Set the outputstream append flag to false for a new document
    * and true for an existing one.
    * NOTE: PDFDocMerger requires an inputstream array even if it only
    * contains one document.
    private boolean addWatermark(InputStream[] pdfin, OutputStream pdfout) {
    if (!sWatermark.equals("")) {
    try {
    PDFDocMerger docMerger = new PDFDocMerger(pdfin, pdfout);
    //docMerger.setTextDefaultWatermark(sWatermark);
    docMerger.setTextWatermark(sWatermark, 80f, 50f);
    docMerger.setTextWatermarkAngle(25);
    docMerger.setTextWatermarkColor(1.0f, .50f, .50f);
    docMerger.setTextWatermarkFont("Garamond", 100);
    docMerger.process();
    docMerger = null;
    return true;
    } catch (XDOException e) {
    logFile.writeln("Watermark process Failed: " + e.getMessage(),
    0);
    return false;
    return true;
    * Returns the file separator
    private String getFileSeparator() {
    return (System.getProperty("file.separator"));
    * EBSEmailDelivery
    * @return
    * Just for testing right now.
    private boolean EBSEmailDelivery() {
    if (!emailAddress.equals("")) {
    try {
    // create delivery manager instance
    DeliveryManager delMgr = new DeliveryManager();
    // create a delivery request
    DeliveryRequest delReq =
    delMgr.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
    // set email subject
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT,
    "EBS Report:" + progDesc +
    " for request: " + iRequestID);
    // set SMTP server host
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_HOST,
    emailServer); // need to supply the email smtp server
    // set the sender email address
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_FROM,
    emailAddress);
    // set the destination email address
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS,
    emailAddress);
    // set the content type of the email body
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE,
    "application/pdf");
    // set the document file name appeared in the email
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME,
    PDFFile);
    // set the document to deliver
    delReq.setDocument(outFilePath + PDFFile);
    // submit the request
    delReq.submit();
    // close the request
    delReq.close();
    return true;
    } catch (DeliveryException de) {
    logFile.writeln("email process Failed: " + de.getMessage(), 0);
    return false;
    return true;
    This is the class for a JCP I created to perform the following:
    1) Launch an existing Concurrent Program that produces PDF output
    2) Grab the PDF and apply a watermark based on user input or conditions
    3) associate the modified PDF to CP output for PASTA printing
    It isn't elegant but it is fairly simple. I added the email capability and tested it but am not implementing it at the present time.
    there is a fair amount of information out there that explains how to create a JCP councurrent program but very little that demonstrates the class needed.
    I hope this helps

  • How do I save and manipulate an attached document through gmail?

    How do I save and manipulate an attached document through gmail on my iPhone?

    I had a client that had hundreds of session variables
    scattered in hundreds of CF pages. There was very little CFLOCKing,
    and consequently the apps were quite unstable in a loaded
    environment.
    What I finally did was to copy the session scope variables to
    ses.request scope variables of the same name, then did a global
    replace of session. with ses.request. In OnRequestEnd.cfm, and
    immediately before all CFLOCATIONs, I copied ths ses.request scope
    back to session scope (locked, of course). There was no measurable
    performance hit, and the apps were rock solid.
    Perhaps you could copy your client variables to session
    scope; then back again in OnRequestEnd.cfm

  • How to use external Java API in Java Embedd inside BPEL

    How to use external classes inside the BPEL in Java Embed Activity ? Any sample code availble ? Like i want to use log4j API inside BPEL.

    No you dont have to change your startManagedServer.cmd/.sh everytime you need to have a Java Embedding activity. You only need it in case of using Log4J. As log4j requires a configuration xml viz log4j.debug.xml and log4j.dtd you need to let the soa managed server know about it. The best way to load this configuration files is using the JAVA_OPTIONS command during server startup.
    Hope the explanation helps.

  • How to use the windows API GetCaretPos with FireFox? It works with IE

    I want to get caret position from a windows desktop application using the Windows API GetCaretPos. It works in any windows Application and in IE. It worked also in FireFox for some minutes in version 3.6.8 but than it stopped working. Can anyone tell me how to make it work?
    == This happened ==
    Every time Firefox opened

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Did this fix your problems? Please report back to us!

  • How to use Google weather API in flex?

    Hi there,
    I have 2 services.
    ServiceONE : http://api.locationservice.com/city/key=123abc
    ServiceTWO: http://www.google.co.in/ig/api?weather='anyCityName'
    I am using HTTPService for both. Firstly I fetch result which gives me city name, by sending ServiceONE. And then, I am assigning this city name to SericeTWO and sending it, which gives me weather details about that city.
    I am hosting my applicaition on some server, http://www.somethirdpartyserver.com/myaccount/myflexstuff/MyWeatherApplication.html
    Since it tries to access http://api.locationservice.com/city/key=123abc and http://www.google.co.in/ig/api?weather='anyCityName', I would need to have crossdomain.xml in them.
    Fortunately I could find http://api.locationservice.com/crossdomain.xml, which has:
    <?xml  version="1.0" ?>
    <!DOCTYPE  cross-domain-policy (View Source for full doctype...)>
    - <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all" />
    <allow-access-from domain="*" secure="true" />
    <allow-http-request-headers-from domain="*" headers="*" secure="true" />
    </cross-domain-policy>
    Which mean, any server can access it.
    But unfortunately, I couldnot find something similar in http://www.google.co.in/crossdomain.xml. Though xml is there, the code is different:
    <?xml  version="1.0" ?>
    <!DOCTYPE  cross-domain-policy (View Source for full doctype...)>
    - <cross-domain-policy>
    <site-control permitted-cross-domain-policies="by-content-type" />
    </cross-domain-policy>
    It doesn't allow any access to any domain.....
    I've already developed the weather gadget in flex but I cant host it for use anywhere, because of this security issue
    Can anyone kindly help me how can this be resolved?>?
    -Deepak

    @ PaulH
    Yes, after few more searches I came across php proxy solution. I should have checked about availablity of crossdomain file in the root of the api, which I didn't and started off with the development.
    For now I'll use this php proxy and use Google weather api. And yes, as you said, it's not official. Can get changed\removed, which will surely affect my code.
    Thanks for http://www.worldweatheronline.com/, may be I'll try to implement it with this api soon and make my app completely stable!
    Came across another great api for weather which too has crossdomain! http://www.wunderground.com
    I've uploaded the widget right here: http://deepflex.blogspot.com/2011/03/weather-widget.html
    @alexsliced
    Adobe Flex is a software development kit (SDK) released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Flex applications can be written using Adobe Flash Builder or by using the freely available Flex compiler from Adobe.
    You can find more about it here:
    http://flex.org/what-is-flex
    http://en.wikipedia.org/wiki/Adobe_Flex

  • HOW TO USE JAVA OWB API

    I'm sorry for my English.
    I try to use java owb api to execute process flow of my owb project from my web application. I use oracle 11g.
    I have found only this thread about use of owb api (https://kr.forums.oracle.com/forums/thread.jspa?threadID=248256&tstart=0).
    I can establish a connection, obtain the project, process flow or mapping object but i can't understand how to run it.
    Help me please
    Stefano

    > JMX and instrumentation are quite different things.
    Not that I know a great deal about either, but this is from the API:
    "Provides services that allow Java programming language agents to instrument programs running on the JVM."
    And this is from the overview I linked:
    "The Java virtual machine (JVM) is instrumented for monitoring and management, providing built-in ("out-of-the-box") management capabilities for for both remote and local access."
    That sounds at least superficially similar to me. I'll do more research when I have the time/need. Thanks for pointing it out, though.
    ~

  • How to use WebCenter REST API to like or comment a activity

    Hi all
    I want to know how to realize like or comment function with REST APIs.
    I execute a REST call with following url, but the 'like' counter is not be increased.
    http://cdcjp77vm3.cn.oracle.com:8888/rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/(s2518c69b_1989_4a63_8886_c32075c76b9c)/likes?&utoken=FDNA-Z7ekZuPnVSNoPWOqTJ2IzAE_w**
    Is there anything i missed?
    Can anyone give me an example about how to use this API to like or comment a activity?
    Thanks
    Qian

    So Qian;
    looking through the code this is how you can
    Post a comment (POST)
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    {key:val}
    {text:'this is my comment)
    Edit a comment (PUT)
    So I haven't tried it but it should do the trick.. although I don't see update under capabilities so you may get blocked.
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
        id: {commentId},
        text: 'changed my comment.. magic'
    Delete a comment (DELETE)
    /rest/api/activities/services/{serviceId}/objectTypes/groupSpace/objects/({objectId})/comments/{commentId}?utoken=blah
    Like POST
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/likes?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    I passed it an empty object {} seemed to work for me.
    Unlike (DELETE)
    /rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/({objectId})/likes/({likeId})?utoken=blah
    Let me know if this works for you

  • How to use the UME api in order to search the LDAP?

    Hello,
    I have an application which connects to the LDAP the portal is connecting to and search users according to a certain search criteria.
    Here is the relevant piece of code:
    Hashtable env = new Hashtable();
    DirContext ctx = new InitialDirContext(env);
    SearchControls controls = new SearchControls();
    String filter = "firstName=..."
    NamingEnumeration results = ctx.search("OU=OUs", filter, controls);
    I would like to do this same search using the UME API.
    Can someone please show me the equivalent code to it using the UME API?

    Hi Roy,
    you find the Configuration File you are using in your portal via System Administration -> System Configuration -> UM Configuration -> Data Sources
    or in sapume.properties where you can find
    ##xml file that configures the persistence except roles
    ume.persistence.data_source_configuration=YOUR_DATASOURCE_CONFIG_FILE.xml
    In this xml file, there is the entry
    <principal type="user">:
    <principal type="user">
         <nameSpaces>
         <nameSpace name="com.sap.security.core.usermanagement">     
    <attributes>                               
    <attribute name="firstname" populateInitially="true"/><attribute name="displayname" populateInitially="true"/>               <attribute name="lastname" populateInitially="true"/>                    <attribute name="fax"/>                         <attribute name="email"/>                    <attribute name="title"/>               <attribute name="department"/>                    <attribute name="extensionAttribute2"/>               <attribute name="mobile"/>          <attribute name="telephone"/>                    <attribute name="streetaddress"/>               <attribute name="pobox"/>                    <attribute name="location"/>               <attribute name="telephoneShort"/>               </attributes>
         </nameSpace>
         <nameSpace name="com.sap.security.core.usermanagement.relation">
         <attributes>
         <attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE"/>
         </attributes>
         </nameSpace>
        </nameSpaces>
    </principal>
    According to your company LDAP attributes, you will have to extend the above attributes, telephoneShort for example is an attribute within our company.
    The UME API does the rest.
    All you have to do, is request the right attribute (in my above example it was the last name).
    (Sorry for the format, but it is quite cumbersome to format it properly with the available editor   )
    Kind regards,
    Rebecca

  • How to use search REST api to get custom managed property data for anonymous user?

     
    I am trying build a public portal with anonymous access and i am trying to read some
    content from custom managed property using search REST api in sharepoint 2013. I have tried to enable all possible attributes of the managed prop. Like searchable,queryable,safe etc. also i am including queryparametertemplate in my REST api search query. But
    still i am not able to retrieve the managed prop. For an anonymous user. The same query returns the value if i am logged in.
    Any Help is greatly appreciated. 
    Thanks,
    Rakesh
    Thanks, Rakesh

    Hi Rakesh,
    To enable anonymous Search REST queries, we need to create queryparametertemplate.xml and upload it to the correct library in SharePoint.
    From your description I can know that you have created the file, then I recommend to check the things below:
    Please use “QueryTemplatePropertiesUrl” instead of “queryparametertemplate” in the Search REST API query as following: &QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml'.
    Make sure that the Query Properties you need have been added to the QueryProperties element in the queryparametertemplate.xml file.
    Make sure that the query parameters you need have been added to the WhiteList element in the
    queryparametertemplate.xml file. For example, if you want to use Refiners in the REST API, then the Refiners should be added to the
    WhiteList element in the queryparametertemplate.xml file as following:
    <a:string>Refiners</a:string>.
    You can also debug setting properties in anonymous Search Rest queries following the link below:
    http://www.mavention.com/blog/debugging-setting-properties-anonymous-search-rest-queries
    More references about anonymous Search REST:
    http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/
    http://msdn.microsoft.com/en-us/library/office/jj163876%28v=office.15%29.aspx#bk_AnonymousREST
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • How to use OE_ORDER_PUB.PROCESS_ORDER API for serial controlled items?

    Hi Guys
    We are using OE_ORDER_PUB.PROCESS_ORDER API with a custom application (R12 12.0.4/12.0.6) for booking sales orders. Right now we don't have serial controlled items, however pretty soon, we will launch medical equipment sales for which we have to start using serial controlled items.
    Anybody has a sample script for the API dealing with serial controlled items?
    Regards,
    Raj

    What kind of serial number related information do you capture during order creation?
    Most businesses either generate serial numbers at the time of Sales order issue OR at wip completion.
    Sometimes a serial number is generated at WIP assembly begin.
    In any case, as long as you don't ALLOCATE serial numbers to a sales order at the time of entry or booking or reservation, you won't need to worry about serial# for oe_order_pub.
    The serial# will come into picture for RMA processing. For that, you can use l_lot_serial_tbl_out oe_order_pub.lot_serial_tbl_type in the oe_order_pub. This will let you record the serial number for the product that is being returned.
    Sandeep Gandhi

  • How to use the crypto api with gemalto cyberflex 32k ?

    Hello ,
    I've done many javacard programs using this method :
    _compilation with javacard kit 2.2.1
    _convertion into ".cap"  with the javacard kit 2.1.2
    All this programs work fine with this method : helloworld, read, write in the card, ....
    But when i want to use the crypto api, i can't charge the program in the card (just by adding 2 lines for generating keys):
    ----------> returns 0x80206A80 (6A80: Wrong data / Incorrect values i data.)
    I think it's because i use the 2.1.2 version , but if i use the 2.2.1 to convert , it's another error and no program work with this method.....even helloworld doesn't work...
    -----------> returns 0x80206985 (6985: Command not allowed - Conditions of use not satisfied.)
    I thing i must change my gpshel command , but i have read many forums but can't find the configuration for my card cyberflex 32k, some people had similar problems so they used the kit 2.1.2 combined with 2.2.1 like me, but i think they can't use the crypto api with this.........
    Any help will be apreciated,
    kind regards
    Franck
    Edited by: jojo85 on Mar 20, 2009 11:03 AM

    Hello,
    Thanks Sonnyyu,
    I deleted my gpshell 1.4.2 directory and i installed gpshell 1.4.0 instead like they said , to avoid some bugs
    i've tested the exemple CardEdgeII.ijc ,
    here's what i got:
    mode_201
    enable_trace
    establish_context
    card_connect -readerNumber 1
    select -AID a0000000030000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
    delete -AID A0000003230101
    delete -AID A00000032301
    delete -AID A00000000101
    delete -AID A000000001mode_201
    enable_trace
    establish_context
    card_connect -readerNumber 1
    select -AID a0000000030000
    Command --> 00A4040007A0000000030000
    Wrapped command --> 00A4040007A0000000030000
    Response <-- 6F188407A0000000030000A50D9F6E060011020201009F6501FF9000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
    Command --> 8050000008674672AE4B85E01800
    Wrapped command --> 8050000008674672AE4B85E01800
    Response <-- 000081410002B2C600E4010151982BB4CF843B1431E57DB6418652AE9000
    Command --> 848201001073CF9B92B3F11E10BE12D1318E9A8095
    Wrapped command --> 848201001073CF9B92B3F11E10BE12D1318E9A8095
    Response <-- 9000
    delete -AID A0000003230101
    Command --> 80E40000094F07A000000323010100
    Wrapped command --> 84E40000114F07A000000323010149D51E784E07966B00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID A00000032301
    Command --> 80E40000084F06A0000003230100
    Wrapped command --> 84E40000104F06A00000032301E3788AF4A9E32C2100
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID A00000000101
    Command --> 80E40000084F06A0000000010100
    Wrapped command --> 84E40000104F06A00000000101C3CC96E6E54AF0ED00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID A000000001
    Command --> 80E40000074F05A00000000100
    Wrapped command --> 84E400000F4F05A000000001DA73D168B218692C00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2
    install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2
    Command --> 80E602001705A00000000107A00000000300000006EF04C60231000000
    Wrapped command --> 84E602001F05A00000000107A00000000300000006EF04C60231000019F52839EB52A80200
    Response <-- 009000
    Command --> 80E80000EFC48230F401000FDECAFFED010204000105A00000000102001F000F001F000A00290256006C2307000A04230000067F00060000000004010004002904000107A0000000620101010107A0000000620102010107A0000000620201000107A000000062000103000A0106A0000000010119CE06006C00800313000C040400051856FFFF1BA41A2A17FB1818183718A61971008300020001011100001E4F1EC51F771F9A1FA71FAC1FB31FBC1FCD1FF41FFD20082043204B205520662071008300030001010D0000209520B520C520D52101211C21742196221F2230226F227D22E1072307000640188C00861803880010
    Wrapped command --> 84E80000F7C48230F401000FDECAFFED010204000105A00000000102001F000F001F000A00290256006C2307000A04230000067F00060000000004010004002904000107A0000000620101010107A0000000620102010107A0000000620201000107A000000062000103000A0106A0000000010119CE06006C00800313000C040400051856FFFF1BA41A2A17FB1818183718A61971008300020001011100001E4F1EC51F771F9A1FA71FAC1FB31FBC1FCD1FF41FFD20082043204B205520662071008300030001010D0000209520B520C520D52101211C21742196221F2230226F227D22E1072307000640188C00861803880010C9DE1DD3FD6CD8CE
    Response <-- 9000
    Command --> 80E80001EF08900B7F001C7B001C03104D387B001C041075387B001C051073387B001C061063387B001C07106C387B001C081065387B001C10061030387B001C1007103038187B001C037B001C925B8C004D6108119CFF8D005318100891008087011810089100808702AD02038F00803D0610108C002037AD020324940000807B001C037B001C925B8B002A7A05361A0525321A062529071F62071F10086C08119C108D00531607610EAD021F24940000802804700CAD011F2494000080280415046708119C108D0053031A07258D002E2905198B003016056A081167008D00531605076D08119C0F8D00531A08252906160504
    Wrapped command --> 84E80001F708900B7F001C7B001C03104D387B001C041075387B001C051073387B001C061063387B001C07106C387B001C081065387B001C10061030387B001C1007103038187B001C037B001C925B8C004D6108119CFF8D005318100891008087011810089100808702AD02038F00803D0610108C002037AD020324940000807B001C037B001C925B8B002A7A05361A0525321A062529071F62071F10086C08119C108D00531607610EAD021F24940000802804700CAD011F2494000080280415046708119C108D0053031A07258D002E2905198B003016056A081167008D00531605076D08119C0F8D00531A082529061605045F95980396338536
    Response <-- 9000
    °
    °
    °
    there are again many lines and the response is always 9000
    i'll try to find a converter to convert the .cap files of my crypto application into .ijc files
    thanks,
    kind regards
    Franck
    Edited by: jojo85 on Mar 21, 2009 2:48 PM

  • How to use Java Mail API in Unix

    I am trying to write some code using Java mail API. I want to execute it in Unix. I downloaded the mail API to windows machine and ftped the mail.jar file to a Unix machine. Then I set the class path as below:
    export CLASSPATH=$CLASSPATH:/home.../mail.jar
    Then I tried to compile my Java program. The output is as below:
    error: error reading /home.../mail.jar; invalid END header (bad central directory offset)
    mail.java:1: package javax.mail does not exist
    import javax.mail.*;
    Can any one please help me out.

    You should also include the "activation.jar" file that you obtained from
    downloading the Java Activation Framework, in your CLASSPATH.
    For example:
    export CLASSPATH=$CLASSPATH:/urPath/activation/activation.jar
    Besides, assuming you unzipped javamail-1_4_1.zip in home/download the following should work
    export CLASSPATH=$CLASSPATH:home/download/javamail-1.4.1/mail.jar:.

  • How to use Add Shipments functionality in Shipment document creation

    Dear All,
    We wanted to use the Add Shipments functionality in the Shipment document creation / change.
    We have two different shipment types.
    I want to add shipments of one shipment type in to Shipment document of anohter shipment type.
    I am not able to do it now as system is saying in the selection log that the shipment types are not same.
    Please let me know what are the pre requisite configurations to enable us to add shipments in to another shipment.
    Please let me tknow he standard functionality of "Add Shipments option" and how to use it to add shipments in a Shipment
    Regards
    Venkat

    Hi Venkat,
    The option "find shipments" is provided to select the shipments to reassign or deassign the deiveries etc in VT01n or VT02n
    transaction planning screen. Basically you can play around to assign and reassign the deliveries to different shipments
    This option is not creating the shipment within shipment. It is just selection of shipments for planning purposes
    Hope this helps.
    Regards,
    Ramana

Maybe you are looking for

  • Adobe Reader 9.x crashes when opening PDF's created using Office 2007

    I work on the helpdesk side for a big corporation and many of our users are reporting that when they try to open a PDF, it locks up their Internet Explorer or Reader 9.x We noticed that the problems were only caused by PDFs that were presentations cr

  • Problems getting started with templates

    I am just getting started with the dreamweaver 30 day trial. I am trying to create my first file. When I try to open a new template file I get the message below- "Dreamweaver stores templates in the root folder of a site, but there are no sites defin

  • Question on Interactive Display

    I am doing an interactive display for school and it includes 2 games and 5 movies.  I have it all set up the way I want it, but I have a HUGE problem, my movies will not play!!  I am using 2 different codes, one for the games and one for the movies,

  • Request for factory rom for Yoga 10"

    Hello, I know, that on russian lenovo forums there is factory rom available for download, but it is their regional version. I'd like to request for such factory rom in european or international version. This way I would be able to refresh or fix my t

  • Default Printer Settings In Microsoft Office For Mac

    I have some problems printing in Microsoft Office. I intend to set up the printer to print double sided and also in color. I've done the neccessary settings in the application and saved the preset as the default preset to print. The problem i am faci