Read poplist values as records

Dear Frends,
Any body know how to read tlist/poplist or combobox values .as we read records by the following procedure
begin
go_block('block_name');
first_record;
if block_name.i1 is not null then
loop
a:=:a||','||i1;
exit when :system.last_record='TRUE';
end loop;
end if;
end;
waiting for your help
with regards,
Ashish Kumar

Somthing like this:
DECLARE
   LC$Liste  Varchar2(61) := :system.cursor_item ;
   LC$Valeur Varchar2(30) := Name_In( LC$Liste ) ;
   LN$Nbre   Pls_integer ;
BEGIN
   LN$Nbre := Get_List_Element_Count( LC$Liste ) ;
   For i IN 1 .. LN$Nbre Loop
        Message( Get_List_Element_Value( LC$Liste, i ) ) ;
   End loop ;
END;You can also use the Get_List_Element_Label() built-in
Francois

Similar Messages

  • How to print all values in record datatype?

    Hello friends ,
    I wrote one function which returned the  departments record type.
    when  ever I called the function that returned departments record type and stored  in department record type variable..I have to print all the values in record...
    What  can I do???
    My code is like this...
    set serveroutput on
    declare
    type depcur is ref cursor return departments%rowtype;
    dep depcur;
    rec departments%rowtype;
    function ref_cur_demo(ref1  in depcur) return departments%rowtype
    is
    v_dep departments%rowtype;
    begin
    loop
    fetch ref1 into v_dep;
    exit when ref1%notfound;
    end loop;
    return v_dep;
    end;
    begin
    open dep for select *from departments;
    rec:=ref_cur_demo(dep);
    --Here I have to print all the record variables;
    end;

    Hi Gopi,
    You have to write the program in different way. In your case the function always returns only one value. You can see only one department detail as output.
    To display a record type variable you need to use record type variable name .(dot) field name.
    SQL> set serveroutput on
    SQL> declare
      2  type depcur is ref cursor return departments%rowtype;
      3  dep depcur;
      4  rec departments%rowtype;
      5  function ref_cur_demo(ref1  in depcur) return departments%rowtype
      6  is
      7  v_dep departments%rowtype;
      8  begin
      9  loop
    10  fetch ref1 into v_dep;
    11  exit when ref1%notfound;
    12  end loop;
    13  return v_dep;
    14  end;
    15  begin
    16  open dep for select *from departments;
    17  rec:=ref_cur_demo(dep);
    18  --Here I have to print all the record variables;
    19  dbms_output.put_line(rec.department_id||'  '|| rec.department_name||'    '|| rec.manager_id||'    '||rec.location_id);
    20  end;
    21  /
    270  Payroll        1700
    PL/SQL procedure successfully completed.
    Here is the sample code which will demonstrates using ref cursors.
    SQL> create or replace function get_dept_detail
      2  return sys_refcursor
      3  is
      4
      5     x_res sys_refcursor;
      6
      7  begin
      8
      9     open x_res for select * from departments;
    10     return x_res;
    11
    12  end get_dept_detail;
    13  /
    Function created.
    SQL>
    SQL>
    SQL> -- Execution
    SQL>
    SQL> declare
      2
      3      res sys_refcursor;
      4      l_rec departments%rowtype;
      5
      6  begin
      7
      8     res := get_dept_detail;
      9
    10     loop
    11        fetch res into l_rec;
    12        exit when res%notfound;
    13        dbms_output.put_line( l_rec.department_id||'  '||l_rec.department_name);
    14     end loop;
    15
    16  end;
    17  /
    10  Administration
    20  Marketing
    30  Purchasing
    40  Human Resources
    50  Shipping
    60  IT
    70  Public Relations
    80  Sales
    90  Executive
    100  Finance
    110  Accounting
    120  Treasury
    130  Corporate Tax
    140  Control And Credit
    150  Shareholder Services
    160  Benefits
    170  Manufacturing
    180  Construction
    190  Contracting
    200  Operations
    210  IT Support
    220  NOC
    230  IT Helpdesk
    240  Government Sales
    250  Retail Sales
    260  Recruiting
    270  Payroll
    PL/SQL procedure successfully completed.
    SQL>
    SQL> -- In SQL*PLUS
    SQL>
    SQL> var res refcursor
    SQL> execute :res := get_dept_detail;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print res;
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID LOCATION_ID
               10 Administration                        200        1700
               20 Marketing                             201        1800
               30 Purchasing                            114        1700
               40 Human Resources                       203        2400
               50 Shipping                              121        1500
               60 IT                                    103        1400
               70 Public Relations                      204        2700
               80 Sales                                 145        2500
               90 Executive                             100        1700
              100 Finance                               108        1700
              110 Accounting                            205        1700
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID LOCATION_ID
              120 Treasury                                         1700
              130 Corporate Tax                                    1700
              140 Control And Credit                               1700
              150 Shareholder Services                             1700
              160 Benefits                                         1700
              170 Manufacturing                                    1700
              180 Construction                                     1700
              190 Contracting                                      1700
              200 Operations                                       1700
              210 IT Support                                       1700
              220 NOC                                              1700
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID LOCATION_ID
              230 IT Helpdesk                                      1700
              240 Government Sales                                 1700
              250 Retail Sales                                     1700
              260 Recruiting                                       1700
              270 Payroll                                          1700
    27 rows selected.
    SQL>
    Cheers,
    Suri ;-)

  • HP QTP10 cannot read Automation values of Advanced DataGrid

    Hi everyone,
    We're an Automation functional testing team, testing a flex application with HP QTP v10. So far we've successfully automated many parts of the application. Now, we're struck at a serious issue.
    The issue is QTP cannot read automation values specified for an Advanced Datagrid (ADG).
    While trying to read row data of the ADG, the automation name of QTP shows like,
    "lblData | someGroup |  | ** |  |  |  |  |  |  |  |  |  | lblData"
    The screenshot of Object Spy while spying ADG is also attached.
    Other than the Automation Index, we are not able to populate any automation values of a row data.
    The ADG is a custom one. Our development team has customized it in some way, and we dont have access to the code. They are using an External renderer or Custom renderer to render values into the column.
    As there is no possiblity for value-based recording, we tried to access the ADG with index-based recording. Then, we 're able to perform operations like Click, but cannot read contents of the row/cell.
    We're using:
    HP Quick TestProfessional v10.0
    Flex plugin 4.5
    Internet Explorer 7
    Flash Player v10
    Our Questions are:
    How to get automation values for these custom ADG?
    Is there any other possible ways to access the custom ADG components other than these automation values?
    Do we need any patches/plugin upgradation to perform this?
    Is there any other tools in market that can recognize and access these custom ADGs?
    Without these automation values we're unable to proceed further work. Any replies/comments/help are welcome.
    Thank you!

    A sortCompareFunction would look something like:
    Function sortWithNullAtEnd(a:Object, b:Object, field:Array = null):int
        if (a.fieldName == null && b.fieldName == null) return 0;
        if (a.fieldName == null) return 1;
        if (b.fieldName == null) return –1;
        if (a.fieldName < b.fieldName)
            return –1;
        if (a.fieldName > b.fieldName)
            return 1;
        return 0;
    Note that this sort would be unstable so you might be better off using a second field to get stability.

  • Poplist and muti-record block navigation

    Hi. I have a form with a multi-record block and a poplist on
    each record. When a certain item is TRUE on a record, I want the
    poplist button to be disabled and enabled when the item is
    FALSE. The button is normally enabled and I disable it when
    needed in the WHEN-NEW-RECORD-INSTANCE trigger. This normally
    works fine except in one likely common scenario: The user
    navigates from a record with the poplist button enabled directly
    into the poplist button of a record for which the poplist should
    be disabled. By clicking directly into the poplist without
    clicking on any of the record's regular fields, the WHEN-NEW-
    RECORD-INSTANCE trigger hasn't had a chance to fire so they are
    allowed in.
    How can I ensure a user cannot navigate to a poplist without the
    system recorgnizing the record change?
    Thanks for any advice.

    What I would advise is that you create another item in the block
    which mirrors the poplist.
    Make this item a text item.
    Change the attributes of the poplist to have a Records Displayed
    of 1.
    What you need to do then is only display the poplist on the
    current record. Do this by dynamically repositioning the poplist
    on a When-New-Item-Instance trigger.
    The information in :system.trigger_record and get_block_property
    (<>, TOP_RECORD) will provide enough information to work out the
    Y coords of the poplist for each record.
    Then at runtime when the user clicks, they will be clicking on
    the Text item rather than the Poplist. You can then navigate to
    the row and display the poplist in the correct position enabling
    or disabling it in the process.

  • SetID not found for name='BUSINESS_UNIT', value='' with record 'BI_DISC_SUR

    Hi
    While entering identifier in Discount/Sub charge page it giving following error:
    SetID not found for name='BUSINESS_UNIT', value='' with record 'BI_DISC_SUR', tree ''. (2,214) FUNCLIB_CA.RENEWAL.FieldFormula Name:SelectDiscountSurcharge PCPC:12887 Statement:186
    Called from:CA_RNW_CYCLE_PNG.GBL.CA_RNW_LN_REDUC.DISC_SUR_ID.FieldChange Statement:9
    The PeopleCode built-in function GetSetID has been called with parameters that were
    not found in the table set definitions.
    Review the table set control tables and the PeopleCode and correct whichever is wrong.
    Please help me to solve this issue.
    Thanks
    Mani

    did you check if your business unit (setcontrolvalue) is setup with record group BI_04, and it has a default setid associated.

  • Modify poplist values in iProcurement (11.5.9)

    Hi, we have a requirement to remove a value from the poplist in iProcurement, Billing Information page for Taxable Status ( Yes, No ,Don't know ).
    Following is the xml code which display the poplist
    <POR_TAXABLE_STATUS ifFlag="true" functionName = "taxableStatus2">
    <if field="POR_ALLOW_OVERRIDE_TAX_CODE" value="false" itemStyle="text" updateFlag="false" >
    <fieldCellAttributes> class=fielddatabold </fieldCellAttributes>
    </if>
    </POR_TAXABLE_STATUS>
    I am not able to find where is the function taxableStatus2 is defined which retrieve the poplist values.
    Also, based on the taxable status value ( if it is Yes ) then we want to make Taxable Code ( LOV ) as read only. Is it possible to do this. If so, please guide me how to proceed further.
    Thanks for help.

    I checked with the procurements folks and looks like these values are hard coded in DataStore.getData and they fetch the values from the message dictinary ICX_POR_PRMPT_DONT_KNOW, ICX_POR_PRMPT_YES and ICX_POR_PRMPT_NO. So you cannot remove any of these values.

  • Read XML Values

    SQL*Plus: Release 9.2.0.1.0 - Production on Wed Mar 26 15:01:22 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    I am new to Oracle coming from MS-SQL for several years.
    I have a stored procedure that receieves as parameter an XML string as Varchar2.
    This is an example of the XML string
    '<ROOT>
    <Product UpdateType="U" ProductCode="928" Description="Product 928"/>
    </ROOT>'
    I need to read the value for UpdateType, ProductCode and Description into variables to do some manipulation and decide if I can update a record or not.
    I do not need to store the XML string into a column in a table, pretty much I need to read the values see if the ProductCode exists in a table, if exists update it and if not create the record.
    Thanks
    MG

    The tag has a child, called a TextNode. That's where your text is :)

  • Reading return values in ArrayBinding situation

    Hi All.
    I'm currently using ArrayBinding to batch insert/update records into a table. I currently have an InOut parameter set that will either set or return the ID of the row depending if it's an INSERT or UPDATE.
    What I'm struggling to do is to actually read the values that come back after ExecuteNonQuery. here is some excerpts of the code:
    OracleParameter requirementId = new OracleParameter("p_id", OracleDbType.Int32, ParameterDirection.InputOutput);
                   requirementId.ArrayBindStatus = new OracleParameterStatus[reqDS.MyRequirements.Count];
    <set up the other params>
    <set up the values in a loop>
    requirementCmd.CommandText          = "PCM_PKG_REQUIREMENT_DAC.USP_SAVE_REQUIREMENT";
                        requirementCmd.ArrayBindCount     = reqDS.MyRequirements.Count;
    requirementCmd.ExecuteNonQuery();
    Now what? I've tried all sorts of ways to get to this but to no avail. My code to get it currently looks like this:
    for (int j = 0; requirementId.ArrayBindStatus.Length - 1;j++)
                             //value = CType(outParameter.Value, Object)(i);
                             requirementToReqVersion.Add(reqDS.MyRequirements.RequirementId,requirementId[j].Value);               
    This doesnt even compile but you can see what I'm getting at. I just need to retrieve a value given an index in the array bind? Thanks for the help in advance..
    jk     

    In VB.NET, we do something like this:
    Option Explicit On
    Option Strict On
    Dim values() As Object
    ReDim values(versions.Length - 1)     ' expected nbr of returned values
    ReDim identities(versions.Length - 1)
    Dim outParameter As OracleParameter
    outParameter = command.Parameters("NameOfOutParameter")
    CDbLateBinding.GetObjectArrayFromOutParameter(outParameter, values)
    Dim i As Integer
    For i = 0 To values.Length - 1
    identities(i) = CType(CType(values(i), OracleDecimal).ToString, Decimal)
    Next
    ' Separate file
    Option Strict Off
    Public Class CDbLateBinding
    Public Shared Sub GetObjectArrayFromOutParameter(ByVal parameter As OracleParameter, _
    ByVal values() As Object)
    Dim i As Integer
    For i = 0 To parameter.ArrayBindStatus.Length - 1
    values(i) = CType(parameter.Value, Object)(i) ' Option Strict Off
    Next
    End Sub
    End Class
    Looks a bit awkward but works fine.
    Armin

  • Using :$FLEX$ to create a mutually exclusive parameter condition without poplist values

    Gurus,
    I've been unsuccessfully searching for an example of utilizing the $FLEX$ to mutually exclude one of two parameters.  Most of the examples I've seen are based on poplist value presented in parameter B for a value provided in parameter A.
    Here's what I need:
    Parameter A is initially editable
    Parameter B is initially editable
    If a value is entered for either B or A, then the other parameter will become greyed out.
    Pretty simple.   I need a straight forward answer.  I would prefer not having to create a custom value and use the "sql statement" option, but if there is no other way then that will be fine.
    Thanks in advance!

    Anyone got anything on this?

  • How to read enumerated values from an OPC server via Datasocket

    Hi Labviewers,
    I am using LV8.2 and I am trying to find if it is possible to read enumerations from an OPC server via Datasocket, not just the values.
    I can successfully read a value for an OPC server via Datasocket and I get a value for example 3, is it possible to get the enumeration/string that corresponds to this value i.e. "Open".
    Many thanks in advance
    Dimitris

    Hi Sarah,
    With the input type as variant I get the following response:
    1                                     <-This is the current numeric value of the parameter
    4 Attribute(s):
       'Quality' -> 192
       'TimeHigh' -> 29861723
       'TimeLow' -> -665408304
       'Timestamp' -> 39.238E+3
    With the Input set to         Enum constant I get no values or strings coming back. With the Input set to                Ring constant I just get the numeric value   
    Dimitris   

  • How to read all values of a queue

    Hi All,
    In Message mapping I am checking condition for field value based on incoming value.
    In test cases i can see the second or third  occurence is getting supressed and first value fails the condition and mapping node not created.
    I would like to know how to read multiple values from queue and check condition for each value and if correct value present condition should pass.
    I tried all possible context changes but no luck.
    Any ideas how to read all values coming .
    Thanks.

    <?xml version="1.0" encoding="UTF-8"?>
    <msg version="" dbName="">
       <rowOp isLast="" cmitLSN="" cmitTime="" authID="" correlationID="" planName="">
          <updateRow subName="" srcOwner="" srcName="" intentSEQ="" rowNum="" hasLOBCols="">
             <col name="END_RSN_CDE" isKey="852369" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
             <col name="SVC_USER_SDT" isKey="789654" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
          </updateRow>
       </rowOp>
    </msg>

  • Problem reading RFC values from IRecordSet !!!!

    Hi All,
    I am having some problem reading values from IRecordSet. Can not seem to parse the output structure from RFC. AM using connector gateway service to execute BAPI_EXCHRATE_GETCURRENTRATES.
    Here is the code,
    MappedRecord input = rf.createMappedRecord("input");
    input.put("DATE",new String("01011990"));
    input.put("DATE_TYPE", new String("V"));
    input.put("RATE_TYPE", new String("M"));
    MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
    Object rs = null;
    IRecordSet recSet = null;
    Object result = output.get("EXCH_RATE_LIST");
    if (result == null) {
    response.write("<BR>null");
    rs = new String(" ");
    } else if (result instanceof IRecordSet) {
    IRecordSet irs = (IRecordSet) result;
    response.write("<BR>Got some dataaa");
    IRecordMetaData rsmd = null;
    rsmd = irs.retrieveMetaData();
    irs.beforeFirst();
    while(irs.next()){
    response.write("Row::"+irs.getString("RATE_TYPE")+" "+irs.getString("FROM_CURR")+" "+irs.getString("EXCH_RATE"));
    Am getting the pritn statement, Got Some Data on the PDK component.
    But somehow not able to read the values from IRecordSet
    What is the mistake here?
    Pls help
    Edited by: Aakash Jain on Oct 11, 2008 12:22 AM

    Hi
    Try in this way.
    IRecordSet resultTable = (IRecordSet)outputParams.get("TABLE_NAME");
    for(resultTable.beforeFirst(); resultTable.next(); ) {
    response.write(resultTable.getString(0));
    response.write(resultTable.getString(1));
    Thanks

  • Short dump in reading selection values in Report

    Hi all,
    I have created a Navegational Attributte and added this Info Object in the existing Query and for this object we have created Charactistics Value Variable with Uesr Entry.
    But, When we use input selection option to select a vlaue for this Variable  in the Variable Selection Screen it is trying to read the values and going into short Dump but for other variables Selection option is working fine.
    Please anyone help me if you have the solution.
    Regards,
    Ali.

    Hi,
       Try deleting the master data and reload the master data again and check for the selection variables. Check the short dump in ST22 it will say which master table ie SID table or master table where the join fails.
    Thanks,
    Arun

  • Determine/read the value of parameter rdisp/max_wprun_time within ABAP

    Hi,
    I need to avoid program breaks caused by exceeding run time longer than defined in parameter rdisp/max_wprun_time.
    I will check the time since start of report in the critcal loop to bring the current data changes to a controlled end before getting a program break. I won't put a constant to the report, I will have a dynamical routine to avoid changes of report if the value of parameter rdisp/max_wprun_time will be changed.
    But how can I get the value of this parameter within my ABAP report? Is there a table where this value has been stored? Is there an existing function module or a method to read the value?
    Thank's a lot in advance!
    Georg

    The runtime   parameter (GET RUN TIME ) can be used to dynamically get the program run time
    DATA T TYPE I.
    GET RUN TIME FIELD T.
    WRITE: / 'Runtime', T.
    or
    U probably can store the start date and time in TVARV with some variable ( line concatenate program name + START Date + Time)
    and then use
    SD_DATETIME_DIFFERENCE
    or
    SD_CALC_DURATION_FROM_DATETIME
    Regards,
    Mithun Shetty

  • Function Module to Read attributes value from Classification tab

    Dear Experts ,
    We are using material classification in the material master. Under classification tab of material master , we are maintaining certain characteristics and their corresponding values.
    I want to read those values and use those in one of the report.
    Can you please help me in identifying Function Module which will return the values of all the attributes of that material.
    Thanks in advnce,
    Regards,
    Nikhil

    You can check those details using CT06 transaction.
    FM CLAF_CLASSIFICATION_OF_OBJECTS can be used to retrive the data using program.
        CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            class              = gc_class
            classtext          = 'X'
            classtype          = gc_classtype
            clint              = gc_mmpsk
            features           = 'X'
            language           = sy-langu
            object             = l_object
            key_date           = sy-datum
            initial_charact    = 'X'
            change_service_clf = ' '
            inherited_char     = 'X'
          TABLES
            t_class            = lt_class
            t_objectdata       = lt_objectdata
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.

Maybe you are looking for