Creating a non database field

Hi.,
i am using jdev 11.1.5
i need to insert a non database field in jspx page
i had created a table finperiod
i need to insert a four nondatabse fields named as rec,dist,supl,cust.
How can i acheive this?

i need to acheive this querry in adf
     select count(*) into var_count
     from appl_journals
     where aj_bu=:global.bu and
     aj_year=:FIN_PERIODS.fp_year and
     AJ_PLANT =:FIN_PERIODS.FP_PLNT AND
aj_period=:FIN_PERIODS.fp_period and
     aj_appl=:AJ_APPL and
     aj_status='N' ;
     if var_count<>0 and :AJ_APPL is not null then
          :APPLICATIONS.appl_exist:='Yes';          
     elsif :AJ_APPL is not null then
          :APPLICATIONS.appl_exist:='No';
     end if;
how can i perform this

Similar Messages

  • Insert Image to table from a Non Database Field

    Hallo,
    db- 9i EE R2
    forms - 6i R2
    OS - W2003
    I have a requirement to upload Images to the database from forms.
    I planned to keep the transaction data and the Images separately in different tables with a reference.
    So, I created the Image field (BLOB)  with a Non Database Field in the Form and use a button to upload the Image. (using READ_IMAGE_FILE).
    I tried to insert the Image to the Actual Image table in PRE-INSERT Trigger at block level.
    But I was not able to Insert the using reference method.  (Cannot compile the PRE-INSERT)
          INSERT INTO IMAGE_TB (ID,IMAGE)
           VALUES (IMAGE_SEQ.NEXTVAL, :ITINERARY_MAP.IMAGE);
    So, Please help me to insert a image to different table from a Non Database Field?
    Thanks

    I don't think it will work with a non-db-item. But you could create a separate block based on your image_tb-table, use read_image_file on the then db-based-column and then simpy issue a commit_form.

  • How to display records from a query into non-database field

    Hi
    I a have a problem:
    I have a query with many tables and 6 column(select a,b,c,d,e,f from x,y,z,t,s,g where conditions) and I use 3 parameters.
    I create 3 parameters :datai,:dataf and :partener and a button with a trigger when button is pressed.
    Then a create a manualy block with six field non-database a1,b1,c1,d1,e1,f1.
    Now I want to display all the records from my query into a1,b1,c1,d1,e1,f1 where a1=a,b1=b,etc. and all the records (if I have 20 record, it will display 20 records in non-database field) when I press the button.
    How I made:
    I create a cursor with query then
    begin open cursor
    loop
    fetch cursor into :a1,:b1,:c1,:d1,:e1,:f1;
    end loop;
    close cursor;
    end;
    It display one record in a1,b1,c1 only and it have to display 100 records and are date for all the fields.
    Can somebody help me in this problem?
    Thanks.
    Edited by: 928437 on Oct 1, 2012 2:55 AM

    Creating a view, and querying that into a database block is an excellent solution.
    To use the non-database block:
    You're missing the all-important Next_Record; command.
    <pre> Begin
    Go_block('X'); -- block X is the non-database block
    Clear_Block(No_Validate);
    open cursor X1;
    loop
    If :System.Record_status != 'NEW' then
    Next_Record;
    End if;
    fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
    Exit when X1%NOTFOUND;
    end loop;
    close X1;
    end;</pre>

  • Xml file, non database field etc..

    Hi,
    There is a requirement for putting a non database field in an
    infobus grid control and populating it with some value at the
    runtime. As this is not directly available in gridcontrol, many
    have tried using a join query as I could see from the
    postings.(Like select deptcode,desc from emp, dept where
    emp.deptcode = dept.deptcode). This works well when the data is
    queried from the database. But when a new deptcode is entered, it
    is not possible to get the corrosponding value from the database
    and show it on this field, as u get readonly attribute error.
    Even if u explicitly change the attribute to updateable the error
    will remain as such.
    The cause of this problem, I have tracked down to the xml file.
    The entity for the updateable table (in this case EMP) does not
    have the attribute for deptdesc. If this is manually added, it is
    possible to add values to the deptdesc column. The catch is when
    inserting a row to the database. All the attributes in the
    entity
    will appear in the insert statement and u end up with an invalid
    column name error for the deptdesc column.
    Seeing this consistant behaviour, I assume that the insert
    statement is created by parsing the xml file. Had there been an
    attribute value in the xml file for insert into database (just
    like IsNotNull etc.. perhaps IsUpdateable which can be set
    manually), while parsing this attribute can be removed.
    To do this I would like to know where this xml parser is
    implemented in jdev. Is it possible for me to change its
    behaviour or can I expect to get a patch for this? This
    functionaliy is very much essential for me, as I am in the middle
    of a very large project using jdev2.0. I don't mind implementing
    it, if the source is available.
    Any helpful suggestions, comments are welcome. Sorry for the long
    post and thanks
    --Gopal
    null

    I don't think it will work with a non-db-item. But you could create a separate block based on your image_tb-table, use read_image_file on the then db-based-column and then simpy issue a commit_form.

  • Problems with query on a non-database field

    Hi,
    Hopefully I am in the correct section...
    I have some problems. I wanna query a non-database field but it does not work for one of them. I have tried the following...
    declare
    vsNewDefaultWhere varchar2(4000);
    vbFirstWhere boolean;
    cursor curArea is
    select a1_area, a1_hbno, a1_seqno
    from b1_in, c1_hdr, a1_bl
    where b1_sequenceno = a1_seqno
    and b1_shipid = a1_hbno
    and b1_id = :c1_shipid;
    rowArea curArea%ROWTYPE;
    procedure mergeStrings (sNewWhereClause varchar2) is
    begin
    if not vbFirstWhere then
    vsNewDefaultWhere := vsNewDefaultWhere || ' and ';
    end if;
    vsNewDefaultWhere := vsNewDefaultWhere || sNewWhereClause;
    vbFirstWhere := false;
    end mergeStrings;
    begin
    navigate.resetselrows('IMP_HDR');
    navigate.resetselrows('IMP_DTL');
    if not navigate.customwhereclause then
    navigate.resetwhereclause('IMP_HDR');
    end if;
    vsNewDefaultWhere := Get_Block_Property('IMP_HDR', DEFAULT_WHERE);
    vbFirstWhere := vsNewDefaultWhere is null;
    ---- does work!
    if :IMP_HDR.c1_usecode is not null then
    mergeStrings('c1_shipid in (select b1_id from b1_in where b1_fac = ''' || :global.fac || ''' and b1_comp = ''' || :global.comp || ''' and b1_code like ''' || :c1_usecode || ''')');
    end if;
    ---- does not work!
    open curArea;
    fetch curArea into rowArea;
    if curArea%found then
    if :IMP_HDR.c1_area is not null then
    mergeStrings('c1_shipid in (select b1_id from b1_in, c1_hdr, a1_bl where b1_fac = ''' || :global.fac || ''' and b1_comp = ''' || :global.comp || ''' and b1_sequenceno = ''' || rowArea.a1_seqno || ''' and b1_shipid = ''' || rowArea.a1_hbno || ''' and rowArea.a1_area like ''' || :c1_area || ''')');
    end if;
    end if;
    end;
    Thanks for your help in advance and let me know if you Need more Information.

    Hello,
    Ask Personalization questions in the dedicated E-Business Suite forum ;-)
    Francois

  • How do I get a value from a portal form for a non database field ? HELP!!

    I have a form based off of a table that I added a field to. The form is to allow the user to change abbreviation for a
    department field ie. BIO to BIOL. for a biology department. I have a pl/sql procedure for validation using the custom option
    on the update button to verify the user and update the data. I have tested to code at the sql prompt and it works.
    They only difference between the prompt and the form is the non-database field new_dept_abbr was added to the
    form. I don't know how to capture the value of the user input into a variable that can be used in the pl/sql.
    Any help would be appreciated.
    I have tried this approach
    v_new_dept_abbr := p_session.get_value_as_varchar2(
    p_block_name => 'default',
    p_attribute_name => 'new_dept_abbr'
    have tried using p_attribute_name as 'a_new_dept_abbr' but this does work and does not exist in the body of the form.
    Have also tried setting the p_block_name to _session - still doesn't work.
    Any ideas??
    Thanks
    Debbie Brennan

    Thanks for the info. I tried that and it still doesn't pull the value. I have opened a TAR via metalink, but I'm not getting any
    satisfactory answers. I ran across an note - 137172.1 that has this snippet of information in it.
    Unfortunately, at this time (portal 3.0.7.6.2) , a non-table item cannot be
    referenced in a plsql event handler, only in client side JavaScript code. This
    is a known limitation and will be fixed in a future release.
    I don't know how to get the value from the client side JavaScript code to a pl/sql variable. Do you?
    I've been trying to get them to tell me if the 'known issue' has been addressed in 3.0.9.
    I'll keep at it. Thanks so much for your suggestion I appreciate it.
    Deb

  • Passing url parameter values to a non database field

    Hi,
    How do I pass values from the url to a non database field ?
    The following works for a database field:
    http://host:7777/pls/portal/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1892460035&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=deptno&p_arg_values=20
    but if I use the same for a non database field item20 it doesn't do anything.
    http://host:7777/pls/portal/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1892460035&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=item20&p_arg_values=2003
    Thanks,
    Sonal.

    Hi,
    Are you trying to query on this field? It wont work because only database fields can be queried on.
    Thanks,
    Sharmila

  • Update of non-database fields mapped to database fields

    I have two columns start month and start year which
    are non-database columns and which map to one database
    field start date in the database.
    I have a post-query trigger on the start month and
    start year fields to derive the value from the
    database field start date when the form is queried.
    When I try to update the form, the update does not
    work - if I remove the post-query trigger then the
    update works but, the month and year non-database
    fields do not get queried.
    Any help will be greatly appreciated.
    Thanks,
    Suzanne

    since those 2 fields are not connected to the database field you need to code the update to the database.
    Use the pre-insert trigger and set the value of the date item according to the values of the 2 fields.

  • Set the value of a non database field in forms

    hai friends ,
    Have been struggling a lot with the problem now . Could anyone suggest me how to go about it.
    I want to set the value of a field in a form . I know the function set_value and set_value_as_(data type ) does the work . But then is there any constraint on the position where it is called.
    My requirement is on querying a form the data from the tables mut be populated( which the portal handles) and I want to populate the non database bound fields with certain values.
    Could any one help me out with this ..
    null

    I need to set value to one of the object attributes if that attribute is blank.This is some kind of a default value that you want, then? If so then just take care of that when you output it. Use <c:if>, and if the attribute is blank then output the default value, otherwise output the attribute.
    Or have the servlet that created that request attribute take care of that requirement.

  • How to promt user to save changes when changing non-database fields?

    Hi,
    I have a form with two tabs. The datablock Block_1 on tab_2 is based on a database view. But all the displayed items of Block_1 are non-database items. Whenever a user changes some items in Block_1 and presses save button, the values from non_db items get copied to the db_items (based on view) and commit_form is called. This works fine.
    But the problem here is: after changing some items in block_1, if the user navigates to some other option/form from the menu , the form doesnt promt the user to 'save the changes' and all the changes made are lost. How can I fix that?
    I have a form level key-exit trigger, (which does not fire) with following code :-
    Declare
      X  Number;
      alert_is             alert;
    Begin
    If :System.Mode = 'ENTER-QUERY' Then
           Exit_Form;
    Else
      If :System.Form_Status In ('NEW','QUERY') Then
           alert_is := FIND_ALERT('TMPL_EXIT'); -- "Are you sure you want to exit?"
        X := Show_Alert('TMPL_EXIT');
        If X = Alert_Button1 Then
           Exit_Form(no_validate);
        End If;
        Else
           Exit_Form;
      End If;
    End If;
    End;

    Slava Natapov wrote:
    Samita wrote:
    Whenever a user changes some items in Block_1 and presses save button, the values from non_db items get copied to the db_items (based on view) and commit_form is called. Try to copy values to the db_items not in save button, but in WHEN-VALIDATE_ITEM of non_db items.- I created the non-db items becoz, it was asking me 'Do you want to save changes', even when I only queried data from the view (becoz i was doing some computations while displaying the items. and the form assumed that the DB items were begin changed ). Inorder to get rid of that problem, i used mirror_items (non-db) for all the db items.
    So under this scenario, when i copy values to the db_items in WHEN-VALIDATE_ITEM trigger of non_db items, the form considers the db_items are changed and asks 'Do you want to save changes' even when the user has not made any changes and only queried data.
    Edited by: Samita on Dec 9, 2009 10:12 AM

  • Sorting on non database fields

    Hi,
    I have a Master-Detail form ( query only form). The detail block has 10 DB fields and 2 NON DB fields (check boxes) . I have implemented Sorting functionality in such a way that, I have buttons on the top of each field and if the button is pressed on , let us say for Eg. Emp Name, sorting should be done on Emp Name and followed by other fields.
    Order by clause after pressing Emp Name looks as follows:
    Order by empname, empno, sal,......
    But can we implement the sorting functionality for check boxes also ? ( Check boxes are non DB Fields )
    These check boxes are populated with cursor in POST-QUERY trigger at block level ( check boxes are in Detail block.)
    how to implement soring on these two check boxes?
    Cheers
    Ram Kanala

    Thanks Every one,
    We can have 2 approaches:
    1. Since my block is based on the view, i have to change my view, to include
    the Non- DB check box values. I can get the check box values using a function.
    2. Another approach is , write a SELECT statement to select all the
    coumns from the view along with the two NON-DB fields, (using function )
    and use this SELECT clause in the QUERY SOURCE property of the block.
    Thanks a lot for your help.
    Cheers
    Ram Kanala

  • ADF 'calculated' non-database field

    I need some help with this
    In a VO (lets say VO1(Cod.....Judet) i have a transient attribute Judet,
    then i have VO2 :
    select decode(l.cod_parinte,
                      null,
                      l.denumire_d,
                      l.cod,
                      l.denumire_d,
                      l.denumire_d || ' (' || lp.denumire_d || ')') denumire_d,
              l.COD_JUDET,
              l.cod
          from localitati l, localitati lp
          where l.cod = :CodLocalitate
             and l.cod_parinte = lp.cod(+)Now I wan that Judet to be populated based on the result of of querying VO2 with the VO2.CodLocalitate = VO1.Cod
    Till now i had declared a view accessor on VO1 for VO2 and put a LOV on Judet (View Att.=Judet ; List Att=CodJudet) and the UI to show me the denumire_d field
    The problem is that when i try the view object in OBCB i have a empty field(although if i run the appropriate query i have a value)
    I did a workaround ... putting the query(adapted properly) of VO2 into the expression of Judet att and it works like this... anyway i don't like this approach...
    So what have i done wrong in the first place?
    Edited by: kquizak on Nov 7, 2008 4:40 PM
    It seams that the workaround does not work ... my Judet field does not refreshes after an update

    i need to acheive this querry in adf
         select count(*) into var_count
         from appl_journals
         where aj_bu=:global.bu and
         aj_year=:FIN_PERIODS.fp_year and
         AJ_PLANT =:FIN_PERIODS.FP_PLNT AND
    aj_period=:FIN_PERIODS.fp_period and
         aj_appl=:AJ_APPL and
         aj_status='N' ;
         if var_count<>0 and :AJ_APPL is not null then
              :APPLICATIONS.appl_exist:='Yes';          
         elsif :AJ_APPL is not null then
              :APPLICATIONS.appl_exist:='No';
         end if;
    how can i perform this

  • Show/Hide NON-DB field in a form

    Hello, I've been reading all these forums about how to hide or show form fields dynamically. Here's my situation. I have a form that updates to a table Project. By default, once a user submits this form, certain groups will be notified that a new project exists. However, we want certain users (ITSUSERS) to be able to bypass this alert. I have added a checkbox field (SKIPHD) to my form. It does not pull any information from any table. I am planning to program the behavior I want for this checkbox into the doInsert. However, I do not want this option to be visible to any non- ITSUSERS. I am working with this code from another forum member, but I'm thinking it won't work, since this is a non-database field:
    declare
    cUserid varchar2(30);
    cSecrGroup varchar2(30);
    iSec number;
    begin
    cUserid:=portal.wwctx_api.get_user;
    cSecrGroup := 'ITSUSERS';
    select count(*) into iSec from person_ctl_syn where person_username=cUserid and person_secr_group_code='cSecrGroup';
    If iSec = 1 then
    htp.p('<SCRIPT LANGUAGE="JavaScript">
    function get_index(p_name) {
    var x;
    for (x=1; x<document.forms[0].length; x++){
    if ( document.forms[0].elements[x].name == p_name) {
    return x;
    var j = get_index("NEW_REQUEST_FORM.DEFAULT.SKIPHD.01");
    document.forms[0].elements[j].style.visibility="hidden";
    </SCRIPT>');
    End If;
    end;
    This is a really big project I'm working on. I need help!

    To add to my previous problem, I'd also like (and this might be impossible for a javascript newbie like me) that when one check box is selected, another becomes visible... within the same form. I will have two checkboxes, one is SKIPHD as mentioned before and the other in SKIPNOTIFY. SKIPHD and SKIPNOTIFY should only be visible to ITSUSERS, but SKIPNOTIFY should also only be selectable if SKIPHD is selected. Possible?

  • Query a non-database column

    My main table is SR_TECHS which has tech id and Techname
    My second table and block is sr_tech_calendar.
    Here tech_name is a non-database field.
    When I type J% in the Tech_name field and query, I should be able to get all tech_names
    starting with 'J'
    How can I get it through pre-query and what should I do in the post-query?

    you achieve this by setting
    set_block_property('blockname',default_where,'give neccessery where condition')
    in pre_query trigger
    siby

  • Database fields empty after creating a new (Crystal) Report in MSY

    Hello,
    I have some issues to use Crystal Reports in Mobile Sales Maintenance (MSY). The situation is as follows
    My example is based on this standard report, which is working
    Report Name: BPartnerActivities
    Reporting Tool: Crystal Reports
    Category: Standard reports
    Subcategory: Lists
    Report Type: Report
    Data Source: Business Content provider
    Business Content Provider: BPActivities
    My requirement is to build a new report, which is based on the standard "BPartnerActivities" Report. If I use the "copy" functionality, I get an working Copy of the standard report. However, I need to modify the Business Content Provider, but I do not want to make the modifications on the standard content provider "BPActivities".
    I am now forced to used the "copy" functionality to create a copy from "BPActivities" for my own Content Provider "My BPActivities copy", which I want to use in a new report.
    Issue:
    I cannot modify the defined Business Content Provider after using the "copy" functionality and hence forced to create a new report from scratch to be able to set a different Content Provider.
    I create my own report "MyBPartnerActivities" based on the standard report "BPartnerActivities" using the same settings and assign my new business content provider.
    If I use the "Design Report" or "Modify Report" button, the Crystal Report designer pops up. Now the problem, the Crystal Report designer does not offer me any data below "Database fields".
    In the standard report, the "Database fields" has a child element "BOACTIVITY-ttx" with several field options. My own created report from sratch does now have anything?!
    Why my report does not offer my any data or is there anything additional to do?
    Another Test
    I tried to create another report using the standard content provider "BPActivities", but I have still the same issue.
    In addition I recongized that the "browse data" fuctionality does not work on the fields in the standard report. The path to the database file does not exist. It starts with "C:\WINNT\...", but my system has "C:\WINDOWS\...". But the executed report is able to retriev the data?!
    Unfortunately was not able to find any proper documentation, but I would really appreciate any help.
    Regards,
    Andreas

    Update
    It looks like that the *.ttx file is not uploaded/create to/on the MSY system. The system shows the file in the Crystal Report Designer, but there is no file on the file system. The confusing thing is, that any standard report is still working and does not really complain about a missing ttx file. I think the content of the ttx file is somehow embeded to the report.
    Does someone know how the system should behave? Should a ttx file be automatically created & assigned to any new report or do I have to create the file by my own every time?
    Cheers,
    Andreas

Maybe you are looking for

  • Import/export not working as expected

    Following is my code. REPORT  Z_DEX_SS_CUSTOMER_CREATE. tables:zcustomer,ztransform. data:itab_bapiname like ztransform occurs 10 with header line. data:gs_return like bapireturn1,      gs_customerno like bapikna103-customer,      gs_bapikna101_1 lik

  • DDIC_ACTIVATION ERROR WHILE APPLYING SUPPORT PACKAGE SAPKW35020 IN ECC5.0

    Hi Gurus, I am getting error DDIC_ACTIVATION while applying support package(BW) SAPKW35020 in ECC5.0 with MSSQL database in Windows server. I am not able to reset the queue, when i tried to reset the queue the system prompting that " cannot reset que

  • Using Time Machine with a Used External Hard drive

    I had posted a question before about using an external hard drive that I have for a Time Machine back up that already have some stuff on the hard drive, and if using it for Time Machine would erase the info I currently have on the drive. I got a resp

  • A work flow to extract email address from mail

    Can anyone help me. I have a bunch of emails that contain text information including an email address. I want a Automator workflow that will extract the email addresses from the emails and then save them as a comma separated text file.

  • Can't get LightDM avatar instructions to work [solved]

    I must be doing something wrong with getting my avatar into LightDM.  I followed the wiki (or at least i think i did).  I am using the default GTK greeter with a theme from my system.  Theme and greeter work fine. Here are files I set up according to