Htmldb_item(s) are null but return query values

Hi,
I have used the following query to create a region (I've done many like this).
When I access the htmldb_application items in insert statements it works fine.
But, when I try to do an update statement the htmldb_application items are null;
even after returning & displaying the values on screen. Hope this makes sense.
Region:
Select x.establishment_name,
x.hsd_insurance_policy_number,
x.hsd_insurance_group,
x.del
from
(Select
htmldb_item.text(11,establishment_name,20) establishment_name,
htmldb_item.text(12,hsd_insurance_policy_number) hsd_insurance_policy_number,
htmldb_item.text(13,hsd_insurance_group) hsd_insurance_group,
htmldb_item.hidden(14,hsd_person_insurance_id) hsd_person_insurance_id,
htmldb_item.hidden(15,gen_establishment_id) gen_establishment_id,
htmldb_item.hidden(16,gen_adr_id) gen_adr_id,
htmldb_item.checkbox(20,gen_person_id) del
from hsd_insurance_v
where gen_person_id = :HSD_Per_Identifier
union all
Select
htmldb_item.text(11,null),
htmldb_item.text(12,null),
htmldb_item.text(13,null),
htmldb_item.hidden(14,null),
htmldb_item.hidden(15,null),
htmldb_item.hidden(16,null),
htmldb_item.checkbox(20,null) del
from all_objects where rownum < nvl(:P4300_ROWS3,2)) x
Update Statement:
Begin
for i in 1..htmldb_application.g_f11.count
loop
If htmldb_application.g_f11(i) is not null Then
Update HSD_PERSON_INSURANCE
Set
HSD_INSURANCE_POLICY_NUMBER = htmldb_application.g_f12(i),
HSD_INSURANCE_GROUP = htmldb_application.g_f13(i),
LAST_UPDATE_BY = :P4300_Updated_By,
LAST_UPDATE_DATE = to_date(:P4300_Updated_Date,'DD/MM/YYYY')
where
hsd_person_insurance_id = htmldb_application.g_f14(i);
Update Gen_Establishment_Entity
Set
ESTABLISHMENT_NAME = htmldb_application.g_f11(i),
LAST_UPDATE_BY = :P4300_Updated_By,
LAST_UPDATE_DATE = to_date(:P4300_Updated_Date,'DD/MM/YYYY')
where gen_establishment_id = htmldb_application.g_f15(i);
end if;
end loop;
end;

Susan,
In 1.5, htmldb_item.select_list_from_query didn't support "display extra values" behavior. Now it does and a tenth parameter (p_show_extra in varchar2 default 'YES') allows you to disable it with 'NO'.
In your example, the query selects only non-null commisions, but setting p_show_null=>'YES' gives you the first null row and the default setting p_show_extra=>'YES' gives you the last null row, which is the "selected" option for rows where the comm column is null.
Add ,NULL,NULL,'NO' to the function call to eliminate the unwanted row.
Scott

Similar Messages

  • Single RFC Lookup should return multiple values - but returns no values

    I have an RFC Lookup in my PID system that i had to change due to a test defect.
    the FM i wrote was working on a single value and returning the correct entry...  however it now needs to return multliple entries and map 0..unbounded....
    i have made the changes, the FM works in ECD, however when i call the FM from the mapping, it does not return any values...  now, i am asking my basis team to change the PIAPPLUSER to dialog user so i can throw a breakpoint for an external user... 
    has anyone done a single to multi value mapping on lookup?  i am not sure that it is the FM that is incorrect as it is very simple code..   
    DATA: lt_jobtype TYPE zhr_lkupjobtype_t.
      CLEAR     lt_jobtype.
      REFRESH lt_jobtype.
      SELECT * FROM zhr_lkupjobtype
        INTO TABLE lt_jobtype
        WHERE zinterface_id = import-zinterface_id
        AND   zsap_jobtype  = import-zsap_jobtype.
      MOVE lt_jobtype TO export.
    is there a way of checking the RFC part of an message mapping?  i checked the full trace within graphical mapping but this shows no return....

    I am using a MOVE instead of APPEND.
    according to the keyword help if the tables are identical, you can use MOVE.
    it works when i test in SE37.
    i have tested it both ways and i get the same result each time.
    i even tried it this way:
      SELECT * FROM zhr_lkupjobtype
        INTO TABLE export 
        WHERE zinterface_id = import-zinterface_id
        AND   zsap_jobtype  = import-zsap_jobtype.
    and that works too to get the target values into the export table!  that's what made me think it was not the code as i have tried three different ways of writing the same code...  the Function Module works perfectly anyway!  but when it is called from PI i cannot see if any values are returned....

  • Simple NOT EXIST but returns wrong values

    I have been doing this for a couple of month and this makes sense to me but I get the wrong answer.
    T1 contains 1 to 10
    U2 contains 1 to 5
    SELECT T1a.num
    FROM T1 T1a
    WHERE NOT EXISTS
    (select T2b.num
    from T1 T1b, U2
    WHERE T1b.num = U2.num
    GROUP BY T1a.num
    I expect to get 6 to 10,
    but am getting NO ROWS SELECTED.
    Ideas more than welcome

    You are trying to :-
    1. Use table T1 twice which is not needed
    2. In the inner sub-query, you are using column T2b.num
    alias 'T2b' is not defined, in which case you should be
    getting SQL Error
    (select T2b.num
    ERROR at line 4:
    ORA-00904: invalid column name
    Try This,
    1 SELECT T1a.num
    2 FROM T1 T1a
    3 WHERE NOT EXISTS
    4 (select Null
    5 from U2
    6 WHERE U2.num = T1a.num
    7 )
    8* GROUP BY T1a.num
    Test Db>/
    NUM
    6
    7
    8
    9
    10

  • DISCVR PARAMETER -- LOV ON DESC BUT RETURN CODE VALUE

    HOW DOES ONE IN DISCVR PARAMETER DIALOGUE CREATE A PARAMETER (SIMILAR TO ORACLE REPORT BUILDER, PICK CODE AND DESC -- HIDE FIRST COLUMN) WHERE THE
    USER SEES THE CODE DESCRIPTION IN THE LOV BUT THE CORRESPONDING CODE VALUE IS WHAT IS RETURNED TO THE PARAMETER BIND VARIABLE ??

    And now Version 2.
    I didn't put this into the 1st post as the formatting goes bonkers.
    #>> Start of VERSION 2
      call function 'MY_FUNCTION_MODULE'
           destination RFCDEST
           starting new task 'taskname'
           performing receive_result on end of task
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
      WAIT UNTIL results_received = 'X' UP TO 60 SECONDS.
    if sy-subrc is initial.   << Now this is always ZERO
      * do some stuff as RC was 0
    else.
    * log non-zero return code etc
    endif.
    FORM receive_result USING iv_taskname.
      RECEIVE RESULTS FROM FUNCTION 'MY_FUNCTION_MODULE'
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
      results_received = 'X'.
    endform.                    "receive_result
    * < End of Version 2

  • How to get the Benefits Rate multiplier value in HCM extract ? used Extract rule type Fastfomula, but returns null.

    how to get the Benefits Rate multiplier value in HCM extract ? used Extract rule type Fastfomula, but returns null.
    Formula:
    DEFAULT FOR BEN_ABR_NAME IS 'NA'
    DEFAULT FOR l_rate_multiplier IS 'X'
    L_BG_ID = GET_CONTEXT(BUSINESS_GROUP_ID, 1)
    L_EFF_DATE = GET_CONTEXT(EFFECTIVE_DATE, to_date('1951/01/01 00:00:00'))
    L_ABRT_ID = GET_CONTEXT(ACTY_BASE_RT_ID, 9999)
    CHANGE_CONTEXTS(EFFECTIVE_DATE = L_EFF_DATE, BUSINESS_GROUP_ID = L_BG_ID, ACTY_BASE_RT_ID = L_ABRT_ID )
    l_rate_multiplier = BEN_ABR_NAME
    RETURN l_rate_multiplier

    I used DBI - BEN_ABR_NAME.
    What is back end query ? can we use query to extract the value in Extracts ?

  • 'Query not returning string values as expected

    Hi
    Why would this be happening?
    I have an insert statement that looks like this;
    UNION ALL
    SELECT '59','','last','first','','','','WILLIAMTA','BEB92C5B52566E6594707C69729624BE','','','Senior Officer','Town Name','2','','SUSTAINABLE FOREST MANAGEMENT DIVISION','NAME BRANCH','CURRENT' FROM DUAL
    ...I then want to create an conditional display statement in an apex application that looks like this;
    PLEASE NOT I HAVE REPLACED (the symbols that will not render for not equal to) WITH THE TEXT "NOT EQUAL TO"
    SELECT USERNAME
      FROM sfm_common.sct_parties
    WHERE division NOT EQUAL TO 'SUSTAINABLE FOREST MANAGEMENT DIVISION'
       AND username = :app_userBut it doesnt return anything and I know it should so I do some tests, below;
    1. You will see the first statement returns no records.
    2. In the second statement there is a space between N and the quote, and it returns a record
    3. In the third test if I make the gap really big it still returns a value.
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 8 14:27:55 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> SELECT DISTINCT null
      2    FROM sfm_common.sct_parties
      3   WHERE division NOT EQUAL TO 'SUSTAINABLE FOREST MANAGEMENT DIVISION'
      4  /
    no rows selected
    SQL> SELECT DISTINCT null
      2    FROM sfm_common.sct_parties
      3   WHERE division NOT EQUAL TO 'SUSTAINABLE FOREST MANAGEMENT DIVISION '
      4  /
    N
    SQL> SELECT DISTINCT NULL
      2    FROM sfm_common.sct_parties
      3   WHERE division NOT EQUAL TO 'SUSTAINABLE FOREST MANAGEMENT DIVISION                 '
      4  /
    N
    SQL>Would anyone know why this has happened, I have checked my insert scripts and there is no space at the end of the text in the column named 'division'.
    Ben
    Edited by: Benton on Sep 8, 2009 2:59 PM

    The table contains attributes like this;
    Col_1
    TOMATO
    ORANGE
    APPLE
    NULLSo what I was attempting to do was something like this;
    SELECT col_1 FROM table WHERE col_1 != 'TOMATO'
    I would then expect to see;
    Col_1
    ORANGE
    APPLE
    NULLBut instead I had the following returned;
    no rows selected
    Which is not correct.
    Apparently the fact that the column is 255 characters long is causing a problem, but I really dont understand why because I have other tables where I execute columns that are not the exact length of the content and yet the sort of query that I have used as an example work perfectly fine. For example;
    SQL> SELECT name
      2    FROM table_name
      3   WHERE name != 'HYGIENE MANAGEMENT'
      4  /
    NAME
    ACTION
    APPROVALS
    AUDITING
    BURNING
    COLLECTION
    COMMUNICATION
    COMPLIANCE
    DEVELOPMENT
    DISTURBANCE
    DOCUMENT CONTROL
    ERADICATION
    11 rows selected.
    SQL>And the ddl for the table looks like this;
      CREATE TABLE "TABLE_NAME"
       (     "ACT_ID" NUMBER,
         "NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
         "CREATED_BY" VARCHAR2(50 BYTE) DEFAULT 'USER',
         "CREATED_ON" DATE DEFAULT SYSDATE,
         "EFF_FROM" DATE DEFAULT SYSDATE,
         "EFF_TO" DATE,
         "DEFINITION" VARCHAR2(4000 BYTE),
         "STATUS" VARCHAR2(15 BYTE) DEFAULT 'CURRENT' NOT NULL ENABLE,
          CONSTRAINT "TABLE_NAME_CHK1" CHECK ( status IN ('CURRENT','NOT CURRENT')) ENABLE,
          CONSTRAINT "TABLE_NAME_PK" PRIMARY KEY ("ACT_ID");The name field in this instance is 50 characters long and the words 'HYGIENE MANAGEMENT' make up 18 characters.
    Ben

  • Hi how will get subquery returns multiple values for main query

    Hi all ;
    here i given one sql query
    1)select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '|| initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b.name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100;
    if i run this above query returning multiple values depend on sa.mgr values.
    like output coming like this
    yes:2000-anbarasan
    yes:2700-anb
    yes:2000-rasan
    yes:2807-anbarasan
    yes:2700-anbanu
    yes:2000-null
    2) this sub query i am passing with main query
    select sa.mgrid,sa.sal,(select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '||
    initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b .name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100)" test " from table4 sa,table5 te ,table6 ft where sa.id(+)=te.id and sa.mgr=ft.mgr;
    my final out put required like this:
    mgrid sal test
    100 20000 yes:2000-anbarasan
    yes:2700-anb
    yes:2000-rasan
    yes:2807-anbarasan
    yes:2700-anbanu
    yes:2000-null
    but i am getting erro:
    1)missing paranths
    2)single row subquery return more then one row.
    hi kindly give me answer to me as soon as possible
    Edited by: anbarasan on Sep 29, 2008 9:48 PM

    I refuse to read all of that code and guess what error message you are getting. Apparently others feel the same way.
    Run the final SQL statement and then cut and paste the code and full error statement into a post.
    Also include your full version number to three decimal places.
    My refusal is not an unwillingness to help you but rather an unwillingness to spend 10 minutes reconstructing what you could have pasted in in a fraction of a second. We are all volunteers here and there are many people that need help. I hope you understand.

  • Color APEX charts based on query value returned?

    Hi,
    I appreciate any information regarding this topic. Do you know if there is a way to change the color of a column chart based on the value that is returned in SQL query? This specific type of query and chart only has one bar...so we don;t have to worry about multiple series of bars here.. For example,
    select null link, FTE_NAME label, (SUM(INVOICeABLE_ALLOCATION) + SUM(SECOND_BILL_ALLOC)) value1
    from FTE_VIEW
    WHERE FTE_ID = :P9_ID
    group by FTE_NAME
    This might return an allocation of 2.5 for a specific person, where we only want people allocated to 1.0 so anything > 1.0 the chart color would turn red.
    PS: There is a reason we are allowing them to enter values >1.0 by the way ;) if you are wondering..haha
    Any ideas? I also looked up in the AnyChart knowledge base, but could not find any help there..
    Kind Regards,

    Hi,
    Thanks for your help. I am not clear on whether I need to create the :P1_Colors item or not. If I choose Custom colors and then have my colors as #099E4A,#F00E19 can I reference :P1_COLORS in my SQL or do I have to create the item :P1_COLORS and use a statics list? Also I've playing with the SQL, I was able to get a return value using a CASE statement, but I had no lukc with the Decode...Here is what I tried IN SQLdeveloper but could not get it to work.
    SELECT FTE_NAME, DECODE(SUM(ALLOCATION),SUM(ALLOCATION)<=1,'GREEN','RED') AS COLOR
    FROM FTE_PRJK_VIEW
    where id = :P9_ID AND FTE_PROJECT_STATUS = 'YES'
    group by FTE_NAME
    (Where i have Green and Red I would have the item :P1_COLORS = #099E4A,#F00E19, ETC..)
    Was able to get this case statement to return a value in SQL Developer..but cannot get it to work in the chart...
    select null link, FTE_NAME label,
    CASE WHEN SUM(ALLOCATION)<1
    THEN :P1_COLORS = '#099E4A'
    else :P1_COLORS = '#F00E19'
    END CASE value1
    from FTE_PRJK_VIEW
    where id = :P9_ID AND FTE_PROJECT_STATUS = 'YES'
    group by FTE_NAME
    Really Appreciate the help with this :)
    Kind Regards,

  • How will get subquery return multiple values and passing to the main query

    Hi all ;
    here i given one sql query
    1)select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '|| initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b.name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100;
    if i run this above query returning multiple values depend on sa.mgr values.
    like output coming like this
    [yes]:2000-anbarasan
    [yes]:2700-anb
    [yes]:2000-rasan
    [yes]:2807-anbarasan
    [yes]:2700-anbanu
    [yes]:2000-null
    2) this sub query i am passing with main query
    select sa.mgrid,sa.sal,(select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '||
    initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b .name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100)" test " from table4 sa,table5 te ,table6 ft where sa.id(+)=te.id and sa.mgr=ft.mgr;
    my final out put required like this:
    mgrid sal test
    100 20000 [yes]:2000-anbarasan
    [yes]:2700-anb
    [yes]:2000-rasan
    [yes]:2807-anbarasan
    [yes]:2700-anbanu
    [yes]:2000-null
    but i am getting erro:
    1)missing paranths-it solved
    2)single row subquery return more then one row.
    give me the correct solution.how will solve this problem
    Edited by: anbarasan on Sep 29, 2008 6:49 AM
    Edited by: anbarasan on Sep 29, 2008 6:51 AM
    Edited by: anbarasan on Sep 29, 2008 6:53 AM
    Edited by: anbarasan on Sep 29, 2008 6:56 AM
    Edited by: anbarasan on Sep 29, 2008 6:58 AM

    Hi,
    It doesn't look like you posted either the complete query or the complete error message (including line number). Try again.
    "single row subquery return more then one row" usually means you are using a sub-query in a place where a single expression is expected, for example the column called avg_sal in this query:
    SELECT  ename
    ,       sal
    ,       (SELECT  AVG (sal) FROM scott.dept WHERE deptno = e.deptno) AS avg_sal  -- Scalar-sub-query
    FROM    scott.emp  e; The error occurs when the sub-query returns more than one row
    If the sub-querry really is supoosed to be returning only one row, the solution is to fix the sub-query, usually be adding something to the WHERE clause.
    If the sub-query is supposed to return more than one row, then the main query has to be re-written, perhaps as a join.
    Post a little sample data and the results you want from that data if you need help.

  • Single query return multiple value

    Hi ALL,
    I have a sql query as below :
    select order_number,
    (select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    from hz_contact_points,
    hz_parties hz
    WHERE hz.party_id=hcp.owner_table_id) Email
    FROM oe_order_headers_all h
    WHERE h.order_number='102'
    Actually the problem i am facing is the inner select query is returning multiple row , so my main query is erroring out, i need to capture the multiple row.
    in the above example the inner decode statement returning two mail address, i need to capture that, but while executing the whole query it is erroring out as saying single query returns multiple values.
    please help me on this to capture multiple values
    Thanks

    >
    select order_number,
    (select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    from hz_contact_points,
    hz_parties hz
    WHERE hz.party_id=hcp.owner_table_id
    /* a join is missing here that points to table oe_order_headers_all h*/) Email
    FROM oe_order_headers_all h
    WHERE h.order_number='102'
    >
    I can see a join missing in your select sub query.
    However, if you you are still getting the single query return multiple value error then you need to replace the sql sub query
    select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    from hz_contact_points,
    hz_parties hz
    WHERE hz.party_id=hcp.owner_table_id)by decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    and join the two tables in you main query..
    Regards
    Biju
    ED: Provide test script and your expected output to get what you want exacly!
    Edited by: biju2012 on Sep 7, 2012 12:06 AM

  • After Trex Query the "areaAttributes" of items are NULL

    Hi, I wrote a simple code to search items by Trex functions.
    This is the code:
    IQueryStatement queryStmt = theCatalog.getCatalog().createQueryStatement();
    IFilter filter = cff.createAttrFuzzyValue("MY_CUSTOM_ATTR", myCustomAttr);
    queryStmt.setStatement(filter, null, null);
    IQuery query = theCatalog.getCatalog().createQuery(queryStmt);
    WebCatItemList itemList = new WebCatItemList(theCatalog, query, true, true);
    The items are found, but the relative areaAttributes is empty.
    If I try this code:
    ArrayList listItemsToTry = itemList.getItems();
    Iterator myListIterator = listItemsToTry .iterator();
    while (myListIterator .hasNext())
    WebCatItem item = (WebCatItem) myListIterator .next();
    The call item.getAreaAttributes() is NULL.
    The attributes are correctly replicated, and the "catalog" object  contains name, description and value of all attributes.
    Anyone have some solutions about this issue? I need Trex query, but I need also the areaAttributes of item!
    Thanks a lot in advance
    Ennio

    Hi,
    i wrote the new code:
    String prdName = "12345";               
              WebCatItemList itemList = null;
              // create the query to search for products
              CatalogFilterFactory fact = CatalogFilterFactory.getInstance();
              IFilter productFilter =     fact.createAttrEqualValue("OBJECT_ID", prdName);
              IFilter filter = productFilter;
              IQuery query = null;
              try {
                   IQueryStatement queryStmt =     catalog.getCatalog().createQueryStatement();
                   queryStmt.setStatement(filter, null, null);
                   // attributes, sort order?
                   query = catalog.getCatalog().createQuery(queryStmt);
                   itemList = new WebCatItemList(catalog, query, true);
                   ArrayList listItemsToTry = itemList.getItems();
                   Iterator myListIterator = listItemsToTry.iterator();
                   while (myListIterator.hasNext())
                      WebCatItem item = (WebCatItem) myListIterator.next();
                      if (item.getCatalogItem() != null && item.getCatalogItem().getParent() != null)
                             WebCatAreaAttributes areaAttrib = new WebCatAreaAttributes(item.getCatalogItem().getParent());
                             Iterator iteratorC = item.getCatalogItemAttributes();
                             while (iteratorC.hasNext())
                                  CatalogAttributeValue aCatValue = (CatalogAttributeValue) iteratorC.next();
                                  out.println("GUID: " + aCatValue.getAttributeGuid() + " DESCRIPTION: " + areaAttrib.getDescription(aCatValue.getAttributeGuid(), aCatValue.getAsString()) + "<br>");
              } catch (CatalogException e) {
                   out.println("CATALOG ERROR");
    This is the result:
    GUID: OBJECT_DESCRIPTION DESCRIPTION: null
    GUID: TEXT_0001 DESCRIPTION: null
    GUID: TEXT_Z001 DESCRIPTION: null
    GUID: MYCUSTOMATTR DESCRIPTION: null
    The solution proposed don't works!
    Where i wrong?
    Thanks,
    Ennio

  • Values from a jsp page are null in Action Class

    hi, i am working on an application...i have a jsp page with several inputs (type=text) and when a submit the form to to my action class all values      received are null.
    Here is a part of code:
    the jsp file: letter.jsp
    <form target="_self" action="/Test/editLetter.do" name="letterTF">
    <table>
    <tbody>
    <tr>
    <th>
    No of objects
    </th>
    <th>
    Weight
    </th>
    <th>
    Description
    </th>
    </tr>
    <tr>
    <td>
    Package
    <input name="package" id="package" type="checkbox">
    </td>
    <td>
    <input name="package_No" type="text" value="<%=currentBean.getPackageNo() %>"> <%-- from session...have to edit some date from a data base--%>
    </td>
    <td>
    <input name="package_weight" type="text" value="<%=currentBean.geWeight()%>">
    </td>
    <td>
    <input name="description" type="text" value="<%=currentBean.Description()%>"
    </td>
    </tr>
    <tr>
    ..................................................... <%-- It's a big form --%>
    </tr>
    <tr>
    <input type="submit" name="send" value="Send">
    </tr>
    </tbody>
    </table>
    </form>
    struts-config.xml:
    <form-bean
              name="letterTF"
              type="Test.LetterForm">
    </form-bean>
    <action path="/editLetter"
                   type="Test.LetterAction"
                   name="scrisoareTF"
                   input="/letter.jsp"
                   scope="request"
                   validate="false">
                   <forward name="success" path="/index_orders.jsp"/>
    </action>
    The ActionForm class:
    public class LetterForm extends ActionForm{
    private String package;
         private String package_No;
         private String package_weight;
         public void setPackage(String package){
    this.package = package
    public String getPackage(){
    return package;
    The action class:
    public class LetterAction extends Action{
    public ActionForward execute(     
                   ActionMapping mapping,
                   ActionForm form,
                   HttpServletRequest request,
                   HttpServletResponse response)
         throws Exception{
    String package;
    String package_No;
    String package_weight;
    LetterForm letterTF = (LetterForm) form;
    package = letterTF.getPackage();
    package_No = letterTF.getPackageNo()
    package_weight = letterTF.getPackageWeight();
    System.out.println("Package: "+package);//it will print Package: null
    System.out.println("Weight: "+weight);//it will print Weight: null
    System.out.println("Description "+description) //it will print Description: null
    As I observed its not making the set methods from LetterForm.java
    I am dealing with this bug for a couple of days an i didn't managed to break it. If anyone has an idea would he be so kind to share it with me.
    Thanks in advanced,
    David

    Basically your form beans are the place holders or containers for your jsp attributes. It has to be mapped in such a way that when the form is submitted the user entered values get populated on to your form bean.
    For Eg:
    JSP
    <html:form action="accountSearchResults.do">
    <html:text property="myName" size="15"/>
    //USE ONLY STRUTS TAGS IN JSP's. U CAN REFER TO
    //http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html
    //THE PROPERTY NAME "myName" SHOULD BE DEFINED IN
    //YOUR FORMBEAN WITH getMyName AND setMyName
    //METHODS DEFINED
    </html:form>
    struts-config.xml
    <form-beans>
         <form-bean name="addEditAccount" type="org.apache.struts.validator.LazyValidatorForm">
              <form-property name="myName" type="java.lang.String">
              </form-property>
         </form-bean>
    </form-beans>
    <action-mappings>
         <action path="/accountSearchResults" type="com.zzz.AccountSearchResultAction" name="addEditAccount" scope="request">
              <forward name="success" path="NextPage.jsp">
              </forward>
         </action>
    </action-mappings>
    Action Class
    Since we have defined the form bean as a lazyvalidator instance you can use:
    PropertyUtils.copyProperties(targetBean, form);to fetch the values entered by the user. Try to use struts tags in your jsp's and map the properties to your form bean variables. Hope that helps.
    SirG

  • Values from a jsp page are null in an Action class

    hi, i am working on an application...i have a jsp page with several inputs (type=text) and when a submit the form to to my action class all values received are null.
    Here is a part of code:
    the jsp file: letter.jsp
    <form target="_self" action="/Test/editLetter.do" name="letterTF">
    <table>
    <tbody>
    <tr>
    <th>
    No of objects
    </th>
    <th>
    Weight
    </th>
    <th>
    Description
    </th>
    </tr>
    <tr>
    <td>
    Package
    <input name="package" id="package" type="checkbox">
    </td>
    <td>
    <input name="package_No" type="text" value="<%=currentBean.getPackageNo() %>"> <%-- from session...have to edit some date from a data base--%>
    </td>
    <td>
    <input name="package_weight" type="text" value="<%=currentBean.geWeight()%>">
    </td>
    <td>
    <input name="description" type="text" value="<%=currentBean.Description()%>"
    </td></tr>
    <tr>
    ..................................................... <%-- It's a big form --%>
    </tr>
    <tr>
    <input type="submit" name="send" value="Send">
    </tr>
    </tbody>
    </table>
    </form>
    struts-config.xml:
    <form-bean
    name="letterTF"
    type="Test.LetterForm">
    </form-bean>
    <action path="/editLetter"
    type="Test.LetterAction"
    name="scrisoareTF"
    input="/letter.jsp"
    scope="request"
    validate="false">
    <forward name="success" path="/index_orders.jsp"/>
    </action>
    The ActionForm class:
    public class LetterForm extends ActionForm{
    private String package;
    private String package_No;
    private String package_weight;
    public void setPackage(String package){
    this.package = package
    public String getPackage(){
    return package;
    The action class:
    public class LetterAction extends Action{
    public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception{
    String package;
    String package_No;
    String package_weight;
    LetterForm letterTF = (LetterForm) form;
    package = letterTF.getPackage();
    package_No = letterTF.getPackageNo()
    package_weight = letterTF.getPackageWeight();
    System.out.println("Package: "+package);//it will print Package: null
    System.out.println("Weight: "+weight);//it will print Weight: null
    System.out.println("Description "+description) //it will print Description: null
    As I observed its not making the set methods from LetterForm.java
    I am dealing with this bug for a couple of days an i didn't managed to break it. If anyone has an idea or a solution would he be so kind to share it with me
    Thanks in advance,
    David

    Basically your form beans are the place holders or containers for your jsp attributes. It has to be mapped in such a way that when the form is submitted the user entered values get populated on to your form bean.
    For Eg:
    JSP
    <html:form action="accountSearchResults.do">
    <html:text property="myName" size="15"/>
    //USE ONLY STRUTS TAGS IN JSP's. U CAN REFER TO
    //http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html
    //THE PROPERTY NAME "myName" SHOULD BE DEFINED IN
    //YOUR FORMBEAN WITH getMyName AND setMyName
    //METHODS DEFINED
    </html:form>
    struts-config.xml
    <form-beans>
         <form-bean name="addEditAccount" type="org.apache.struts.validator.LazyValidatorForm">
              <form-property name="myName" type="java.lang.String">
              </form-property>
         </form-bean>
    </form-beans>
    <action-mappings>
         <action path="/accountSearchResults" type="com.zzz.AccountSearchResultAction" name="addEditAccount" scope="request">
              <forward name="success" path="NextPage.jsp">
              </forward>
         </action>
    </action-mappings>
    Action Class
    Since we have defined the form bean as a lazyvalidator instance you can use:
    PropertyUtils.copyProperties(targetBean, form);to fetch the values entered by the user. Try to use struts tags in your jsp's and map the properties to your form bean variables. Hope that helps.
    SirG

  • XML into table: Why do all my insert values are NULL?

    Hello,
    I'm pretty new in XML ... then I still learn a lot by myself !!!
    I surfed to a lot of forums and examples ....
    I have a XML file. I built a XSL file in order to insert a part of my XML file into a table.
    The 2 files are loaded as CLOB into a DB table.
    I wrote a PLSQL procedure for this job.
    We are on a DB 10gR2.
    As a result, all the inserted columns are loaded with NULL !!!! ....
    I must have done something wrong ... for sure !!! but I cannot figure out.
    Here are the files and procedures:
    *<?xml version="1.0" ?>*
    *<purchaseOrder orderDate="1999-10-20">*
    *<shipTo country="US">*
    *<name>Alice Smith</name>*
    *<street>123 Maple Street</street>*
    *<city>Mill Valley</city>*
    *<state>CA</state>*
    *<zip>90952</zip>*
    *</shipTo>*
    *<billTo country="US">*
    *<name>Robert Smith</name>*
    *<street>8 Oak Avenue</street>*
    *<city>Old Town</city>*
    *<state>PA</state>*
    *<zip>95819</zip>*
    *</billTo>*
    *<comment>Hurry, my lawn is going wild!</comment>*
    *<items>*
    *<item partNum="872-AA">*
    *<productName>Lawnmower</productName>*
    *<quantity>1</quantity>*
    *<USPrice>148.95</USPrice>*
    *<comment>Confirm this is electric</comment>*
    *</item>*
    *<item partNum="926-AA">*
    *<productName>Baby Monitor</productName>*
    *<quantity>1</quantity>*
    *<USPrice>39.98</USPrice>*
    *<shipDate>1999-05-21</shipDate>*
    *</item>*
    *</items>*
    *</purchaseOrder>*
    The XLS file is :
    *<?xml version="1.0"?>*
    *<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">*
    *<xsl:output method="xml" media-type="text/xml" />*
    *<xsl:template match="/">*
    *<insert>*
    *<Table>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_club'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *<Columns>*
    *<Column>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_code'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *</Column>*
    *<Column>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_name'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *</Column>*
    *<Column>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_price'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *</Column>*
    *</Columns>*
    *<xsl:for-each select="purchaseOrder/items">*
    *<Rowset>*
    *<xsl:for-each select="item">*
    *<Row>*
    *<Column>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_code'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *<xsl:value-of select="@partNum" />*
    *<!--layer=Default-->*
    *</Column>*
    *<Column>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_name'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *<xsl:value-of select="productName" />*
    *<!--layer=Default-->*
    *</Column>*
    *<Column>*
    *<xsl:attribute name="source">*
    *<xsl:value-of select="'item_price'" />*
    *<!--layer=Default-->*
    *</xsl:attribute>*
    *<xsl:value-of select="USPrice" />*
    *<!--layer=Default-->*
    *</Column>*
    *</Row>*
    *</xsl:for-each>*
    *<!--layer=Default-->*
    *</Rowset>*
    *</xsl:for-each>*
    *<!--layer=Default-->*
    *</Table>*
    *</insert>*
    *</xsl:template>*
    *</xsl:stylesheet>*
    *<!--xsl-easyControl - (C) 2003-2007 SoftProject GmbH-->*
    *<!--Source: "purchaseOrder_clubDev.xml"|Type:"xml"-->*
    *<!--Destination: "Connexion_XSL_SCFOX.xac"|Type:"Connexion_XSL_SCFOX"-->*
    *<!--Document type: Input Driven-->*
    The XML files are successfully inserted into a CLOB colum :
    ID FILENAME XML
    24 item_club.xsl <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.or
    25 purchaseOrder.xml <?xml version="1.0" ?> <purchaseOrder orderDate="1999-10-20">
    And the procedure is :
    CREATE OR REPLACE PROCEDURE load_xml( p_dir IN VARCHAR2
    , p_filename IN VARCHAR2) AS
    insCtx DBMS_XMLSave.ctxType;
    rows NUMBER;
    l_bfile BFILE := BFILENAME(p_dir, p_filename);
    l_clob CLOB;
    l_bfile_xsl BFILE;
    l_clob_xsl CLOB;
    begin
         dbms_output.put_line('p_filename='||p_filename);
         insCtx := DBMS_XMLSave.newContext('sipmo.item_club'); -- get the save context..!
         dbms_output.put_line('item_club.xsl context='||insCtx);
         --IMPORTANT... ignore la casse
         DBMS_XMLSave.setIgnoreCase(insCtx, 1);
         --select XSL file item_club.xsl
    l_bfile_xsl := BFILENAME(p_dir, 'item_club.xsl');
         DBMS_LOB.createtemporary (l_clob_xsl, TRUE);
         DBMS_LOB.fileopen( l_bfile_xsl, DBMS_LOB.file_readonly);
         DBMS_LOB.loadfromfile( l_clob_xsl, l_bfile_xsl, DBMS_LOB.getlength(l_bfile_xsl));
         dbms_output.put_line('item_club.xsl length='||DBMS_LOB.getlength(l_bfile_xsl));
         DBMS_LOB.fileclose(l_bfile_xsl);
         DBMS_XMLSave.SETXSLT(insCtx, l_clob_xsl);
         dbms_output.put_line('step 10');
         DBMS_XMLSave.clearUpdateColumnList(insCtx); -- clear the update settings
         DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_CODE');
         DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_NAME');
         DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_PRICE');
         -- Now insert into the table
         dbms_output.put_line('step 90');
         rows := DBMS_XMLSave.insertXML(insCtx, l_clob);
         dbms_output.put_line('step 100 rows='||rows);
         DBMS_XMLSave.closeContext(insCtx);
         DBMS_LOB.freetemporary (l_clob_xsl);
         DBMS_LOB.freetemporary (l_clob);
    END;
    The result table is like this :
    scfx>select * from item_club;
    ITEM_CODE ITEM_NAME ITEM_PRICE
    All the columns of each row are NULL !!!
    Why?
    Do you have any advice ?
    Thanks if advance,
    Olivier

    So, if I understand what you mean ... I should write something like this :
         insert into item_club
              select t2.partnum, t2.productname, to_number(replace(t2.usprice, '.', ','))
              from odab_xml_tab t
              , xmltable('*' passing t.xml.extract('purchaseOrder/items/*')
              columns partNum varchar2(35) path '@partNum'
              , productName varchar2(35) path 'productName'
              , USPrice varchar2(35) path 'USPrice'
              ) t2
    Its a change in our code.. but that looks nice !!!
    Thanks,
    Olivier

  • A In-line view query works with 8.1.6 but returns ORA-1008 with 8.1.7

    Hello Gurus,
    The following query works fine with 8.1.6 but returns
    ORA-1008: not all variables bound
    with 8.1.7.
    Here is the query:
    SELECT y.node_id , y.parent_node_id
    FROM ( SELECT x.node_id
    ,x.parent_node_id
    FROM ( SELECT a.node_id
    ,a.parent_node_id
    FROM xor_hs_base_details a
    WHERE a.node_id <>
    a.parent_node_id
    AND a.base_id=1
    ) x
    CONNECT BY PRIOR x.node_id =
    x.parent_node_id
    START WITH x.parent_node_id = 1
    ) y
    WHERE y.node_id IN ( SELECT node_id
    FROM xor_hs_transactions
    WHERE hierarchy_id = 1
    AND created_by
    = 'system'
    AND committed_on IS NULL
    Any ideas??
    TIA.
    ...Atul

    After having a closer look at metalink it seems to be obvious, that Forms 6i (8.0.6.) only supports user exits generated with the 8.0.6. precompiler.
    If this is the case new questions follow:
    Is there a way to get a 8.0.6. precompiler?
    Is it possible to connect to a 8.1.5. database with such a user exit? Does anybody have corresponding experiences?
    Our customer uses a 8.1.7. database. What about connecting to that database with the user exit?
    /Ralph

Maybe you are looking for

  • ITunes Update Win 8.1

    Trying to update iTunes from 11.2.3.8 to recommended update Mar 2014, repeatedly hangs up install with "Could not access network location".  Same response on auto-update or download only and then manual update.  Have not seen this update hangup befor

  • Java.lang.NullPointerException in adobe.abc.GlobalOptimizer

    I'm access the GlobalOptimizer directly and passing an ABC dump to it. It works just fine if I pass lets say builtin.abc or something from Tamarin but if I pass in an ABC dump from a SWF compiled in Flash CS5 I get an error. Any ideas? Mainly looking

  • Creating a fill-in calculating form

    I am trying to create a fill-in form that will calculate figures (addition, subtraction). It's a 3 column form, with the last column as a total column. I would like it to calculate automatically.  This is going to be a network form.  Is this possible

  • Poor Wireless signal

    I just bought a HP 20-2110d All-in-One Desktop PC. Had so much difficulty setting it up as it had a poor wireless connectivity. Always only showing 2 bars and connectivity cutting off every now and then. Called HP support this morning and they led me

  • Undo changes in table row in Oracle ADF 10g

    Hi all, I use a commandButton to undo changes in editable rows of a table. This is the code I use in the action() method of my button: DCIteratorBinding iter = (DCIteratorBinding)getBindings().get("queryVariablesFindAllIter"); Row currRow = iter.getC