Hou to bind a char value of bapi to check box of a UItableelement

Hi all,
      I have a bapi which returns a table where one of the field is char(1), I should bind this field with a check box in the UItableelement. When i try to change the celleditor to check box it raises an error as select an attribute of type boolean. how to solve it.
Also if we can change the char data type to boolean in the bapi table my problem is solved.
Thanks in advance.
problem solving reply is awarded.

Don't do this in method wdDoModifyView() but in a controller method, e.g. an event handler.
Create a context attribute "TableVisibility" of type com.sap.ide.webdynpro.uielementdefinitions.Visibility (designtime simple type, not Java native type).
Bind property Table.visible to this attribute.
In the event handler, write something like
void on<Event)(...)
  if (<table-should-be-invisible>)
    wdContext.currentContextElement().setTableVisibility(WDVisibility.NONE);
  else
    wdContext.currentContextElement().setTableVisibility(WDVisibility.VISIBLE);
Armin

Similar Messages

  • Extracting values from multi select check boxes delimeted by ":"

    A set of check boxes in an Apex form produces "V1:V2:V3" in the target field, these are the key fields from a dynamic selection lists based on a table that contains the key and value fields. Does anyone have a sample SQL fragment that will produce a record for each one of the values ?
    FORM_TABLE
    ID (1)
    CB_TARGET (V1:V2:V4)
    LIST_TABLE
    KEY_F (V1),(V2),(V3),(V4) etc.
    VALUE_F (Value 1), (Value 2), (Value 3), (Value 4 ...)
    Even though there is only a single row in this example in the "FORM_TABLE", how can this be transformed to :
    1, V1
    1, V2
    1, V4
    Regards
    H

    Does anyone have a sample SQL fragment that will produce a record for each one of the values ?Does it have to be SQL? The simplest approach is probably PL/SQL, using the <tt>apex_util.string_to_table</tt> function.
    For a purely SQL-based solution, use whatever string-to-row technique is appropriate to your situation.

  • Getting values from a multi check box

    I have a multi record block with on text item and check box... I ned to get the value when i click the checkbox to fetch the data from teh sql query..
    For eg;
    I have a multi record block with the values as A,B,C,D,E and if i check the checkbox for teh dept A,C,D then I should ge the return value as ('A','C','D') to fetch the data from the query
    Requesting your help..Thanks in Advance

    Checkbox properties:
    "Value when Checked" - 1
    "Value when Unchecked" - 0
    Create variable str varchar2(2000) in the package val
    Create summerized item (sum of checkboxes)
    When-Checkbox-Changed Trigger
    if <checkbox> = 1
    then
    val.str := val.str||''''||<text_value||''',';
    else
    val.str := replace(val.str, ''''||<text_value||''',', NULL);
    end if;
    Pre-qwery trigger
    if <sum of checkboxes> = 0
    then
    -- No selection => no qwery
    raise form_trigger_failure;
    elsif <sum of checkboxes> = 1
    then
    set_block_property(..., default_where, 'where ... = '||rtrim(val.str, ','));
    else
    set_block_property(..., default_where, 'where ... IN ('||rtrim(val.str, ',')||')');
    end if;

  • How to validate and pass a value stored in the Check box to a SQL report

    I have a menu(parameter form) with select lists and two check boxes(one option for DD/MM/YY(called CHK_BOX_MTH) and other for Quarter(Called CHK_BOX_QTR)).
    If the user selects the check box for month, he should be only be able to select list of values for Month, Day and Year. The user should not be able to choose Quarter(or should be prompted with a message, "Check only one option"). Similarly if Quarter is chosen, DD/MM/YY should be disallowed.
    How do I code this validation in HTML DB and where would it reside on the item?
    How do I then pass these parameters(Checked box value) using a URL to another page as input?
    The query expects the following
    SELECT ... FROM DIM_DAY
    WHERE
    (:CHK_BOX_MTH IS NOT NULL AND START_DATE = ":SELECTED_DATE")
    OR
    (:CHK_BOX_QTR IS NOT NULL AND QTR = ":SELECTED_QTR");

    Vikas ,Thank you for your reply.
    The only reason I am not able to use the radio group because I am not able to place the items shown adjacent to Month in the page. The From Date and To date (user enterable fields) should appear to the right of the Month radio button and quarter item to the right of the quarter radio button.
    From Date : "Month" "Day" "Year" (should be displayed to the right of Month )
    End Date : "Month" "Day" "Year" (should be displayed to the bottom right of
    Month and above the Quarter line)
    I hope I am making sense.

  • How to Auto-populate TextField in Acrobat x with a value determined by user check box selection?

    I have a group of 3 Check Boxes for user to select their Work Shift:  The check boxes are set up to be mutually exclusive (same name: "EMP_Shift", different Export Values: Day, Evening, Night).
    Form Field properties name:      EMP_Shift (for all 3 check boxes)
    Acrobat edit panel field names:  EMP_Shift#0, EMPShift#1, EMPShift#2
    Export Values:                         Day, Evening, Night (chose these only because they are descriptive)
    I need to Auto-populate a Text Field named EMP_WorkShift with "Day" if EMP_Shift#0 is selected, "Evening" if EMPShift#1 is selected, or "Night" if EMPShift#2 is selected.
    Is there a script I can use to accomplish this in Acrobat Pro X.

    The simplest is to set up the text field to be calculated using the following custom Calculate script:
    // Get the value of the check box
    var v = getField("EMP_Shift").value;
    // Set this field value
    event.value = v !== "Off" ? v : "";
    You'd normally set the text field to be read-only, but if you want the user to be able to edit the text field, you can instead use the following script in the Mouse Up event of each check box:
    // Get the value of the check box
    var v = event.target.value;
    // Set the value of the text field
    getField("EMP_Workshift").value = v !== "Off" ? v : "";

  • Set the value of items when check box is checked

    Hi,
    My requirement is when we click a check box it should set the value of an item as 111111 and clear the values of two items in an apex page.
    I used java script onClick event to set those items using document.getElementByID('Item_Name')='';
    One of the item which needs to be cleared is a conditonal type.
    When the condional item present, java script works fine. But if it is not present,
    code works but it shows "error on page" for few seconds.
    Is it possible to clear the item, only when the item is present in the page.
    Thanks,
    Ravi

    Hi,
    Yes e.g. like
    if($x("ITEM_NAME")){
    $s("ITEM_NAME", "");
    }Regards,
    Jari

  • Infoobject - Option - Char is a document attribute check box? useful??

    HI,
    Can anyone tell me if they use this?  The documentation states that you can assign a comment for a combination of characteristic values. 
    Does anyone use this?  Is this something users can change or is this for developers?
    Thanks
    JP

    Hi,
    You can specify that a characteristic be used as a document property. This enables you to assign a comment (this can be any document) to a combination of characteristic values. See also Structure linkDocuments and the example Structure linkCharacteristic Is Document Property.
    Note
    Since it does not make sense to use this comment function for all characteristics, you need to identify explicitly the characteristics that you want to appear in the comments.
    If you set this indicator, the system generates a property (attribute) for this characteristic in the metamodel of the document management system. For technical reasons, this property (attribute) has to be written to a (dummy) transport request (the appropriate dialog box appears) but it is not actually transported.
    Hope this helps,
    Thanks,
    Happy life,
    Aravind

  • How to dsplay the values based on the check box?

    forms6i
    Hi to all
    the requirment the we have already master detail form.example emp details based on the dept number.in the form just only displays three coloumns per record wise(emp details).
    actually my requrment is place the check box each record and place a one button in the form.once check the particular record and click on the button open the another form
    it's displays that particular record entire emp details.any one help me...........
    Edited by: 994418 on 3 Apr, 2013 1:50 AM

    994418 wrote:
    forms6i
    Hi to all
    the requirment the we have already master detail form.example emp details based on the dept number.in the form just only displays three coloumns per record wise(emp details).
    actually my requrment is place the check box each record and place a one button in the form.once check the particular record and click on the button open the another form
    it's displays that particular record entire emp details.any one help me...........
    Edited by: 994418 on 3 Apr, 2013 1:50 AMHi,
    As you said, you emp block is tabular, i think there is no need of check box. Just add a button in that block. So there is a button for each record and associate button click display the associate record details (you said to go another form and display)
    check this Calling a form and passing a context
    Hope this helps
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • Passing check box values to WHERE clause

    Hi,
    I have created a Data block - 'CONTACTS' (Database data block)
    and has database item - 'Code', 'Descr'
    The number of records displayed is set to 5.
    Value When checked - 'Y'
    Value When Unchecked - 'N'
    Check box mapping of other values - 'unchecked'
    I am writing the code inside 'WHEN BUTTON PRESSED'. My main objective is to return the count of records based
    based on several conditions and one among them is CODE which is can be single or multiple based on the check box checked.
    The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
    Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
    I have tried using basic loop but things havnt worked.
    Logic tried with basic LOOP
    BEGIN
    GO_BLOCK('CONTACT');
    IF :contact.cb = 'Y' THEN
    LOOP
    IF p_where is null then
    p_where := :contact.code;
    else
    p_where := p_where ||','||:contact.code;
    end if;
    exit when :system.last_record = 'TRUE';
    next_record;
    END LOOP;
    end if;
    MESSAGE ( 'p_where :'||p_where);
    MESSAGE (' ');
    END;
    And Even if i write the LOOP before the first IF, it return me the current record value and move to the last record.
    please guide me where am i wrong.
    Regards.
    Anoop.

    Try something like this:
    FIRST_RECORD;
    LOOP
      IF :contact.cb = 'Y' THEN
        IF p_where is null then
           p_where := :contact.code;
         else
           p_where := p_where ||','||:contact.code;
         end if;
       END IF;
      exit when :system.last_record = 'TRUE';
      next_record;
    END LOOP;
    -- END LOOP;
    MESSAGE ( 'p_where :'||p_where);
    MESSAGE (' ');
    END;

  • Mutiply textfield by value when checkbox is check

    Hello all,
    I have a fillable PDF Form, built in Adobe Acrobat Pro X, that I am creating as a repair form with charges included in it.
    I know how to have a value filled in a given text field when a checkbox is checked.
    My question is this.  Say I have a textfield labeled as "labor_hrs" that is set to a number format.  What I want to do is to have this box multiplied by a given value of 45.00 populated to the "labor_chrg" text field.  I can get this feature to work on its own.
    What I want to do is only have the value populated to the "labor_chrg" when the checkbox labeled "billable" is checked.
    Any help would be appreciated.

    A quick way is to set the export value of the "billable" check box to 1.
    You can then use the simplified field notation script of:
    (labor_hrs * 45) * billable
    A custom JavaScript calculation:
    function GetField(cName) {
    // return field object with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field " + cName, 0,1);
    return oField;
    } // end GetField function;
    event.value = (isNaN(GetField("billable").value) == false) * GetField("labor_hrs").value * 45;
    If you add a hidden field for labor rate called "labor_rate", then you can use the "Field is the product of the following fields:" and select the "billable", "labor_hrs", and "labor_rate" fields.

  • How do I tally values that only have a ticked Check Box next to them?

    Hi Folks,
    I'm new to Acrobat forms and have recently finished a complicated 7 page form for a client and I am quite pleased with it.
    But the client has come back with the following request:
    They want Check Boxes next to a series of values and, when a Check Box is ticked, it only adds that ticked value. To show what I mean, please see the below image.
    So basically, there is a field on the left-hand side (Current Monthly Repayments) that tallies all the values - in my example this totals $50.00. Then, there is a field on the right-hand side (Future Monthly Repayments) that needs to tally only the values that have a ticked "Yes" Check Box next to them. In my example, this would produce a tally of $20.00.
    Does anyone know how this could be done?
    Thank you

    Yes, that's perfect. Try the following custom calculation script:
    // Custom calculation script for future monthly repayments field
    (function () {
         // Initialize variables
         var i, cb, v, sum = 0;
         // Loop through each row and add repayment value if Yes is checked
        for (i = 1; i < 7; i += 1) {
            // Get the value of the check box
            cb = getField("CashFlowCheck" + i).valueAsString;
            // Get the value of the repayment field, as a number
            v = +getField("CashFlow" + i).value;
            // Add the value to the sum if the check box is checked
            if (cb === "Yes") {
                sum += v;
        // Set this field's value to the sum, rounded to the nearest cent
        event.value = util.printf("%.2f", sum);

  • ORA-01461: can bind a LONG value ... Please hlep ASAP

    In my java code I try to update a table in the db like this:
    "ps = conn.prepareStatement("update dg_log set ISUPDATED=1,CAUser=?
    where qnum =? and cid !=3"); "
    and when i tried to bind a variables to one of the fields like that:
    " ps.setString(1,"32");
    ps.setString(2,"3");"
    On my local Oracle 8.1.5 db these statement work fine.
    When I conncted to Oracle 8.1.6 I encountered this problem :
    "ORA-01461: can bind a LONG value only for insert into a LONG
    column"
    This is caused because the binded variable is of type :NUMBER.
    I do not wont to use setInt()
    Is there any way to config the Oracle the he will do the translation string to number?
    null

    Nop, it didn't make any difference.
    "Sree Bodapati" <[email protected]> wrote in message
    news:3d2edd39$[email protected]..
    Can you try to turn off the PreparedStatement cache by placing
    PreparedStatementCacheSize=0
    in the properties of the pool and see if it helps.
    sree
    "erj" <[email protected]> wrote in message
    news:[email protected]..
    Hi guys,
    I am trying to use a prepared statemnt to insert into a table that has
    two
    fields. One is Char(3) -From field- and the second is Varchar2(8) -user
    field.
    My code looks like :
    lstrSQL = "INSERT INTO Table1( ID, From, DateAdded, USer) VALUES
    (TheInsertSeq.nextVal,? , sysdate, ?) ";
    ps = con.prepareCall(lstrSQL);
    String Temp1 = "dee";
    ps.setString(1, Temp1);
    String Temp2="abcde";
    ps.setString(2, Temp2);
    retVal = ps.executeUpdate();
    But after the execute statement I get the error:
    ORA-01461: can bind a LONG value only for insert into a LONG column
    I am using Weblogic Server 6.1 SP2 and Oracle 8.1.7. The database is in
    AMERICAN_AMERICA.WE8ISO8859P9 and in the startweblogic.cmd file I use:
    set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P9
    The connection pool has properties of:
    weblogic.codeset=ISO8859_9
    weblogic.oci.min_bind_size=660
    weblogic.oci.ncodeset=WE8ISO8859P9
    server=OracleServer
    user=testUsert
    I have tried to run the code over and over, with and without theNLS_LANG
    and connection pool settings. I even set NLS_LANG as a systemenvironment
    variable. But nothing changed, could someone please give me a hand?
    Thanx.
    Ercu

  • APex 4.1 Error ORA-01461: can bind a LONG value only for insert into a LONG

    Hi There,
    Facing a strange issue.
    I have a regular cursor, and in that cursor loop I have a select statement into some variables based on cursor parameters.
    I was getting the "ORA-01461: can bind a LONG value only for insert into a LONG column" error so I started individually checking each of the columns. Now it works fine for some column, but the moment I add this number field. It starts throwing this error. Now, the database source where the select is fired is of type number, the variable into which I select it is number .
    Infact, I dont have any LONG column defined anywhere.
    The strange thing is that the block executes perfectly fine in SQl developer. So looks like a Apex specific issue.
    I am on 4.1/11g
    Any ideas?
    Thanks,
    Sun

    sun1977 wrote:
    Now, I have put this inside a Dynamic action (PL/SQL procedure). I think this PL/SQL procedure will go up to about 1500 to 2000 lines of code. There are no long columns involved anywhere or even CLOB, BLOB etc.
    Is there any limitation to the size of code? When you say size of a code. Are you saying the whole PL/SQL block is stored in one Varchar2(4000) field? :) Did not know that. I am quite sure, the PL/SQL compiled package on the database would work perfect. Just was wondering why it was not working within APEX!
    Also, Is there any documentation regarding this that you might be aware of?You can look at the APEX views. Code for some purposes (like region source) is stored in CLOBs:
    desc apex_application_page_regions
    Name                           Null     Type               
    WORKSPACE                      NOT NULL VARCHAR2(255 BYTE) 
    WORKSPACE_DISPLAY_NAME                  VARCHAR2(4000 BYTE)
    APPLICATION_ID                 NOT NULL NUMBER             
    APPLICATION_NAME               NOT NULL VARCHAR2(255 BYTE) 
    PAGE_ID                        NOT NULL NUMBER             
    PAGE_NAME                      NOT NULL VARCHAR2(255 BYTE) 
    REGION_NAME                    NOT NULL VARCHAR2(255 BYTE) 
    PARENT_REGION_ID                        NUMBER             
    PARENT_REGION_NAME                      VARCHAR2(255 BYTE) 
    TEMPLATE                                VARCHAR2(255 BYTE) 
    TEMPLATE_ID                             NUMBER             
    STATIC_ID                               VARCHAR2(255 BYTE) 
    REST_ENABLED                            VARCHAR2(3 BYTE)   
    DISPLAY_SEQUENCE               NOT NULL NUMBER             
    DISPLAY_REGION_SELECTOR                 VARCHAR2(3 BYTE)   
    REGION_ATTRIBUTES_SUBSTITUTION          VARCHAR2(4000 BYTE)
    ESCAPE_ON_HTTP_OUTPUT                   VARCHAR2(3 BYTE)   
    DISPLAY_COLUMN                          NUMBER             
    DISPLAY_POSITION                        VARCHAR2(255 BYTE) 
    DISPLAY_POSITION_CODE                   VARCHAR2(255 BYTE) 
    REGION_SOURCE                           CLOB
    ...for others&mdash;like LOV source and DA actions (PL/SQL code is stored in <tt>ATTRIBUTE_01</tt>)&mdash;are only VARCHAR2(4000 BYTE):
    desc apex_application_page_da_acts
    Name                        Null     Type               
    WORKSPACE                   NOT NULL VARCHAR2(255 BYTE) 
    WORKSPACE_DISPLAY_NAME               VARCHAR2(4000 BYTE)
    APPLICATION_ID              NOT NULL NUMBER             
    APPLICATION_NAME            NOT NULL VARCHAR2(255 BYTE) 
    PAGE_ID                     NOT NULL NUMBER             
    PAGE_NAME                   NOT NULL VARCHAR2(255 BYTE) 
    DYNAMIC_ACTION_ID           NOT NULL NUMBER             
    DYNAMIC_ACTION_NAME         NOT NULL VARCHAR2(255 BYTE) 
    ACTION_NAME                          VARCHAR2(100 BYTE) 
    ACTION_CODE                 NOT NULL VARCHAR2(50 BYTE)  
    ACTION_SEQUENCE             NOT NULL NUMBER             
    DYNAMIC_ACTION_EVENT_RESULT          VARCHAR2(5 BYTE)   
    EXECUTE_ON_PAGE_INIT                 VARCHAR2(3 BYTE)   
    AFFECTED_ELEMENTS                    VARCHAR2(4000 BYTE)
    AFFECTED_ELEMENTS_TYPE               VARCHAR2(30 BYTE)  
    AFFECTED_REGION                      VARCHAR2(255 BYTE) 
    AFFECTED_REGION_ID                   NUMBER             
    ATTRIBUTE_01                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_02                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_03                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_04                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_05                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_06                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_07                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_08                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_09                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_10                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_11                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_12                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_13                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_14                         VARCHAR2(4000 BYTE)
    ATTRIBUTE_15                         VARCHAR2(4000 BYTE)
    STOP_EXECUTION_ON_ERROR              VARCHAR2(3 BYTE)   
    LAST_UPDATED_BY                      VARCHAR2(255 BYTE) 
    LAST_UPDATED_ON                      DATE               
    COMPONENT_COMMENT                    VARCHAR2(4000 BYTE)
    ACTION_ID                   NOT NULL NUMBER             
    COMPONENT_SIGNATURE                  CHAR(15 BYTE)       Oracle presmably have reasons for this difference but it's not something that is made clear in any way through the Builder UI.
    Common sense should come into play. As Tony points out, the proper way to develop and deploy complex PL/SQL is using modular subprograms stored in packages. Same for APEX as for anything else.

  • Sql load error: ORA-01461: can bind a LONG value only for insert into a LON

    I have 3 columns of varchar2(4000) in my table. I used char(4000) in my ctl. Please see below..
    LOAD DATA
    TRUNCATE INTO TABLE sa.sudhir_MARRIOTT_RBP_FORMAT
    fields terminated by ' '
    TRAILING NULLCOLS
    TARGETING_SECTION,
    TAG_TYPE,
    NO_OFFER_SUPPRESS,
    MAX_OFFER,
    HTML_REGEX,
    HTML_HEADER char(4000),
    HTML_FOOTER char(4000),
    RICH_TEXT_REGEX,
    RICH_TEXT_HEADER,
    RICH_TEXT_FOOTER,
    TEXT_REGEX,
    TEXT_HEADER,
    TEXT_FOOTER
    If I specify char(3000) for HTML_HEADER and char(1000) for HTML_FOOTER it works! (because at this moment html_header is less than 3000 and html_footer data is less than 1000). But I want to load 4000 characters max into both columns too. When I add , it fails with following error,
    ORA-01461: can bind a LONG value only for insert into a LONG column
    Please help !!
    Sudhir

    Anybody have any ideas?

  • While Creation Of SaleOrder Char Values are not getting saved.(V C)

    Hi SAP gurus,
    One of my client can able to create a saleorder but when we go and see in VA03 Display mode,we found Charactrestic values getting miised out.What could be the probale reasons.
    Note: I Have stimulate the required combination as per my client requirement in CU50,here i can able to indentify the Green Sign,but While Creation Of SaleOrder Char Values are not getting saved.
    Awaiting for your valuable reply.
    Cheers,
    Kumar.S

    Kumar ,
    If you assign values in classification view or configuration profile  they will become default for the product, and it willnot be changed in sales order.
    another thing if the item category is incorrect you will not get the configuration pop up at all .
    problem what i understand from your thred is at the time of sales ordeer creation there is some inconsistances in the configuration , may be some condition is not fullfilling.
    If in CU50 the result shown are error free, same configuration should owrk properly in sales configuration process, please again try to create it in sales order with same value assignment also check all the messages.
    see the result of configuration before saving the sales order , i hoep it will work for you.
    I am assuming all the things from SD are properly configured ie item catageory, varient pricing etc.
    Check and revert back.
    Regards
    Ritesh

Maybe you are looking for