HANA XSODATA Create multiple entities with associations in single LUW

Hi all,
Is it possible to create multiple entities with associations in a single LUW.
For e.g. we have a Sales Order and Item. This is modelled as 2 DB tables and 2 entities.
In XSOData I have defined association relationship between them.My XSOData definition is like this...
"XSDemo.DB::SO"    as "SalesOrder"
   navigates ("SalesOrder_OrderItem" as "SOItem");
   "XSDemo.DB::ITEM" as "OrderItem";
   association "SalesOrder_OrderItem" principal "SalesOrder"("OrderID") multiplicity "1"
   dependent "OrderItem"("OrderID") multiplicity "*";
My post URI is
http://server:port/SODemo.xsodata/SalesOrder
My data is as follows
  "ID": 1,
  "Customer": 123,
  "Desc": "Test SO",
  "SOItem": [
      "Material": "MAT1",
      "Qty": "10",
      "Item": "10"
      "Material": "MAT2",
      "Qty": "20",
      "Item": "5"
From the post, I get a response 201 (Created). However, only the Sales Order is created. The Items are not created.
My question is:
1. Is it possible to create Order and Item together in a single post call ?? If yes, how. What is the syntax of XSOData / Post Request
2. If it is not possible to create Order and Item together in a single post call, then how do we ensure atomicity of the transaction.
For e.g. What is Order creation is success and then the Item creation fails ...
How can we ensure that all is committed or none is committed.
3. From the documentation I understand that this might be possible using modification exits... However, I want to achieve this without using modification exits...
Is this possible or not ?

Hi Thomas,
Actually the problem is that Sales Order and Order Items are modeled as different entities... So, XSOData allows creation of Sales Order Item independently WITHOUT creation of a sales order header.
For e.g. URL : http://server:port/SODemo.xsodata/OrderItem
Ideally, the XSOData should implement a logic that a Dependent entity cannot be created without a Principal entity.
For e.g. using a Sales order BAPI you cannot create a sales order item alone !
Similarily, since XSOData is the end point service for the consumer, the XSOData should have the logic to ensure that both principal and dependent entities are created together.
Otherwise, in the UI the developer has to ensure that the post body is build correctly...

Similar Messages

  • Create multiple folders with one click on documents tab in BP in SAP CRM

    Hi Experts,
    I have a requirement to create multiple folders by clicking on a button in Documents tab in BP transaction in CRM. In standard process by clicking on create folder button we create folders. we want to create multiple folders with one single click ( i guess we can develop another button for that) folder name will be hard coded. Kindly let me know , how this can be achieved.

    Hi Experts,
    I have a requirement to create multiple folders by clicking on a button in Documents tab in BP transaction in CRM. In standard process by clicking on create folder button we create folders. we want to create multiple folders with one single click ( i guess we can develop another button for that) folder name will be hard coded. Kindly let me know , how this can be achieved.

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • Can we create multiple application with single MSI(or Same MSI) in biztalk admin console ?

    Can we create multiple application with single MSI(or Same MSI) in biztalk admin console ?
    My client requirement is process 100 files  from biztalk with in 5 min ,actually it is taking 20 min .
    So I decided to created same instance of the application with multiple time in BTS admin console ,as I understand biztalk admin console never allow to install same
    schema’s with multiple  time .
    Any help can be  appreciate ..

    BizTalk will automatically process multiple messages on separate threads so you may need to tune your system. The following link should get you started:
    http://social.technet.microsoft.com/wiki/contents/articles/7801.biztalk-server-performance-tuning-optimization.aspx
    Another possibility is to set the Batch Size property on your receive location if the adapter uses batch size to determine how messages are picked up.  As an example, it you want  the MSMQ adapter to immediately pick up messages and start
    to process them, set the batch size to 1.
    You may also need to distribute the processing across multiple BizTalk servers by installing BizTalk on additional servers and joining the existing BizTalk group.
    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

  • Created multiple websites with iwebsites, now need to save multiple domains

    I have created multiple websites with iwebsites on iweb 06, now I want to save these sites so in case there is any problems when I upgrade to 08. How do I do this?

    Hello Paul,
    You need to locate the Domain files for each website. You should find these under your account (the house icon in the finder)/Library/Application Support/iWeb.
    Vonz.

  • Creation of Multiple Shipments with respect to Single inbound.

    Hi,
    This is regarding creation of Multiple Shipments with respect to Single inbound.
    In standard SAP, you can create Shipment cost based on Inbound number.Requirement is here for single inbound can we create multiple Shipment document.
    Can we do shipment costing for Multiple shipment in single document through VI01.
    Yours Help in this will be highly appreciated.
    Regards
    Sunami.

    dear friend,
    to process shipment cost documents you can either call up a shipment cost document in change mode or you can create lists of the shipment cost documents
    you can create the following lists:
    -Shipment cost documents for calculation
    -Shipment cost documents for settlement
    to process a single document use t-code VI01
    to create lists of shipment cost documents to be changed use t-code  VI11
    so, if you need something very special you would think about the new enhancement...
    good luck!

  • Creating Multiple LibrarySession (Connection Pool), Using single LibraryService

    Hello,
    I am trying to create multiple LibrarySession with a single LibraryService, so that each user can pick a new session from a pool and release LibrarySession back to the pool, when the user task is been completed.
    Question.
    1. Is it possible to create LibrarySession Pool ?
    2. If yes, Can any one suggest, whether there will be any improvement in the performance of the application by doing so, or Oracle IFS internally handles the connection pool mechanism for LibrarySession.
    3. Does Oracle IFS handle LibrarySession pool internally.
    If there is any code, which does similar action, please do forward.
    Best Regards
    Sujeem Haries

    Sujeem, we do not pool LibrarySession instances for you. You may see a performance improvement if you maintain a LibrarySession pool, depending on the application. See the following post for more info:
    Oracle Security & PAM
    Please note that although LibrarySession instances are not pooled for you, the underlying database connections are pooled.

  • Create multiple SOA Clusters in a single domain?

    Is it allowed to create multiple SOA Clusters in a single domain with both SOA Clusters sharing the same soa-infra schema but deploying different composites?
    Create a domain with
    - Admin server (AdminServer)
    - SOA_Cluster1
    -soa_server1
    -soa_server2
    - SOA_Cluster2
    -soa_server3
    -soa_server4
    SOA_Cluster1 will need to deploy servcies A, B and C and SOA_Cluster2 will have services A, D and E. Is there any documentation which can help us with this?

    Thanks for the document link but it seems that the document was created only yesterday. Can you elaborate on "only one set of SOA schemas is allowed per SOA domain/cluster". I was able to build another SOA cluster_2 to my existing domain with SOA_cluster1 pretty successfully. The only problem was the internal JMS queues were configured as Uniform Distributed. hence i was not able to point them to 2 clusters.

  • How can I create multiple pages, with different layouts to the others, in DW fluid grid layouts?

    Hi everyone,  : )
    I am creating a website using FGL in DW CS6, v12.0 build 5808.  I do not have Creative Cloud (do you have to pay to use this service?).
    I have created one layout for my home page.
    I would like to create several more pages, but I want them to use different layouts (as well as different content).
    I tried to do something similar before using 'save as' (this was with a non-FGL), but whenever I changed the original page that I had 'save as'd' from, the layout in all the other pages would change too!
    I found a possibility from someone else online suggesting using a template, but have not tried it yet: http://www.linkedin.com/groups/Adding-second-fluid-page-in-119937.S.192422240
    I'm a bit scared of breaking everything, as I am new to web design and have had to restart the whole process a few times due to messing up the fluid.css etc and other issues, so I am taking baby steps.
    Happy to try whatever's suggested and, while I wait for (I hope) your responses, I think I will try the template thing, but from the reply the person who asked the question gave, it sounds like his subsequent pages changed too, as I mentioned above?  *scared*  ; )
    If anyone can help me with this query I would be very grateful.  Thank you!  : )

    Thanks David.
    I tried using different IDs for the other pages, but eventually one of the divs seems to 'break' - it overlaps other divs, or cannot be moved or resized (you can select the outline and it goes blue, but no 'move up a row' or down a row or 'lock to grid' etc icons appear and it can't be drag-re-sized), plus the green overlay disappears (just from that div.  I'm aware of how to turn visual aids on and off), so it seems broken.  This often seems to happen if you rename a div once it's been created; it does not rename in the layout.css on the right side panel (CSS Styles) in DW and the 'broken' behaviour above is exhibited.  Do you know anything about this?  Is this the 'edit this doc at your peril' stuff that most tutorials seem to mention?  Am I doing something wrong?
    I also tried making an FGL and saving out the original boilerplate.css, layout.css and respond.js.  Then created multiple new FGLs and each time it created new versions of layout.css (called 'untitled-1', 2 etc.).  Once I had created all the FGLs, I deleted all the new boilerplates and untitled.css files.  Then restored the original ones and changed the link at the top of each page's html to refer to the same filename (the original layout.css), rather than untitled.css.  I thought this might work and it seemed to for a while, but then as I had to add new div names for the sections on each page, it eventually broke (as above).
    Anyway, I think you have a good point about different layouts and it occurred to me also while I was exploring and waiting for replies here.  I think I will make one layout for all pages and go with that.  I have a couple of questions about that though:
    1. I think the max number of divs I want for one of the pages is 10, but some pages need less divs.  If I only fill e.g. 8 divs on one page, will the other ones be sat there empty?  I think they will actually...I guess I'm asking because I have not tried it yet (will do after this) and it takes so long to do this trial and error.
    2. If the amount of content in each div is different, e.g.  let's say Page 1 has 6 lines of content in div1, but page 2 may have an unlimited amount of content (I will want to add to it in the future).  Will this result in the div on page 1 being a huge block of empty space after its 6 lines?
    Thanks so much for your help!

  • When saving a File OS Is Creating Multiple Folders With The Same File Name

    Not sure what I changed but, now when I save a any file (ppt. word, Keynote,Pages e.g.,) to the desktop or any other location the OS will also create multiple file folders with the same file name as the file I'm saving. Inside the folders are what appears to be files locating the saved files. What can I do to fix this problem?
    I'm using the 10.7.2 version
    MacBook Pro

    Misio wrote:
    It looks like a finder bug. To replicate, I surf to any website, I right-click on a jpg image, select "Save Image As" and in the window that pops up I type in the filename "000.jpg", I select the folder Pictures, and click on Save.
    BTW, I don't know why, but the file was saved only as "000" without the file extension ".jpg". Does anybody know why?
    the extension is simply hidden. go to the get info panel for the file and uncheck the option to hide the extension.
    Then I surf to another image, and again I save it as "000.jpg" and now it asks me if I want to replace the existing filename, although the existing one is "000" and I try to save as "000.jpg", so I say yes, and then magically the file is saved with the full filename including the extension "000.jpg"
    When I did it a couple of times, always saving image as "000.jpg" from various sources, I ended up with two distinct files named "000" and both in the same folder Pictures.
    Please advise.
    it sounds to me like you saved one file as 000.jpg and the other and 000.jpg.jpg.
    check the info panels for the files for full names to verify if this is the case.

  • How do I create multiple columns with bullets in pages

    I'm trying to figure out how to create multiple columns within a document in which I bullet information...

    At the point you wish to change to two columns, Insert > Columns and then in the Layout Inspector, select the number of columns. After the insertion point, you will also need to insert another Column Change to return the following paragraphs to single column.
    Then Select the text to be bulleted and in the Text Inspector > List tab select the type of bullets.
    Note: This creates two columns that flow together. This can be tricky if you add any text later.
    If you wish to ensure alignment, create a two column text table and remove the lines with the Graphic Inspector > Lines > No Lines option and insert your text in each column and apply the bullets as above.
    This will create a text box - you then need to ensure it moves with the text by electing "Object Moves With Text" in the Wrpa Inspector.
    Message was edited by: bwfromspring hill

  • How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack

    Dear Friends,
    I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
    So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
    DynamicConfiguration conf = arg0.getDynamicConfiguration();
    StringBuffer sbFileData = new StringBuffer();
    for (int i =0; i < record.size(); i++ {
         . // Create XML for each row and Marshal the object into to the String Buffer
         String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
         conf.put(KEY_FILENAME, strFileName);
         arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
         arg1.getOutputPayload().getOutputStream().flush();
    So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
    Please let me know if I missing something or need to do some thing else.
    Regards,
    Shreyansh Shah

    Hi
    You can easily achieve this using graphical mapping.  Create your target message type like below
    MT_Target
      Details  0 to 1
          Data  0 to 1
    Source sample structure
    <resultset>
    <row>
    <column-name>column-value</ column-name>
    </row>
    Then do the message mapping like below
    map <row> with  MT_Target
    contant ----> Deatils
    column-name ------>Data
    In the signature tab of message mapping, choose the occurrence of your target message type as
    0 to unbounded.
    This will generate multiple files from multiple rows.
    Let me know if you have any doubt.

  • Create multiple idoc with multiple receivers based on value mapping table

    Hi,
    Scenario: 
    Step1 : sender sends a finance doc iin the form of an idoc. This idoc will have multiple line items based on profit center. Do determine the value of receiving comp code(header field) n receiving system(logical sys name) value mapping table has to be used.
    Solution so far: I can put an rfc lookup for fetching receiving comp code from mapping table with i/p paraameter as profit center . And split the incoming idoc based on comp code value by using split by value. Now I need your advise 2 take this further.
    Issue 1 : say the incoming idoc has 4  line seg wid 4 diff profit center
    Profit center.       Rec comp code.   Recv sys
    P1.                       C1.                        R1
    P2.                       C2.                        R1
    PS.                       C2.                        R1
    P3.                       C3.                        R2
    Nw using this info, I want 3 diff idocs to be created for each unique comp code.
    Idoc 1 : for C1 wid one line item + 1 for reconsilation ( to be generated additionally)
    Idoc2 : for C2 wid 2 line items + 1 for reconsilation
    Idoc 3: for C3 wid 1 line item + 1 for reconsilation
    Idoc 1 and idoc 2 shud be sent to R1.
    Idoc 3 shud be sent to R2.
    Kindly advise on this

    Hi experts,
    U all r pretty close, but let me put this more clearly.
    Step1: create multiple idocs based on unique comp code - I'm able to do this using rfc lookup n split by value. So I get 3 idocs each for c1, c2 n c3.
    Nw as per the values from value mapping table.
    Idoc for c1 contains 1 line seg.
    Idoc for c2 contains 2 line segs.
    N idoc for c3 contains 1 line seg.
    steps2 n 3,  where I do not have a confirmed solution yet n need ur advise.
    Step 2 : for each idoc generated I need 2 create n additional segment, mapping 4 which will be based on the values in the original segments for that idoc.
    In d above scenario, idoc for c1 contains 1 line seg, nw I want 2 add one more seg to it. The amount and pisting key values in this segment wud be calculated based on the values of the amount and posting key belonging to the original segment in this idoc.
    Similarly for idoc for c2 there are 2 segs, nw I need one more, means 3 in allm
    Hence for idoc for c3, 1 orig already present + 1 more. = total 2.
    Nw I need ur advise on how 2 generate this additional seg in each idocm
    Step 3: when all dese 3 idocs are generated, ( in this case itz 3, in real time it can be n), I need to find their respective receivers using rfc lookup n then based on the receiver send 2 resp recvng systm
    Nw how do I do this?
    Please explain with examples if possible 4 bettr understanding.
    u2020ђąu03B7kўu03C3u03C5 in advance.

  • Create multiple copies with multiple develop settings in one keystroke (like PS action)?

    Hi,
    I'm trying to move over from PS to LR in my tourist photo studio (it's easier to train employees, it's more intuitive, it's cheaper, etc.). However, there is one element missing that I simply can't do without. We're located in a theme park and we handle A LOT of people in a day so we're are a very fast paced studio, I like to call it fast food photography. Customers come in, have their photos taken, pick them out immediately and get prints right away (hopefully all in less than half an hour). I've always used Photoshop actions to make everything very fast and efficient (afterall, the less time we spend tinkering on a computer the more time we can spend interacting with our guests). As of now, customers get to pick the finish of their photo so I have an action that creates four layers, each with a different effect (b&w, antique, desaturated, full color). We then can click the layers on and off to show the customer what each finish looks like. I've been trying to replicate this in LR without any luck. The best I can figure out is to use virtual copies and create a preset for each effect. However, we simply don't have the time to click "create virtual copy" three times in succession then select each one and apply a different preset to create the four effects for one image. Esepcially since each customer usually buys multiple images we'd have to do that many times for just one sitting. It seems simple in theory, but the amount of time it takes to create 3-18+ virtual copies each with different presets applied adds up drastically. Clicking a function key for each image is an amazing time saver. The focus of our business is very customer oriented, and we've tried our best to create a workflow where we face our guests more than we face our computer monitors. If anyone knows of anyway to accomplish what I described in PS in an equally efficient manner in LR that would be wonderful. Perhaps there's a tactic I haven't thought of yet.

    What you describe cannot be done directly in Lr, i.e. there is - unfortunately - no way to create multiple Virtual Copies (VC) with one command.
    But in Lr you don't need multiple VCs. If you have created presets for each "look" you can just apply one "look", i.e one preset after the other the one-and-the-same VC. And you can apply the "looks" i.e. presets in any order and go back-and-forth numerous times. Since the Lr edits are not pixel edits but parametric (only a set of data in the Lr database = catalog), there is no harm done if you apply the same set of presets numerous times in various order. In Photoshop you would switch layers on and off (maybe you use layer comps), in Lr you would switch from one preset to the other for the same VC - or even for the original.
    And, you can always go back to the original state the photo was in when it was imported.
    If the customer likes one preset, just switch over to the Print Module, apply your Print Preset and print. If the customer likes three presets, go back to the Develop Module click on the other preset, go back to the Print Module ... go back to the Develop Module, click on the third preset .... etc.
    PS: I bet Lr could be even faster than Photoshop
    Message was edited by: web-weaver: PS added

  • Create multiple delivery with one invoice

    Hi all,
    can you tell me how to do multiple delivery with one invoice,
    i tried in vf01 by giving their my 3 delivery nos but it is generating three invoices
    pls explain this in details
    points will be rewarded
    regards,
    smmmmmm

    Dear Sameer
    As per your requirement run the Tcode VF04 (Billing Due list) and select the Delivery Documents for which you want to to have single Billing Document by clicking on Collective Billing document/Online  Push Button in that screen.
    To Have Single Billing Document for Multiple Delivery you need to have Payer,Terms of Payment,Incoterms(part 1 and part2) same for all materials orelse the billing document will split and this split analysis is visible during creating of Billing document.
    Hope this will help you in solving your problem.
    Regards
    PSH

Maybe you are looking for

  • Change of payroll accounting area in middle of Period

    Hi , SAP has recommended that we should not change payroll accounting area in middle of the period . Now we cannot change the payroll area for the period for which it has run , assuming we have Monthly payroll area from 1 March 2011 to 31 March 2011 

  • Copy value in drop down to text field

    Hi, I am not sure what the best solution for this may be. I have a form (ASP/VB) it has a drop down menu and two text fields. The drop down displays the names of people, but the value of each is their email, the text fields is a 'to' field and a 'cc'

  • Backup in Oracle 10g

    Hi I am using Oracle 10 EnterPrise Manager I want to make schedule of Backup but I am unable to do it. It is asking Host Credential user name & Password I entered user as Administrator and password for my local system than also I am unable to do it K

  • Conditional record

    hi experts, Batch Input for Creation and Change of condition records for condition types        with    different access sequences in sales and distribution. what did it mean explaine me briefly thanks in advance.

  • Deleting a Partial Time Machine Backup? Trash?

    OK so the other night I left my computer alone for a bit and it started making a backup that I didn't want. When I came back to my computer it was half done so I told it to stop backing up. Long story short I had put a clone on the drive and forgot t