How to create compute field

Hi,
Does anybody know how to create a compute field based on other input fields and data retrieved from the database in the same page ?
I use an interactive form and report which has 2 input fields, 1 drop-down list containing identifiants and a kind of total field which has to be calculated from the 2 first input fields, 1 value retrieved from the database by the identifiant seleted that i may put in a hidden field. On form submit (click on the create button), the value calculated in this compute field has to be inserted into database as any other input field.
I've tried many things : button , process, computations after regions and so on but nothing works. I wonder if i can put some pl/sql or expression in the default value of the compute field ?
As i'm new in apex, can somebody tell me how do these objects work together ? how to refer to a field in the form with an 'apex expression' ?
Thks a lot

Hi,
I've tried 2 solutions. The first one, with calculations performed by trigger, works well but i can't see the total before inserting into DB.
The second is what i prefer but impossible to get it work.
So if someone has an idea, please help
in my pdetail_modele page_
I have
- 2 input fields P28_X and P28_Y
- 1 compute field P28_CTP
- a button "compute CTP" which has to display, for example, the sum of P28_X and P28_Y in the P28_CTP field.
Here is what i did
- process (before regions) create_mod_collection:
begin
if apex_collection.collection_exists(p_collection_name=>'MODELE') = false then
apex_collection.create_collection(p_collection_name=>'MODELE');
else
for x in (select n001, n002 from apex_collections where collection_name='MODELE')
loop
:P28_X := x.n001;
:P28_Y := x.n002;
end loop;
end if;
end;
- P28_X and P28_Y : nothing in source field
- P28_CTP source value or expression : select nvl(:P28_X,0) + nvl(:P28_Y,0) from dual;
- Button Compute_CTP action : redirect to page in this application with p_detail_modele in page field.
- process (after regions) add_modele_collection :
apex_collection.add_member(p_collection_name=> 'MODELE', p_n001=>:P28_X, p_n002=>:P28_Y);
Thks
Edited by: user469717 on Apr 23, 2013 11:33 AM

Similar Messages

  • How to create a field with  1200 chars length

    Hi,
    Will anybody let me know how to create a field with length 1200 in a table.
    Regards,
    Madhavi

    Hi Madhvi,
    Other thing what you can do is
    1. First create a Table type.
         Goto SE11-> Dataelements ->Table type
         There on the next screen select Predefine radio button & there provide data type & size.
    2. Create a structure having a field typa of Table type created before. say that field is quant.
    Now in your program refer that structure to create an internal table & work area.
    Now if u append ur text to the field quant.
    try creating line type of size more that 255 if it works then fine other wise reduce it.
    Note:: This will be a deep structure.
    so first append value to the field quant,  the at the end of first record append valu to ur internal table.
    thanks
    Satyam

  • 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 create a field group.

    Hi all,
    Can anyone please explain how to create a field group for few fields?
    My requirement is i want to Create a specific fieldgroup for maintenance of the fields for the contacts TAB on the customer master
    KNVK-NAME1
    KNVK-NAMEV
    KNVK-ABTNR
    KNVK-PAFKT
    KNVK-BRYTH
    How todo this? please anyone can explain the steps.
    Mohana

    If you are creating these fields with Business Data Tool Set.
    Then you will have field group and fields.
    Field are attached to field groups,
    Field groups are attached to view
    Views are attached to Section
    Sections are attached screen : you are calling as a tab
    Regards,
    Shiva Kumar
    removed by moderator
    Edited by: Jan Stallkamp on Dec 19, 2008 2:33 PM

  • How to create required field in alv?

    hi friends^^
    how to create required field in alv?
    i don't find required option in fieldcatalog and others.
    is it possible?

    Source code..
    PLANETYPE is key_sel = 'X'.
    But does't required field...
    REPORT  zs32editable1  .
    TYPE-POOLS : slis.
    DATA : gt_sflight  TYPE TABLE OF sflight.
    DATA : gt_fieldcat TYPE slis_t_fieldcat_alv,
           gs_fieldcat LIKE LINE OF gt_fieldcat,
           gs_layout   TYPE slis_layout_alv.
    START-OF-SELECTION.
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE gt_sflight
        FROM sflight.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-edit = 'X'.
      gs_fieldcat-fieldname = 'PLANETYPE'.
      gs_fieldcat-key_sel = 'X'.
      append gs_fieldcat to gt_fieldcat.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_STRUCTURE_NAME = 'SFLIGHT'
          is_layout        = gs_layout
          IT_FIELDCAT      = gt_fieldcat
        TABLES
          t_outtab         = gt_sflight
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • How to create new field while upgrading from CRM 4.0 to 7.0

    Hi ,
    How do we create new field on UI and store data into existing field in database?
    Is there any option in AET to skip the creation of new field in the database table ?
    Custom field is already created in GUI and database table while using CRM 4.0
    Now, after upgrading to 7.0 EHP3 , I need to bring this field on the UI .
    Using AET may create new field again in the database table.Please suggest.
    New filed needed to be created in Marketing Campaign Element Header data.
    Thanks
    Jayasri

    Hi Jayasri,
    As a custom fields are already there in crm 4.0. You don't need to use AET again to add field.
    These enhancements still exist after the upgrade. Dependent on the enhancement object and type some manual steps are necessary.
    For example regarding a single field enhancement for the BP the whole framework is enhanced after the upgrade. There is only one manual step to bring the field on the relevant view(s) via the UI Configuration Tool. For whole BP tables some more manual steps are necessary, these steps are described in the note 1069791 - CRM WebClient UI for EEW enhancements (reference to more notes regarding the EEW after the upgrade).
    For set types, we need to generate UI With the help of the UI configuration tool the settypes could become visible in the Web UI.
    I didn't understood your scenario, can add little more information why you want to add field by AET if available in DB?
    Refer
    FAQ - SAP CRM Upgrade from release 4.0 to 7.0 
    Regards,
    Arjun

  • How to create form fields in Adobe Professional version 8

    Hello,
    I have been trying for some time now to get a form in place. I have used an existing form and I am working in Adobe Professional version 8.
    I went to tools, forms and than I thought I had to click on text field tool. But than it asks me to name the text field. I want to keep the name fields blank and have them completed by the persons I will send it to (or actually this form will be posted online). The other persons should be able to open, complete, save and return it by email.
    please advise me what to do.
    Your help section brings me all the time to the Life Cycle which I think is not appropriate for the purpose I need it.

    Thank you for your advises but I have the impression my initial question is still not being answered.
    I have tried to create the fields in Adobe Pro 8 version, via forms, text field tool and named all the fields.
    Than I saved it and enabled the usage rights for Adobe Reader but opening this file from another computer in Adobe Reader, it allows me only to add comments and markups in the document, not filling out the form in the form fields I thought I created before?
    Now what to do? Did I do something wrong with the creation of form fields, can you please describe the exact path/steps to take?
    Appreciate your prompt reply.

  • How to create new field groups in AA master data screen layout?

    Hello,
    We are using ECC 6.0
    We have created bunch of new fields for asset master data, but we want to make them visible only for particular asset class. So we need to customize in SPRO Asset Master Data Screen Layout, but there no specific field groups that we can customize. So how to create and add new field groups to manage them by radiobuttons Required, Optional, No or Display?

    hi,
    think, it's not possible.
    look here:
    http://help.sap.com/saphelp_47x200/helpdata/en/4f/71e05a448011d189f00000e81ddfac/frameset.htm
    "The field groups and their respective fields are defined in system tables"
    kind regards
    Andreas

  • How to create a field catalogue dynamically?

    Hi guys,
          I have to create a field catalogue dynamically. I am creating the internal table dynamcially. It is <fs_dyn_table>. I am passing this to the function module REUSE_ALV_FIELDCATALOG_MERGE.
    <fs_dyn_table> contains five fields kunnr, land1, name1, ort01 and telf1 which i am passing from selection screen.
    This is how my function module is
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = sy-repid
       i_internal_tabname             = '<FS_DYN_TABLE>'
       i_inclname                     = sy-repid
        CHANGING
          ct_fieldcat                  = it_fcat
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3.
    I am not getting any values in the internal table it_fcat.
    I would like to know if there is any other way to create field catalogue?
    Help will be appreciated.
    Thanks,
    Ibrahim

    Hi,
    Kindly refer wiki links:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/complete%252bcode%252bfor%252bdynamic%252bfield%252bcatalog%252bcreation
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/create%252ban%252balv%252b(%252bUsing%252bOOABAP%252b)with%252bdynamic%252bField-Catalog
    Hope they help you.
    Regards,
    Tarun

  • How to create composite field in crm 2013

    Hi,
    I need 3 address fields in account entity in crm 2013 . By default 2 composite address fields are available i need 1 more composite address field. Can anyone tell me how to create custom composite address field like address1 and address2. Please guide me
    how can I meet that requirement.

    Hi Aamir,
    See if these links below helps you
    http://www.magnetismsolutions.co.nz/blog/paulnieuwelaar/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu
    https://msdn.microsoft.com/en-in/library/dn481581.aspx?f=255&MSPPError=-2147217396
    Hope it helps!
    Regards, Abhishek Bakshi If you find this post helpful then please Vote as Helpful and Mark As Answer. Check my blog on https://mydynamicscrmblog.wordpress.com/

  • How to create Dynamic field so it appears the file name

    Hi,
    I was wondering if anyone knows how to create a dynamic text field so it automatically appears the file name created of the document.
    thanks alot !!!
    Jack
    [email protected]

    Hi, Seems we can't upload examples anymore, but here is a screen shot of what I meant.
    Hope it helps

  • How to create text fields & assign values form sql in ADF

    Hi all,
    I am new to oracle ADF,
    i want know how to create text fileds and how to assign the values to those fields from plsql.
    Regards
    Prakash

    http://technology.amis.nl/blog/3315/creating-an-adf-application-based-on-plsql-api-part-one-reading-data-as-a-collection-of-sql-type-objects
    Hope this will help.
    ~Krithika

  • How to create password field in screen painter

    hi all,
        i am designing login screen. in that i hv to create one input-output field as a password field. i.e when i enter the characters it will display in <b>*(star) format.</b>
         also is there any way to do the same using <b>parameters</b> statement in report? give me the Way or coding.
    thanks in advance,
    regards,
    Vinod.

    HI GOPI
       I TRY TO ENCRYPT FORMULA IN PASSWORD PROTECT.BUT ITS NOT WORK .ITS SUCCESSFUL COMPILE & WHEN I PUT PASSWORD ITS SHOWING WHAT I GIVEN THERE. SO I THINK IN MY CODING PART THERE IS SOME ERROR.CAN U HELP ME PLEASE.
    I BRIEFLY DESCRIBE.........
    HERE FOR LOGIN PURPOSE I USE MODULE POOL PROGRAM & THERE I CREATE TWO FIELD ONE FOR (USER_NAME & PASSWORD).THERE SHOWING TWO ERROR (1ERROR ONE) EVEN IF YOU GIVE WRONG USER & PASSWORD THEN LOGIN SUCCESSFUL AND (2 SECOND ONE) IF YOU GIVE PASSWORD IN PASSWORD FIELD THAT   LOOK LIKE (****) MEANS ENCRYPT.
    I ALSO SEND MY CODING CAN YOU CHECK PLEASE.
    REPORT  ZLOGIN_PRO MESSAGE-ID ZBABUN.
    TABLES: ZTABLE_LOGIN.
    data: itab like table of ztable_login with header line,
                  OK TYPE SY-UCOMM.
                     CALL SCREEN 100.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK.
    WHEN 'LOGIN'.
        SELECT * FROM ZTABLE_LOGIN INTO TABLE ITAB.
            SELECT * FROM ZTABLE_LOGIN INTO TABLE ITAB WHERE PASSWORD = ZTABLE_LOGIN-PASSWORD.
      SELECT USER_NAME FROM ZTABLE_LOGIN INTO ITAB-USER_NAME.
       SELECT PASSWORD FROM ZTABLE_LOGIN INTO ITAB-PASSWORD.
    LOOP AT ZTABLE_LOGIN.
      if itab-user_name ca itab-password.
           message i006.
    ELSEIF SCREEN-GROUP1 = 'ZTABLE_LOGIN-PASSWORD'.
    SCREEN-INVISIBLE = '1'.
    MODIFY ZTABLE_LOGIN.
    CONTINUE.
           call transaction 'SBWP'.
         else.
         message e020.
         CLEAR  : ZTABLE_LOGIN-USER_NAME,ZTABLE_LOGIN-PASSWORD.
       endif.
    END LOOP.
    WHEN 'LOGOUT'.
    MESSAGE I007.
    LEAVE PROGRAM.
    WHEN 'CREATE'.
      CALL TRANSACTION 'ZLOGIN_NEW_USER'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  IN
    note: FIELD NAME OF USER_NAME = ZTABLE_LOGIN-USER_NAME
                                        PASSWORD = ZTABLE_LOGIN-PASSWORD
    PLEASE REPLAY ME.
    .I AM WAIT FOR UR RESULT.
    THANKS
    LAXMIKANTA.

  • Create computed field in cube query

    I have a cube query in Hyperion 9.3.1 from an Essbase database and I want to add a computed field, but the option does not appear to be available. Can I add a computed field to this type of query?

    first download it to result and then you can do whatever you want. To have the look and feel of query, you can again form a pivot out of that.
    You can also add that computed item to essbase and then fetch it via the query.
    Regards,
    rahul

  • How to create Count field

    Hi All,
    I need to create Count(*) one of the fileld from Fact Table. How to create it in presentation layer?

    Hi Welcom99,
    You can apply the 'Count' Aggregation for any column.
    right click on column from the table in BMM Layer which you want to apply 'count' and select properties. In the third tab called 'Aggregation' is available. from there you can select 'Count' from default aggregation rule.
    There is another way also.
    In the presentation services we can write the formula count(column name) for the column which you want make count.
    Regards,
    Bose

Maybe you are looking for