KIMYONG :  API ( FND_SUBMIT,  FND_REQUEST) Sample Code 소개

Purpose
Extension 개발자들이 간혹 요청하는 Standard API (FND_SUBMIT, FND_REQUEST)의 sample code입니다.
Configuring the Script
FND_SUBMIT test procedure and sample code
Creates a procedure called fnd_submit_test that can be registered and run as a concurrent program.
This procedure will use the FND_SUBMIT API to submit a request set. (Function Security Reports - This request set should be seeded, if it is not available the values in the script may need to be changed.) The procedure will then place itself in a Paused status until the request set completes.
Running the Script
1. Install this procedure in the APPS schema.
2. Register the procedure as a concurrent program
Caution
This script is provided for educational purposes only and not supported by Oracle Support Services. It has been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.
Proofread this script before using it! Due to the differences in the way text editors, e-mail packages and operating systems handle text formatting (spaces, tabs and carriage returns), this script may not be in an executable state when you first receive it. Check over the script to ensure that errors of this type are corrected.
Script
REM +==========================================================================
REM | Concurrent Processing Sample Code
REM |
REM | FILE:
REM | fnd_submit_test.pls
REM |
REM | REVISION:
REM | $Id$
REM |
REM | DESCRIPTION:
REM | FND_SUBMIT test procedure and sample code
REM | Creates a procedure called fnd_submit_test that can be registered
REM | and run as a concurrent program.
REM | This procedure will use the FND_SUBMIT API to submit a request set.
REM | (Function Security Reports - This request set should be seeded, if
REM | it is not available the values in the script may need to be changed.)
REM | The procedure will then place itself in a Paused status until the
REM | request set completes.
REM |
REM | INSTRUCTIONS:
REM |
REM | 1. Install this procedure in the APPS schema.
REM |
REM | 2. Register the procedure as a concurrent program
REM |
REM |
REM +==========================================================================
whenever sqlerror exit failure rollback;
create or replace procedure fnd_submit_test (errbuf out varchar2,
retcode out varchar2) as
success boolean;
req_id number;
req_data varchar2(10);
srs_failed exception;
submitprog_failed exception;
submitset_failed exception;
begin
-- Use FND_FILE to output messages at each stage
fnd_file.put_line(fnd_file.log, 'Starting test...');
-- Read fnd_conc_global.request_data, if available then we have been
-- reawakened after the request set has completed.
-- If so, exit.
req_data := fnd_conc_global.request_data;
if (req_data is not null) then
errbuf := 'Done!';
retcode := 0 ;
return;
end if;
-- Step 1 - call set_request_set
fnd_file.put_line(fnd_file.log, 'Calling set_request_set...');
success := fnd_submit.set_request_set('FND', 'FNDRSSUB43');
if ( not success ) then
raise srs_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Calling submit program first time...');
-- Step 2 - call submit program for each program in the set
success := fnd_submit.submit_program('FND','FNDMNFUN', 'STAGE10', 'System Administrator', chr(0));
if ( not success ) then
raise submitprog_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Calling submit program second time...');
success := fnd_submit.submit_program('FND','FNDMNMNU', 'STAGE10', 'System Administrator', chr(0));
if ( not success ) then
raise submitprog_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Calling submit program third time...');
success := fnd_submit.submit_program('FND','FNDMNNAV', 'STAGE10', 'System Administrator', chr(0));
if ( not success ) then
raise submitprog_failed;
end if;
-- Step 3 - call submit_set
fnd_file.put_line(fnd_file.log, 'Calling submit_set...');
req_id := fnd_submit.submit_set(null,true);
if (req_id = 0 ) then
raise submitset_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Finished.');
-- Set conc_status to PAUSED, set request_data to 1 and exit
fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => '1') ;
errbuf := 'Request set submitted. id = ' || req_id;
retcode := 0;
exception
when srs_failed then
errbuf := 'Call to set_request_set failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when submitprog_failed then
errbuf := 'Call to submit_program failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when submitset_failed then
errbuf := 'Call to submit_set failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when others then
errbuf := 'Request set submission failed - unknown error: ' || sqlerrm;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
end;
rem ===================================================================
commit;
exit;
Reference
자세한 사항은 Note 221542.1 를 참고하세요.

Not sure about that particular option, but in general you pass in pairs - an example from code I didn't write but maintain (so if this is the worst possible way, I apologize)
proj_req_id6 := FND_REQUEST.SUBMIT_REQUEST('SQLGL', 'XXXX_GLGENLED_PDF',
                          'XXXX General Ledger',
                          '',dummy_default,
                          'P_SET_OF_BOOKS_ID='||v_rep_cmp.set_of_books_id,'P_CHART_OF_ACCOUNTS_ID=101',
                          'P_KIND=L','P_CURRENCY_CODE='||v_rep_cmp.currency_code,
                          'P_ACTUAL_FLAG=A','P_BUD_ENC_TYPE_ID=100',
                          'P_START_PERIOD='||'&1','P_END_PERIOD='||'&1',
                          'P_MIN_FLEX='||v_min_flex||'.'||v_emp_cost_center.COST_CENTER||'.00000.000.000.000.00',
                          'P_MAX_FLEX='||v_max_flex||'.'||v_emp_cost_center.COST_CENTER||'.99999.999.999.ZZZ.99',
                          'P_PAGE_SIZE=180',chr(0),'',
                          '','','','','','','','','','');You see where I have option pairs - for example
'P_ACTUAL_FLAG=A'Tells my program that the value for parameter P_ACTUAL_FLAG is A
This example is from a SQL*Plus script, hence the &1 for the value substitutions.
Hope that helps

Similar Messages

  • I want to an API or any sample code to make business calls to J.D.Edwards

    hi,
    i want to make use of J.D.Edwards from my java GUI application, by using my Application Interface i want to make use of Java Calls to the the J.D.Edwards. is any one is having API or Sample code fro this?
    plz help me out Regarding this.

    hi,
    i hav searched through google also
    i did not get anything regarding this, what all got apart from this is,
    in market we are having 3rd party onnectors for this.
    but i dotn use any of them.
    can any body help me regarding this plz.

  • Public Beta?  Documentation?  API Reference?  Sample Code?

    Dear Adobe:
    Is this beta just for testing existing code to see if the new player version breaks our existing code?
    Or is this beta intended as a public beta to allow developers to use the new capabilities in FP11/AIR3?
    Based on the release announcement stating "Introduces features" it seemed like it was intended to allow all interested developers to access the new APIs.  If this is true, can an Adobe employee explain what a "beta" of FP11/AIR3 means without documentation or code samples?  Or, if docs and/or samples are public can you reply on this post with the links?
    I do see the link on the Features page for "Stage3D APIs (`Molehill`) for Flash Player".  I would very much appreciate if you could add a similar link for a page with details on "H.264/AVC SW Encoding for Camera"  :-)
    Best regards from the lead on a loyal developer team chomping at the bit to build great solutions using the new FP11/AIR3 capabilities.
    Best regards,
    g
    P.S. Following are related, prior and still unanswered posts:
    http://forums.adobe.com/thread/877323
    http://forums.adobe.com/thread/877452

    Here's what I've heard from one of our community managers regarding stage3d:
    "Thibault Imbert posted a discussion of what Stage3D is all about back then at http://www.bytearray.org/?p=2555. NJ also posted a more beginner level discussion of what it is all about at http://www.rictus.com/muchado/2011/02/28/demystifying-molehill-part-1/. Assuming they actually do intend to use these low level API’s (which I doubt most people will want to or have the ability even to do so), a site called iFlash3D covered it in great detail in a two part series discussing the ins-and-outs of AGAL (http://iflash3d.com/shaders/my-name-is-agal-i-come-from-adobe-1/ and http://iflash3d.com/shaders/my-name-is-agal-i-come-from-adobe-2/) as well as a reference card for AGAL http://iflash3d.com/site/agal-reference-card-available/. Or another that discusses how to manage cameras in a 3D space http://iflash3d.com/flash3d-coding/flash-3d-molehill-cameras/. Beyond those sites, most people aren’t discussing the details of the Stage3D api’s for a general audience that I have found."
    I asked about the other new features (audio compression, surround sound, video encoding, etc.) but they hadn't seen anything created yet.  However, they are interested in getting content developed for these areas and will work on getting that done.  Look for third party resources and ADC updates in the near future.
    Thanks,
    Chris

  • ODP API documentation and sample code

    I am looking to write a custom program as a part of my client requirement to find the delta changes from an extractor. I heard that latest SAP NetWeaver EhP contains it. I beleive this ODP API is some Java interface and would be useful for me to use in my custom program.
    How can I make use of this ODP API? Is there any documentation and code samples available.

    I was able to find some API called Data Federator Facade with in the ABAP Code. Is this what it is?

  • Need Sample Code for Vendor creation using JAVA API

    Hi,
    I have a scenario like Vendor creation using <b>Java API</b>.
    1.I have Vendors (Main) Table.
    2.I have <b>look up</b> tables like Account Group.
    3.Also <b>Qualifier table</b>(Phone numbers) too.
    Could you please give me the sample code which helps me to create Vendor records using Java API?
    <b>I need Code samples which should cover all of the above scenario.</b>
    <b>Marks will be given for the relevent answers.</b>
    Best Regards
    PK Devaraj

    Hi Devraj,
    I hope the below code might solve all your problem:-
    //Adding Qualified field
    //Creating empty record in Qualifed table 
    //Adding No Qualifiers
    Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
    try {
    qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
    catch (IllegalArgumentException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    catch (MdmValueTypeException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    //Creating Record in Qualified table
    CreateRecordCommand create_command = new CreateRecordCommand(connections);
    create_command.setSession(sessionId);
    create_command.setRecord(qualified_record);
    try
    create_command.execute();
    catch(Exception e)
    System.out.println(e.toString());
    RecordId record_id = create_command.getRecord().getId();
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue lookup_value = new QualifiedLookupValue();
    int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
    //Adding Yes Qualifiers
    lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
    //Now adding LookUP values
    //Fetch the RecordID of the value selected by user using the following function
    public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
    ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
    rsd.addSelectField(new FieldId(Fieldid));
    StringValue [] val = new StringValue[1];
    val[0] = new StringValue(value);
    RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
    val_command.setSession(sessionID);
    val_command.setResultDefinition(rsd);
    val_command.setFieldId(new FieldId(Fieldid));
    val_command.setFieldValues(val);
    try
         val_command.execute();
    catch(Exception e)
    RecordResultSet result_set = val_command.getRecords();
    RecordId id = null;
    if(result_set.getCount()>0)
         for(int i = 0 ; i < result_set.getCount() ; i++)
         id = result_set.getRecord(i).getId();     
    return id;
    //Finally creating the record in Main table
    com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
    try {
         empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
         empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
    empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp  value Retrieved above
    } catch (IllegalArgumentException e1) {
    // TODO Auto-generated catch block
         e1.printStackTrace();
    } catch (MdmValueTypeException e1) {
         // TODO Auto-generated catch block
         e1.printStackTrace();
    //Actually creating the record in Main table
    CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
    create_main_command.setSession(sessionId);
    create_main_command.setRecord(empty_record);
    try
         create_main_command.execute();
    catch(Exception e)
         System.out.println(e.toString());
    Thanks
    Namrata

  • I just need a little help to connect with eCommerce API. Could anyone please give a JAVA sample code

    Hi All,
    I am looking for a sample code to just to connect with Business Catalyst eCommerce API. My aim is to simply retirieve the list of the products and update them.
    It would be really helpful, if anyone please provide me a sample code in JAVA, just to connect with the API.
    Thanks
    Ani

    public static void main(String[] args) throws RemoteException, MalformedURLException {
                        String endpoint = "https://CC.sys.com/CatalystWebS1ervice/CatalystEcommerceWebservice.asmx?WSDL"; // endpoint url can be found under Site Settings -> API -> click on eCommerce and copy the URL on the browser here.
                        CatalystEcommerceWebserviceSoapProxy sq = new CatalystEcommerceWebserviceSoapProxy(endpoint);
                        Products[] prod = new Products[2];
                        prod = sq.product_ListRetrieve(Username , Password, SiteID, CatalogueID);
                        System.out.println(prod[1].getDescription());

  • Need help with API and sample code for checking a user's rights on a folder

    Hi All,
    I am working on an UCM integration where user supplies a folderpath (ucm folders), and a file is later uploaded to this location.
    Since a user can provide a folderpath where he has only Read Access or no access at all, we are trying to work out a way to pre-check his permissions on the folder.
    Since we have Entity Security enabled, we have 5 security fields to rely on Account, Security Group, User Access List, Group Access List, Role Access List.
    Writing custom code for this security check is second on our agenda.
    Firstly, we wish to know the API and sample code that typically performs this Security Check in UCM.
    We could find intradoc.shared.SecurityUtils which has methods to check security on SGroup and Account, but we couldn't find anything for:
    1) Overall security check
    2) ACL security check on top of sgroup and account security check

    Any ideas anyone?!
    I am looking forward to some pointers here. :(

  • Web Service API sample code

    Howdy All,
    I am trying to work through the iTunes U Admin's guide directions on how to upload content using the Web Service API. I have completed everything through step 2, (I believe it is page 48 in the current guide), Request an Upload URL from iTunes U. After I try to POST a file to the URL returned in step 2 the only response I receive back from the server is a 500 error. I am writing my application in C# so using a UNIX curl script to perform the file upload is not possible, and that seems to be the only thing close to sample code that I can find.
    Has anybody else written some .NET code that performs the file upload in step 3 that they would be willing to share? Even Java code that I could port over to C# would be a good start. I can also post some of my own code if there is anybody that feels like taking a look at it.
    Thanks,
    David
      Other OS  

    Couple of pointers for you ...
    First is that the documentation (last time I looked) has a bug that will prevent you from using the web services API. Here is a link to the changes you need to make:
    http://discussions.apple.com/thread.jspa?threadID=899752&tstart=15
    Next, when I was working through this stuff, I found learned a ton about HTTP I didn't previously know (like how to construct a valid multipart MIME doc). If it would be helpful, your POSTed doc should look pretty close to this:
    Content-Type: multipart/form-data; boundary=0xKhTmLbOuNdArY
    --0xKhTmLbOuNdArY"
    Content-Disposition: form-data; name="file"; filename="myXMLFile.xml"
    Content-Type: text/xml; charset="utf-8"
    <?xml version="1.0" encoding="UTF-8"?>
    <ITunesUDocument>
    <ShowTree>
    <KeyGroup>maximal</KeyGroup>
    </ShowTree>
    </ITunesUDocument>
    --0xKhTmLbOuNdArY--
    I would be happy to share my own code, but it might not be what you're after (I used Objective-C and Apple's NSMutableHTTPRequest Cocoa class to do my HTTP POST). I am not a C# guy, but I would bet dollars-to-donuts that C# has some kind of class that serves as a wrapper for an HTTP POST request ... you give it the HTML, it POSTs.
    MacBook Pro   Mac OS X (10.4.8)   I lied. I'm running Leopard

  • DRM API Sample code & new to API work recommendations

    Hello Gurus,
    I am getting ready to venture into the world of DRM API. I'm a SQL / integration / app type person with no experience related to working wth APIs. Can someone please post some sample code and perhaps recommend some reference books, training, approach I should consider? I welcome the opportunity to learn. I just need a nudge in the right direction. Your recommendations are greatly appreciated!
    Cheers!

    http://docs.oracle.com/cd/E17236_01/epm.1112/drm_api_ref.html
    Thanks,
    Murali

  • Essbase API Sample code

    Hi,Can anyone help me to get Essbase API's sample code for Java.Thanks in advance.Mahesh

    When you install Essbase Deployment Services (formerly Essbase Enterprise Services), which is the container for the Java API, a sample directory get installed that has about 30 sample Java classes covering a wide variety of JAPI functionality.Tim TowApplied OLAP, Inc

  • Wizard framework API SAMPLE CODE !!!!

    Does somebody have some sample code
    on how to use the wizard framework api
    Thanks

    Yeah, I have it.
    Wizard Framework
    Regards
    Puru
    Award points.

  • API or Sample code to monitor the temperature of Intel processors

    Is there any free(no license or trail) API or sample code for temperature monitoring which can able to monitor Intel single Core, dual Core and quad Core processors temperature ? 
    http://tnvbalaji.com
    http://in.linkedin.com/in/tnvbalaji

    Hi,
    Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.
    Best regards,
    Jesse
    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

  • Sample code for creation of contact

    Creation of contact using the java api does not work as it should for me. I think i dont have the correct format for the vcard will someone help me with this!! A sample code example will be very helpfull§. I am using calander version 9.0.4.
    any additional information can be provided!
    thanks
    joyce

    Creation of contact using the java api does not work
    as it should for me. I think i dont have the correct
    format for the vcard will someone help me with this!!
    A sample code example will be very helpfull§. Hi Joyce,
    The thread "create contact returns -- CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY"
    is the correct way to store a contact. Note that I just updated the thread.
    What is your problem exactly?
    Jean-Philippe

  • Java Mapping sample code

    HI all,
    I want to learn how java mapping can be done in XI.
    I have created a javaMapping class implements StreamTransformation .
    I am not getting what code should be written in execute method. I have included all the jar files required.
    Please can anyone give me a sample code that should be written in execute method for a simple Message mapping.
    I presume we use jaxp Api for that,but I am not getting the exact way to proceed further.
    Thanks
    Yomesh

    Thanks Anad And Shridhar,
    I am able to do java mapping now.Actually I was not understanding how the input schema will be read and converted into output schema. Now I got that the DefaultHandler class's methods like startDocument EndDocument ,startElement and EndElement takes care of this. We have to just implement these methods and they are called automatically when corresponding tags are read.
    Thank You verymuch for your help,
    Yomesh

  • Socket Programing in J2ME - Confused with Sun Sample Code

    Hai Everybody,
    I have confused with sample code provided by Sun Inc , for the demo of socket programming in J2ME. I found the code in the API specification of J2ME. The code look like :-
    // Create the server listening socket for port 1234
    ServerSocketConnection scn =(ServerSocketConnection) Connector.open("socket://:1234");
    where Connector.open() method return an interface Connection which is the base interface of ServerSocketConnection. I have confused with this line , is it is possible to cast base class object to the derived class object?
    Plese help me in this regards
    Thanks in advance
    Sulfikkar

    There is nothing to be confused about. The Connector factory creates an implementation of one of the extentions of the Connection interface and returns it.
    For a serversocket "socket://<port>" it will return an implementation of the ServerSocketConnection interface. You don't need to know what the implementation looks like. You'll only need to cast the Connection to a ServerSocketConnection .

Maybe you are looking for

  • I need to recover my own deleted email for a civil court action. What do I need to do?

    I have a contentious civil proceeding and need to be able to recover deleted emails from and to one specific email address. I've tried to recover the deleted email using backup and restore from iCloud but this really did nothing. Since they're my own

  • My iMac (2009) slows down after I go to sites that are memory intensive

    I have noticed my computer slows down to a crawl after I use sites that I believe are memory intensive.  Example of that is iFirstrowSports.eu (streams soccer games live).  The latest one was Wix where my wife was building her web site using their ht

  • PDF washed out

    I'm creating a pdf in Bridge and it becomes washed out once saved.  I've tried sRGB color space as well as Adobe 1998.  Both are washed out.  Does anybody have a solution to this issue? 

  • Business partner number range - Current number set to 0

    I need to initialize business partner number range. TCode: BUCF 0009000000 -0013999000  Current number 9000029 How can I set Current number to 0. I have deleted business partners via BUPA_DEL. I need this to be set to 0 so that can bring in legacy da

  • Time machine e-mail report

    Hello, i'm using Leopard and want to know if there is a way to get a time machine backup status report by e-mail It's important for us to know every day if time machine was able to backup ok or if there are problems. thanks for suggestions Marco