LOVs again!  How to return multiple fields to calling form

Hi
Newbie question, any help GREATLY appreciated :)
Is there a simple and easy way to return more than one field from a LOV.
I need this as I have a composite fk comprised of 2 fields, and as such need to return 2 fields from the LOV to the calling form.
(My environment: JDeveloper 9.0.5.2 build 1618)
CM

Thanks, you put me on the right track here. Further investigations show the following sample provided by OTN shows how to use both the session request/response values or a JavaBean to do this:
http://www.oracle.com/technology/sample_code/products/jdev/10g/ADF_UIX_UserInput.zip
As such I post my solution to my original post. Hopefully it's useful to someone beside myself. I have to write up my notes anyhow so it's no fuss to submit them to the forum. I must admit I'm a newbie and slightly demented Forms programmer so such solutions aren't so obvious to me. With this in mind please include the "standard disclaimer" here, with the addition "mileage may vary" warranty.
For these notes I've used the "HR" demo Oracle schema. In particular the tables departments and employees. As you know there is a master-detail relationship between these 2 tables, where each department may have one or more employees.
We have the requirement on a webpage to:
1) Provide an input-form-with-navigation to edit the employees.
2) Display the relating department_name field, rather than just showing the department_id which is meaningless to the user. For example if the employees.department_id = 40, we wish to show the department name "Human Resources" on the employees record.
3) Provide a LOV for the department ID field to allow the user to change the underlying department_id to a different master departments record.
4) Update 2) given a change via 3).
To do this do the following:
Entity Objects
1) Create default EO/VOs on both tables.
2) In the employees EO, create a new field "DepartmentName" to represent the derived department name field.
3) Set the new EO attribute's selected-in-query field.
4) In the query-column-expression field, enter a query to derive the department name field for each record in the detail-employees-EO.
eg. (SELECT dpt.department_name FROM departments dpt WHERE dpt.department_id = employees.department_id)
Ensure to include the brackets.
5) Apply the changes and accept the warning to create default data-type settings for the new attribute.
View Object
6) In the employees VO, include the new field DepartmentName as a selected attribute from the EO.
7) Apply the changes and accept the warning to create default data-type settings for the new attribute.
8) Test the model by running the ADF BC tester. Once running select the employees VO and step through the records, making sure the DepartmentName field has a value and changes appropriately according to the relating parent department_id.
UIX input-only-form
9) Create a new UIX web page employeesEdit.
10) From the data-control pallete, drag in the employees VO as an input-form-with-navigation.
11) For testing purposes it is also useful to have a create, delete, commit and rollback button, so includes these too.
12) Within the employees VO data-control, also drag across a messageLovInput for the DepartmentId. Position it under the existing DepartmentId messageTextInput within the UIX page. We'll remove the existing messageTextInput later, but it's useful to leave it in for testing purposes initially when the LOV returns values.
UIX LOV
13) Navigate to the default LOV page that has just been created for you.
14) Within the data-control pallete, expand the departments VO, select department ID then LOV-table from the drop-down, and drag this item onto the LOV page.
15) Save your changes.
16) Run your application. For an existing employee, invoke the department LOV and select an alternative department. Note on returning to the employees page the DepartmentID (both the messageTextInput and messageLovInput fields) are updated, but the DepartmentName is not. To do this we need to create a JavaBean to return multiple fields from the LOV to the original form.
JavaBean
17) Within your ViewController project, expand the ApplicationSources-View node.
18) Select the new button, and create a standard JavaBean.
19) Name the bean DepartmentsLov.
20) Via the class editor, add 2 private scope fields DepartmentId and DepartmentName with String data-types, ensuring the create get/set method checkboxes are checked.
21) Make and save your changes.
22) From the navigator drag the newly created java file into the data-control palette.
UIX LOV
23) Return to the LOV webpage.
24) Your LOV page will have a lovSelect event handler something like the following:
<event name="lovSelect">
<set property="inputValue"
value="${bindings.DepartmentId.inputValue}"
target="${data.employeesEdit.DepartmentId}"/>
25) Change the lovSelect as follows:
<event name="lovSelect">
<compound>
<set property="inputValue"
value="${bindings.DepartmentId.inputValue}"
target="${data.employeesEdit.DepartmentId}"/>
<set value="${bindings.DepartmentId.inputValue}"
property="inputValue"
target="${bindings.JavaBeanDepartmentId}"/>
<set value="${bindings.DepartmentName.inputValue}"
property="inputValue"
target="${bindings.JavaBeanDepartmentName}"/>
</compound>
26) Within the UI model navigator, right-click on the top node, then create-binding, input, text field.
27) Select the AppModuleDataControl, then DepartmentView, then the DepartmentName field, and then the ok button.
28) In the UI model select the new field, then in the structure pane rename the field to DepartmentName.
29) Within the UI model navigator, right-click on the top node, then create-binding, data, iterator.
30) Select the DepartmentsLovDataControl and name the new iterator DepartmentsJavaBeanIterator.
31) Again in the UI model navigator, right-click on the top node, then create-binding, input, text field.
32) Select the DepartmentsLovDataControl then departmentId field, then the ok button.
33) In the UI model select the new field, then in the structure pane rename the field to JavaBeanDepartmentId.
34) Again in the UI model navigator, right-click on the top node, then create-binding, input, text field.
35) Select the DepartmentsLovDataControl then departmentName field, then the ok button.
36) In the UI model select the new field, then in the structure pane rename the field to JavaBeanDepartmentName.
UIX input-only-form
37) Return to the main employeesEdit UIX form.
38) Your UIX page will have a lovUpdate event handler something like the following:
<event name="lovUpdate">
<null/>
39) Change the lovUpdate as follows:
<event name="lovUpdate">
<compound>
<set value="${bindings.JavaBeanDepartmentId.inputValue}"
property="inputValue"
target="${bindings.DepartmentId}"/>
<set value="${bindings.JavaBeanDepartmentName.inputValue}"
property="inputValue"
target="${bindings.DepartmentName}"/>
</compound>
</event>
40) Repeat steps 29 through 36 for this page.
41) Within the UIX page find the entries for the departmentId LOV, and the DepartmentName. They should look something like the following:
<messageLovInput id="${bindings.DepartmentId.path}"
model="${bindings.DepartmentId}"
destination="lovWindow1.uix"/>
<messageTextInput model="${bindings.DepartmentName}"
columns="10"/>
42) Modify these 2 entries as follows:
<messageLovInput id="DepartmentId"
model="${bindings.DepartmentId}"
destination="lovWindow1.uix"
partialRenderMode="multiple"
partialTargets="DepartmentId DepartmentName"/>
<messageTextInput id="DepartmentName"
model="${bindings.DepartmentName}"
columns="10"/>
43) Finally delete the original DepartmentId messageTextInput field, leaving the DepartmentId messageLovInput.
Testing
44) Open your UIX input-only-form.
45) Call the LOV and change the department for an existing employee record.
46) Return to the employees page and note that the department ID and name have changed.
47) Commit your changes.
48) With your favourite data inspection tool (a'la Toad), check that the employee record's department ID has been appropriately saved to the database.
<The End>
Phew!

Similar Messages

  • [UIX] How To: Return multiple values from a LOV

    Hi gang
    I've been receiving a number of queries via email on how to return multiple items from a LOV using UIX thanks to earlier posts of mine on OTN. I'm unfortunately aware my previous posts on this are not that clear thanks to the nature of the forums Q&A type approach. So I thought I'd write one clear post, and then direct any queries to it from now on to save me time.
    Following is my solution to this problem. Please note it's just one method of many in skinning a cat. It's my understanding via chatting to Oracle employees that LOVs are to be changed in a future release of JDeveloper to be more like Oracle Forms LOVs, so my skinning skills may be rather bloody & crude very soon (already?).
    I'll base my example on the hr schema supplied with the standard RDBMS install.
    Say we have an UIX input-form screen to modify an employees record. The employees record has a department_id field and a fk to the departments table. Our requirement is to build a LOV for the department_id field such that we can link the employees record to any department_id in the database. In turn we want the department_name shown on the employees input form, so this must be returned via the LOV too.
    To meet this requirement follow these steps:
    1) In your ADF BC model project, create 2 EOs for employees and departments.
    2) Also in your model, create 2 VOs for the same EOs.
    3) Open your employees VO and create a new attribute DepartmentName. Check “selected in query”. In expressions type “(SELECT dept.department_name FROM departments dept WHERE dept.department_id = employees.department_id)”. Check Updateable “always”.
    4) Create a new empty UIX page in your ViewController project called editEmployees.uix.
    5) From the data control palette, drag and drop EmployeesView1 as an input-form. Notice that the new field DepartmentName is also included in the input-form.
    6) As the DepartmentName will be populated either from querying existing employees records, or via the LOV, disable the field as the user should not have the ability to edit it.
    7) Select the DepartmentId field and delete it. In the UI Model window delete the DepartmentId binding.
    8) From the data controls palette, drag and drop the DepartmentId field as a messageLovInput onto your page. Note in your application navigator a new UIX page lovWindow0.uix (or similar) has been created for you.
    9) While the lovWindow0.uix is still in italics (before you save it), rename the file to departmentsLov.uix.
    10) Back in your editEmployees.uix page, your messageLovInput source will look like the following:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="${bindings.DepartmentId.path}"
        destination="lovWindow0.uix"/>Change it to be:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="DepartmentId"
        destination="departmentsLov.uix"
        partialRenderMode="multiple"
        partialTargets="_uixState DepartmentName"/>11) Also change your DepartmentName source to look like the following:
    <messageTextInput
        id=”DepartmentName”
        model="${bindings.DepartmentName}"
        columns="10"
        disabled="true"/>12) Open your departmentsLov.uix page.
    13) In the data control palette, drag and drop the DepartmentId field of the DepartmentView1 as a LovTable into the Results area on your page.
    14) Notice in the UI Model window that the 3 binding controls have been created for you, an iterator, a range and a binding for DepartmentId.
    15) Right click on the DepartmentsLovUIModel node in the UI Model window, then create binding, display, and finally attribute. The attribute binding editor will pop up. In the select-an-iterator drop down select the DepartmentsView1Iterator. Now select DepartmentName in the attribute list and then the ok button.
    16) Note in the UI Model you now have a new binding called DCDefaultControl. Select this, and in the property palette change the Id to DepartmentName.
    17) View the LOV page’s source, and change the lovUpdate event as follows:
    <event name="lovSelect">
        <compound>
            <set value="${bindings.DepartmentId.inputValue}" target="${sessionScope}" property="MyAppDepartmentId" />
            <set value="${bindings.DepartmentName.inputValue}" target="${sessionScope}" property="MyAppDepartmentName" />
        </compound>
    </event>18) Return to editEmployees.uix source, and modify the lovUpdate event to look as follows:
    <event name="lovUpdate">
        <compound>
            <set value="${sessionScope.MyAppDepartmentId}" target="${bindings.DepartmentId}" property="inputValue"/>
            <set value="${sessionScope.MyAppDepartmentName}" target="${bindings.DepartmentName}" property="inputValue"/>     
        </compound>
    </event>That’s it. Now when you select a value in your LOV, it will return 2 (multiple!) values.
    A couple things to note:
    1) In the messageLovInput id field we don’t use the “.path” notation. This is mechanism for returning 1 value from the LOV and is useless for us.
    2) Again in the messageLovInput we supply “_uixState” as an entry in the partialTargets.
    3) We are relying on partial-page-refresh functionality to update multiple items on the screen.
    I’m not going to take the time out to explain these 3 points, but it’s worthwhile you learning more about them, especially the last 2, as a separate exercise.
    One other useful thing to do is, in your messageLovInput, include as a last entry in the partialTargets list “MessageBox”. In turn locate the messageBox control on your page (if any), and supply an id=”MessageBox”. This will allow the LOV to place any errors raised in the MessageBox and show them to the user.
    I hope this works for you :)
    Cheers,
    CM.

    Thanks Chris,
    It took me some time to find the information I needed, how to use return multiple values from a LOV popup window, then I found your post and all problems were solved. Its working perfectly, well, almost perfectly.
    Im always fighting with ADF-UIX, it never does the thing that I expect it to do, I guess its because I have a hard time letting go of the total control you have as a developer and let the framework take care of a few things.
    Anyway, I'm using your example to fill 5 fields at once, one of the fields being a messageChoice (a list with countries) with a LOV to a lookup table (id , country).
    I return the countryId from the popup LOV window, that works great, but it doesn't set the correct value in my messageChoice . I think its because its using the CountryId for the listbox index.
    So how can I select the correct value inside my messageChoice? Come to think of it, I dont realy think its LOV related...
    Can someone help me out out here?
    Kind regards
    Ido

  • Sending an Email with a cursor that returns multiple fields.

    I was investigating about sending emails from apex, and I'd like to know if you can help me, I need to send an Email report with multiple fields, I m using this code :
    DECLARE
    CURSOR c1 is
    select id,gk,creation_date,sr_count,issue_notes,sr_impacted,oldest_creation_date
    from gk_report where id = (select max(id) from gk_report);
    reg c1%ROWTYPE;
    begin
    IF (c1%ISOPEN = TRUE) THEN
    CLOSE c1;
    END IF;
    OPEN c1;
    FETCH c1 INTO reg;
    CLOSE c1;
    APEX_MAIL.send(
    p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => 'Hourly GK Log',
    p_body_html =>
    'GK: '||to_char(reg.gk)||'<br>
    CREATION DATE: '||to_char(reg.CREATION_DATE,'DD-MON-YYYY HH24:MI:SS')||'<br>
    SR COUNT: '||to_char(reg.SR_COUNT)||'<br>
    ISSUE NOTES: '||to_char(reg.ISSUE_NOTES)||'<br>
    SRs IMPACTED: '||to_char(reg.SR_IMPACTED)||'<br>
    OLDEST CREATION DATE: '||to_char(reg.OLDEST_CREATION_DATE,'DD-MON-YYYY HH24:MI:SS'),
    p_SUBJ => 'Hourly GK Log: ' || to_char(reg.CREATION_DATE,'DD-MON-YYYY HH24:MI:SS'),
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    end;
    In this code there is a cursor that returns just one field, But what about if the cursor returns multiple fields, How can I insert a Loop into this code.?
    Thanks,
    Pablo.

    Hi,
    DECLARE
    p_collection_name VARCHAR2(9000) := 'Report_collection';
    begin
      IF (apex_collection.collection_exists(p_collection_name => p_collection_name)) THEN
         apex_collection.delete_collection(p_collection_name => p_collection_name);
      END IF;
    apex_collection.create_collection_from_query(
            p_collection_name => 'Report_collection',
            p_query => 'SELECT DISTINCT AUD_SR AS SR,  C.USER_NAME   AS AUDITOR, F.ERROR_NAM  ,  A.AUD_OBSERV AS AUDIT_OBS,D.FEEDBK_OBSERV AS FEEDBACK_OBS , E.ANALYSIS_OBS ,A.AUD_STATUS
    FROM   AUDIT_PROCESS A, MICC_AT_DATA B, MICC_AT_USER C, FEEDBACK_PROCESS D, MICC_AT_ANALISYS E, MICC_AT_ERROR F
    WHERE   B.DATA_MONTH = :P27_MONTH AND B.DATA_SR  = A.AUD_SR AND C.ID = B.DATA_AUDITOR  AND F.ERROR_ID = A.AUD_ERROR AND A.FEEDBACK_COD = D.FEEDBACK_COD AND  D.FEEDBK_AGREE = 'N' AND E.COD_ANALYSIS =  A.COD_ANALYSIS  ORDER BY AUDITOR');
      APEX_MAIL.send(
      p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => p_collection_name ,
    p_body_html => '',
    p_SUBJ => 'hi',
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    END;
    Error
    ORA-06550: line 18, column 176:
    PLS-00103: Encountered the symbol " AND E.COD_ANALYSIS = A.COD_ANALYSIS ORDER BY AUDITOR" when expecting one of the following:
    ) , * & = - + < / > at in is mod remainder not rem
    <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset
    The symbol "," was substituted for " AND E.COD_ANALYSIS = A.COD_ANALYSIS ORDER BY AUDITOR" to continue.
    1. DECLARE
    2. p_collection_name VARCHAR2(9000) := 'Report_collection';
    3. begin
    I got out the 'N' quotes of the N :
    DECLARE
    p_collection_name VARCHAR2(9000) := 'Report_collection';
    begin
      IF (apex_collection.collection_exists(p_collection_name => p_collection_name)) THEN
         apex_collection.delete_collection(p_collection_name => p_collection_name);
      END IF;
    apex_collection.create_collection_from_query(
            p_collection_name => 'Report_collection',
            p_query => 'SELECT DISTINCT AUD_SR AS SR,  C.USER_NAME   AS AUDITOR, F.ERROR_NAM  ,  A.AUD_OBSERV AS AUDIT_OBS,D.FEEDBK_OBSERV AS FEEDBACK_OBS , E.ANALYSIS_OBS ,A.AUD_STATUS
    FROM   AUDIT_PROCESS A, MICC_AT_DATA B, MICC_AT_USER C, FEEDBACK_PROCESS D, MICC_AT_ANALISYS E, MICC_AT_ERROR F
    WHERE   B.DATA_MONTH = :P27_MONTH AND B.DATA_SR  = A.AUD_SR AND C.ID = B.DATA_AUDITOR  AND F.ERROR_ID = A.AUD_ERROR AND A.FEEDBACK_COD = D.FEEDBACK_COD AND  D.FEEDBK_AGREE = N AND E.COD_ANALYSIS =  A.COD_ANALYSIS  ORDER BY AUDITOR');
      APEX_MAIL.send(
      p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => p_collection_name ,
    p_body_html => '',
    p_SUBJ => 'hi',
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    END;
    Error : ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ParseErr:ORA-00904: "N": invalid identifier
    If you can help me would be great, and if you see another mistake please let me know i have not may reach out the solution about it.
    Thanks,
    Pablo.

  • [Forum FAQ] How to use multiple field terminators in BULK INSERT or BCP command line

    Introduction
    Some people want to know if we can have multiple field terminators in BULK INSERT or BCP commands, and how to implement multiple field terminators in BULK INSERT or BCP commands.
    Solution
    For character data fields, optional terminating characters allow you to mark the end of each field in a data file with a field terminator, as well as the end of each row with a row terminator. If a terminator character occurs within the data, it is interpreted
    as a terminator, not as data, and the data after that character is interpreted and belongs to the next field or record. I have done a test, if you use BULK INSERT or BCP commands and set the multiple field terminators, you can refer to the following command.
    In Windows command line,
    bcp <Databasename.schema.tablename> out “<path>” –c –t –r –T
    For example, you can export data from the Department table with bcp command and use the comma and colon (,:) as one field terminator.
    bcp AdventureWorks.HumanResources.Department out C:\myDepartment.txt -c -t ,: -r \n –T
    The txt file as follows:
    However, if you want to bcp by using multiple field terminators the same as the following command, which will still use the last terminator defined by default.
    bcp AdventureWorks.HumanResources.Department in C:\myDepartment.txt -c -t , -r \n -t: –T
    The txt file as follows:
    When multiple field terminators means multiple fields, you use the below comma separated format,
    column1,,column2,,,column3
    In this occasion, you only separate 3 fields (column1, column2 and column3). In fact, after testing, there will be 6 fields here. That is the significance of a field terminator (comma in this case).
    Meanwhile, using BULK INSERT to import the data of the data file into the SQL table, if you specify terminator for BULK import, you can only set multiple characters as one terminator in the BULK INSERT statement.
    USE <testdatabase>;
    GO
    BULK INSERT <your table> FROM ‘<Path>’
     WITH (
    DATAFILETYPE = ' char/native/ widechar /widenative',
     FIELDTERMINATOR = ' field_terminator',
    For example, using BULK INSERT to import the data of C:\myDepartment.txt data file into the DepartmentTest table, the field terminator (,:) must be declared in the statement.
    In SQL Server Management Studio Query Editor:
    BULK INSERT AdventureWorks.HumanResources.DepartmentTest FROM ‘C:\myDepartment.txt’
     WITH (
    DATAFILETYPE = ‘char',
    FIELDTERMINATOR = ‘,:’,
    The new table contains like as follows:  
    We could not declare multiple field terminators (, and :) in the Query statement,  as the following format, a duplicate error will occur.
    In SQL Server Management Studio Query Editor:
    BULK INSERT AdventureWorks.HumanResources.DepartmentTest FROM ‘C:\myDepartment.txt’
     WITH (
    DATAFILETYPE = ‘char',
    FIELDTERMINATOR = ‘,’,
    FIELDTERMINATOR = ‘:’
    However, if you want to use a data file with fewer or more fields, we can implement via setting extra field length to 0 for fewer fields or omitting or skipping more fields during the bulk copy procedure.  
    More Information
    For more information about filed terminators, you can review the following article.
    http://technet.microsoft.com/en-us/library/aa196735(v=sql.80).aspx
    http://social.technet.microsoft.com/Forums/en-US/d2fa4b1e-3bd4-4379-bc30-389202a99ae2/multiple-field-terminators-in-bulk-insert-or-bcp?forum=sqlgetsta
    http://technet.microsoft.com/en-us/library/ms191485.aspx
    http://technet.microsoft.com/en-us/library/aa173858(v=sql.80).aspx
    http://technet.microsoft.com/en-us/library/aa173842(v=sql.80).aspx
    Applies to
    SQL Server 2012
    SQL Server 2008R2
    SQL Server 2005
    SQL Server 2000
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How to create Lookup field in user form in OIM 11g - Urgent

    Hi Experts,
    How to create Lookup field in User Form - OIM 11g.
    Pls. provide your support on priority.
    Regards
    Karan

    Thanks all for your suggestion.
    Our requirement, is we need to have a user defined field similar to how its there in "Organisation".
    For example we need to create an user defined field like "Service Holding" which holds different services say like Service 1, Service 2, Service 3 etc.
    Under each service there are multiple roles....
    Eg:
    Service 1 - Role 1, Role 2, Role 3
    Service 2 - Role 4, Role 5
    Service 3 - Role 6, Role 7, Role 8
    Is there a way to store multi-valued attribute in OIM UDF? If so, pls. guide us
    If its not possible we would need to create a Lookup field (something similar to Organization or Manager). User clicks on the button (lens button), which should invoke an API wherein he can select specific Roles and save in User. Eg. like Service 1 - Role 1#Service 2 # Role 5 and store in the backend database.
    Is this possible. Pls. guide.
    Regards,
    Karan

  • How to return a html repsonse after form guide rendering in browser?

    How to return a html repsonse after form guide rendering in browser indicating that server has recieved transmission and request is submitted succesfuly?
    I am rendering the form guide in browser using guide invoke service and when i submit the data in browser to server through guide , it is displaying some random number in browser?
    i need to display a resposne that request is submitted successfully?

    how could i define a variable with "html data" ?
    Create a variable of type document and then a service to read the html from where ever it's located. If you put it in LiveCycle, you can use the ReadRessource service. If it's on the file system, you can use the Read Document. If it's in the database, you can use the JDBC service.
    Also, one more doubt where should i use this variable in my process to get the same?
    You want the response once you've submitted the data, so the html is really the result of calling the process that's processing the data. So I would create an output variable of type document on that process.
    Right now it displays a random number in the browser because your submit process is long lived. When a process is long lived (asynchronous), you invoke it and then you get an identifier back. It's kind of a fire and forget. You can use that identifier to check the status of the long lived process, since long lived processes can take hours, days to complete. You don't want your browser to wait that long, hence the identifier.
    However if you change the process to be short lived (synchronous), the browser will wait for the result of the process, which really means the output variables for that process. If your output variable contains html, it'll display html.
    So the key is make you submit process short lived and populate the output variables appropriately.
    Jasmin

  • How to make a field in adobe form noneditable

    how to make a field in adobe form noneditable. like info keys..
    when this form is sent through worflow the receiver shudnt be able make changes to the field value...(I have a form, which has fields prefilled(like pernr employee name) but these fields are in editable able..(i want only some fields to be uneditable not all)
    Edited by: kumar gaurav on Apr 11, 2008 8:04 AM

    Hi,
    You can make fields non-editable at runtime using this code:
    field.access = "readOnly"
    Hope this helps.
    Amit

  • How to Bring "Division" field into PCA form to create Report?

    Hi,
    I need to create Balance sheet reports -Division wise in profit center accounting.Kindly advise me how to bring Division field in to FORM of PCA.Once i get the Division field in to FORM of PCA then i can full fill the requirement.
    Kindly advise me as i am not able to bring it either through Key figures or Characterstics.how do i bring into KE84 form
    Please help me
    Supriya

    Hello,
    I do not think division wise balance sheet is possible.
    Regards,
    Ravi

  • How can i disable/hide the calling form from fnd_function.execute

    Hi,
    How can i disable/hide the calling form from fnd_function.execute.If so can any one give the syntax.
    thanks

    Hi Francesco,
    Are you talking about that ??? )) It will explain you about to get the name of the web page when you are executing an abap function for determining the values of variables...
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20make%20a%20variable%20even%20more%20flexible%20in%20bw-bps.pdf">How to make a variable even more flexible in BW-BPS?</a>
    This is weird: I wrote that document a few weeks ago, it is theorically published on SDN but this is not possible to find it by using the research tool... Maybe because it applies only to BPS in 3.5. I did not have enough time to migrate that solution to BI-IP 7.0.
    Regards
    Laurent

  • How to return multiple values from dialog popup

    hi all
    I'm using ADF 10g. I have a requirement that I have to return multiple values from a dialog.
    I have a page containing a table with a button which calls the dialog. The dialog contains a multi-select table where i want to select multiple records and add them to the table in the calling page.
    In the backing bean of the calling page, I have the returnListener method.
    I am thinking that I have to store the selected rows from dialog in an array and return that array to the returnListener...but I don't know how to go about it with the code.
    Can someone help me out with it?
    thanks

    Hi Frank,
    I'm trying to implement your suggestion but getting comfused.
    AdfFacesContext.getCurrentInstance().returnFromDialog(null, hashMap) is called in ActionListener method, from what I understood.
    ReturnListener method already calls it, so no need to call explicitly.
    Okay here's what i'm doing.
    command button launches the dialog on the calling page.
    In the dialog page, there is a button "select", which when i click, closes the dialog and returns to calling page. I put a af:returnActionListener on this button, which logically should have a corresponding ReturnListener() in the calling page backing bean.
    Now I have 3 questions:
    1. do i have to use ActionListener or ReturnListener?
    2. where do I create the hashMap? Is it in the backing bean of the dialog or in the one of calling page?
    3. how do I retrieve the keys n values from hashmap?
    please help! thanks
    This is found in the backing bean of calling page:
    package mu.gcc.dms.view.bean.backing;
    import com.sun.java.util.collections.ArrayList;
    import com.sun.java.util.collections.HashMap;
    import com.sun.java.util.collections.List;
    import java.io.IOException;
    import java.util.Map;
    import javax.faces.application.Application;
    import javax.faces.application.ViewHandler;
    import javax.faces.component.UIViewRoot;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.ActionEvent;
    import mu.gcc.dms.model.services.DMSServiceImpl;
    import mu.gcc.dms.model.views.SiteCompaniesImpl;
    import mu.gcc.dms.model.views.SiteCompaniesRowImpl;
    import mu.gcc.dms.model.views.lookup.LkpGlobalCompaniesImpl;
    import mu.gcc.util.ADFUtils;
    import mu.gcc.util.JSFUtils;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.context.AdfFacesContext;
    import oracle.adf.view.faces.event.ReturnEvent;
    import oracle.adf.view.faces.model.RowKeySet;
    import oracle.binding.AttributeBinding;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    import oracle.jbo.AttributeDef;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowIterator;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.java.util.Iterator;
    public class CompanyList {
    private BindingContainer bindings;
    private Map hashMap;
    DMSServiceImpl service =(DMSServiceImpl)ADFUtils.getDataControlApplicationModule("DMSServiceDataControl");
    SiteCompaniesImpl siteCompanyList = service.getSiteCompanies();
    LkpGlobalCompaniesImpl globalCompanyList = service.getLkpGlobalCompanies();
    public CompanyList() {
    public BindingContainer getBindings() {
    return this.bindings;
    public void setBindings(BindingContainer bindings) {
    this.bindings = bindings;
    *public void setHashMap(Map hashMap) {*
    *// hashMap = (Map)new HashMap();*
    this.hashMap = hashMap;
    *public Map getHashMap() {*
    return hashMap;
    public String searchCompanyButton_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Execute");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    *public void addCompanyActionListener(ActionEvent actionEvent){*
    AdfFacesContext.getCurrentInstance().returnFromDialog(null, hashMap);
    public void addCompanyReturnListener(ReturnEvent returnEvent){
    //how to get hashmap from here??
    public String addCompanyButton_action() {
    return "dialog:globalLovCompanies";
    }

  • How to return all field names in a table

    How do you write a report to return all field names in a table? I prefer the field names in a column.
    Thanks
    Wayne

    Hi,
    In Oracle it is,
    Select column_name from user_tab_cols where table_name  = 'Table_Name';
    Note: Table_Name should be in capital letters
    In MS SQL Server it is,
    SELECT Column_Name + ', '
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'Table_Name'
    Hope this helps!
    Thanks
    -Azhar

  • How to print multiple fields in single barcodes

    Hello friends,
    How to create a single barcodes with multiple fields in smartforms and retrieve same multiple fields while scanning also.
    My requirement is, i want to create barcodes which contains material no, serial no, material description and quantity all fields together in a single barcodes.
    While scanning how to identify all this different fields. For e.g. from single barcodes how we will identify while scanning which is material no, serial no, material description and quantity.
    Thanks in advance.......
    Regards,
    Dev

    Hello friends,
    How to create a single barcodes with multiple fields in smartforms and retrieve same multiple fields while scanning also.
    My requirement is, i want to create barcodes which contains material no, serial no, material description and quantity all fields together in a single barcodes.
    While scanning how to identify all this different fields. For e.g. from single barcodes how we will identify while scanning which is material no, serial no, material description and quantity.
    Thanks in advance.......
    Regards,
    Dev

  • How to return multiple tags (based on different checks) in a for loop?

    Hi,
    I'm trying to return multiple elements, based on different checks that are done in the XQuery, within a for loop. But I'm getting syntax errors at any attempt to do this.
    This is the structure of what I'm trying to do:
              <ActionList>
         <ACtion>
    let $total := count(...)
    for $x in (1 to $total)
         let $lineItems := $someVariable/*:Items/*:Item[$x]
         return
              if(...)
                        <Qty1>{...}</Qty1>
                             else     ""
                        if(...)
                        <Qty2>{...}</Qty2>
                             else ""
                   {                                       if(...)
              <Qty3>{...}</Qty3>
                             else ""
              <LinesList>
                             let $totalcount(...)
                             for $y in (1 to $totalcount(...)
                                  let $DTL := $someVariable*:DTL[$y]
                             return
                             <Line>
                                  <Carrier>{...}</Carrier>
                                  <Path>{...}</Path>
                                  <CA>{
                                       if(...)
                                            data($$someVariable/*:CA)
                                       else
                                  }</CA>
                                  <RE>{
                                       if(...)
                                            data($someVariable*:CA[@XX="RG"])
                                       else
                                  }</RE>
                                  <Time>{
                                       if(...)
                                            data($someVariable*:CA[@XX="BN"])
                                       else
                                                                     </Time>
                                  </Line>
                        </LinesList>
                                                 </ACtion>
                                                 </ActionList>
    I'm not able to return elements without having their father being returned as well, I just want to iterate over those fields and, based on that verification, decide whether they should be returned or not.
    Can someone please advise?

    An example anyway...
    Input document ($d) :
    <ns0:Items xmlns:ns0="http://my.company.org/my-namespace">
      <ns0:Item type="A">
        <ns0:Qty>2</ns0:Qty>
        <ns0:UnitPrice>10.00</ns0:UnitPrice>
        <ns0:DTL>
          <ns0:Article>ART001</ns0:Article>
          <ns0:DispatchDate>2012-01-20</ns0:DispatchDate>
          <ns0:Destination direct="1">Location1</ns0:Destination>
        </ns0:DTL>
        <ns0:DTL>
          <ns0:Article>ART002</ns0:Article>
          <ns0:DispatchDate>2012-01-21</ns0:DispatchDate>
          <ns0:Destination direct="1">Location2</ns0:Destination>
        </ns0:DTL>
      </ns0:Item>
      <ns0:Item type="B">
        <ns0:Mass>5</ns0:Mass>
        <ns0:Unit>kg</ns0:Unit>
        <ns0:DTL>
          <ns0:Article>ART003</ns0:Article>
          <ns0:DispatchDate>2012-01-20</ns0:DispatchDate>
          <ns0:Destination direct="1">Location3</ns0:Destination>
        </ns0:DTL>
        <ns0:DTL>
          <ns0:Article>ART004</ns0:Article>
          <ns0:DispatchDate>2012-01-21</ns0:DispatchDate>
          <ns0:Destination direct="1">Location4</ns0:Destination>
        </ns0:DTL>
        <ns0:DTL>
          <ns0:Article>ART005</ns0:Article>
          <ns0:DispatchDate>2012-01-22</ns0:DispatchDate>
          <ns0:Destination direct="2">Location5</ns0:Destination>
        </ns0:DTL>
      </ns0:Item>
    </ns0:Items>XQuery :
    declare namespace ns0 = "http://my.company.org/my-namespace";
    <DispatchInfo>
      for $i in $d/ns0:Items/ns0:Item
      return
      <Parcel>
        if ($i/@type = "A")
          then <Amount>{xs:decimal($i/ns0:Qty * $i/ns0:UnitPrice)}</Amount>
          else <Weight>{concat($i/ns0:Mass, " ", $i/ns0:Unit)}</Weight>
      , for $j in $i/ns0:DTL
        return
        <Article>
          <Num>{data($j/ns0:Article)}</Num>
        , <Dt>{data($j/ns0:DispatchDate)}</Dt>
        , if ($j/ns0:Destination/@direct = "1")
            then <Dest>{data($j/ns0:Destination)}</Dest>
            else ()
        </Article>                 
      </Parcel>
    </DispatchInfo>Output :
    <DispatchInfo>
      <Parcel>
        <Amount>20</Amount>
        <Article>
          <Num>ART001</Num>
          <Dt>2012-01-20</Dt>
          <Dest>Location1</Dest>
        </Article>
        <Article>
          <Num>ART002</Num>
          <Dt>2012-01-21</Dt>
          <Dest>Location2</Dest>
        </Article>
      </Parcel>
      <Parcel>
        <Weight>5 kg</Weight>
        <Article>
          <Num>ART003</Num>
          <Dt>2012-01-20</Dt>
          <Dest>Location3</Dest>
        </Article>
        <Article>
          <Num>ART004</Num>
          <Dt>2012-01-21</Dt>
          <Dest>Location4</Dest>
        </Article>
        <Article>
          <Num>ART005</Num>
          <Dt>2012-01-22</Dt>
        </Article>
      </Parcel>
    </DispatchInfo>

  • How to make text field in tabular form as List of value (LOV)

    So the problem is next:
    I should to make field in tabular form as LOV(list of value (combobox)) to load there data form db. Could smb take me an advise how to make it.
    Thanks.

    So thanks, I did it, it works. How now to make next: I selected Id from list and in the next column appears name with ID from DB. so how to make ondemand process i know (thanks to you), but how to get value from LOV that I selected to give it to Dynamic Action.
    Thanks

  • How to return all fields when updating?

    When I update a lead, it only returns fields that are modified but not all fields in the XML.
    I noticed the LeadID and LeadFullname values are still being returned when updating which is good.
    How can I make it so it will return ALL fields that have values and not just the modified ones when updating?
    Thanks

    I have to query it after getting it back from the queue.

Maybe you are looking for

  • Datasource error- while activating it- warnings occured

    Hi experts, I'm using the standard BC datasource 3FI_SL_7R to load the data into the cubes 0rtl_c01 & 0rtl_c03. while activating the data source in the R/3 the system displayed the below warnings: "Generating DataSource 3FI_SL_7R" "Delta process ABR

  • How to *actually* add a second AEX

    With apologies to folks I've replied to in the fora, I've found it educational just to read iFelix, Duane and ADSL nation's replies. Here's an article that directly contravenes all the advice I've given in the past few days: "AirPort Extreme and Expr

  • Frame only for columns having values in smartforms

    hi friends, im in the process of developing a smartform in which i have a table and i need to have give frames only to the columns which are having values...is it possible..pls help

  • Upgradeing oracle 9i Windows 32 bit to Oracle 10.2.0.3 Windows 64bit

    I have a DB in oracle 9.2.0.5. I have two questios 1 ) How can I upgrade this to Widnows 64 bit oracle 10.2.0.3 without doing an export import. 2) Is it possible to upgrade 9.2.0.5 straight to 10.2.0.3 Windows 64 bit without export import. My plan is

  • Using Output types in Custom Reports

    Hello, I have got a requirement to set up two new Outputs which would be used by two different Custom Reports such as Shortage Allocation and Late Shipment notification report,Both these Outputs Both output types need to be linked to the same access