Add functionality Via Coding

Hi,
I have made a page to input new values in 2 View Objects (Dept & Employee) using "Create Insert" Operation for both VO's using a bean as coded below:
public String cb10_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding2 = bindings.getOperationBinding("CreateInsert1");
Object result2 = operationBinding2.execute();
if (!operationBinding2.getErrors().isEmpty()) {
return null;
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
. Now I need to submit the values entered in the Form but am unable to do so . Even if I drag "Commit" operation on button it gives foreign key error. Is there any code to submit the Value in 1 VO and then in 2nd VO like the above...
And also what if I want to route to next page after submitting Values. what code should I write.
Thanks ,
MB

I only quote the docs:
By default, when you commit the transaction the entity objects in the pending changes list are processed in chronological order, in other words, the order in which the entities were added to the list. This means that, for example, if you create a new Product and then a new Supplier related to that product, the new Product will be inserted first and the new Supplier second.
When two entity objects are related by a composition, the strict chronological ordering is modified automatically to ensure that composed parent and child entity rows are saved in an order that avoids violating any constraints. This means, for example, that a new parent entity row is inserted before any new composed children entity rows.
If your related entities are associated but not composed, then you need to write a bit of code to ensure that the related entities get saved in the appropriate order.
and etc...
Straight copy-and-paste from the link I posted. Further on it describes how, in detail, to write code so that the parent entity posts first.
If you have a composition association => no need to do anything.
If you do not have a composition association => you can force the parent to post first.
So, I think you have it backwards, Suganth.
MB, Are you sure that you are using an Employee VO instance that is a child of the Department VO instance in your application module (they should appear as the employee nested inside the department in the data control panel) - this could also be your problem.
John
John

Similar Messages

  • HR form: Add functionality to add comments to payslip via IT0128

    Hi,
    I am very new to the HR forms. Not having any experience of any transaction or table etc.
    My requirement is: I need to add functionality to add messages to payslip via IT0128 to a HR form having specific group.(Add comment to payslip)
    Can you please give me the steps to be followed to fulfill this requirement?

    Hi Ankit,
    You have so many threads on same question.before you raise a forum question do enough R & D
    some threads for you.......
    https://forums.sdn.sap.com/click.jspa?searchID=21696631&messageID=6879933
    https://forums.sdn.sap.com/click.jspa?searchID=21696631&messageID=6627148
    https://forums.sdn.sap.com/click.jspa?searchID=21696631&messageID=6546304
    Kindly go through the below steps for Inserting Logo in SmartForm :
    1) In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
    2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
    3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
    4) Select any picture and set its Resolution in DPI
    5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and position of the Logo
    6) Set any other parameters if required, save and activate.
    7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
    8) User TCode SE78 to upload new pictures and logos.
    I hope it helps you!!!
    Thanks
    Cheera

  • Oracle Proc in edmx via add function import is not working

    I have a mandate to call a external oracle package from my local oracle db proc using Entity Framework. I have created a synonym for that. When I am trying to polpulate the oracle procedure data in my mvc screen using odp.net. The screen is closing automatically when I am trying to retive the column info by clicking "get column information" under "Add Function Import" in model browser.
    Following is my code snipet
    1. created a oracle stored proc to call the external proc
    CREATE OR REPLACE PROCEDURE USP_GET_DETAILS
    IN_ID IN NUMBER,
    OUT_RESULT OUT SYS_REFCURSOR
    IS
    OUT_FED_TAX_ID_NO VARCHAR2(50);
    OUT_PARTY_ID_NO NUMBER;
    OUT_PARTY_TYP_CD NUMBER;
    BEGIN
    PKG_GET_DETAILS.USP_GET_DETAILS_INFO (IN_ID, OUT_FED_TAX_ID_NO, OUT_PARTY_ID_NO);
    OPEN OUT_RESULT FOR
         SELECT OUT_FED_TAX_ID_NO, OUT_PARTY_ID_NO FROM DUAL;
    END USP_GET_DETAILS;
    2. added the proc "USP_GET_DETAILS" using "Update model using database" in my edmx file
    3. Now proc has been added to my edmx file under SSDL
    <Function Name="USP_GET_DETAILS" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="BCS_OWNER">
    <Parameter Name="IN_ID" Type="number" Mode="In" />
    </Function>
    4. added following code to my web.config file
    <oracle.dataaccess.client>
    <settings>
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursor.OUT_RESULT" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursorMetaData.OUT_RESULT.Column.0" value="implicitRefCursor metadata='ColumnName=OUT_FED_TAX_ID_NO;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursorMetaData.OUT_RESULT.Column.1" value="implicitRefCursor metadata='ColumnName=OUT_PARTY_ID_NO;NATIVEDATATYPE=Number;ProviderType=Decimal'" />
    </settings>
    </oracle.dataaccess.client>
    5. underModel Browser try to add the procedure under "Add Import Function", select "Complex Type". when i am clicking on "Get column information" button, the screen blank for some time and then auto closing the screen without displaying any column info. I would like to know if any thing wrong i am doing on my steps? please help?

    I managed to workaround this problem.
    I add the function with no return value. Then in the Model Explorer you go to the properties of the imported function and edit the return type property, the same dialog appears, but this time it works as expected(considering you have set all the values correctly on your config file).

  • What procedures in BRF+ workbench and what in ABAP via coding

    Hello Gurus ,
    I am new in BRF+ development. I have a query -what procedures should be done in BRF+ workbench and what in ABAP via coding.
    If we create all object in BRF+ workbench  and  use ABAP for only invoking the function , passing parameters and displaying result .
    Is  there be any limitation/ issues for extending BRF+ functionalities later using this approach.
    Thanks in advance.
    Best Regards,
    PS

    Moderator message -
    When closing old threads, there is no need to add a comment. Adding a pasted answer like "thanks a lot" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.

  • Document flow for opportunity via coding

    Hello,
    has anybody already realized such an requirement:
    I want to see in the CRM-Opportunity follow-up documents from SAP ERP.
    Therefore i need to add entries to the document flow via coding.
    Could you please assist how this can be realized? Any standard functions that can be reused?
    Thank you
    Best regards
    Manfred

    Hi ,
    Try using the FM CRM_DOC_FLOW_MAINTAIN_OW'.
    Hope this helps.
    Regards,
    Ruby.

  • Is there a way to add a via point to a route in Maps?

    With the addition of Maps to Maverick is there a way to add a via point to a route between 2 points
    I might like to take a scenic highway for part of the trip or stop at a particular restaurant
    I don't see a way

    I was looking for this function to, but don't see it.  Looks like the Maps functions is a little thin right now.  Hopefully it will be expanding in the future.....hopefully near future.

  • How can I add email (via outlook client) to share options of preview app

    how can I add email (via outlook client) to share options of preview app

    You can't.  Apple's share button only supports Apple Mail (as specified by launching Apple Mail, choosing preferences and choosing general.).  Maybe Apple will open this up to other apps in future updates.

  • Works with normal = declaration but not with .add() function call? Why?

    I still have some problems in relation to my earlier post:
    http://forum.java.sun.com/thread.jspa?threadID=5164571&tstart=0
    Help is still warmely appreciated! Thanks already to you Franzis.
    So I try to add several JScrollPanes into on Container variable allComponents.
    I don't understand why in my program
    allComponents = jspane;works but
    allComponents.add(jspane);does not.
    Same is true for Jpanel objects. In my program
    allComponents = panel;works but
    allComponents.add(panel);does not. Why is this?
    Still I necessarily need to work with a add() function.
    So where is the problem?
    The whole source code is at:
    http://forum.java.sun.com/thread.jspa?threadID=5164571&tstart=0
    Message was edited by:
    wonderful123
    null

    I added a response in your original message:
    http://forum.java.sun.com/thread.jspa?messageID=9629812
    Let's keep to it since splitting things across two posts might be confusing.

  • How can I set a polygon's path by using the .add() function?

    I have been searching the web and this forum and doing plenty of experimenting, and I can't for the life of me figure out how to do this.
    I can set other attributes of a polygon inside the add() parentheses, such as the fillColor, but I can't set the polygon's path's pathPoints unless I use a separate line of code after the add(); line.
    My script adds a great deal of polygons in a row, so halving the number of operations would greatly help me, and also it seems that some properties such as appliedObjectStyle cannot be set until after a polygon's path is defined. That means I need a third line of code after add() and entirePath=, which slows me down even more.
    Help?

    Ryan, I think you need to reset and take a moment to understand what it is that is going on here.
    The things you've proposed that don't work shouldn't work, and it's all quite simple.
    Generally speaking, a .add() function takes an additional parameter, a JavaScript Object, that list properties of the created object that can be set.
    A JavaScript Object is a list of key/value pairs, just like an associative array in a language like perl, or a dictionary in a language like Python. It is expressed in curly braces as such:
    { key1: value1, key2: value2, key3: value3}
    So, for any such general add function, these
    foo = whatever.add();
    foo.bar = baz;
    are equivalent to this:
    foo = whatever.add({bar: baz});
    Are you with me? So, for instance, you had originally asked why you could not use pathPoints in polygons.add() and the answer is simpe. You cannot set polygon.pathPoints, because there is no .pathPoints property of a polygon.
    So, when you want to try add properties inside properties, you must do as as objects within objects, and follow the strict hierarchy. Marc advises that this works:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
    and if indeed that is so, then the extension for setting multiple transparencySettings should be clear. It is not this, that you propose:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
        transparencySettings: {dropShadowSettings: {distance:1}}
    Because to do so is to set the transparencySettings key twice in the same Object. And to do that is to replace the first with the second. The above (yours) is wholly equavelent to:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {distance:1}}
    If you wish to set more than one attribute of dropShadowSettings, you must set transparencySettings to an object containing one and only one dropShadowSettings, and you must do it only once. So it is this:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings:
          {dropShadowSettings: {angle:120, distance: 1}}
    I am not sure why you thought you should have the name of the key in the Object named properties. That is probably because in some cases you can use:
    foo.properties = { a: 1, b: 2};
    as a shorthand for
    foo.a=1;
    foo.b=2;
    but you would [probably] never want to mix that with the object notation for setting multiple properties in the .add() function.
    Does this help to clarify?
    As for your last question:
    Also, it doesn't let me use square brackets or parentheses inside the add() parentheses, so the original problem I posted (trying to set a polygon's path) is still a problem.
    It's not about the use of brackets or parentheses, but what they mean and where they go. As you have not posted an example of setting the polygon's path the long way, it's hard to show you how to shorten it. Post what you have that works, and we will show you how to shorten it. (I suppose some with more patience than I are willing to go look up what we think it is you are trying to do, and then interpret it. But I would much rather you show me the code you have that works, and then your attempts to transform or shorten it and change its notation. This makes it much much easier to help you, and it should also make the help more effective, by contextualizing it. As an added benefit, when someone else reads your post and tries to learn from it, they will gain more.)
    So again, please provide a clear example of the "long way" to do the thing you are attempting, and then your attempt at shortening it.

  • Inbound-Queue - Set Queue To Retry via Coding

    Hello Experts,
    I am just implementing a MEP-Scenario and facing a problem in timing.
    Because of Missing Data delivered via RFC from other system i need to set an inbound-queue (R3AD...) to waiting and retry.
    Is it possible to do this via coding?
    When I fire an error message (type EAX) the queue gets in status "SYSFAIL" - but in this case it will not automatically retry again.
    Any hints are appreciated.
    Thanks
    Mario

    Hi ,
    You can deregister the inbound queue R3AD* from SMQR tcode and the other way is You can write a program to start the inbound queue processing which has a status 'SYS-FAIL'.
    Thank you,
    Gangadhar.S

  • FS10N ADD Functional area in the parameter screen

    hi,
    we need to add functional area to the parameter screen of FS10N.
    today in the parameter screen of FS10N  appears the next fields: gl account, company code, fiscal year, business area
    please advice
    thanks,
    meir

    HI,
    which SAP release? FS10N does not support the functional area selection on the selection screen. ECC 60 (new T-Code FAGLB03 ) does in SAP standard. Guess its time to upgrade
    BR Christian

  • About implementing the "add'" function in web dynpro

    hi guyes,
    now i want to implement the "add" function in the webdynpro. i bind a model node to the inputfields. and then i call the webservice ,but it does not work . the webservice is good . what happened to my project on earth? can anybody tell me what i should pay attention to in my code? my node structure is below:
    AddTicketworkhour==
       ticketworkhourbean
           name
           remark
       userId
    the root node is AddTicketworkhour ,it contains ticketworkhourbean and userId,    ticketworkhourbean contains name and remark.
    Thanks A Lot !

    public onActionSave(  ){
    wdContext.currentAddWorkscheduleBeanElement().setConsultantName("qinlei");
        wdContext.currentAddWorkscheduleBeanElement().setDistrictName(wdContext.currentDisplayElement().getName());
        wdContext.currentAddWorkscheduleBeanElement().setRowId(123456789);
        wdContext.currentAddWorkscheduleBeanElement().setLocation(wdContext.currentDisplayElement().getRowId());
        wdContext.currentAddWorkscheduleBeanElement().setWorkerId(12345678);
        wdContext.currentAddWorkscheduleBeanElement().setWorkDate(new Timestamp(wdContext.currentContextElement().getWorkDate().getTime()));
         wdContext.currentAddWorkscheduleElement().setUserId(100);
        boolean result = wdThis.wdGetMyWorkscheduleUICompController().addWorkschedule();
    wdDoInit( ){
    MyWorkscheduleAddModel addModel = new MyWorkscheduleAddModel();
                    AddWorkschedule addWorkschedule = new AddWorkschedule(addModel);
                    WorkscheduleBean addBean = new WorkscheduleBean(addModel);
                    addWorkschedule.setBean(addBean);
                    IAddWorkscheduleElement addWorkscheduleElement = wdContext.createAddWorkscheduleElement(addWorkschedule);
                    wdContext.nodeAddWorkschedule().bind(addWorkscheduleElement);
    Is there anywrong with my wdDoIt( )?
    &#35874;&#35874;&#65281;

  • How to  pass a variable value into a custom planning function via a web

    Can some one tell me
    How to  pass a variable value into a custom planning function via a web template?
    What are the different types of Planning function parameters available and what is the difference between them?
    Thanks
    babu

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • Add functionality for enter and close in a dialogue window

    Hi
    I have a dialogue screen.
    On pressing enter or the enter icon I need some functionality.
    And on clicking the close icon or close(on the dialogue window) i need to exit.
    How to add functionality to close and enter?
    (The icons are functioning properly but Enter and close are not functioning)
    Here is the code i have used
    gv_save = gv_code.
    CLEAR gv_code.
    CASE gv_save.
    WHEN 'OK' OR 'ENTER'.
    PERFORM char_convert.
    LOOP AT object_tab WHERE selected = 'X'.
    UPDATE imptt SET pyear = gv_exponent
    WHERE point = object_tab-point.
    ENDLOOP.
    LEAVE TO SCREEN 0.
    CLEAR gv_annual.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 INPUT
    MODULE cancel INPUT.
    gv_save = gv_code.
    CLEAR gv_code.
    CASE gv_save.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    Please help me .
    Best regards,
    Kranthi

    You need to take ABAP help and build logic, so that If so & so condition pick LOGO1
    and for so & so Condition LOGO2 & for rest LOGO3.
    You need to incoroporate the Logic in your program for Script / Smartform.

  • I am unable to manually add artwork via itunes 12 on windows 7. I've tried all the suggestions to no avail. Has anyone succeeeded on the same platform as me?

    i am unable to manually add artwork via itunes 12 on windows 7. I've tried all the suggestions to no avail. Has anyone succeeded on the same platform as me?

    The new iTunes 12 Get Info dialog lacks right-click context menus (at least for now) but it still accepts most standard keyboard shortcuts and drag & drop actions.
    Delete Artwork
    On the artwork tab of Get Into, tap the image in question, use Backspace or Ctrl+X. Delete doesn't work.
    Or, tap the image at the top left of Get Info, this time use Backspace or Delete, it is Ctrl+X that doesn't work.
    Add Artwork
    Select artwork, press Ctrl+C to copy, tap the centre of the Artwork tab, press Ctrl+V to paste.
    Or, select artwork, press Ctrl+C to copy, tap the small image area at the top left, press Ctrl+V to paste.
    Or, you can drag & drop to, or sometimes from, the same locations.
    You can also copy artwork from the Get Info dialog to Windows Explorer with the keyboard shortcuts.
    If the source image is on a web page right-click and use Copy Image rather than copy. (With Chrome I get a one pixel wraparound so tend to go for a temporary local copy anyway - not sure whose bug this is, but it isn't new.)
    If you have multiple images embedded drag the one you want to be the primary artwork to the leftmost position.
    Replace/Remove All Artwork
    The top left image box can be used to add or delete art from multiple tracks. In either case all existing artwork in all tracks is replaced/removed.
    Old Style Get Info Dialog
    Select some items, right-click, hold down shift, then click Get Info from the context menu. (Use alt/option on a Mac)
    If you still cannot add artwork via any of these methods then I would suspect a permissions problem. See Repair security permissions for iTunes for Windows.
    tt2

Maybe you are looking for

  • Output error in Query for Weekly report

    Hello friens, I want to create a report in which the user want the output of data as foloow net amount---- week1 week2 week3............. and so on. pack1 pack2 pack3 Now there are 52 weeks in a year, and in system the data is stored since 2003 till

  • I got reception problem in my 4g both gsm and wifi ? in form of very poor signal why*

    i got reception problem in my 4g both gsm and wifi ? in form of very poor signal why*?? it was working fine suddenly the signal became bad and when i make phone call the other person on the seceond side doent hear me but when i use face time it is wo

  • Best way to parse serial communications

    I've been programming a long time, but am new to object oriented languages and Java in particular. I have an application where I read in replies from an instrument over an RS232 port.. Each reply is terminated with a CR. I need to parse each reply an

  • Whay is the latest version of the adobe flash player?

    what is the latest version?

  • Creating Drop Shadow

    It seems like creating a simple drop shadow would be an easy task but I've tried with no luck. I've looked at all of the help and followed the directions in help. I have a jpg (a photo) and want to place a drop shadow on the bottom and right side. I'