How to recieve a POSTed data

How can I recieve a POSTed data by Sevlet doPost Method?
Raheel

No, I cannot use getParameter because a XML Request is posted to the Servlet and my Servlet has to parse that servlet using DOM.
My code is as follows:
factory = DocumentBuilderFactory.newInstance();
builder = factory.newDocumentBuilder();
document = builder.parse(new InputSource(requst.getReader())); --- A
I am facing SAXParseException that Content not allowed in Prolog at point A.
Any Help
Thanks
Raheel

Similar Messages

  • How to Recieve a POSTed data by Servlet

    How can I recieve a POSTed data by Sevlet doPost Method?
    Raheel

    No, I cannot use getParameter because a XML Request is posted to the Servlet and my Servlet has to parse that servlet using DOM.
    My code is as follows:
    factory = DocumentBuilderFactory.newInstance();
    builder = factory.newDocumentBuilder();
    document = builder.parse(new InputSource(requst.getReader())); --- A
    I am facing SAXParseException that Content not allowed in Prolog at point A.
    Any Help
    Thanks
    Raheel

  • How to change the posting date at the line item level in a sales order

    how to change the posting date at the line item level in a sales order

    Hi,
    I believe the POSTING DATE will appear on the accounting document
    In the Accounting document, the posting date will be based on the  Billing date.
    Please let me know if you need any more details
    santosh

  • How to show field Posting Date (FB60)

    Hi All...
    I have some problem with my SAP testing,
    when i try to created some testing with AP Invoice transaction FB60 @ SandBox Client 200, i can found field Posting Date.
    but when i try to create testing with FB60 @ SandBox Client 300, i can't found field Posting Date,
    does any body can give me the solution, how to display field Posting Date @ my client 300 ??
    Regards
    Ferry

    Hi,
    There must a screen varient activated for tcode FB60 in yuor 300 clent to suppress the PD field.
    In standard system it will always shown.
    Please check with your ABAPer for the screen varient activated to it or not.
    Thanks,
    Srinu

  • How can I send post data through nsurlrequest?

    Hi.
    I'm working on an application which needs to make requests to a php gateway. I tried many examples I found on google, but none of them worked for me.
    First I was working with GET, and it worked just fine, but now, as I need to send more complex data, GET isn't a solution anymore. I have three params to send: module which is a string containing a php class name, method: the function in the class, and params for the function which is usually an indexed array.
    The following method makes the request to the server, but for some reason, doesn't send the POST data. If I var_dump($_REQUEST) or var_dump($_POST), it turns out, the array is empty. Can somebody tell me, what am I doing wrong? Is there some kind of a sandbox, which prevents data from being sent to the? I also tried to send some random strings, which aren't json encoded, no luck. The sdk version is 5.1, and I'm using the iPhone simulator from xcode.
    If it is possible I would like to solve this problem without any additional libraries (like asihttp).
    And here is the code:
    +(NSObject *)createRequest:(NSString *)module: (NSString *)method: (NSArray *)params
        NSString *url       = @"http://url/gateway.php";
        NSData *requestData = nil;
        NSDictionary *data  = [NSDictionary dictionaryWithObjectsAndKeys:
                module, @"module",
                method, @"method",
                params, @"params",
                nil];
        NSString *jsonMessage = [data JSONRepresentation];
        NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
        NSString *msgLength = [NSString stringWithFormat:@"%d", [jsonMessage length]];
        [request addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
        [request addValue: msgLength forHTTPHeaderField:@"Content-Length"];
        [request setHTTPMethod:@"POST"];
        [request setHTTPBody: [jsonMessage dataUsingEncoding:NSUTF8StringEncoding]];
        requestData     = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
        NSString *get   = [[NSString alloc] initWithData:requestData encoding:NSUTF8StringEncoding];
        NSLog(@">>>>>>%@<<<<<<",get);
    Thank you.

    raczzoli wrote:
    I'm working on an application which needs to make requests to a php gateway. I tried many examples I found on google, but none of them worked for me.
    Why not?
    Unfortunately, you are dealing with a number of different technologies that have been cobbled together over the years. You could write a PHP server that would respond correctly to this request, but not using basic methods like the $_POST variable. PHP was designed for HTML and true forms. What you are trying to do is make it work as a general purpose web service over the HTTP protocol. You can do that, but not with the form-centric convenience variables.
    The following is a basic program that will populate the $_POST variable.
    #import <Foundation/Foundation.h>
    int main(int argc, const char * argv[])
      @autoreleasepool
        // insert code here...
        NSLog(@"Hello, World!");
        NSString  * module = @"coolmodule";
        NSString * method = @"slickmethod";
        //NSArray * params = @[@"The", @"Quick", @"Brown", @"Fox"];
        NSString * params = @"TheQuickBrownFox";
        NSString * url = @"http://localhost/~jdaniel/test.php";
        NSDictionary * data  =
          [NSDictionary
            dictionaryWithObjectsAndKeys:
              module, @"module",
              method, @"method",
              params, @"params",
              nil];
        //NSString *jsonMessage = [data JSONRepresentation];
        //NSData * jsonMessage =
        //  [NSJSONSerialization
        //    dataWithJSONObject: data options: 0 error: nil];
        NSMutableArray * content = [NSMutableArray array];
        for(NSString * key in data)
          [content
            addObject: [NSString stringWithFormat: @"%@=%@", key, data[key]]];
        NSString * body = [content componentsJoinedByString: @"&"];
        NSData * bodyData = [body dataUsingEncoding: NSUTF8StringEncoding];
        NSMutableURLRequest * request =
          [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:url]];
        //NSString * msgLength =
        //  [NSString stringWithFormat: @"%ld", [jsonMessage length]];
        NSString * msgLength =
          [NSString stringWithFormat: @"%ld", [bodyData length]];
        [request
          addValue: @"application/x-www-form-urlencoded; charset=utf-8"
          forHTTPHeaderField: @"Content-Type"];
        [request addValue: msgLength forHTTPHeaderField: @"Content-Length"];
        [request setHTTPMethod: @"POST"];
        //[request setHTTPBody: jsonMessage];
        [request setHTTPBody: bodyData];
        NSData * requestData =
          [NSURLConnection
            sendSynchronousRequest: request returningResponse: nil error: nil];
        NSString * get =
          [[NSString alloc]
            initWithData: requestData encoding: NSUTF8StringEncoding];
        NSLog(@">%@<",get);
      return 0;
    I have written this type of low-level server in PHP using the Zend framework. I don't know how to do it in basic PHP and wouldn't bother to learn.
    Also, you should review how you are sending data. I changed your example to send the appropriate data and content-type for the $_POST variable. If you had a server that could support something else, you could use either JSON or XML, but your data and content-type would have to match.

  • How to change the posting date in UD stock posting for a HU managed item?

    Hi,
    We are using Handling Unit managed items with QM activation. For a specific HU managed material, we wanted to post the stock on a previous date. We have created PO on a back date and made GR also on a back date. Now the problem is, the system has generated an inspection lot. Now while trying to do UD and stock posting, I do not see the "Doc" tab which we normally see in UD stock posting for normal inspection lots (non-HU managed items) for changing the date.
    I don't see any other way to change the posting date for the HU managed item in UD stock posting. Anyone can help please?
    Thanks & Regards,
    Madhavan Krishnamoorthy.

    I don't think you can.
    Craig

  • How to change the posting date of confirmations?

    Hi,
    In my company CATA is scheduled as a background job and uses some ABAP logic to set the correct posting date for the confirmations that are transferred to the PS module. As a result of a wrong date entry in the table which is used in the ABAP logic, all the confirmations (8572) that should have had posting date in February got posting dates in March.
    As far as I can see some of the options are:
    - Use CN48N and cancel one and one confirmation
    - Manually add 8572 confirmations with the correct amount of time, employee number, periode, posting date etc.
    Due to the amount of confirmations this procedure will be very time consuming.
    My questions is what is the best procedure to correct the posting date for 8572 confirmations with wrong posting date?
    Regards,
    Petter Kvalvik

    hi
    write a LSMW or BDC to cancel the confirmation and correct it by another LSMW or BDC program for correct date.

  • How to mass change posting date of parked logistics invoice verifications

    I was wondering if someone can help...
    We are looking if there is a standard SAP program available to mass change the posting date (to a new date in a new period) for a number of parked logistics invoice verification documents.
    Example: Invoices are parked in e.g. April 2010; relevant information is not available before month end; so invoices will probably be posted somewhere in May or June or ...; users now have to individually change the posting date on each parked invoice to the new open month.
    Is there any proces/program that could automate this task.
    Thanks in advance for all your advice, feedback and comments.
    Best Regards,
       Luc Vernieuwe.

    Hi,
    There is no standard tcode , i used Tx Shuttle tool to do this in past for one of my client. ( excel based sap transaction tool)
    Thanks,
    sudhakar

  • How can I change Posting Date on Sales Invoice form in UI?

    Hello,
    I cannot change the Posting Date on the Sales Invoice form in UI.
    The new date is earlier than the system date, but when I type it on the field on the form, it's not problem!
    I've tried to use the following code in vb.NET:
    SBO_Application.Forms.Item(pVal.FormUID).Items.Item("10").Specific.value = DocDueDate.ToString("yyyyMMdd")
    But I've got an exception: <i>Form - Bad value</i>
    Next step I tried this, but I've got a same message:
    SBO_Application.Forms.Item(pVal.FormUID).Items.Item("10").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    SBO_Application.SendKeys(DocDueDate.ToString("yyyy.MM.dd"))
    Any idea?
    THX,
    Csaba

    Hi Csaba!
    please, make sure that you've handled Sales Invoice form - just show the message:
    MessageBox.Show(pVal.FormUID)
    edDate = SBO_Application.Forms.Item(pVal.FormUID).Items.Item("10").Specific
    edDate.value = DocDueDate.ToString("yyyyMMdd")
    This has to show you 133. If not then put the IF-statement to check what form you are handling before you try to get the item's handler

  • How to change a posting date of an invoice in background

    Hello,
    I want to change the posting and invoice dates ( to correct many invoices,)
    I use the MIR4 transaction, the batchinput works fine in foreground,
    but in background I have the error
    Control framework : erreur fatale, destination SAPGUI
    due to enjoy transaction.
    No OSS notes or BAPI's to solve it.
    I am on ECC5 (MySap ERP2004)
    any idea ?
    Best regards
    RF

    New transactions based on control framework are not suitable for batch input. Try to find a BAPI or function module to do the same.

  • How to get GR posting date for schedule line of scheduling agreement?

    I had hard time to tie the GR date to schedule lines. I need this information to generate vendor performance report. However, the GR date is tied to scheduling agreement item level only. One item line can have multiple schedule lines. Is there a way to link the GR date to actual schedule line? Thanks in advance!

    Hi,
    There will be icon called PO history in the over view screen of SA.Select the item and press it.May be this will be some what useful to you.
    Regards,

  • Third Party GRN Posting Date to be Copied to Sales Order Line item Billing Date

    Hello Experts
    I have a client requirement where in they want to bill line items in the sales order ( third party process ) to the end customer in sync with the GRN posting dates happened in the PO
    For EG if GRN happened on 1st July 2014 then Billing Date should come in as 31st July 2014 so when they execute VF04 giving from and to dates as 1st july to 31st corresponding sales order can be invoiced
    Actual problem is for suppose if i create a sales order in the month of june say 26th basing on the factory calendar setting and invoicing list maintained in the customer master system defaults the billing date to 30th June 2014 , and the same when user runs VF04 from 1st June to 30th June this sales order shows as due and mistakenly end user invoices the customer ( whereas logical GR would have only received in July 1st )
    My requirement is similar to below threads but i am unable to find answer how to copy GR Posting date to Billing Date of the sales order line item
    use GR Doc date as billing date
    3rd party sales process (w/o ship notif) - Billing

    Hi Lakshmipathi ji,
    As my requirement is to update the billing date at the sales order line item level , As a process user goes in executes VF04
    For Ex
    Sales Order Created Date is 1st June 2014 then System Defaults Billing Date at line item to 30th June 2014
    Now when i do GRN suppose on 1st July 2014 for that line item , system should trigger a code where in check the posting date of the GRN and override the same in the Biiling Date field of the sales order line item
    So when VF04 is run for a month All the GRN which are recieved in the month of July are invoiced in July
    Please share me your thoughts do we need to check any userexits from MM side which reads the posting date of GRN and then copies in to my third party sales order
    Regards
    Hiba

  • Posting Date of Cancelled Invoice Document MR8M

    Hi, there is a invoice document posted in the system (using MIRO) on 3/31/09, when i reverse this document on 4/14/09 using MR8M, the canceled document has a posting date of 3/31/09 (same as the original document) instead of 4/14/09. Can someone tell me how to get the posting date to 4/14/09. Both 3/31/09 and 4/14/09 are in the same fiscal year and period.
    Thanks

    Hi,it's depend on Reversal reason!You'd to customize it

  • Unable to change stock posting date at usage decision while inspecting HUs

    If we were using materials without WMS it's simple: thereu2019s a button in the screen for stock posting by which we're able to change document date and posting date; but we're using WM and the screen is slightly different: the button I'm referring it's gone!
    So, how to change the posting date at posting stock in QA11 when we're using handle units? Some end-user told me that in version 4.7 this was possible. I don't think so ...unless there was something customized at WM IMG...or maybe they were using a USER EXIT to bring a pop-up window for this (I'm starting to believe that this was implemented..). This is the first time I work with HUs, so I don't know how to manage this.
    Anyone?
    Seba
    Edited by: Sebastian Sniezyk on Apr 3, 2009 10:16 AM

    I solved it in this topic: Changing posting date at usage decision for handle units. How?

  • Month end accrual posting date- Last day of the month

    Hi Experts,
    I have set up month end accruals for PY US by configuring posting dates, LDCD, WageType accrual processing class, Schema changes. I have also set the closing dates as the end of the month.
    Now after I do the posting , there are three documents getting generated.
    1. Accrual posting document with first day of the current month
    2. Normal Payroll posting  document with payroll period posting date
    3. Accrual reversal document with first day of the following month.
    My Question is:  As per standard SAP configuration, the month end accrual will have first day of the month. Can we customize this to end of the month for doc#1 - accrual document?
    Please do let me know your suggestion and ideas.
    Thanks,
    Amosha

    Hello,
    I have a similar question and I hope to have more details on how to change the posting date.
    The point is that I have an amount of 1200 and I have to post 100 for each month.
    Key Date for Accruals: 31.01.2011
    I posted 100 with Document date: 31.01.2011 and Posting date 31.01.2011
    Key Date for Accruals: 28.01.2011
    I posted 200 with Document date: 28.02.2011 and Posting date 28.02.2011
    Also I reversed the amount posted in the previous month (100) with Document date: 31.01.2011 Posting date 28.02.2011
    And so on...
    The problem are the dates because I need to post the amount at the end of each month (28/02) and to reverse the previous amount at the beginning of the next month (01/02).
    How can I change these dates?
    Thanks a lot in advance
    Kind Regards,
    E.

Maybe you are looking for

  • MacBook Pro wakes up when unplugging usb from cinema display

    Hi all, I have a 30" cinema display at work and a 23" at home which I use with my macbook pro. At work, I use a usb keyboard which stays plugged into the monitor. At home, I have a wireless keyboard and a usb printer plugged into the monitor. Thus in

  • Transferring data to new (replacement) hard drive using time machine

    My MacPro has crashed and after replacing the motherboard with no improvement, Apple thinks I will likely need a new hard drive. The cost of new drive and labor to install it is covered by Apple Care, but not for the technician to transfer to the new

  • Trying to understand the keywork "final" ...

    I know of three cases where "final" isused: final member variable (whatever static or instance), final method, and final arguments as the parameters of a method. I'm curious about the mechanism how final is implemented. Can I assume that these three

  • My iPhone 4S is stuck in iTunes screen after updating to iOS 7, what can I do?

    Hi everyone I updated iTunes to latest version. Connected my 4s to iTunes and started the update to iOS 7. Took a few minutes and in the end it gave me an error, dying the iPhone could not be updated for an unknown reason. Now the iPhone screen shows

  • Wont take my itunes gift card

    It has approved my gift card. I see the amount, but everytime I try and make a purchase of a song, it won't take my gift card.