New record default field value: same as current

Hi, OTN
A want to set a default value of a new record field, created by ADF Form. This field is not editable and shouldn't be shown at all.
New value should be the same as current.
The form is exposing an updatable detail View object based on two entity objects (only one of them is updatable).
How is it done? Please, advice.
Thanks

You are almost right, Sireesha.
This field really is a foreign key. But VO is built on three entity objects and is linked with a MasterVO using another key.
The model is (see model screenshot in the next message):
table1 ( id_one\[pk\] ) \--* table2 ( id_one\[fk\], id_three\[fk\]) \*-- table3 ( id_three\[pk\] ) --* table4 ( id_four\[pk\], id_three\[fk\] )
Hope the model is understandable.
MasterVO is build on table1.
DetailVO is build on tables 2, 3, 4. Only table4EO is updatable.
DetailVO is linked with MasterVO through table2.id_one.
I need to insert a row into table4, using DetailVO. So when I click Create, I want table4.id_three to be the same as table3.id_three.

Similar Messages

  • Set the default field value to transaction code field, when calling from WD

    Hi all,
    Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
    Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
    Is there any way to set the default field value to transaction code field, when calling from WD?
    Please suggest, if anyone have any idea.
    Thanks
    Sanket

    Hi,
    I am using the below code to open a standard transaction. It will help you to explain my point more easily.
    DATA: url TYPE string,
              host TYPE string,
              port TYPE string.
    *Call below method to get host and port
      cl_http_server=>if_http_server~get_location(
         IMPORTING host = host
                port = port ).
    *create URL
      CONCATENATE 'http'
      '://' host ':' port
      '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
       INTO url.
    *get the window manager as we are opening t code in external window.
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component TYPE REF TO if_wd_component.
      DATA lo_window TYPE REF TO if_wd_window.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
    call the url which we created above
      lo_window_manager->create_external_window(
      EXPORTING
      url = url
      RECEIVING
      window = lo_window ).
      lo_window->open( ).
    Note*
    One more query I want to add to this thread, that is there any possibility to call a custom transaction as well?

  • How can I get the previous record's field value in a VO

    Hi I would like to know how can I get the previous record's field value in a VO
    For example : I have a VO porequisitionlinesvoimpl, and it contains 5 records (porequisitionlinesvoimpl.getRowCount() = 5). How can I search all records in the VO and get the field (attribute3) for all records?
    Many thanks anyone can help
    Lawrence

    Hi ,
    U can loop through the VO to get the value of attribute3,
    need to extend the controller ,use below code
    OAViewObject vo = (OAViewObject)oawebbean.getApplicationModule (VO1);
    OARow row = null;
    int fetchedRowCount = vo.getFetchedRowCount();
    RowSetIterator Iter = vo.createRowSetIterator("Iter");
    if (fetchedRowCount > 0)
    Iter .setRangeStart(0);
    Iter .setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    row = (OARow)Iter .getRowAtRangeIndex(i);
    String value = (String)row.getAttribute("Atrribute3");
    Thanks
    Pratap

  • How to create new record with old values

    Dear all
    i have creation page with 45 fields are there
    user will enter all the fields and save it will call to non editable mode
    if user will click on change button it will call to editable mode
    in that my requirement is user wont change among those ites(45 items)clcik on save again it will call to view mode
    in that user will change any one of the value among 45 items and click on save button i need to create one more record in database
    if user wont edit any one of the field out of 45 items i dont want to create new record in database
    how can we achieve thsi functionality
    Regards
    Sreekanth

    Hi Srikant,
    When user may edit the record, the same row may get updated in vo. Thus over writing existing row instead of creating new row.
    Approach1..
    On the page where user may edit records, instead of presenting records of existing row, present copy of existing row. So
    In AM... (Later on you can put vo logic to its proper place, i.e. vo java file)
    public void viewPageCallSetup()
    Row originalRow=vo.createRow();
    Row dummyRowForEdit=vo.createRow();
    //COPY THE ORIGINAL ROW TO DUMMY ROW. IF THERE IS DIRECT METHOD TO CREATE COPY OF EXISTING ROW, THAT MAY BE MUCH BETTER.
    for(int i=0;i<vo.getAttributeCount()-1; i++)
    dummyRowForEdit.setAttribute(i, originalRow.getAttribute(i));
    vo.insertRow(dummyRowForEdit);
    vo.setNewRowState(Row.STATUS_INITIALIZED);
    vo.setCurrentRow(dummyRowForEdit);
    call this method in contoller's processRequest..
    string oid=pagecontext.getparameter("oid");
    if(pageContext.getparameter("Purpose").equals("Edit")) //Means user clickED the edit button so we need to replicate the row
    am. viewPageCallSetup(oid); //calling this method in am
    else
    In PFR...
    if(pageContext.getparameter("Purpose").equals("Edit"))
    am.xxcostedit(oid); //calling this method in am
    in case user selects "Cancel" on edit form,we need to remove the duplicate row. So in AM write a method to remove the duplicate rowd on click of "Cancel" button on edit form.
    Rest of the logic is same for "Save" button. Just say commit.
    Abdul Wahid

  • JSF: how to add new record in datatable from same page

    Jdeveloper : 11.1.2.2.0
    using ADF i want to create a page that contains a datatable, input text field and a command button.
    when i press the command button i want the text in the input text field to be inserted as a new record in datatable.
    what is the best practice for that ? how to get the value of the input text field and insert it?
    thanks in advance :)

    thanks so much that really helped :)
    the solution is to do it programatically in a managed bean :)

  • Several content types and default field value

    Hi!
    I have a document library with several custom content types (derived from standard Document type). One of them (CT1) has field with default value. Other content types must not contain this field. And when I upload document, this field has no default value.
    If I make CT1 first (and default) content type in a library, default value appears. Also it works when I add the field to the first content type. But in my solution CT1 must not be the first content type in a library and the field must have default value (and
    other content types must not have this field). Does anybody know how to make it?

    I understood why default value does not work. When we upload document to a library and then see a form with fields, it's not a newform, it's edit form. So when we upload a document, it gets first (default) content type of the library, only default fields
    from this content type are filled. The solution here to fill default fields from other content types is to write itemadded event receiver.

  • Head Scratcher - Default Field Values

    have an issue that is truly a head scratcher and I could use a little help.
    I created a number of fields - client name, client email, account manager etc. Most are just Unicode a couple are integer and one is a date. For two of them Client Name and Account Manager which I'm going have a lookup attached I enter a default value. Choose Client and Choose Account Manager.
    For two of the fields (client name and account manager) I created lookups with a list of clients and the other with a list of account managers.
    I then created a new group added all of the custom fields. For the two fields I want lookups on I select them in the group window and attach the lookups that I've previously created. I continue with where the group appears, attach it to a set etc and then save changes.
    So everything is perfect I can see the group within the set but for the two lookups I don't have a default value just a blank pull down window. What's the deal. Is there a syntax I'm missing for entering the default value for the field? Do I also need to enter the default value in the lookup so they match?

    actually the issue was with putting the default value in the lookup. That worked. I get what your saying though, however its really six of one half dozen of another. I created the fields first so editing the field in the lookup pulldown I didn't actually have the correct lookup values.
    By creating the field and then lookup and then linking them up in the group it worked just fine. But after I read your post I created the lookup first and then attached it while creating a field and didn't attach it while creating the group and got the same result.

  • Default  field values in UI screen

    Hi Experts,
    I came across a situation and it is like...
    i included the available field in the UI and i am even getting the drop down list for tht value...
    not the problem is..once i select tht value it get refresed and nothing appears there..
    also i want to make other fields  to be visible when this fields is slected...
    i have included STATUS PROFILE and the values from it get dis appeared once i select it...
    also i want to make current status as created always and
    new status as released just .
    Please let me know abt wht can be done to make is work..
    thanks,
    Saurabh.
    ney..experts wht happened..i relly need some reply here,,pls
    Edited by: Saurabh Agrawal on Jun 16, 2008 3:07 PM

    Hi Experts,
    I have solved this problem but when i am selecting this..i want to limit the entries in new status to just 1..
    suppose i am creating the campaign then present status will be Created and the new status will be a blank and Relaeased(just 2)
    suppose now the present status is released then new status must be just blank..
    is it possible to do so.. pls let me know abt this solution..its urgent..pls
    thanks,
    SA

  • Building repositories - need ECC default field values

    For building MDM repositories - Vendor, Customer and Product in SAP MDM, I need default values of SAP ECC fields like -
    Payment Term - Table T052
    Warehouse Type -
    Purchasing Group - T024
    Customer Type (Account Group) - Table T077Y
    Customer Industry Type - INDUSTYPE
    Customer Industry Code - TBRCT
    Product Category - Table MARA
    Product Type - Table MARA
    Product Grade - Table MARA
    Product Package - Table MARA
    Product Unit of Measure - Table MARA
    Can someone update the default values of these tables?

    Hi Sam,
    Field name->Table>Referance Table--->Default Value
    Payment Term--->T052->None--->None
    Warehouse Type--->MLGN->T307--->Yes
    Purchasing Group--->T024->None--->None
    Account Group--->T077Y->None--->None
    Industry Type--->INDUSTYPE->None--->None
    Industry Code--->TBRCT->TBRC--->Yes
    Material Type--->MARA->T134--->Yes
    Note : Take help of functional person who can guide you proper way regarding who's default value are populating at ECC sceen which dependent on configuration setting or ABAP programming and not on referance table so according to buisness demands you need to set default value to mdm even if there in no referance table or default value in ECC
    Thanks,
    Jignesh Patel
    Edited by: jignesh patel on Aug 4, 2010 5:25 PM

  • Dilemma in having default field values

    Hi all,
    I have lots default values in my form page like the "creation date" field, which is set to sysdate.
    My dilemma is that whenever I edit an existing record/row of a form, when updating a field, the other fields with previously "null" values will be updated by default, if the default value is set.
    How do I avoid this? or it is the right behavior and logic?
    Thanks

    Hi,
    You can also try setting the default values in the Field Group structure view.
    crmc_blueprint_c -> Application elemt -> Field Group -> Field Group structure.
    Give the name of the fieldgroup that you wish. (if your field group was never customized, you need to click the 'Import S-Table entries button')
    in this view, you will see all the fields in your field-group. You have to then select the required field and set value in it's "default value" field.
    Once done, save and re-generate the field-group. You should now see the defulat values on ur PCUI screen.
    Hope this helps.
    Regards,
    Raviraj

  • Setting default field values for multi-line text fields in lists?

    For the multiple lines of text field in a list, I'm using SharePoint Designer 2013 to set a default
    value for the field, but I need that default value to include rich text formatting (the default value includes a formatted table). Is this possible without having to delve into JavaScript? And if so, how?

    Yes, we can :)
    You can do it with powershell
    $web = get-spweb <yourweb>
    $list = $web.lists["<yourList>"]
    $field = $list.fields["<yourField>"]
    $field.DefaultValue = "place your html code here"
    $field.update()
    hope that helps

  • How to set default field values in customer master data.

    hi,
    I want to set default values in customer master data (account group wise).
    but
    I don't know how to set it .
    please help me.
    (I don't want to change field status in account group rather than I want to set default values for field. )
    thank you.

    hi,
    this is to inform you that,
    in SAP there is no such a provision.
    but
    in LSMW there is an option of CONSTANT VALUES.
    check in SHD0 - also
    please check and confirm
    balajis\a

  • How to default field values based on a sql query?

    I have a create form that has employee_id and supervisor_id fields. I am defaulting the employee_id based on the login info (no problem there). Now I want to default the supervisor_id also. Supervisor id is based on a sql query that takes the employee_id as a parameter for the where clause.
    How do I implement this in jDeveloper?

    I figured how to do this. I created a new EO, associated it to my base EO via association. Then put this code in the base EO's create() method:
    // Set supervisor id based on SupervisorEO
    SupervisorEOImpl supEO = getSupervisorEO();
    Number newSupId = supEO.getSupervisorId();
    setSupervisorId(newSupId);
    This seems to be the simplest.

  • Account external unique id default field value

    Hi everyone,
    I am not so experienced in writing expressions so if anyone has created an expression to use when new accounts are created in the system to autopopulate the Integration ID into the External Unique ID field then kindly share.
    I have tried
    [<ExternalSystemId>] = [<IntegrationId>]
    [<ExternalSystemId>] = IntegrationId()
    Thanks,
    Søren

    [<IntegrationId>]
    This should work.

  • How to discover which field was clicked in when-new-record-instance

    Suppose: a multi-record block. The user is positioned on an existing record on field A
    Action: user clicks on empty (new) record on field B
    Question: how can I discoverer that the user clicked on field B in the when-new-record-instance? Already tried :system.current_item and :system.trigger_item. They both contain 'field A'.
    Edited by: user473811 on 26-aug-2010 4:56

    That should work. What version of forms are you running?
    I tested it out on Forms 9.0.4 just to make sure and :system.current_field, :system.current_item, :system.cursor_field, and :system.cursor_item all bring back field B when I run the form in debug mode. Is there logic in your when-new-record-instance trigger that is taking you back to field A before you look at the :system variables?
    I would run the form in debug mode if I was you and break on the first thing in the WNRI trigger and just step through it looking at those system variables so you can see what it happening, but it should work unless you have some bugged up version of forms or are doing a go_item in the trigger back to field A.

Maybe you are looking for

  • BPE_adapter The process does not support the given synchronous interface

    We are using PI 7.0 Sp 14 . Old dev box needed to be upgrade with 64 bit hardware. We did a fresh installation and done all the technical configuraiton. Imported SLD , IR,ID , Runtime value mapping . All scenario working fine after migration except o

  • Appending Objects to a File using serialization

    hi, I was wondering if I can append objects in a single file. For example, suppose there are 2 .java files. 1st file creates the Serialized file caleed sl.dat, opens it, writes the object, close it down. The 2nd file nw open that same file, sl.dat, i

  • Plesae Help me (Japanese problem)

    Hi, I am developing a vocabulary trainer. The languages I want to support are German and Japanese. When I try to store Japanese characters in my mysql database, I do not get the correct characters. The entry of the field is "???" instead of the Japan

  • Very big problem with JSF about FORM and "id=" for HTML form's elements and

    I have discovered a very big problem with JSF about FORM and "id=" for HTML form's elements and java instruction "request.getParameterNames()". Suppose you have something like this, to render some datas form a Java Beans : <h:dataTable value="#{Table

  • ServerApplicationContext SaveChanges loose data

    Hi, I've an entity with 2 navigation property (ForeignKey). In WebApi controller with ServerApplicationContext I want to add new entity with the following code: navprop1 = CurrentDataWorkspace.ApplicationData.Type1.GetQuery().Execute()