Setting environment for a new custom JSP

Hi All,
I have created a new custom jsp,Calling teh API is not working as apps initialization is not happening. When we printed the user id,application id etc it was coming as null. How to initialize apps in JSP.
Thanks,
Shreya

Below code might be useful.
<%@ page language="java" errorPage="OAErrorPage.jsp" contentType="text/html"
import="oracle.apps.fnd.common.WebAppsContext"
import = "java.io.File"
import = "oracle.apps.fnd.framework.webui.OAJSPHelper"
import = "oracle.apps.fnd.framework.webui.URLMgr"
import = "oracle.apps.fnd.common.WebAppsContext"%>
<%! public static final String RCS_ID = "$Header: test_fwktutorial.jsp 115.5 2003/05/05 10:20:28 gmallesh noship $"; %>
<jsp:useBean id="sessionBean" class="oracle.apps.fnd.framework.CreateIcxSession"
scope="request"></jsp:useBean>
<%
response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1
response.setHeader("Pragma", "no-cache"); // HTTP 1.0
response.setDateHeader("Expires", -1); // Prevent caching at the proxy server
response.setStatus(HttpServletResponse.SC_RESET_CONTENT); // HTTP 1.1. Only way to force refresh in IE.
String dbcFullPathName = oracle.apps.fnd.framework.webui.OAJSPHelper.getWebAppContextInitParameter(pageContext, "DBC_FULL_PATH_NAME");
System.out.println("dbcFullPathName: "+dbcFullPathName);
String userName = "fnd_user_name";
String userPassword = "pwd";
String appShortName = "product short code";
String responsibilityKey = "RESP_KEY";
String dbcName = "DBName";
String sessionid = sessionBean.createSession(request, response, dbcFullPathName, userName, userPassword, appShortName, responsibilityKey);
String transactionid = sessionBean.createTransaction(sessionBean.mRespInfo[0], sessionBean.mRespInfo[1], sessionBean.mRespInfo[2], dbcFullPathName);
//Use flowing webAppsContext to call the API
WebAppsContext wctx = sessionBean.getWebAppsContext();
%>
Regards,
Peddi.

Similar Messages

  • Wrong default layout for a new customer

    Hi all,
    I hope somebody can share inputs with regards to this issue.
    I'm assigning a default layout to one customer group (layout1 for all Group1).  When this was done, a list of customer codes were included in the list and each were ticked from that list.
    Second layout called layout2 for the setting 'Set &as Default for all BPs (for Whom a Default Layout Has Not Been Assigned).
    Scenario:  A new customer code is created belonging to Group1.
    Issues: 
                a.  This new customer code does not automatically follow the setting on default layout which is layout1.  When the layout1 default setting was double  
                     checked, the new customer code was part of the list, but it was not ticked. 
                b.  When document was previewed, it uses the wrong layout2.
                c.   The user still has to update the layout1 default setting, ticking the tick box from the list for the new customer code, then clicking update in then
                      layout designer window.
    Question:  Is this a normal behaviour of the system?  I thought that setting it as default for certain customer group will be applicable even to newly created ones under that group.
    Regards,
    Cathy

    Hi,
    I am afraid that it is your SAP B1 version current behavior but you may check using demo database. What is your SAP B1 version anyway ? what is your database localization ?
    You may try the solution part from one of these notes below:
    993486  - 'Set as Default for All BPs' doesn't affect specific BP
    Version   5   Validity: 21.01.2011 - active
    Language   English (Master)
    Portuguese 
    Content:      Summary    |    Header Data    |    References    |    Validity 
    Symptom
    Specific printing template for Business Partner can not be changed in attempt to define printing template as a default template for all Business Partners.
      Cause
    Functionality description
      Solution
    In order to change a specific default printing template for Business Partner follow the steps below:
    1. Choose the required template and press on the 'Set as Default' button.
    2. Choose the 'Set as Default for Specified BP' and 'Set as Default for Current User' option.
    3. Uncheck the box near the BP name and press on the 'Update' button.
    4. Choose the required default template (new template) and press on the 'Set as Default' button.
    5. Choose the 'Set as Default for all BP' option.
      Other terms
    Print Layout Designer, Default Template, Set as Default for All Users,
    Set as Default for Current User, Set as Default for All BPs, Set as Default for Specific BP
            Header Data
    Released On
    24.02.2011 20:52:30   
    Release Status
    Released for Customer   
    Component
    SBO-GEN-PLD Print Layout Designer  
    Other Components
    SBO-SH-PLD-A2 Tips and tricks for building PLD templates
    Priority
      Recommendations/additional info   
    Category
      Consulting   
           References
    This document refers to:  SAP Business One Notes
    861088
    Cannot set a template as default for all users
    This document is referenced by:   SAP Business One Notes (1) 
      861088
      Cannot set a template as default for all users
           Validity
    Software Component
    Version
    SAP BUSINESS ONE
    2005 A
    2005 A SP01
    2005 B
    2007 A
    2007 B
    8.8
    2nd note:
      861088  - Cannot set a template as default for all users
    Version   4   Validity: 04.08.2009 - active
    Language   English 
    Content:      Summary    |    Header Data    |    References    |    Validity 
    Symptom
    When print previewing,the template used is not default template.
      Cause
    A template has been defined as default for all users, when previewing this it is not the template which has been set as default for document.
      Solution
    In order to change to a different default template for all users and all business partners please do the following:
    a) "Set as default for specified Business Partner" and "set as default for current user"
    b) Add tick for this Business Partner
    c) Update by ticking again the specific Business Partner
    d) Change set as default for all users and all Business Partner's
      Other terms
    Print Layout Designer, Default Template, All users, Set as Default template, SAP Business One
            Header Data
    Released On
    04.08.2009 11:28:58   
    Release Status
    Released for Customer   
    Component
    SBO-GEN-PLD Print Layout Designer  
    Other Components
    SBO-SH-PLD-A1 Print Layout Designer known Issues
    Priority
      Recommendations/additional info   
    Category
      Consulting   
           References
    This document refers to:  SAP Business One Notes
    993486
    'Set as Default for All BPs' doesn't affect specific BP
    This document is referenced by:   SAP Business One Notes (1) 
      993486
      'Set as Default for All BPs' doesn't affect specific BP
           Validity
    Software Component
    Version
    SAP BUSINESS ONE
    2004 A
    2005 A
    2005 A SP01
    2005 B
    2007 A
    2007 B
    JM

  • Creative Cloud for Photographers - New Customer Pricing UK

    Hi,
    I have read about the new announcement regarding Creative Cloud for Photographers subsciption charges for existing photoshop users. I have never used Photoshop due to cost; I do not work as a creative professional and I think there would be a limited set of functions in Photoshop for me so £600 quid for something that gets upgraded every 12 months seemed excessive.
    My question is, what is the cost for a new customer for CC for Photographers - is there a new offer similar to that for previous customers?
    Thanks,
        Rob.

    I was very tempted to sign up for this, as an amateur photographer I have never been able to afford Photoshop, and the current offer price is right for me. However, reading the TOS and conditions I have reluctantly had to shelve my plans:
    Renewal
    After the first 12 months, we will automatically renew your contract based on the current price of the offering.
    Cancellation
    We'd hate to see you go, but if you cancel within the first 30 days starting from your contract date, we'll give you a full refund. Otherwise, you'll be billed 50% of your remaining contract obligation for the cancellation or removal of seats. If you ever need to cancel, just call Customer Support
    I cannot sign up to such vague and open ended conditions. What happens next year when the price is doubled? If Adobe could offer retiree amatuers like myself a long term commitment to even a cut down Photoshop that is just for photographers I would sign up like a shot. But as things are I can only got back to grumbling about how Photoshop remains beyond my reach.

  • Changing customer number in alv top of page for every new customer

    hi experts,
    in alv grid display top-of- page, how to change customer number  customer name for every new customer.
    please help me.
    Regards
    Naveen.

    You may look into this blog
    http://help-abap.blogspot.com/2008/09/salv-model-5-add-header-top-of-page.html
    This is has been contributed by one of the SCN contributor Naimesh Patel.

  • Error while entering transaction for a new customer in release 12.1.1

    Hi,
    I created a new customer in receivables (am using the version 12.1.1)
    First i got an error while creating the customer saying, "Provide a positive integer for minimum customer balance amount or percent when balance amount overdue type is amount or percent respectively"
    I corrected the profile class amounts and now am allowed to create the customer but now the error comes while entering a transaction for this new customer:
    "The system cannot determine geographical information for this location and cannot derive a tax jurisdiction. Please contact your system administrator"
    please suggest a solution.
    regards,
    Shilpa

    I faced the same problem, Doc ID 420194.1 solved the problem. Shilpa kindly post the solutions moving forward so the users can benefit from it. Thank you!
    Solution
    run Geography Reference Program with parameter "Country code" for all records.
    Navigate to Trading Community Manager ->
    Requests -> Run
    Select "Geography Name Referencing" program
    Processing for Table : HZ_LOCATIONS and Run Type : ALL
    Parameters: Country Code :US
    Usage Code :ALL
    From Location Id :NULL: To Location Id:NULL
    Start Date :NULL: End Date:NULL
    Number of workers:1
    Total number of Processed Locations:9
    Number of Successfully Processed Locations:9
    Number of Locations in Error:0

  • Opinion: new Package for every new custom Component?

    Hi there,
    I am just thinking of some possibilities to structurize my Components I made.
    I wonder if it is useful/good programming to define a new package for each new custom Component?
    So if I define a new MyComponent class extending JFrame should I make a new package:
    "mycomponent"
    containing these subfolders:
    "view"
    "model"
    "controler"
    subfolging "controler" in:
    "listeners"
    "adapters"
    "events"
    Is there any sense to do so? I think this would be the best way to structurize one's components.
    But if you do, you have to include millions of packages if you want to use one of these components :(.
    Please post, what you think.
    Thank you
    Sincerely
    Karlheinz Toni

    nope ;). I would most certainly not want to put every file in a single directory.
    But I like sturctured things. If things belong to each other, it should be visible at once, that they have something to to with each other. And the best method I can figure you is putting them in one package.
    The subpackages should be created, because of the model, that is used for all swing componentd (UI-delegete, MVC...) so that each structural component is where it belongs to.
    I don't like it if tere are 100 events one object could possibly create and you don't know the events from the component (of course you can guess by the name Event :)), but if they are in the same package, you would have to scroll a long way to get the thing you want (either m, v or c).
    So this is why I would do it ;).
    Anyway: do includes make the program run slower (I have read many threads about it, but there are way to many opinions, so I would be grateful if you post your opinions here, thx ;).
    Thanks for your answer,
    Sincerely
    Karlheinz Toni
    p.s.: why wouldn't you put them in a seperate directory (just overkill?), would you use classes that are structured like this if you are looking for a implementation of something and find it in this structure?

  • Fbl5n report showing pritn output for a new customer on a new page

    Hello  All,
    In fbl5n when i execute for all the customers and give print command its printing every new customer on a new page but i want to print the data continously.
    Pls let me knw how to avoid this?
    Sunny

    Hi Sunny,
    you're case is quite common, because SAP displays the customer data in a standard layout, putting a page break after every customer and company code.
    In order to avoid this, you may change the grouping criteria. For that,
    1. be sure that you have not clicked on the header of any column in the list
    2. click on button "sort ascending"
    3. here you'll see that fields "company code" and "account" have an asterisk on column NG (new group). This means that, for every change in these fields, SAP will insert a page break
    4. remove these asterisks
    5. (optional) save this layout for further launchings of the report
    I hope this helps. Best regards,
    Alvaro

  • Regd Workflow for a new custom page

    HI ,
    We have created 2 pages for some functionality where in user can login n serach for a person and update certain attributes like his source/company, assignment category etc.
    First page he can searach the person and after search results come in, he can click on a link and go to the next page where he can edit the attributes n submit.
    Now after updating and submitting the page, we have a reqt to send notifications to the initiator in case the user has approved the txn or rejected or sent for correction. But we dont know how to achive it with the 2 pages n no workflow.
    How to launch a workflow for this ?
    or is there a way we can send notification from backend without using workflow n it shud still come in the worklist of a person.
    Regards,
    Preeti

    Hi Preeti
    DECLARE
    l_itemtype VARCHAR2(30) := 'XX_TEST';
    l_itemkey VARCHAR2(300) := 'TEST';
    BEGIN
    Begin
    wf_engine.createprocess(l_itemtype, l_itemkey, 'XX_MAIN_TEST');
    Exception
    when others then
    dbms_output.put_line('Error in create process:' sqlerrm);
    End;
    BEGIN
    wf_engine.setitemuserkey(itemtype => l_itemtype
    ,itemkey => l_itemkey
    ,userkey => 'USERKEY: ' l_itemkey);
    EXCEPTION
    when others then
    dbms_output.put_line('Error in set userkey process:' sqlerrm);
    END;
    BEGIN
    wf_engine.setitemowner(itemtype => l_itemtype
    ,itemkey => l_itemkey
    ,owner => 'SYSADMIN');
    EXCEPTION
    when others then
    dbms_output.put_line('Error in set owner process:' sqlerrm);
    END;
    BEGIN
    wf_engine.startprocess(l_itemtype, l_itemkey);
    dbms_output.put_line('Process started');
    commit;
    EXCEPTION
    when others then
    dbms_output.put_line('Error in set owner process:' sqlerrm);
    END;
    END;These are the details of the functions used
    1> wf_engine.createprocess
    This API creates a new runtime instance of the workflow process, Pass the item type and item key for the workflow.
    2> wf_engine.setitemuserkey
    Use this API to mark the new runtime instance of the workflow process with an
    end–user key
    3> wf_engine.SetItemAttrText
    Use this API to set values for the item type attributes defined for workflow process .E.g.: Email ID, Description defined in the workflow.
    4> wf_engine.setitemowner
    Use this API to set the value of owner (Of Workflow)
    5> wf_core.context
    In case of exception, it will help in locating source of an error.
    6> wf_engine.startprocess
    Use this API to invoke the workflow for the item type and item key specified.
    Ajay

  • Setting Environment for Oracle XA - dbms_system

    Hello,
    I habe some questions concerning the Documentation
    http://e-docs.bea.com/wls/docs81/jta/thirdpartytx.html
    and the Section "Set the Environment for the Oracle Thin/XA Driver".
    The problematic sentense is:
    (when using the Oracle Thin driver 10.1.0.3 or later)
    grant execute on dbms_system to <user>;
    The database team colleagues claim that this requirement could be a security problem.
    The documentation of this package has been left undocumented or
    removed from the official Oracle documentation in some later release.
    Though, there are some scare references to this package I have not found the definition
    http://www.oracle.com/pls/db102/master_index?letter=d here as well.
    What is your opinion to this topic?
    Another point is that it seems that this package is not accessible directly and
    must be installed in a separate step. The should be some script prvtutil.plb, which creates
    the package. Am I right?
    (I know it is an Oracle not WLS topic, but maybe you have done it already)
    I'll be glad for any comments or background information.
    Best regards
    Jaro
    WLS 8.1. SP4
    Oracle 10.2.0.3.0

    Access is necessary, else certain XA recovery calls via the Oracle driver will fail.
    Joe
    Jaroslav Simak wrote:
    Hello,
    I habe some questions concerning the Documentation
    http://e-docs.bea.com/wls/docs81/jta/thirdpartytx.html
    and the Section "Set the Environment for the Oracle Thin/XA Driver".
    The problematic sentense is:
    (when using the Oracle Thin driver 10.1.0.3 or later)
    grant execute on dbms_system to <user>;
    The database team colleagues claim that this requirement could be a security problem.
    The documentation of this package has been left undocumented or
    removed from the official Oracle documentation in some later release.
    Though, there are some scare references to this package I have not found the definition
    http://www.oracle.com/pls/db102/master_index?letter=d here as well.
    What is your opinion to this topic?
    Another point is that it seems that this package is not accessible directly and
    must be installed in a separate step. The should be some script prvtutil.plb, which creates
    the package. Am I right?
    (I know it is an Oracle not WLS topic, but maybe you have done it already)
    I'll be glad for any comments or background information.
    Best regards
    Jaro
    WLS 8.1. SP4
    Oracle 10.2.0.3.0

  • Error "_blank is undefined" for a new popup jsp page opening from a button

    Added a new button, by personalization to a self service page. The new button on click should open a new jsp page. The jsp page is opening properly on the same page if I remove the blank from the target frame property. For opening the jsp page on a new window, on specifying blank property, getting page error as "_blank is undefined". Also the appearance of the new button added by personalization is different from other buttons. Please help me as I am clueless regarding what might be the cause of such java script(page error).

    If your button appears as a normal html button then your display server might not be generating the image properly, check the logs after turning on logging to see if there are any errors thrown from the display server. Secondly the images generated at runtime are cached in $OA_HTML/cabo/images/cache/en folder, check to see if that folder has proper write permissions for the display server to write the image there.
    What is the OAf version you are using ? Setting _blank on the target frame is the right approach, once you get the above problem rectified try it again.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Highlighting TEXT - not the field - and clearing the set value for a new one

    I have a form in which various text fields are set with a message to inform the user as to what kind of information I want typed in. My goals are:
    1. Have the text get highlighted so when the user starts typing, the "old" value gets replaced with the "new"
    2. Or, when the user tabs or clicks in the field all of the "old" value is deleted and they can start typing the "new" value from the beginning of the field.
    I am trying to eliminate having to manually highlight the field in order to type in the needed information. But each field needs to start with a value so the user knows what kind of information I am looking for.
    Does this make sense? By the way, I have no JavaScript experience...uh oh!

    Use the Media Manager (under the File menu bar item).
    Link:
    What Can You Do with the Media Manager?

  • Possible to set shortcut for file scripts custom script ?

    i have some custom scripts in file > scripts. i'd like to set a shortcut key for them, but you can't do that thru edit > keyboard shortcuts because the custom ones don't show up, only "other script F12" shows up.
    is there a way to set a shortcut to execute a custom script? i am using Ai CS3 version 13.0.2
    some work arounds i tried that didn't seem to work:
    - setting the script as an action - didn't work, the script does a bunch of stuff that can't be solved by actions
    - setting an action and inserting a menu item, then setting a shortcut to run the action - doesn't help because menu item (the script) gets disassocated from the action every time you shut down Ai. sometimes it disassociates itself. tried to save the actions and reload them, but the scripts were still disassociated
    thanks

    As it sounds like you have already discovered, you should be able to define an Action with but one InsertMenuCommand step in it. That menu command would be the selection of your script from the File Menu.
    However, that functionality has been broken for four full versions now. The Menu Command step goes vacant after quitting and re-launching Illustrator.
    I keep an Action in my Actions palette titled CurrentScript. I can at least, at the beginning of a work session in which I know I will need to call a particular script repeatedly, re-do the Insert Menu Item step and have it survive during the work session. (It will, of course, be gone if I quit & relauch.)
    If Actions could reliably call scripts from the File menu, one could do some very cool things. Many operations in the standard UI are not available via the scripting model, and of course vice-versa. Simply being able to reliably call scripts as individual steps of an Action would open the door for elaborate automations that perform both scripted functions and those available in the UI.
    But alas, users have been complaining about this bug for four versions now.
    I think it is conceivable that one could build a Javascript that employs the ScriptUI functionality, and have that script run automatically at launch. That script could simply be a "dashboard" palette from which to call other scripts. But one should not have to go to such ridiculous lengths to work around a bug that has gone unaddressed for so long.
    JET

  • Set Parameter for Select Option & Customized field

    Hi All,
    I had 2 questions here:
    1. This field in the report is a customized field and did not have any parameter.
        Is there any way to set the parameter for such fields?
    2. This field is a select option in the report.
        How can i set the parameter for the select option with lower and higher range?

    >
    Sally Teo wrote:
    > Hi All,
    >
    > I had 2 questions here:
    >
    > 1. This field in the report is a customized field and did not have any parameter.
    >     Is there any way to set the parameter for such fields?
    ----> plz ref ur prev.Post.
    >
    > 2. This field is a select option in the report.
    >     How can i set the parameter for the select option with lower and higher range?--->
    i dont think its possible to give High/low values to them, better to write small BDC to pass the data.
    regards
    Prabhu

  • ITunes set up for a new "home computer" on an iPhone set up on a different computer

    I recently bought a new MacBook laptop. I downloaded iTunes and want to set it up as my "home computer", but it has already been set up with my old laptop. How to I change the home computer to my new MacBook, without loosing my music, games, data, etc., so that I can download music and things from my new computer. As of right now, iTunes tells me that I have to "erase" everything from my iPhone and "sync" it to the new iTunes on the Mac. I assume that this will cause me to loose all my progress in games on my phone, and I DO NOT want to loose that. Can anyone help me? Thank you!

    Copy everything from your old computer to your new one.
    Sync

  • Trying to look Contents for a new custom InfoCube and giving ERRORS ?????

    Hi all,
        I have created a custom InfoCube (ZTEST_PS) in similar to 0PS_C04. When I try to look the Contents of this InfoCube through Manage --> Contents or Listcube Tcode option, it is giving the following warnings/errors for every attempt:
    1. Your user master record is not sufficiently maintained for object Company Code Hierarchy
    Diagnosis
    When checking your authorizations for object 'Company Code Hierarchy' (technical name: ZCOMPHIER) it was established that you do not have authorization in your user master record for this object (return code 12).
    Procedure
    How you continue depends on the return code. See the online documentation for ABAP language element "AUTHORITY-CHECK". Please note:
    With a return code of 12, the object 'Company Code Hierarchy' has not been maintained in the user master, meaning there is no profile in the user master record in which this authorization object has been entered. This is, however, absolutely necessary, as all of the authorization objects created in the development class RSR are validated in the 'and' link. If the authorization is missing for only one object, the request is rejected as unauthorized.
    Get the person responsible for your authorization to create you a profile containing authorization for object Company Code Hierarchy.
    2. System error: RSDRC / FORM AUTHORITY_CHECK USER NOT AUTHORIZED ZTEST_PS ZTEST_PS
    3. System error: RSDRC / FUNC RSDRC_BASIC_CUBE_DATA_GET ERROR IN RSDRC_BASIC_QUERY_DATA_GET ZTEST_PS 64
    Message no. DBMAN100
    4. System error: RSDRC / FORM DATA_GET ERROR IN RSDRC_BASIC_CUBE_DATA_GET ZTEST_PS 64
    When I try to run a query against this custom InfoCube, I am getting the same First Warning.
    How can I fix theses warnings/errors, PLEASE ?
    Thanks.

    Venkat,
    You dont have authorizations for the 'Company Code Hierarchy'ZCOMPHIER , you dont have authorizations.
    What you will have to do is ask the basis person to give you authorization for the Hierarchy , Or if you can ..switcg off authorization checks for the Cube in T-Code RSSM.
    Regards,

Maybe you are looking for

  • How to take print of revision 2 po if it has revision 3 also

    Dear gurus, how to take the print for old version if it has many new versions.plz explain me with screen shots. Moderator message: discussion continued here: http://scn.sap.com/thread/3547172 Discussion locked Message was edited by: Jürgen L

  • Mac calendar syncing problem with exchange server

    Hi, I have been having problems syncing the calendar on my MacPro (late 2013, with OX Y Yosemite, even the earlier operating system) with my work calendar (exchange server). It keeps giving an exclamation mark and the error message is "There was an e

  • Error 5002

    Tonight when I tried to check for purchases, it said, "Unable to check for purchases. An unknown error occurred (5002).) Anybody know what this means? I also cannot buy anything. It gives me another message, "Could not purchase. The network connectio

  • Okay, so Im having an issue with my mac and itunes

    So I went into Apple and they had to reboot my computer because of my disc drive not working, well now I can't get my itunes library back on my computer, even though homesharing and my account info is in place. Why wont it put my library back on my c

  • Problem with opening page

    Hi, I have problem with open IR,ID in XI. I can able to logon the xi server through log on pad. But i am unable to open IR,ID, SLD and Runtime work bench. Can u help me this. Thanks and regards manoj