Foreign key fields not getting populated in datacontrol palette for EJB app

Hi,
I am quite new to ADF and EJB.I developed a jdeveloper application with JSF and EJB tiers.(I am using jdeveloper 10.1.3.5)
For database the default HR database is used.I created the entities for the EMPLOYEES and DEPARTMENTS table.
I also created a session bean and a data control for the session bean.
I am having a JSF page that receives all the details of a new Employee and insert into database (i.e persistEntity)
But the Employees constructor from the Data control palette is not populating the MANAGERID and DEPARTMENTID fields which are
the foreign key constraints for the EMPLOYEES table and hence while trying to persist the entity
with the auto populated fields an error message is thrown.
If I used ADF BC instead of EJB then i could populate all the fields including MANAGERID and DEPARTMENTID.
Is it possible to have two text fields for Manager and Department in the jsf to insert the Employee details with EJB as the Model?.
If possible how do I bind the values of these fields to the Employees entity object in EJB.
Kindly need your insights on this.
Thanks,
Guna.

Hi,
How are you using MANAGER_ID and DEPARTMENT_ID fields, are they exposed as Long (or some other numeric type), or did you map them on the entity, something like this
@ManyToOne
private Employee manager; // this by default uses the column named MANAGER_ID
@ManyToOne
private Department department; // this by default uses the column named DEPARTMENT_ID
.... If you mapped them (which is the right way), when you create an employee you should set these attributes before persisting the entity, by using employee.setManager(manager) and employee.setDepartment(department). Then, the foreign keys get populated automatically by your persistence provider (Toplink).
If you are using data controls, it is a little different process to set the department and manager, but you should take a look at this tutorial http://www.oracle.com/technology/obe/obe11jdev/ps1/ejb/ejb.html , it will hopefully answer a lot of your questions.
Pedja

Similar Messages

  • XREF3 field not getting populated in BSEG table while posting MIRO

    Hi,
         I have one query in MIRO tcode.I have activated xref3 field in MIRO tcode using enhancement LMR1MF6Q.Now when i try to post document with some values in xref3 field on screen ,value is not getting populated in BSEG table.Please tell me what else needs to be done to achieve this ?
    any hint on this?
    Thanks & Regards,
    Soniya S.

    Hi,
    1.- According to SAP Note 904652 - MIRO: Different from FB60
    https://service.sap.com/sap/support/notes/904652
    MIRO is an independent Materials Management (MM) transaction that does not
    claim to be the same as the accounting transactions (such as FB60 or FB01).
    MIRO was developed to allow users to process vendor invoices within the
    context of the MM procurement processes as simply as possible.
    For this reason, among other differences, the field selection was limited
    to the absolutely necessary. For example, the following fields from the
    accounting document are not available in Transaction MIRO (this list is not
    complete):
    Reference key (BSEG-XREF1, -XREF 2, -XREF 3)
    2.- SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment
    https://service.sap.com/sap/support/notes/1156325
    Have a look at badi MRM_ITEM_CUSTFIELDS.
    This badi will create a new tab at item level in order to display the new fields.
    I haven´t used this badi so i cannot talk from experience here.
    Think twice before deciding.
    Best regards.

  • Workday field not getting populated in BAPI_ENTRYSHEET_CREATE

    Hi MM gurus,
    I am trying to upload service entry sheets using bapi's , i checked the note 420334 and its working fine now.But, i want to populate  the workday field also in the service entry sheets, but this field is not getting populated even if i enter this field in the test data directory.
    Can anyone give me the reason for this?

    Hi
    Are you trying to populate the workdays field using BAPI in SE37 transaction??
    If you are executing the BAPI in SE37 then the data would not get updated in database.
    You need to run the BAPI FM & another BAPI "BAPI_TRANSACTION_COMMIT" in sequence in SE37 to post the data in database.
    I hope this helps.
    Thanx
    Prasad

  • Virtual Key figure not getting populated

    Hi All,
    I have included a virtual key figure in a multiprovider  on which the query is created and its underlying ODS.
    This issue is the virtual key figure is not getting populated . I am not sure what I am missing
    I did the following :
    1) Tried Debugging - Put a break point and execute the query in RSRT.It  did not go to the Exit. I also tried  generating the query from RSRT.
    I am using the BADI (RSR_OLAP_BADI) to populate the Vir Key Fig.
    Please guide me.
    Thanks,
    HM

    Hi All,
    Now that I am able to get the logic to come up in debug. I am faced with another issue.
    I am implementing  avery simple logic . I added a integer type key figure to the ODS and I am tryin to assign value 1 to the the key figure in the code (I am assigning 1 just ot check if the value is passed to query or not. I do have acomplex logic tha i need to implement).
    Here I am able ot see the value in the debug but in the qury the value is not populated.
    N ot sure what might be going wrong.
    code is
    l_z_avg = 1.
    <fs_zavglate> = l_z_avg .
    Appreciate help.
    Thanks,
    HM

  • Fom field not getting populated

    Hi,
    I have a field in the form role(multi select field). The value of another field in the form 'abc' is depedent on role selection. I have a rule with a switch and case statements for this. In the rule i am using
    <Rule>
    <switch>
    <ref>role</ref>
    <case>
    </case>
    </switch>
    </Rue>
    I tested the rule and it's working good.
    Now i am calling the rule in the field 'abc':
    <Field name='abc>
    <block trace'true'>
    <Expansion>
    <rule name='xxx'/>
    </Expansion>
    </block>
    </Field>
    The prolem here is that, even after i select the role, this field is not getting populated. It is empty.
    Not sure what i am missing. Please help.
    Thanks,

    step1) when you are getting value in the field on which "abc" is dependent , how are you getting that value?you are getting this value in derivation or expansion???
    step2: write the code logic for field "abc" in Derivation instaed of expansion. That should help.
    Please let me know if you are still facing the problem.
    Warm Regards,
    G

  • Fields Not getting Populated in Queries on Multi Provider

    Hi All,
    Product class,Product form and Packet size from Zqn6x03 (ods) are not getting populated in Queries(Multiprovider). Our`s is Heterogenous Multi Provider
    Points will be awarded.
    Thanks in Advance....

    Hi xys redd,
    After checking all the options it is very much important to run a report "RSR_GEN_DIRECT_ALL_QUERIES" IN SE38.
    This is the report used to generate all the changes to reflect in BEx
    It will aolve your problem if am not wrong.
    Don't forget to assign points.
    Venkat

  • Custom field not getting populated in the "Show Results where" drop down

    Hi all,
    In appointment detail page by clicking on Add button on the user related information section , it takes us to a search layout showing the list of available users.
    Here we have to filter the user's based on a custom field which has already been created in the user object. But I am not able to add the custom field in the "Show results where" drop down for which the search has to be done.
    It is getting reflected in the normal search layouts.So Can any one tell me why the change is not getting reflected in the user related info search layout?

    I tested your use case and you are correct. I would recommend that you submit a service request to CRM On Demand customer care in reference to this issue.

  • PKUNRE field not getting populated in 2LIS_13_VDITM after ECC upgrade

    Hi,
    We are seeing blank values for PKUNRE / 0BILLTOPARTY during extraction from 2LIS_13_VDITM.
    We are experiencing this issue after ECC upgrade which went live recently.
    We have applied note 580694  to correct missing fields in the billing extractor.
    This field is sourced from VBPA/VBRP.
    Our functional teams confirmed that VBPA/VBRP are updated properly and there seems to be no timing issue.
    However, the record is landing in PSA with blank BILLTOPARTY.
    Where could the problem be?
    Is there any thing we missed?
    Can any one throw some light if you have experienced this kind of an issue after upgrade.
    Thanks a ton in advance,
    Sandy.

    Hi Sandy:
        In my system I didn't find the Field PKUNRE on the VBPA / VBRP Tables, so my guess is that you're dealing with a Custom Enhancement, if this is the case the SAP Note 576886 - "Change to user-defined fields not extracted" might help you in solving this issue.
    Regards,
    Francisco Milán.
    ***Follow up note:
    I double checked and found the Field PKUNRE on the Extract Structure for 2LIS_13_VDITM (using Transaction Code LBWE) so now I know that you're working with a Standard field and not with a custom ehnancement, the SAP Notes below address a similar issue to yours but they are related to Applications 11 and 12, not for App 13. I apologize for the confusion.
    Note 621684 - "Fields PKUNRE and PKUNRG are not filled from delivery"
    Note 379237 - "BW Content LE-SHP: missing partners in 2LIS_12_VCITM"
    Edited by: Francisco Milan on Jan 28, 2011 12:54 PM

  • Fields not getting populated when a particular selection not given

    Hi!
    In my query when I run the query with the a particular sleection having contract and the dates it show sme a list of the contarct items and its sales prive , quantiy and estimated sales price ect, but in the output there are some contracts for which the sales price and the estimated sales price dosent show up , but simultaneousely I run the same query putting in the selection screen with same contract number and dates as well as a filed activity type giving its range the items that we not showing the sales price and estimated sales price now shows up on the output. Can anyone tell me why does the query dosent show the sales price and estimated sales price when the activity type range is not given and shows the price for all when activity type range is given. On teh first run it does show for few but not for all but on second insatnce when I enter the activity type it shows for all.
    Thanks

    Thats what when I make a sleection on teh selection screen excluding the activity type and run it dosent display the sales price and estimated sales price for few contracts but when I enter the activity type for those particuoar contarcts in my selection screen and run it does show me the sales price and the estimated sales price. I am not sure which part for the query you want to see, please let me know so that I can send that particular part .
    Thanks

  • Quantity field not getting update in PCA document for Goods Receipt

    We have the Purchase Account activated for our company code.
    For movement type 101 (Goods Receipt), I am getting the quantity field updated for GR/IR account and Stock Account (B/S item).
    But the quantity field is not getting updated for the "Purchase Account" and the "other offsetting PL A/C).
    Please advice whether I am missing something.
    Regards
    B.Mohanty

    Hi Aravind,
    Check SAP notes  1063198 and 1117587.
    FAGLL03 display quantity which is updated in FAGLFLEXA, BSEG is not
    relevant in this case. This is clearly explained in the note 1063198.
    The quantity posts through to FI on the 'goods receipt' items, but not on the
    'invoice receipt' items.
    In the FI normally the Quantity is not a 'real' important field, as it
    is more related to the MM area.
    But in the old 'Profit Center Accounting' and the old' Special Ledger'
    the field has been important.
    As the same logic of these areas to 'store' the Quantity is also used
    in the NewG/L the field get only filled in the line, where it make
    'sense' from our point of view, because only in the 'goods receipt'
    lines a 'real' Quantity is posted to the system.
    So as before in the PCA and SL, now also in the NewG/L the Quantity is
    filled in the correct and important lines and postings.
    In the BSEG ('old document segment table') the field is filled 'just'
    as it is send to the FI, but this is not completely correct from the
    business point of view.
    This can also lead to issues with the reporting and summation to this
    field. So with creating the new logic in the NewG/L the 'correct'
    standard of the 'writing' for the Quantity has also been taken over.
    So in the end, the update and display is correct according  SAP standard behavior.
    Actually,Quantities within G/L are never reliable,
    because the purpose of FI is a view on the data according to amount
    but not according to quantity.
    In the FI normally the Quantity is not a 'real' important field, as it
    is more related to the MM area.
    I hope I could be of assistance.
    Regards,
    Fernando

  • CProjects dash board fields not getting populated

    Hi
    Currently using cProjects 4.0 on ECC6.0 server.
    Facing problem for dash board data. Have created the project in cProject. Completed all the tasks, phases and project header also. I want actual start and actual finish date data to appear on the dash board.
    For evaluations I have done following settings:
    Activated Use Dashboard for corresponding project type ('Define Project Types' under 'Evaluations' and 'Dashboard').
    Specified when evaluations are executed as : Only with background processing ( 'Define Project Types' under 'Evaluations' and 'Dashboard').
    Assigned the extract layout to the corresponding project types for the dashboard evaluations
    Other settings:
    Transaction SPRO -> Collaboration Projects -> Evaluations -> Define Extract Layouts
    extract layour here is 0_DASHBOARD, attributes for this extract layout selected as Actual finish, actual start by checking the box of Always extract
    But I am still unable to see the dates in the Actual finish and Actual start fields on the dash board for the project of that project type.
    secondly,
    Currently Actual start and Actual finish fields are hidden, I make them to displyed column in the settings, but whenever I leave the the home page and again come to home page these fields are again going to the hidden column. I want them to be shown permanently.
    Please help on the same.
    Thanks and Regards,
    Niraj Sikligar

    hi Yogesh,
    I did the same as mentioned by you.
    Now I am getting following error message:
    Error when processing your request
    The following error text was processed in the system EC6 : Property GROUP_AGGREGATION with the value X is not allowed for key figure (PRIORITY)
    Any Solution?

  • Functional Area field not getting populated in the AUFK table

    Hi Friends,
    The table AUFK is the table for Internal Order master data.
    The issue which we are facing is:
    In a particular Order type, the field 'Functional Area' is suppressed in the field status group for the order master data.
    But the cost centers which are maintained in the order master has the functional area field populated with value.
    In the table AUFK, the functional area field is populated for some internal orders and not populated for others. In all cases it should pick the functional area from the cost center which is maintained in the internal order.
    Please guide us about what can be the possible reason(s) for populating the field in some cases while not populating in other cases.
    Thanks a lot in advance for your help.
    Regards,
    Shilpi

    Hi,
    maintain the functional area in order master data to ensure 100% functional area is available in AUFK.
    I can't tell you the reason why its sometimes appearing and sometimes not bur FUNC_AREA is not picked from responsible/requesting cost center (from master data).
    If in customizing of internal order order types a "model-order" is assigned with maintained functional area, this func_area is taken if you create a new order for this ordertype.
    Best regards, Christian

  • M204 field not getting populated in VA01

    I have to map order number to M204 field according to requirement using ORDERS05 Idoc and i am using EXIT for it.
    .but that field does not come during creating sales order.
    If I try to modify BDC DATA and try to append that field it says that its not an input field.
    What can be done???

    Hi,
    1.- According to SAP Note 904652 - MIRO: Different from FB60
    https://service.sap.com/sap/support/notes/904652
    MIRO is an independent Materials Management (MM) transaction that does not
    claim to be the same as the accounting transactions (such as FB60 or FB01).
    MIRO was developed to allow users to process vendor invoices within the
    context of the MM procurement processes as simply as possible.
    For this reason, among other differences, the field selection was limited
    to the absolutely necessary. For example, the following fields from the
    accounting document are not available in Transaction MIRO (this list is not
    complete):
    Reference key (BSEG-XREF1, -XREF 2, -XREF 3)
    2.- SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment
    https://service.sap.com/sap/support/notes/1156325
    Have a look at badi MRM_ITEM_CUSTFIELDS.
    This badi will create a new tab at item level in order to display the new fields.
    I haven´t used this badi so i cannot talk from experience here.
    Think twice before deciding.
    Best regards.

  • Tax Field not getting populated

    Hi SAP SD Gurus
    I am calculating tax with condition type MWST. In the pricing procedure the tax is getting calculated. The Tax Amount is also getting deducted from the Net Amount. But, on the Conditions Tab Page of Item Details, it is not displaying the Tax Field (KOMP-MWSBP) below the Net (KOMP-NETWR) Field.
    Thanks & Regards.

    Hi,
    Plz check if you have input the plant name in the shipping tab at item level.
    Without putting the plant name,tax (MWST) will not be visible in the conditions tab because there is a routine set in the pricing procedure against a tax condition.
    Reward points if it helps.
    Regards
    Karan

  • Total Settlement Value field  not getting populated in IW38  Transaction

    Dear all PMCS group Members,
    I have a list of  Maintenance Orders on which  Actual Costs are posted and also periodic settlements done before TECO.  When i list these Maintenance Orders in IW38 transaction the system is bringing in the values in  Total Actual Costs column  but  not the Settlement values in Total settlement column which i need to cross check before i do mass TECO. 
    Your help will be greatly appreciated.
    regards,
    rajaraman.

    Dear Rajaraman,
    You can see the Total Settlement values by using tcode IW38.
    ---> Goto IW38
    ---> Execute the Report for selected Orders
    ---> Click on the Current Tab or Press CTRL+F8
    ---> Select the Column of Total Settlements and Actual Settlements
    ---> Click on the Save Button... it will ask you to enter the Layout... Enter it and hit Enter
    Your Required Fields will be Displayed.
    Regards
    BK

Maybe you are looking for

  • How can I get an album with multiple artists to display in my Nano as one album insteadof multiple albums?

    How can I get an album with multiple artists to display in my Nano as one album insteadof multiple albums?

  • Design Mode not working - java.lang.Null Pointer exception

    When attempting to use the Design mode Flash Builder has started to completely fail to display the design and issues following erros in the components tab: "Could not create the view: An unexpected exception was thrown." "java.lang.NullPointerExcepti

  • Remap CAPS as BackSpace

    setxkbmap -option capslock:backspace or in config /usr/share/X11/xkb/symbols/[your layout]     key <CAPS> { [BackSpace,        BackSpace,         BackSpace,        BackSpace ] }; But the trouble is that sometimes when you press caps, backspace activa

  • Rename Finder Items with Automator in Leopard

    I used following automator actions to rename all files contained in selected folders in Mac OS finder: 1. Get Selected Finder Items 2. Get Folder Contents (repeat for each subfolder found option on) 3. Rename Finder Items (Add Text before name, Show

  • Non-blocking Server/Client is blocking...?!

    First, a simple question: Why in most example code using Selectors, when iterating over the Set returned by Selector.selectedKeys() does the currently selected SelectionKey get removed from the Iterator? I see it all the time, but since the Selection