Setting Application leve items after authentication

All,
I'm doing a custom authentication in my application using the built-in login page and calling the standard API. My function then returns TRUE/FALSE for authentication.
After I authenticate the user, I want to set an application level item to the primary key of their user (i.e. GV_USER_ID).
When the user issues queries against the reports, then I will build the where clause to say 'where user_id = :GV_USER_ID'.
I'm at a loss however in setting the application level item.
Initially, I set a PAGE PROCESSING -> PROCESS to fire onSubmit - after calcs & validations, putting it between "Login" and "Clear". My process queries the database using P101_USERNAME from the login page.
However, when my user is logged in, the application level item is blank. Here is my code to set the value. Remember, my user will already have been authenticated.
declare
u_id USER.USER_ID%TYPE;
predicate varchar2(30);
begin
if (lower(trim(:P101_USERNAME)) = 'administrator') then
u_id := 0;
predicate := 'user_id like ''%''';
else
select user_id
into u_id
from user
where lower(trim(EMAIL_ADDR))=lower(trim(:P101_USERNAME));
predicate := 'user_id = ' || u_id;
end if;
:GV_USER_ID := u_id;
:GV_ID_PREDICATE := predicate;
exception
when others then :GV_ID_PREDICATE := 'user_id is null';
end;
Can someone tell me exactly where I should place this code so I can set my application items?
Thanks.

Ooops, spoke a little too soon. The application items do not get set with I first spawn the browser and and try to log in.
However, when I log out and then log back in, then my application items get set. The code is now sitting in the authenticate_user function
create or replace function authenticate_user
(p_username in varchar2
,p_password in varchar2)
return BOOLEAN is
f_id FRANCHISEE.FRANCHISEE_ID%TYPE;
passwd FRANCHISEE.PASSWORD%TYPE;
predicate VARCHAR2(30);
valid BOOLEAN;
begin
valid := FALSE;
-- authenticate the user
select password into passwd
from franchisee
where lower(trim(email_addr)) = lower(trim(p_username));
if (passwd = p_password) then
valid := TRUE;
end if;
-- set the query predicate
if (valid = TRUE) then
if (lower(trim(p_username)) = 'administrator') then
f_id := 0;
predicate := 'franchisee_id like ''%''';
else
select franchisee_id
into f_id
from franchisee
where lower(trim(EMAIL_ADDR))=lower(trim(p_username));
predicate := 'franchisee_id = ' || f_id;
end if;
htmldb_application.update_cache_with_write('GV_FRANCHISEE_ID', f_id);
htmldb_application.update_cache_with_write('GV_ID_PREDICATE', predicate);
end if;
return(valid);
exception
when OTHERS then return(FALSE);
end

Similar Messages

  • Setting application level item during authentication

    We’re having an issue with an application level item that we set during our custom authentication function to store a role list for authorization. The issue is that the application level item, which should be set using htmldb_util.set_session_state(‘ITEM_NAME’, p_item_value), is not being set.
    On further investigation we realised that this issue was only affecting developers, not users of the application. This seems to be because the home page link, set in Shared Components > Edit Security Attributes, is set to “f?p=&APP_ID.:1:&SESSION.”, which means that the developers session was being passed to the application when the “Run Application” button was pressed. What then happens is that following the successful execution of the authentication function, a new session id is generated and visible on the URL and the Application Level Items are not set correctly.
    Examples:
    I’m developing an application on Apex that has the home page link set to “f?p=&APP_ID.:1:&SESSION.”, here’s the first part of my URL at the Application home page:
    http://apex.oracle.com/pls/otn/f?p=4000:1:1065658352862710::
    I hit “Run Application” and get to this URL (note the session id is the same)
    http://apex.oracle.com/pls/otn/f?p=16033:1:1065658352862710:::::
    I log in using any old username and password (the auth scheme on this demo app always returns true) and I get to this URL (note the session id is different):
    http://apex.oracle.com/pls/otn/f?p=16033:1:1403999736046638
    My application level item is not set and I start to cry. When I recover from my tearful episode I try to log in again, I hit logout and get taken to this URL:
    http://apex.oracle.com/pls/otn/f?p=16033:1
    I log in again (with the same username or different, it doesn’t matter) and low and behold, my application level item is set ok. This is the URL I can see (note another new session id):
    http://apex.oracle.com/pls/otn/f?p=16033:1:4917752800353335
    In despair, I close my browser window and go to my other application, this one has got the home page link set to “f?p=&APP_ID.:1” (no session id passed).
    I log back into Apex as a developer and go to the application home page at this URL:
    http://apex.oracle.com/pls/otn/f?p=4000:1:131988631742187::
    I hit “Run Application” and get to this URL (note the session id is missing):
    http://apex.oracle.com/pls/otn/f?p=19114:1::::::
    I log in using any old username and password (same deal as before) and I get to this URL (new session id):
    http://apex.oracle.com/pls/otn/f?p=19114:1:4320851658879093:::::
    Amazingly, this time the application level items are set first time.
    What I’d like to know (there is a purpose to this) is:
    - Why is a different session allocated to the application after login, when a “developer’s” session id is passed to the application?
    - If I remove the session id from the home page url what is the impact? I can’t think of anywhere within the application that this is used (other than between page 101 and the home page), but our thoughts are that this could mean that users end up generating more sessions on the server.
    - Is there any other way around this, perhaps using a different method of setting the application level item? The authentication procedure which sets the item reads as follows and mimics our authentication procedure (which you can assume does a little bit more than just returning true):
    function test_login 
      (p_username in varchar2 default null, 
      p_password in varchar2 default null) return boolean is 
    begin 
      htmldb_util.set_session_state('F16929_SYSDATE', to_char(sysdate, 'DAY')); 
      return true; 
    end;- Has anyone else encountered difficulties with the setting of application level items during login or has anyone come up with a more ingenious plan for passing something back from authentication that can later be used for authorisation?
    Thanks
    matt

    Scott,
    Many thanks for the response.
    We've found a way around this now, by changing the developer's usernames to the same as their NT/ Active Directory signon, which fools APEX into maintaining the session id from their builder session even though when logging into the application they get authenticated by LDAP.
    Using a post authentication process would be ok but I can't see any way of passing a variable retrieved in the authentication process under the first session to the post authentication process so that it can be set in the second session. We'd either therefore have to insert the data into a table and read it back or add an extra LDAP call to retrieve the user role/ group list during the post authentication process.
    Thanks again,
    Matt

  • Value is not getting set in messageTextInput item after PPR action

    Hi everyone,
    I have a page in which On selecting a value from a lov, the next messageTextInput item should be set to "dummy"(I am using setText() method for this). However its not getting set at that time . But if I apply the same code in click event of submitbutton, its getting set. i.e. some kind of page refresh event is required for this.
    Plz suggest me the way of achieving this through PPR.
    My code of controller is like this :
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    /* validation code for Preffered ordering Method LOV */
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if(lovInputSourceId.equals("PreferredOrderingMethodLOV"))
    if(!selectedPrefferedOrderingMethod.matches("URL"))
    String v_ani = pageContext.getParameter("AribaNetworkId");
    if(!v_ani.matches("dummy") || v_ani.length()==0)
    OAMessageTextInputBean aribaNetworkIDTextInputBean =
    (OAMessageTextInputBean)webBean.findIndexedChildRecursive ("AribaNetworkId");
    String dummy = "dummy";
    aribaNetworkIDTextInputBean.setText(pageContext, dummy);//.setText(pageContext,"dummy"); // here its not getting set on page
    String s = aribaNetworkIDTextInputBean.getText(pageContext); // however its showing "dummy"here
    }

    Hi,
    OAMessageTextInputBean aribaNetworkIDTextInputBean =
    (OAMessageTextInputBean)webBean.findIndexedChildRecursive ("AribaNetworkId");
    String dummy = "dummy";
    aribaNetworkIDTextInputBean.setText(pageContext, dummy);//.setText(pageContext,"dummy"); // here its not >getting set on page
    String s = aribaNetworkIDTextInputBean.getText(pageContext); // however its showing "dummy"here
    In processFormRequest() method we should not change bean properties.
    Instead, achieve your requirement using
    row.setAttribute() method.
    -Anand

  • Setting session item after logon

    hello,
    i want to set the value of an item after an user successfully has logged on to an apex application.
    where should i set the value best?
    regards,
    roman

    A good place to do this is in the authentication scheme's post-authentication process.
    Scott

  • Set item value from application level item

    Hello,
    I'm using Apex 2.2.1.00.04. I've modified the Page "No Tabs" template so that I can have my own Form (which is submitted to an outside website). On this form, I create some hidden items:
    <form name="frmEPay" method="POST" action="some_website">
    <input type="hidden" id="i1" name="userId" value=&G_ID. />
    <input type="hidden" id="i11" name="timestamp" value="" />
    <input type="hidden" id="i12" name="hash" value="" />
    On this apex page, I have a javascript function which is called in the onload (basically, the ApEx webpage displays and then is redirected). Here's a snippet of that function:
    var appProc = new htmldb_Get(null, html_GetElement('pFlowId').value,'APPLICATION_PROCESS=PrepEPay',0);
    appProc.get();
    appProc = null;
    document.getElementById('i11').value = "&G_ECOM_TIMESTAMP.";
    document.getElementById('i12').value = "&G_HASH.";
    document.frm_infiNET.submit();
    As you can see, the function calls an application level On Demand process (PrepEPay). That process sets the values of the application level items G_ECOM_TIMESTAMP and G_HASH. After those App level items have their values, I want to take those values and apply them to the hidden items on my custom form. Unfortunately, it doesn't work how I have things currently. I've verified that the On Demand process is running(by viewing the Session report on the page). So my problem seems to be this: 1. Retrieving the values from the Apex application level items
    2. Setting those values to the values of my hidden items (on my custom form)
    I think the biggest reason why I'm having difficulties is because I have to do a lot of this in the template, since that is the only way to have a separate Form. Maybe my problem is that I don't understand how to reference the Apex application level item value from a different form?
    Thanks,
    Marty

    Marty,
    You are describing this as if you expect the substitution within "&G_ECOM_TIMESTAMP." and the other one to take place in some kind of lexical order, e.g., from the top to the bottom of the HTML. The replacements happen in the engine, before anything is sent to the page. Then the browser interprets language constructs such as javascript calls which in your case includes an ajax invocation of a server-side application process.
    You need to re-think the machinery here.
    Scott

  • Unable to access application set in admin console after upgrade to 7.0 M

    Hi Experts
    I am unable to access the Application Set through BPC Administration after upgrading our development server to version 7.0 SP3. I followed the instructions as per the Upgrade guide, and there was no issues during the installation. But when trying to access the application set i receive the following error message on step 9  ( 9/10) of during the connection.
    Error message: Subquery returned more than 1 value. This is not
    permitted when the subquery follows =, !=, <, <= , >, >= or when the
    subquery is used as an expression.
    I have done all of the steps outlined as per SAP Note 1242962, but i still receive the error message. I tried to do a SQL Profiler trace, but i have been unable to find the query which returns more than one record.
    Any help is appreciated
    Kind Regards
    Daniel

    Interesting that you ask about upgrade vs uninstall/reinstall.
    We were running BPC 5.1
    We have also re-installed the Admin client to be the new version.
    We have been working with an outside consulting firm to manage our system upgrade/install.
    Our dev and qa environments were uninstalled then reinstalled.
    When we went to production, our system was intially upgraded.  I do not know why this route was chosen when that was not what was completed on dev/qa.  On our production 'upgrade', we are still working through issues. We then uninstalled iis, sqlserver reporting services, both .net 1.1 and 2.0, and the BPC application. Then reinstall everything and we were getting the same errors. 
    Our error was at Progress 10/10 Create Database Schema and check Application server collation.
    Error Message: Object Reference not set to an instance of an object.
    We are able to access the appShell and test copies of the appShell, we were not able to access any custom appSets which were created prior to the upgrade, nor are we able to access any appSets that were created as a copy of the custom appSet after the upgrade.
    When logged with SAP, we were directed toward note Note 1331040 - Cannot log into 7M Admin console after restore from version5 noting that we needed to do the following changes:
    Note that you will need to change the following:
    INSERT INTO tblDefaults VALUES ('_GLOBAL','Prev_AppSet_Version','','','7.0.112')
    INSERT INTO tblDefaults VALUES ('_GLOBAL','Curr_AppSet_Version','','','7.0.112')
    to
    INSERT INTO tblDefaults VALUES ('_GLOBAL','Prev_AppSet_Version','','','7.0.113')
    INSERT INTO tblDefaults VALUES ('_GLOBAL','Curr_AppSet_Version','','','7.0.113')
    The reason is because '7.0.113' means 7 MS SP04 while '7.0.112' means SP03.
    There are 8 steps in this note, for us, only the first 2 were needed. I have asked SAP to create new note/update existing accordingly.
    With the table entry, we were able to successfully access our app set.
    Hope our experiences can help you out.
    Thanks,
    Becky Zick

  • Setting application items through javascript

    Is there any way to modify application items using javascript? I would work with page items, but I need something that is guaranteed to be in the session state.

    Oh yes, I know that. Well here's the exact problem (I've posted threads on it from a couple different angles previously):
    - I am trying to open a popup with a report region such that I can send a query to the popup some how, without doing a page submission of the parent page.
    - The current method I am using is to send the query by URL, but I'm reaching the limit of URL length, and it's not a particularly secure solution.
    - My latest idea was to pass-by-reference (what this thread is about), but this presented a couple of problems.
    1) I could set a parent page item dynamically by JS, but the only way I know of loading the information automatically in the popup is using onLoad -- but that's too late.
    2) I could use session state, but I risk Region condition: javascript is enabled?, page session items are not set until a page is submitted, and application session items are not accessible by JS.
    I was thinking that maybe there is some way of accessing browser session state with JS, but I guess not....

  • How do I set up my Imac after adding a SSD along with my existing HD

    How do I set up my Imac after adding a SSD so that my system and apps are on the SSD and everything else is on the HD?  I am using mountain Lion.  I want to make sure I can still do Time Machine backups. 
    I was planning on first formatting the SSD and then using Migration Assistant to copy the System and the Library and the Apps over.  Where it gets confusing is the User account where some of the items will be on the SSD but I want all my folders to be on the HD.  Do I just not copy over that other stuff and once I restart from the SSD it will know where all the folders are?  Is there anything I need to know about setting up a time machine backup after that?  Will the backup I had from the one drive have to be erased and start a whole new backup?
    I just want to do this right so I don't have some major problems.
    Thanks for any help.
    Michael

    time machine backed up your whole system data/everything in time machine hdd.
    you want to use ssd over hdd so you need to put new mac os x in ssd.
    then copy all the stuff that you want to put in ssd.
    from my point of view put the mac os x and other application in ssd and leave other data in hdd.(music,movies,etc....)
    more info about time machine : http://support.apple.com/kb/ht1427

  • J_security_check not redirecting after authentication - in one environment

    Hi all,
    I have a J2EE web application developed in JDeveloper 10.1.3 which uses JAAS security with a custom authentication provider class. I can configure this is both a windows and unix based OC4J. The windows OC4J is stand alone, the unix one is part of a managed instance (OPMN).
    When I deploy to windows, attempts to access a protected resource cause the authentication to fire off perfectly and redirect to the appropriate url after login is successful. Absolutely no problems.
    When I deploy to unix with the same configuration, the authentication fires off perfectly but after authentication the redirect attempts to go to Base URL/j_security_check which results in a 404 not found as j_security_check is a logical name and not a real url.
    I have tried setting the ocfj.formauth.redirect flag in the oc4j startup options and this did not seen to help. I still got the 404 error.
    Can anyone advise me on whether there are any switches or parameters I need to set for the j_security_check redirection to work correctly, or is there something else I need to do in a unix (Solaris) environment to cause the redirections to work?
    thanks for any suggestions
    Ben

    Hi,
    you are always seeing the j_security_check in the URL. It seems that this problem is OC4J rekated and I suggest to post the question on the Application Server or the J2EE forum here on OTN
    Frank

  • How do I clear application level item of the last value it held?

    See next post - I oopsed the first try.
    Edited by: user3034406 on Jul 28, 2009 1:48 PM

    Using oracle 11g, apex version 3.0.
    Ok, so I am developing a survey with questions and their related answers (either radio group or checkbox depending). I have it set up so that when a user clicks a checkbox, an apex_collection is updated. In the pl/sql of my region source, I left outer join to this collection to display the checkbox as checked when its value is found in the collection. Using this same strategy, I can delete a value from the collection when a user uncheckes a box....
    The problem I am having is this: the very last value that a user checks initially (i.e. takes checkbox from unchecked to checked status) is staying in my application level item :ADD_THIS, so when the page is refreshed or whatever, this value gets added to my collection, which means it shows as checked. Well, I think this is what is happenig...!
    I have tried setting the app level item to null in a computation process, but this screwed everything up and nothing would work right....
    So, if someone knows when, how and where to reset an app level item?
    NOTE: I barely know javascript (getting the hang of simple stuff but I have a long way to go!) and am a little shaky on things like session state, before load, after load, etc., etc, when it comes to apex. Please be patient with me! (smile)
    Here's what's going on script wise:
    PL/SQL in region source of page: builds list of questions and their associated answers
    DECLARE
    #####stuff here####
    CURSOR multiple_answer_cur IS select apex_item.checkbox(1, nvl(a.c001, a.answer_seq),'onclick="f_updateMember(q_seq, a_seq);"', a.c001, null, v_q_seq) cbox, a.answer_text, qa.question_seq, a.answer_seq
    *<etc. etc....>*
    CURSOR single_answer_cur IS select apex_item.radiogroup(radio_global, nvl(a.c001, a.answer_seq),a.c001, null, null, null, 'f_updateMember(q_seq, a_seq)',null, v_q_seq) rgroup, a.answer_text, qa.question_seq, a.answer_seq
    *<etc. etc....>*
    BEGIN
    ####stuff here that builds survey and writes it using HTP. to page####
    END;
    Javascript function to add or delete from collection (in header of page)
    function f_updateMember(q_seq, a_seq){
    --determine if value represents checked or unchecked box
    var isString = /q|a/;
    var getThis = document.getElementById(q_seq).value;
    var findinValue = getThis.search(isString);
    var getaddthis = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AddCheckboxValue',0);
    var getdelthis = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=DelCheckboxValue',0);
    --onclick, if an 'a' or 'q' is found in value, this box is in the collection and therefore checked, so delete it
    if (findinValue != -1) {
    getdelthis.add('DELETE_THIS', "q"+q_seq+"a"+ a_seq);
    getdelthis.GetAsync(function(){return;});
    getdelthis = null;
    }else{
    --onclick, no 'a' or 'q' is found in value, this box is not in the collection, so add it
    getaddthis.add('ADD_THIS',"q"+q_seq+"a"+ a_seq);
    getaddthis.GetAsync(function(){return;});
    getaddthis = null;
    Snippet of page source
    <b>Question number one</b>
    <input type="checkbox" name="f01" value="q78a489" checked="checked" onclick="f_updateMember(78,
    489)" id="78" />Answer option one for question one>
    <b>Question number two</b>
    <input type="checkbox" name="f01" value="483" onclick="f_updateMember(77, 483)" id="77" />Answer
    option one for question two>
    Edited by: user3034406 on Jul 28, 2009 12:18 PM

  • Custom SharePoint 2010 designer page throws "The data source control failed to execute the insert command" exception while adding the new item after the August 13, 2013 CU has installed

    We have the SharePoint Server 2010 with SP1 environment on which the custom SP2010 designer pages were working as expected before the
    August 13, 2013 CU has installed. But, getting the below exception while trying to add the new item after the CU has installed.
    Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteInsert(IDictionary values)     at
    System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    06/19/2014 16:49:37.65  w3wp.exe (0x1240)                        0x1300 SharePoint Foundation        
     Runtime                        tkau Unexpected Microsoft.SharePoint.WebPartPages.DataFormWebPartException: The data source control
    failed to execute the insert command. 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.InsertCallback(Int32 affectedRecords, Exception ex)     at System.Web.UI.DataSourceView.Insert(IDictionary
    values, DataSourceViewOperationCallback callback)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e)    
    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean
    inclu... 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    06/19/2014 16:49:37.65* w3wp.exe (0x1240)                        0x1300 SharePoint Foundation        
     Runtime                        tkau Unexpected ...deStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    I have tried changing the "DataSourceMode" as below, now the insert command is working, but update command is not working.
    <SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" />
    Also, the lookup dropdown fields are displaying the value as "<a href="Daughterhttp://cpsp10/sites/Employees/_layouts/listform.aspx?PageType=4&ListId={8F62F444-FB6A-4F03-9522-C4696B45DCD1}&ID=10&RootFolder=*">Daughter</a>"
    instead of only "Daughter".
    Please provide the solution to get rid of this issue.
    Thanks
    Ramasubbu

    Try below:
    http://social.technet.microsoft.com/Forums/en-US/ae910269-3a0c-4506-844b-e8bc89d95b71/data-source-control-failed-to-execute-the-insert-command
    http://blog.jussipalo.com/2012/01/sharepoint-2010-data-source-control.html
    While there can be many causes for this generic error message, in my case the first parameter or ddwrt:DataBind function inside the SharePoint:FormFields element was
    'i' and I was working with an Edit Form. Changing it to
    'u' as it was with every other FormField fixed the issue.
    <SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="Edit" FieldName="Esittaja" __designer:bind="{ddwrt:DataBind('u',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Esittaja')}"
    />
    Explanation:
    DataBind operation type parameters (the first parameter) are listed below:
    'i' stands for INSERT,
    'u' stands for UPDATE,
    'd' stands for DELETE.
    http://webcache.googleusercontent.com/search?q=cache:d9HHY4I7omgJ:thearkfloats.blogspot.com/2014/03/sharepoint-2010-data-source-control.html+&cd=4&hl=en&ct=clnk&gl=in
    If this helped you resolve your issue, please mark it Answered

  • System should not allow to delete PO line Item after GR/IR

    Hi,
    I am working on a SAP Retail Implementation project.
    Currently the system is allowing us to delete the PO line items after doing GR or IR against that PO line item. But the clients requirement is that the system should not allow to delete PO line item after doing GR/IR.
    We are using Account Assignment Category-N, Item Category-S.
    Please let me know if you have the solution for this requirement.
    Thanks in advance
    Thanks & Regards,
    Suresh

    Hi,
    Standard SAP will not allowed the PO to be deleted once it was GR done. The controlled is on the attributes of message to set as "E"
    Message no. 06115
    But if invoiced takes place, the is the point that PO can be deleted.
    You have to do have a Enhancement using MM06E005, insert you logic here to check PO history tables like EKBE, then check if invoice " Q" (BEWTP) exist, the PO cannot be deleted once the user delete the PO line and SAVE it. Ask you developer to help you on the following coding.
    Use MM06E005 and EXIT_SAPMM06E_012
    IF SY-TCODE = 'ME22N'.
    IF sy-ucomm = 'MESAVE' OR SY-UCOMM = 'YES'..
    LOOP AT TEKPO.
    IF TEKPO-LOEKZ = 'L'.
    SELECT SINGLE BELNR FROM EKBE INTO BELNR1 WHERE EBELN = TEKPO-EBELN AND EBELP = TEKPO-EBELP AND BEWTP = 'E'.
    IF SY-SUBRC = 0.
    SELECT SINGLE BELNR FROM EKBE INTO BELNR2 WHERE EBELN = TEKPO-EBELN AND EBELP = TEKPO-EBELP AND BEWTP = 'Q'.
    IF SY-SUBRC = 0.
    Regards,

  • Auto completion of Sales order item after upto 90% delivery

    Hello,
    Business Requirement:
    After 90% quantity of an order quantity is delivered, the item should not be considered by MPS planning run and the item should not appear in MD04.
    Current workaround:
    Currently, for that item we are setting Partial Delivery / item = A, manually, and then the order item disappears from MD04.
    Question:
    I found in the customer master sales area data, Partial Delivery / item can be set to A and it gets copied in the sales order. But, the underdelivery talerence is nil in our customer master records. So I dont know how to satisfy the condition of 10% underdelivery. Is there any way by which this can be done, other than writing a program and scheduling it for nightly batch job.

    Hello,
    Business Requirement:
    After 90% quantity of an order quantity is delivered, the item should not be considered by MPS planning run and the item should not appear in MD04.
    Current workaround:
    Currently, for that item we are setting Partial Delivery / item = A, manually, and then the order item disappears from MD04.
    Question:
    I found in the customer master sales area data, Partial Delivery / item can be set to A and it gets copied in the sales order. But, the underdelivery talerence is nil in our customer master records. So I dont know how to satisfy the condition of 10% underdelivery. Is there any way by which this can be done, other than writing a program and scheduling it for nightly batch job.
    Any help is appreciated.
    Thanks.
    Madhura

  • Setting value of items based on a radio group selection

    Hi,
    I have a radio group with 3 values (let's say A, B, C)... at the moment I have dynamic actions set to hide and unhide items based on the selection from the radio group...
    e.g when value A is selected then only item_1 and item_2 are displayed, when value B is selected then only item_3 and item_4 are displayed... and so on...
    idea was to let users to only enter information related to specific selection... but with what I currently have, users can select option A from the radio group and can enter information in item_1 and item_2 and then they can change there minds and select option B and start entering information in item_3 and item_4 and when they save the form they potentially could have information in all items (item_1 to item_4 and so on)...
    Is there a way I can set the value of certain items to null based on the selection from the radio group... e.g when user select option A, then values of item_3 and item_4 be set to null and if they select option B, then values of item_1 and item2 be set to null...
    Please advice how to approach it the best... I would appreciate a step by step solution as I am a new bee...
    Thanks in advance

    Hi,
    You can hide and disable other items.
    Disabled items values are not submitted.
    And you can create after submit computation that set NULL to item session state according your radio group state
    Regards,
    Jari

  • Setting App level Items and using it.

    Hi all
    I am setting the application level item value by application level process which is working good.
    application level process : select get_dbname into env_str from dual.
    But when I use this variable value, its not working.
    In logout URL,, I am trying to put &env_str. but that is not working.
    Any idea?
    pb

    Scott,
    Its working, but for some reason this whole thing (using item in logout url) wasnt working for this particular application.
    Thanks for the reply.
    pb

Maybe you are looking for

  • How To know Which Columns are not null and Which are null

    Hi Freinds, I want to Know ,How by Wrting a Query we can get the Names of The Columns from the Table which is set to not-null or null, Thanks Shoaib

  • Major Prolem with 30GB Video!!  Underwater, Instant death.  Help Please?

    I have had a 30GB Video Ipod for about a year now. For the first few months it worked like a charm, but now it is not working at all. I have tried everything i can from FAQ's and other posts on apple.com, but none of the common problems pertain to mi

  • Problem with creating ssl on wls 10.3

    I have oziiden.jks containing private key, which is used on two other weblogic servers(on winxp and aix5.3), and now i'm trying to use this jks to create ssl on wls 10.3 on aix5.3. The configuration is the same for keystrores and sll in all 3 servers

  • Regarding the workflow notification page customization

    Hello Everyone... I am new to Oracle OAF... Customize the Oracle Workflow Notifications page (for Open Notifications) by using OA Framework Customization (to display more details on the Notification) what is solution for this component? could someone

  • Buying the iPhone 3G S at the Apple store

    Hey guys, so i have been waiting for the iPhone 3G S ever since i got tired of Edge moving so slow on my 2G iPhone, and its been quite a wait. But sadly, Apple's strict policies and quick sales are keeping me from obtaining an iPhone. All of AT&T's s