HOW TO CREATE ORDER ON REST???

hey anyone has created crs order using rest web services ???
Edited by: 961757 on Sep 27, 2012 1:11 AM

I think all you need is to create a REST session for a given user and then access ShoppingCart component's current property which will create the order if it is not already existing. Pseudo code would be like:
RestSession session = RestSession.createSession(HOST, PORT, USER, PASSWORD);
session.setUseHttpsForLogin(false);
String loginStatus = session.login();
if(loginStatus == null || "null".equals(loginStatus)) {
  // Login failed
else {
  // Login successful
  RestResult result = RestComponentHelper.getPropertyValue("/atg/commerce/ShoppingCart", "current", null, session);
  String responseData = result.readInputStream();
  if (responseData != null) {
    JSONObject json = new JSONObject(responseData);
    String currentOrderJson = json.toString();
}And of course, to make it work you would also have to setup REST security configuration in /atg/rest/security/restSecurityConfiguration.xml giving the required privileges to the user that you are using in creating the RestSession.

Similar Messages

  • How to Create simple WCF/REST (JOSN,get and post) and deploy to Sharepoint 2013 Server.

    HI All,
       I wan to create a simple WCF/REST service and deployed to SharePoint server , i have created some sample svc file and put in to _vti_bin folder using SharePoint solution using vs 2013 but its not accessible from IIS its always asking the Widows
    Authentcation .
    however my exact requirement is custom service should be accessible without asking the authentication like _vti_bin/Listdata.svc is there any way to do like this ? 
    my reference:
    http://platinumdogs.me/2013/03/14/sharepoint-adventures-with-the-rest-api-part-1/
    http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx
    http://dotnetmentors.com/wcf/wcf-rest-service-to-get-or-post-json-data-and-retrieve-json-data-with-datacontract.aspx
    http://stevenhollidge.blogspot.in/2011/09/wcfwebapi-rest-json-services.html
    Thanks
    SujilKumar
    Software developer

    Hi Sujil
    Greetings. pls check this link
    http://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-sharepoint-and-deployed-in-a-wsp.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Rfc to idoc...... how to create order

    hi,
    i worked on rfc to idoc scenario...... using matmas idoc to create material from r/3 system to IDES system through (rfcxiidoc) scenario
    Now i want to do it to create an order using rfc to idoc
    I am not sure which IDOC structure i will use and which fields are mandatory and optional?
    I am looking to do that scenario with minimum required fields
    hussaan

    hi,
    The fields which are mandatory in case of order creation depends on your system settings.Like for a sales order or purchase order,you first create an orderusing transaction me23n for purchase order and va01 for sales order and check which fields are mandatory and get minimum no of required fields.
    In this PO to SO scenario Idoc message controls will also come into picture.
    Then after doing the required ALE settings you can test your scenario.
    regards,
    ujjwal kumar

  • How to create order group

    I would like to analyze orders according to several criterias. For example, first by region : region 1 and region 2. Then, for every region, I would like to analyze by tcustomer type : type X and type Y. Then, for every customer type, I would like to analyse by product brand...
    I believe I can do that via Orders Group (tcode: KO01).
    Could you help me with that please ?
    Regards,
    Bahia.

    Hi,
    Functionally, your group is not hierarchy-oriented; that's why SAP does not allow it. It's not an hierarchy, but rather an OLAP-cube, that you are describing.
    I suggest you create independent groups; for cities, brands , regions, etc. Alternatively, you can work with classifications in internal orders and assing a characteristic to each internal order in terms of city, brand, etc. This will be better approach for reporting, if you want to see/select all the dimensions together. For separate analysis of the dimensions, creation of separate groups will be enough.
    Regards,
    Eli

  • How to create order of filterPath?

    Hello! I'm a complete newbie to Adobe Flex and coding in general. But I've been tasked with creating a Treemap for work. I can get the Treemap to filter by sector. But I need an overarching filter by team.
    This is my xml coding.
    <project name="Automated Staff Distribution"
                         description="Automated Staff Distribution" team="Priority One" sector="Resources" priority="2"
                         completion="3">
    My filterPath is set up like this.
      filterPath="{['@sector', '@name']}"
    Whenever I try adding team into it, I lose the sector or the name or both. I have three team categories which should branch into about other categories. Ex., Team=Priority One has four sectors, Team=Priority Two has five sectors, Team=Priority Three has two sectors.
    Please help!
    Thank you!!

    Hi,
    It's in the customization. You can access it via KOT2_OPA transaction (that's for Controlling internal orders).
    Regards,
    Eli

  • How to create orders and deliveries on Non-working day.

    Greeting all,
    We set up all our national holidays and Sundays as non-working day in our working calendar for Japan(OY05) .
    But I have a request from Sales Dept that only one customer wants us to deliver products on the holidays.
    We don't want to affect other customers delivery date so we are thinking we have to change the holiday to working day on the day before the holiday for the customer.
    But we need a complicated procedure to change the calendar in our company IT rule so I am wondering if there is any other good solution that we don't have to change the calendar so often.
    Does anybody have the same situation like this?
    I will appreciate any kind of suggestion.
    Thank you very much for your help in advance.
    Best regards,
    Miki

    George,
    I understand that is simple and correct procedure but I wanted to consider other possibilities to ship on non-working day because it is NOT working day here.
    Finally, our management have decided we don't change the calendar and ship with date the system proposes. They explained the customer and our distributor center that shipping date is one day ahead because of the calendar.
    To all,
    Thank you very much all of your advice.
    Best regards,
    Miki

  • Free goods , contract, creating order

    Hello SAP Prof,
    1. what is the diff b/w Free goods and Bonus buy?
    2. What is Rental Contract and service contract?
    3. How can we create our own order ,
    ( we can copy std order.)  But plz tell me how to create order with copy controls in detail.

    Hi Rajesh
    Free goods are considered to be merchandise, moveable belongings or personal property. Free goods are those which economists are not interested in because in free goods doe not offer the opportunity for creating a cost for usage. The best example of free goods is air because there is no scarity of air. Economists are interested only in goods, which can be manipulated to create cost for useage. Free goods are plentiful, you have as much as you want without a chance for future cost to society.
    A bonus buy refers to any product manufactured or otherwise made available for purchase at a lower cost for a certain period of time. A bonus buy can relate to food, cars, stocks, bonds, insurance, bank loans or almost any product you can think of.
    Examples of Bonus buys are: Buy one and get one free, 20% original price, 15% Reduced Mortgage today.
    SERVICE CONTRACT:
    A service contract is an arrangement between a service provider and service recipient and is characterized by a separate lease and service contract term. The lease usually ranges from 22 to 27 years while the service contract ranges from 13 to 18 years in length. The combination of the lease and service contract terms is typically 80% of the useful life of the asset. While the equity return is based on the overall term, depreciation occurs over 125% of the lease term only which differs from a pickle structure where depreciation occurs over the entire deal term. The participants in this type of transaction are the service provider or lessor, service recipient or lessee, operator, and customer. Typically, a service contract is used with assets such as gas, water, and power distribution networks and generation facilities. However, they can also be applied to real estate and securitization transactions.
    A service contract is considered a property lease under section 7701(e) of the IRS Code if certain requirements hold. These requirements are divided into general and special criteria groups. Section 7701(e) outlines six criteria in the general case which indicate when a service contract should actually be classified as a lease:
    If the service recipient is in physical possession of the property
    If the service recipient controls the property
    If the service recipient has a “significant” economic interest in the property
    If the service provider has no economic risk in the contract
    If the service provider does not provide services to a third party
    If the contract price does not “substantially” exceed the rental value of the property
    To obtain classification as a service contract, the first two rules essentially require a management contract so that the service provider maintains control of the property. The service recipient is allowed to retain an interest in the land underlying the asset via a ground lease without being considered in physical possession of the property. However, they will not be able to mandate how the property is maintained, operated, or improved. There are five rules to consider which determine “significant” economic interest in a property:
    If the property is utilized by a service recipient for most of its useful life
    If the service recipient bears the risk of a decline in value of the property
    If the service recipient shares the reward for an increase in value of the property
    If the service recipient receives a portion of savings in operating costs
    If the service recipient bears the risk of damage or loss of the property
    To be considered a service contract, the fourth general rule requires the service provider to bear the risk of reduced receipts or increased expenses as the result of non-performance under the contract. An exception to this rule is a provision which allows for an output contract to remain in force during short shut-downs of a facility. To resemble a service contract, the fifth rule states that services must be provided to someone other than the service recipient. For example, a purchaser of power should allow sales to customers and not use all of it for themselves. The last rule states that the total contract price should “substantially” exceed the value of the property to be classified as a service contract. Thus, if the contract price is derived mostly from recovery of costs of the property or there is a separation between use and service charges of the property, then the contract will resemble a lease.
    An important item to note is that not all six requirements need to be satisfied to be considered a service contract. Section 7701(e) does not weight any of the criteria but simply allows for a contract either resembling a lease or a service contract. This would imply that a simple majority of criteria is necessary for classification.
    Section 7701(e)(3) provides special rules for determining whether a contract is a service contract. These special rules apply only to the following types of facilities: qualified solid waste disposal, cogeneration, alternative energy, and water treatment works. The following four special rules replace the general rules for the above facility types and indicate when a service contract should actually be classified as a lease:
    If the service recipient operates the facility
    If the service recipient risks a significant financial loss when there is non-performance under the contract
    If the service recipient risks a significant financial gain when operating costs are less that the standards of performance under the contract
    If the service recipient has a purchase option or is required to buy all or part of the facility at a fixed price other than the fair market value
    There are three main differences between the special and general rules. The first one is that with the special rules, lower operating costs cannot be passed on to the service recipient. Secondly, the risk of temporary shut down of the facility can be shared by the service recipient. Lastly, all costs and benefits due to changes in the law can be passed on to the service recipient.
    Service contracts have less tax downside and less financial risk as well as more even returns over time. Also, the contract must be carefully structured to qualify as a service contract. While it is easier to qualify under the special rules, there are many fewer available facilities. The main tax benefit for classification as a service contract is the allowance for depreciation over 125% of the lease term rather than 125% of the combined lease and service contract terms.
    RENTAL CONTRACT
    A rental agreement is a contract, usually written, between the owner of a property and a renter who desires to have temporary possession of the property. As a minimum, the agreement identifies the parties, the property, the term of the rental, and the amount of rent for the term. The owner of the property may be referred to as the lessor and the renter as the lessee.
    COPY CONTROL
    Copy Controls
    The Copy controls enable a Document in SD to be created by referring to an existing document
    Document referred: Source document
    Document created: target document
    Copy controls enable data to be copied from source to Target document
    Copy controls to be maintained for Header, Item, Schedule line
    QT---&#61664;OR
    Header                         Header
    Item                         Item
    Schedule line               schedule line
    Copy controls have 3 controls
    a)     Copying requirements
    b)     Data transfer routines (a program)
    c)     Switching requirements
    Copying requirements: only if the requirement is met copying takes place
    IMG—SD—sales—Maintain copy controls for Sales documents
    Copying control sales document to sales document
    Header
    Position
    Target: OR
    Source: QT
    Select OR+QT and then select details button
    We can see Copy controls
    Copying requirement: Same Customer
    Only if the requirements met then only Copying possible
    Data transfer routines
    a)     General header data
    b)     Business data
    c)     Partners
    Switching requirement: Copy item number
    Only those items cleared for copying will be copied into target document with item numbers unchanged
    Item level Copy Controls
    First select combination OR+QT
    Click item
    Select Item category of source document and select Details button=AGN
    Copy controls for item level
    Requirement: item rejection reason
    Only those items which are not rejected in source document will be copied into target doc
    Switching requirements: Copy schedule lines
    Activate document flow at item level
    This automatically updates item status in the reference document and new document
    +Ve/ -ve qty
    Quotation 200302        AGN
    10          M1          100 Pcs
    Copied into order 25 pieces TAN
    Completed qty= 25
    2nd copy
    Copied 50 nos
    Completed item = 25+50=75
    This means there is + ve effect on Completion qty
    -ve effect exists in the case of item level copyng from credit note in the case contracts
    Pricing type: Pricing type controls how the pricing to be determined in target documents
    Example:
    a)     Copy all pricing elements unchanged and redetermine scales
    This can be overruled by update Control in the Pricing
    Schedule line
    Select OR+ QT
    Select schedule line
    Select schedule line category     BN
    Select Details
    Copying requirements:
    Schedule line qty>0 then only copy
    Note1: when we create a new document by copying standard document, copy controls also get copied
    Note2. Copy controls can be seen at all different times of documents like sales, delivery and billing in customization
    Reward if useful to u
    null

  • Create order with CHANGED_AT CREATED_AT old

    Hi Gurus,
    My requirement:
    I have to do a massive load of orders with the fields CHANGED_AT and CREATED_AT old.
    The thing is exist a table which doesn't allows me to changed CRMC_FIELDCHECK (and I cannot change)
    Does anybody know how to create orders with filling this parameters with old date values.
    Thanks in advance.
    Regards.
    Diego

    I'm afraid you won't be able to do it that way, I would suggest to create a custom date profile to store this information.
    Cheers!
    Luis

  • How to create sales order Automatically with reference to contract?

    how to create sales order automatically through batch or online? can anyone please suggest what needs to be change in SAPMV45A program?

    Hi,
    Wt am able to understand from the above question is, you want to create automatic sales order against contract on a day to day basis by doing batch program, hope am wright.
    See you can do it in two ways.
    1. By using BDC, in SHDB T code record how exactly you will do transaction and then give it to your abaper rest he will do. he will write a program and he will schedule that program every day night.
    2. By using BAPI. Just check in there are many threads are there which gives sales order bapi. Tell your abaper to map that bapi and tell them to schedule back ground job.
    Hope this will help out in solving your problem.
    Regards,
    Nagesh

  • How to create a job card and how to add waranty card in sales order

    I have one scenario for CS.the scenario is realted to automotive industry. Basically its a trading industry of HCV,MCV,LCV apart from that they will do servicing also. First the customer comes for a service.he is having free services. he will have waranty for spare parts of the vehicle. once he comes for servicing first the executive will take complains from the customer after that a Job card will be issued to the customer. there his chasis no ,engine no and registration no will be there. once enter the chasis no entire customer details has to come. how many free services he is having for how many kilo meters.then job card will go to the spare parts dept.that dept will issue the spare parts.then they will invoice the customer. he will pay the payment.and finally the gate pass will be given to the customer to deliver the vehicle.
    painful area is how to create a job card and how to add waranty in sales order.
    Regards,
    Venkat

    Hi,
    Have u resolved it then Please let me know !!! It is a very interesting problem and owuld like to know the solution...
    Regards
    Krishna

  • How to create a daily report for sales order

    hi
    how to create a daily report for sales order. what fields it must consists of. what are the tables it need?

    Hi
    You have to use the sales order tables VBAK,VBAP and VBEP
    So keep date field on selection screen
    and treat this date as Order creation data audat field in VBAK.
    based on this fetch the data from VBAK and VBAP  with the following fields like
    VBELN, KUNNR,NETWR,POSNR, MATNR,ARKTX,KWMENG,WAERS  etc and display in the report
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to create an order based on Notification through BAPI_ALM_ORDER_MAINTAIN

    Hi
    I need to create an order based on the notification no. This is manually can be done using the Standard T.Code IW34.I am using BAPI_ALM_ORDER_MAINTAIN to create an order based on Notification. I am getting the below message( which is success message)
    Order %00000000001 saved with number 40001258
    BAPI control was ended
    Though order is created it not assigned to notification No. I am using ref key as '%00000000001' and also I tried with '%0000000000140232323' where 40232323 is notification No.
    And if I checked in order the notification No is assigned to order as '%00000000001'. And when I check back the Notification, the order is not assigned to Notification No. How to assign the created order no to Notification No.
    Code is attached for Ref.
    Now the problem is the order is not assigned to notification no. Is there any FM or BAPI to do the same fucntionality..!
    Regards,
    Amar

    Hello Amarnadh,
    Keng Haw Soon is right, object key should always have the client like 010.
    In your code you were passing it without the client.
    Pass like below and it will work.
    ls_methods-objectkey = '%00000000001000040232323'.
    Regards,
    Thanga

  • How to create an inspection lot for each line item of the Purchase order?

    Hi,
    How to create an inspection lot for each line item of the Purchase order ?
    In detail if possible.

    Hi
       please check this
    [thread|Create Inspection Lot;

  • How to create one GR document for mutiple Purchase orders

    Can you please explain me in SAP - How to create one Goods Receipt document for reference of Multiple purchase orders.

    Dear Tanuj,
    Both Rama & Stephen are correct.
    You can take Single GR for Multiple PO either in MIGO or MB01 as long as that POs belongs to same vendor.
    In MIGO, after putting the PO press,enter,  again give the next PO of that vendor .
    If this solve your problem, close the issue.
    With Regars,
    Krishna Reddy

  • How to create multi garnishment order for the same garnishment document

    Hi,
    Can anyone tell me how to create multi garnishment order for the same garnishment document. I tried to copy the entry in IT0195 but the sequence field is grayed out so it will just delete the old record. What configuration should I do to make this possible?
    Thanks a lot in advance.

    hi,
    As far as I got it.
    You cannot have multiple Garnishment order but if a need arises you have to maintain it in IT216.
    For that follow this path goto PA30->pernr->194->change->Garnishment->adjustment.
    Since like order you cannot maintain adjustment also directly.
    Regards,
    Amit
    Reward all helpful replies.

Maybe you are looking for

  • ITunes 9 Crash Fix for .m4p Protected Music

    Okay iTunes crashed for more reasons than just .m4p files from the iTunes store. However this is what I had to go through with Apple Tech support to fix the problem and figured it might help. First off grab a copy of the old iTunes 8 from FileHippo.c

  • Screen goes black audio still works

    I've noticed for the last couple of days when I am watching tv (YES network), the screen suddenly goes black, the audio still works.  If I flip the chanell selector on the remote up or down a few chanells it comes back.  This is happening on both of

  • Column A shows up on everypage of a large spreadsheet

    The first column of my spreadsheet is gray and shows up on every page of a large spreadsheet. If I delete it from any page, it gets deleted from all. Any help would be appreciated.

  • A nest within a nest and the multiple-query blues...

    Hi all: Complex problem here, so bear with me please. I'm still building this corporate database for purposes of inventory tracking, and my latest problem follows. Here's the setup. I have a MySQL database with 3 tables (there are actually more, but

  • Transaction Problem in Session Facade Design Pattern

    Hi Well Sorry for giving wrang title to the topic, coz of which I have not received and reply. I am using session facade design pattern. I have Action class calling session facade method "getData" . This method calls "findByPrimaryKey" method in BMP.