How to modify query  statement in record grp of LOV in standard form

Hi,
We are using Service contracts in Production environment.
Duplicate rows selected for LOV query.
By adding a line userenv('language') we solve the problem.
But the coding was written inside the standard "OKSITMSL.pll". Here For the Field "NAME", LOV
record group "CUST_SYSTEM" assigned dynamically based on
other fields "ITEMSEL.FILTER = SYSTEM" and "ITEMSEL.CUSTOMER_FILTER = CUSTOMER".
I have added piece of the details below.
Form is Standard form "OKSITMSL", Which is calling om parent form "OKSAUDET".
Form : OKSITMSL
Block : ITEMSEL
field : NAME
pll : OKSITMSL.pll
oksitmsl.pll coding-------------
ELSIF NAME_IN('ITEMSEL.FILTER') = 'System' THEN
If UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'CUSTOMER' then
l_group_name := 'CUST_SYSTEM';
Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'RELATED' then
l_group_name := 'REL_CUST_SYSTEM';
Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'BOTH' then
l_group_name := 'BOTH_SYSTEM';
Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'ALL' then
l_group_name := 'OKS_SYSTEM';
End If;
Set_Lov_Property('ITEMSEL_LEVEL', GROUP_NAME, l_group_name);
“CUST_SYSTEM” Record group present in “OKSITMSL” form.
I need the advice how to solve my problem by adding a line in query of "CUST_SYSTEM" record group without touching/alter standard form.
Thanks in advance.
Navas

thank you shadow,
I think you mean like below:
and trim(leading 0 from a.DD_DRX_BSID_NID) = nvl(trim(to_char(SUBSTR('00042',6,5),'XXXXXXXXX')),0)
and trim(leading 0 from a.DD_DRX_BSID_BSC) = nvl(trim(to_char(SUBSTR('00042',11,5),'XXXXXXXXX')),0) ))But i think it compares with all 0's record ... but that's not correct
Edited by: josh1612 on Dec 22, 2008 2:50 AM

Similar Messages

  • How  do the dynamic state to record image in the cell-phone?

    Excuse me.How do the dynamic state to record image in the cell-phone?Or whether it has the feasibility or not?..Somebody can give me some opinions and data,please.
    Thanks.

    I don't understand very well what you want, but to record and image (get and snapshot) you have to create an Player, realize the player, start it and then get the snapshot. ex:
                player = Manager.createPlayer("capture://video");
                player.realize();           
                VideoControl videoControl = (VideoControl) player.getControl("VideoControl");
                player.start();
                byte[] data = videoControl.getSnapshot(null);
                Image image = Image.createImage(data, 0, data.length);To find out if a device can record images you can use this:
                boolean mmapiAvailable = System.getProperty("microedition.media.version") != null;
                boolean canGetSnapshots = System.getProperty("supports.video.capture") != null;Hope that answer your question.

  • How to get query from a record group

    HI
    do we get the query from which record groupis based on in oracle forms with out checking in to the properties.

    Hello,
    No, you cannot get the initial SELECT order from the Record Group.
    Francois

  • How to implement a Date Picker (Calendar) as a LOV in Portal Form?

    I have a form, which will input date from user, and I also have javascript calender.
    How to implement a Date Picker (Calendar) as a LOV in Portal Form? Do I need to choose POPUP and LOV for Date?
    Instead of typing the Date within a Portal form, a popup Calender that will allow user to Pick a date.
    Please help anyone!!

    Once you have the JavaScript and have added it to your form, you need to the the following. First off, you need to be able to customize the HTML code for the form (i.e. choose custom for form type when creating the form). Once you do that go into the custom layout to customize your HTML code. Find the field you want to add the date picker to. It will be <#your_field_name.ITEM#>
    Paste this code after it:
    <a href="javascript:show_calendar('forms[0.elements[16');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src="the source of your image file" width=34 height=21 border=0></a></TD>
    You will have to play around with the forms[0].elements[16]. 16 is what date field is set to. However your will differ, so just play with it.
    Hope this helps.
    Martin

  • How to know query fetched % of record till now

    Hi ,
    Please tell me hoe to know query fetched % of record till now
    suppose table having 20 lack record, it is taking time but i want to know
    how many % fetch is completed.
    Regards

    I dont't have access to but try to see:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1099233454171
    Regards
    Etbin

  • How to return to the first record of a multiple row cursor (Forms 6i)

    Hi all,
    I had a bit of a search through here, but couldn't quite find the answer I'm after.
    I have a multiple row cursor, which I feed into a multi-row block in Forms 6i. I have the following code:
    OPEN CURSOR;
    LOOP
       FETCH CURSOR INTO :FIELD1, :FIELD2, :FIELD3, :FIELD4;
       ... do other code not related with cursor
       EXIT WHEN CURSOR%NOTFOUND;
       NEXT_RECORD;
    END LOOP;Now, I use the Forms built-in NEXT_RECORD to move down through the records on the form and fill in each row from the db. However, once the block loads (this works correctly), the current item (ie where the typing cursor is left) is on the last record.
    Obviously, I need the current item (after loading) to be on the first record. I tried using the Forms built-in FIRST_RECORD after the END LOOP command, but that gives me an ORA-06511 error (An attempt was made to open a cursor that was already open).
    Does anyone know how I might be able to return to the first record of the block correctly?
    Thanks in Advance,
    Chris.

    Ok, I feel like a bit of a dolt.
    I found that all cursors had to be closed before navigating back to the first record.
    Case closed! :)

  • How to modify query

    I have a situation where I need to include more than a 1000 values inside an IN clause.
    My query is this. How can I modify it to do so?
    SELECT p.pat_seq, p.diagnosis_type, ct.code_value || ' ' || p.alt_description as diagnosis_desc
    FROM patient_diagnosis p,
    (select * from code_set , code_set_type
    where code_set.code_set_type_seq =code_set_type.code_set_type_seq) ct
    WHERE p.enterprise_seq = (select enterprise_seq
    from org_lookup
    where organization_seq = 0 and rownum = 1)
    and p.diagnosis_code_seq = ct.code_set_seq(+)
    and (p.diagnosis_type LIKE 'A%' OR p.diagnosis_type LIKE 'W%')
    and p.PAT_SEQ IN
    (list 1000 pat_seq)
    OR p.PAT_SEQ IN (more pat_seq) ORDER BY p.pat_seq

    If pat_seq can be obtained from a previous query, then you can embed that query in the IN clause.
    There is a limit of 1000 values when you add hardcoded values in the IN clause.
    There is no limit if you use a subquery in the IN clause.
    If you need to use the list of pat_seq more than once in the same query, you could use the WITH clause (introduced in 9i) as an alternative to a temp table.
    Thanks
    Shakti
    (http://www.impact-sol.com)
    (Developers of Guggi Oracle)

  • How do I query a single record from a database?

    I need to retrieve a record from a specific table within a .mdb file using it's name or primary key to search.
    I have the database connectivity toolkit(LV7.1) and have not been able to figure this out.
    Any help would be greatly appreciated.
    Jim

    Bdougr,
    Thanks for the reply, but it's a little over my head.
    Maybe I should give some more info. We store test parameters in a MSAccess database.
    Using LabView 7.1, I would like to retrieve a "record" or row based on a primary key (our part#)from a .mdb file and then use that data as my test parameters, I do not want to use the row# or record#. The database contains several tables so I also need to get to the specific table.
    I have figured out how to get a "feild" or the hole thing but I don't know how to return just one specific row.
    I have tried Select data, Fetch, Fetch all and Execute query VIs without success. Would "Execute query" be the way to do it? If so, what would be the correct SQL syntax to retrieve a record base on its primary key?
    Jim

  • How to save more than 2 records at a time in tabular form?

    I have a table name SAMPLE_TABLE, which has SNO,NAME items and one sequence name is SEQ_SAMPLE.
    i have one form based on SAMPLE_TABLE. my form is in tabular format, which has 5 records.
    in the layout wizard only NAME is displayed. SNO doesnot displayed.
    in the layout wizard, there is one push button named as SAVE.
    the code of SAVE button(When_Button_Pressed) is
    insert into sample_table values(seq_sample.nextval,:sample_table.name);
    clear_record;
    commit;
    my problem is :
    when ever i want to save one record at a time there is no problem.
    if i want to save more than 2 records at a time then sequence number is alloted for last record. other records have no sequence numbers.
    for example i want to insert 2 names as XYZ,PQR then
    the table look like this:
    sno name
    1 PQR
    XYZ
    if SNO is primary key then it doesnot work because of null value.
    can any one solve my problem?
    Thanks
    Meegada

    Is the block a database block or a control block,
    1. if database block, assign the primary key on a
    trigger like new record instance for each record
    enteredour's is a control block, ididnt get your point clearly
    could you make it clear how to assign a primary key on a trigger
    our criteria is we are having two block as lov_values and lov_name
    lov_values:
    lov_values_id (sequence generated)
    lov_id will be same for the all the values for a particular lov_name
    lov_values will be which we enter in the form which will be the only visuble colums on the form
    lov_name block:
    lov_name
    lov_id(sequence generated)
    could you help me with the code
    thanks
    prasad

  • How can we select more than one item from LOV in Query_Find form?

    Hi,
    I have a requirement i.e i want to select more than one customer number seperated by comma from the customer number lov field in the query_find form.How can we write the code for this requirement?
    and after clicking find it has to display notification form which contains the details of customer which you selected from Custome query_find form.
    Could you please help me out.
    Thanks in Advance,
    Dhana

    Found the "Search Entire Library" option - click on the small (VERY small for my eyesight) down arrow next to the magnifying glass. Also need to select "Filter by: Songs", and then the songs in the main window show the results.
    I'm going to leave this up on the board because 1) in case someone else has this question, and 2) I don't know how to delete it anyway.

  • Duplicate rows in Record grp "Cust_sytem"  in form "OKSITMSL"

    Hi,
    We are using Service contracts in Production environment.
    Duplicate rows selected for LOV query.
    By adding a line userenv('language') we solve the problem.
    But the coding was written inside the standard "OKSITMSL.pll". Here For the Field "NAME", LOV
    record group "CUST_SYSTEM" assigned dynamically based on
    other fields "ITEMSEL.FILTER = SYSTEM" and "ITEMSEL.CUSTOMER_FILTER = CUSTOMER".
    I have added piece of the details below.
    Form is Standard form "OKSITMSL", Which is calling om parent form "OKSAUDET".
    Form : OKSITMSL
    Block : ITEMSEL
    field : NAME
    pll : OKSITMSL.pll
    oksitmsl.pll coding-------------
    ELSIF NAME_IN('ITEMSEL.FILTER') = 'System' THEN
    If UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'CUSTOMER' then
    l_group_name := 'CUST_SYSTEM';
    Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'RELATED' then
    l_group_name := 'REL_CUST_SYSTEM';
    Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'BOTH' then
    l_group_name := 'BOTH_SYSTEM';
    Elsif UPPER(Name_In('ITEMSEL.CUSTOMER_FILTER')) = 'ALL' then
    l_group_name := 'OKS_SYSTEM';
    End If;
    Set_Lov_Property('ITEMSEL_LEVEL', GROUP_NAME, l_group_name);
    “CUST_SYSTEM” Record group present in “OKSITMSL” form.
    I need the advice how to solve my problem by adding a line in query of "CUST_SYSTEM" record group without touching/alter standard form.
    Thanks in advance.
    Navas

    Of course you can/should do additional validations on the client as needed basing on your requirement, there is nothing wrong with that. If you can't afford the roundtrip to the database than by all means: do everything you can to permit it if it's not allowed anyway.
    But even if you do checks on the client side you must not forget that you are in a multi user environment and you can't check for duplicates of uncommited data in another session. Also let's not forget that you might not be the only one jamming data into your database, and if you don't enforce it with a constraint another application actually could create duplicates because the developers forgot to implement a unique check. So the only way to be 100% sure you cannot pile duplicates into the database is a constraint.
    My point is:
    - always create a constraint when you want to enforce uniqueness => this is a must
    - if needed do additional checkings on the client to make users life easier => optional and can be implemented as needed
    From what I see mostly the first point get's ignored, and the second get's implemented. The implementations most of the time utterly fail when I start the application twice and enter the same data in two different sessions. Now I have a serious problem, as data which is supposed to be unique isn't unique anymore. too_many_rows are going to happen in every corner of the application, and nobody knows why.
    cheers

  • How to modify or put entry in a particular field of a database table

    i want to to modify a field in a database table record identification by primary key fileds
    the situatio is like this
    there are two primay key in database table
    customer number PK
    status PK
    date
    and third field which i want to modify is customer part number.
    based on condition that
    database table1-cuspip = wa_record-cuspip.
    database table1-status <> wa_record-status
    and database table-date = wa_record-date
    if above is true a particular field  the database table  for that record
    ie customer_part_number = 'FAiled'.
    loop at it_record into wa_Record
    endloop.
    please suggest how to modify the database table record if the avove condition is tru and please give me full working code
    regards
    Arora

    Dear Nishant,
    Use UPDATE function for updating the customer part number.
    But please do mention the database table and the keys used for update.
    if en entry already exists with the key then the Entry will fail so use MODIFY statement to modify the Consumber Part Number  with the specificed keys  and transport the modified customer part number and then do COMMIT the changed entry to database.
    Hope this helps you in some way.
    Encourage others to answer you queries by suitably rewarding them.
    Thanks
    Venugopal

  • How to modify the query to get max id record

    Hi All,
    How to modify below query to get proper result.The query is returning some records are duplicated.I need only one record to display from duplicate based on max assetid.
    Here is my query:
    SELECT *
    FROM (
    SELECT a.uppertitle, a.composer, a.esongid,
    MAX (asset_new.assetid) AS assetid,asset_new.ownerid
    FROM (SELECT DISTINCT NVL (esong.title, '~') AS uppertitle,
    INITCAP (NVL (esong.composer, '~')
    ) AS composer,
    esong.esongid
    FROM esong, esongcountry_us eus
    WHERE 1 = 1
    AND eus.esongid = esong.esongid
    AND eus.isocountrycode IN ('US')
    AND esong.title LIKE 'LIVE TO TELL%'
    AND ROWNUM < 390) a,
    songwebrecording,
    recordingasset_new,
    asset_new
    WHERE a.esongid = songwebrecording.esongid(+)
    AND songwebrecording.recordingid = recordingasset_new.recordingid(+)
    AND recordingasset_new.assetid = asset_new.assetid(+)
    GROUP BY a.uppertitle, a.composer, a.esongid,asset_new.ownerid)
    WHERE ROWNUM <= 390
    ORDER BY uppertitle
    result:
         upperlittle composer esongid assetid onwerid
    1.     LIVE TO TELL Gelb, Howe 480340000 null      null
    2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 null null
    3. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
    4. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3038107 null
    5. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
    I need the result like this :
         upperlittle composer esongid assetid onwerid
    1.     LIVE TO TELL Gelb, Howe 480340000 null      null
    2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
    3. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
    Please help me on this regard. oracle version is 9i
    Regards,
    Rajasekhar

    can you please format your code with                                                                                                                                                                                                                        

  • Modifying the Inner Query Statement in FORMS 10g

    Hi,
    I have a form with a Search Criteria section. The user builds the search criteria by puting values in the ITEMS. Then I want to query the table USING the criteria entered by the user.
    I know this is possible.
    How would I modify ORACLE's query statement in the form.
    I did this a VERY LONG time ago (forms 4.0), but don't remember how to !!!
    Please Help,
    Marc.

    Hi ,
    declare
       v_where varchar2(600);
      begin
         v_where:='<your where statement>';
         SET_BLOCK_PROPERTY(<your_block_name>,DEFAULT_WHERE,V_WHERE);
         execute_query;
      end;Greetings,
    Sim

  • How to re-query changed record in multi-row block after update in a called form

    Hi,
    I have a form that I use to perform searches, which is a multi-record block.
    The user can navigate to a record, press a button on call another form which provides
    more detail, and allows update of the record.
    If the user changes it, and returns to the original search form, how can I re-query the
    changed record to update the fields on the search form.
    Is there a way other than to re-query the
    whole block - a built-in to just update on record if it's changed on the database.
    If not, can I use globals to pass back the data (since only a few fields are updatable),
    and change the record without effecting its forms status.
    Many thanks
    Bernie

    BD,
    I haven't managed to look at a solution yet, but the block is a large multi-row block,
    with an ORDER BY, and since it can return a large number of records, there is a short
    delay. I was hoping there was a way of just
    re-querying the one record, which was displayed
    in the second form for update.
    I'll give the query a go, or might try and pass back some globals with the update values.
    By the way, DML Return Value is an excellent feature, but only works against Oracle 8.
    It basiclly adds the RETURNING clause to any DML statement (see SQL manual), so that if
    a trigger changes/adds values you didn't provide, it will return them back to you
    so the values in your form are correct.
    I use a trigger on the DB to populate history fields (create/update,who/when) and
    the PK sequence. Using this feature, those values are returned to the block and displayed.
    Regards
    Bernie

Maybe you are looking for