How to update need by date in Purchase order using an API?

Hi All,
Is there any API available in 11i which can be used to update the need by date in purchase order?
There is a API PO_CHANGE_API1_S.UPDATE_PO, but it updates only the promise date and not the need by date.
Please help !!
Thanks & Regards
Anuj

Your error comes from Sybase, so I suggest you post your question to a Sybase forum.  And be aware that Sybase does not use the same tsql dialect as sql server, so you must use their dialect (if, indeed, there is any difference in this particular situation). 
One note - there should be no space between "N" and the Unicode string literal to which it applies in tsql.  E.g.,
= N'Executive Chair эюя'
not
= N 'Executive Chair эюя'

Similar Messages

  • How to Assigning the number ranges for Purchase Order using EXIT_SAPMM06E_0

    How to Assigning the number ranges for Purchase Order using EXIT_SAPMM06E_001 using Functional Module NUMBER_GET_NEXT explain me ?

    Hi,
    First go thourh the FM import export parameters list.
    Try to create an internal table of type INRI-NRRANGENR for number ranges.
    We can provide the lower and higher values for this table so that what ever PO is created will be with that range.
    Try to create the ncessary ones using this FM.
    In the Exit, EXIT_SAPMM06E_001,
    the Export parameters are-
    EKKO-EBELN- the PO ios created with in that specified range
    Range as INRI-NRRANGENR - Here try to assign the Internal table that was populated in the FM.
    Try to code this in the Include provded and keep Breakpint and check the PO number generated.
    Reply if u need more help on this.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • How system updating the delivery dates in sale order schedule line

    Hello
    i created a sales order with 2 line items. For the first line item the confirmed delivery date in the schedule line is 06.02.2012 and for the second line item the confirmed delivery date in the schedule line is 14.02.2012 . Both the line items are third party items and the PR created against the line items in the sales order .
    We created the PO with reference to the PR of the SO and we find there are different delivery dates coming in the PO document for the 2 line items . For the first line item the delivery date is coming as 14.11.2011 and for the second line item in the PO , the delivery date coming as 11.11.2011 . Firstly we are not understanding from where the delivery dates are picking in the PO.
    Secondly , once we saved the Purchase order and once we come back to the sales order , the schedule line dates are getting changed automatically in the sales order . For the first line item in the sales order the delivery date is changing to 22.11.2011 and for the second line item in the sales order the delivery date is changing to 22.11.2011.
    Now my question , is from where the delivery dates are updating in the Purchase order and once we save the purchase order how the delivery dates in the schedule line are getting changed .

    Now my question , is from where the delivery dates are updating in the Purchase order and once we save the purchase order how the delivery dates in the schedule line are getting changed .
    For third party processing, the delivery dates are updated in the purchase order based on the settings in the field Planned delivery time in the MRP2 view of the material master(defined in purchase info record in t.code ME11/ME12) and purchasing processing time defined in t.code OMEW. This means, since the date of PO created, it will take the days mentioned in the planned delivery time field and purchasing processing times to determine the delivery date, which will be copied into the sales order as delivery date. In your case, the purchase order delivery date is not copied into the sales order, hence you may need to check OSS note. How the PO is handled? Any confirmation control functionality is used?
    Regards,

  • Update of delivery date on purchase order line

    Hi,
    Is it possible that the delivery date in the purchase order is automatically updated. When the required delivery date changes in the sales order when there is a link between the two?
    If yes, how?

    Thank You!
    My problem is solved regarding DELIVERY_DATE but I am getting new problem .
    I am getting error message
    "Control indicators for controlling area UPS do not exist"
    when I use BAPI BAPI_PO_CREATE1 . 'UPS' is the new controlling area that in which I am creating the Purchase order.
    Please suggest me some solution.
    Thanks,
    Sonali.

  • How to header and item data of sales order using bapi interface

    hi friends,
       i am geetha, i having a problem like how to upload sales oder header and item data through va01 tcode using BAPI FUNCTION MODULES.
    i need bapi function modules for header adn item data  and brief explation on that , how to pass importing and tables  parameters to get exact output .
    regards
    geetha.

    Use : BAPI_SALESORDER_CREATEFROMDAT2
    Sales order: Create Sales Order
    Functionality
    You can use this method to create sales orders.
    You must enter at least sales order header data (via ORDER_HEADER_IN structure) and partner data (via the ORDER_PARTNERS table) as input parameters.
    Enter the item data via the ORDER_ITEMS_IN table. You can allocate item numbers manually, by filling in the relevant fields, or the system does it, according to the settings for Customizing, by leaving the relevant fields blank.
    If you have configurable items, you must enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and ORDER_CFGS_VALUE tables.
    Credit cards can be transferred via the BAPICCARD structure, on the one hand, data for card identification, on the other, data for a transaction which has taken place in an external system.
    Once you have created the sales order successfully, you will receive the document number (SALESDOCUMENT field). Any errors that may occur will be announced via the RETURN parameter.
    If no sales area has been created in the sales order header, then the system creates the sales area from the sold-to party or ship-to party, who has been entered in the partner table. If a clear sales area cannot be created, you will receive a system message, and the sales order will not be created.
    Notes
    1. Mandatory entries:
    ORDER_HEADER_IN : DOC_TYPE     Sales document type
                       SALES_ORG    Sales organization
                       DISTR_CHAN   Distribution channel
                       DIVISION     Division
    ORDER_PARTNERS..: PARTN_ROLE   Partner role, SP sold-to party
                       PARTN_NUMB   Customer number
    ORDER_ITEMS_IN..: MATERIAL     Material number
    2. Ship-to party:
    If no ship-to party is entered, use the following: Ship-to party =
    sold-to party.
    3. Commit control:
    The BAPI does not have a database commit. This means that the relevant application must leave the commit, in order that can be carried out on on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.
    4. German key words:
    The following key words must be entered in German, independantly of
    the logon language:
    DOC_TYPE     Sales document type, for example: TA for standard order
    PARTN_ROLE   Partner role, for example: WE for ship-to party
    Further information
    You can find further information in the OSS. The note 93091 contains general information on the BAPIs in SD.
    Parameters
    SALESDOCUMENTIN
    ORDER_HEADER_IN
    ORDER_HEADER_INX
    SENDER
    BINARY_RELATIONSHIPTYPE
    INT_NUMBER_ASSIGNMENT
    BEHAVE_WHEN_ERROR
    LOGIC_SWITCH
    TESTRUN
    CONVERT
    SALESDOCUMENT
    RETURN
    ORDER_ITEMS_IN
    ORDER_ITEMS_INX
    ORDER_PARTNERS
    ORDER_SCHEDULES_IN
    ORDER_SCHEDULES_INX
    ORDER_CONDITIONS_IN
    ORDER_CONDITIONS_INX
    ORDER_CFGS_REF
    ORDER_CFGS_INST
    ORDER_CFGS_PART_OF
    ORDER_CFGS_VALUE
    ORDER_CFGS_BLOB
    ORDER_CFGS_VK
    ORDER_CFGS_REFINST
    ORDER_CCARD
    ORDER_TEXT
    ORDER_KEYS
    EXTENSIONIN
    PARTNERADDRESSES
    Exceptions
    Function Group
    2032

  • Updating Scheduling data for Purchase Order

    Hi,
    I need a function module which can update the scheduling data for purchase order in EKET table. Normally we create Purchase Order as a reference from purchase requisition through BAPI_PO_CREATE1. That time it takes care of all the scenarios. But as per the requirement I want to create a PO which is created from more than one Purchase Requistions so I can't use the said BAPI. But still I am using this BAPI and after creation is completed I am updating the Requistions. The same scenario is taken care in ME59N, but I can't copy that code because of some requirements. So could any one please give me the idea to replicate the same functionality with any function module or other ways.
    Thanks
    Somnath paul

    try to pass all u sheduling related fields to POSCHEDULE and make sure u have enabled POSCHEDULEX along with sheduling related fields .....also (if no changes  are there  leave it with space )...
    this will definetly update not only eket table ....it will update every table regarding to purchase order,ekpo,ekko,eket ...etc
    Example of population of BAPI interface in the Function
    Parameter: POHEADER
    COMP_CODE            =                    1000
    DOC_TYPE             =                    NB
    ITEM_INTVL           =                    00001
    VENDOR               =                    0000001000
    PMNTTRMS             =                     0001
    PURCH_ORG            =                     1000
    PUR_GROUP            =                     001
    CURRENCY             =                     EUR
    Parameter: POHEADERX
    COMP_CODE            =                     X
    DOC_TYPE             =                     X
    ITEM_INTVL           =                     X
    VENDOR               =                     X
    PMNTTRMS             =                     X
    PURCH_ORG            =                     X
    PUR_GROUP            =                     X
    Parameter: POITEM
    PO_ITEM              =                     00001
    MATERIAL             =                    100-100
    PLANT                =                    1000
    STGE_LOC             =                    0001
    QUANTITY             =                    15.000
    TAX_CODE             =                    V0
    ITEM_CAT             =                     0
    ACCTASSCAT           =                    K
      Parameter: POITEMX
      PO_ITEM              =                    00001
      MATERIAL             =                    X
      PLANT                =                    X
      STGE_LOC             =                    X
      QUANTITY             =                    X
      TAX_CODE             =                    X
      ITEM_CAT             =                    X
      ACCTASSCAT           =                    X
      Parameter: POSCHEDULE
      PO_ITEM              =                    00001
      SCHED_LINE           =                    0001
      DELIVERY_DATE        =                    02.12.2002
      QUANTITY             =                    6.000
      PO_ITEM              =                    00001
      SCHED_LINE           =                    0002
      DELIVERY_DATE        =                    03.12.2002
      QUANTITY             =                    5.000
      PO_ITEM              =                    00001
      SCHED_LINE           =                    0003
      DELIVERY_DATE        =                    04.12.2002
      QUANTITY             =                    4.000
      Parameter: POSCHEDULEX
      PO_ITEM              =                    00001
      SCHED_LINE           =                    0001
      PO_ITEMX             =                    X
      SCHED_LINEX          =                    X
      DELIVERY_DATE        =                    X
      QUANTITY             =                    X
      PO_ITEM              =                    00001
      SCHED_LINE           =                    0002
    Parameter: POACCOUNT
    PO_ITEM              =                    00001
    SERIAL_NO            =                    01
    QUANTITY             =                    15.000
    GL_ACCOUNT           =                    0000400000
    COSTCENTER           =                    0000001000
    CO_AREA              =                    1000
    Parameter: POACCOUNTX
    PO_ITEM              =                    00001
    SERIAL_NO            =                    01
    QUANTITY             =                    X
    GL_ACCOUNT           =                    X
    COSTCENTER           =                    X
    CO_AREA              =                    X
    Parameter: POCOND
    ITM_NUMBER           =                    000001
    COND_ST_NO           =                    001
    COND_TYPE            =                    PB00
    COND_VALUE           =                    79.900000000
    CURRENCY             =                    EUR
    CURRENCY_ISO         =                    EUR
    COND_UNIT            =                    KG
    COND_P_UNT           =                    1
    CHANGE_ID            =                    U
    Parameter: POCONDX
    ITM_NUMBER           =                    000001
    COND_ST_NO           =                    000
    ITM_NUMBERX          =                    X
    COND_TYPE            =                    X
    COND_VALUE           =                    X
    CURRENCY             =                    X
    CHANGE_ID            =                    X
    Parameter: POPARTNER
    PARTNERDESC          =                    OA
    LANGU                =                    EN
    BUSPARTNO            =                    0000001100
    PARTNERDESC          =                    GS
    LANGU                =                    EN
    BUSPARTNO            =                    0000001200
    PARTNERDESC          =                    PI
    LANGU                =                    EN
    BUSPARTNO            =                    0000001000
    reward points if helpful....

  • Creating a Purchase Order using ORDERS05 Idoc

    Hi Experts,
    I need to create a purchase order using ORDERS05 Idoc, with the data I am using a sales order is gettig created but I need to create a PO insted of SO.
    Please let me know what is difference between a PO and SO while using ORDERS05. Also please let me know what are all the fields that needs to chaged in the Idoc.
    Thanks,
    Suma

    Hi,
       I'm looking at a similar problem, can we use ORDERS05 IDOC basic type to create a Purchase Order?
       What is the inbound processing FM?  I tried IDOC_INPUT_ORDRSP, but it seem to only allow changes to a PO, and not creation of a PO.
       For IDOC_INPUT_ORDERS FM this one seem to only create Sales Orders?
       Which inbound FM should i be using?
    Regards.

  • Create an AP Invoice based on a Purchase Order using SDK

    Hi,
    What are the steps to create an AP Invoice based on a Purchase Order using DI API?
    Which methods of which objects to use and what parameters to pass?
    Thanks.

    Hi Rajesh,
    Here is a sample to create an Invoice based on a Sales Order. The same way you can change as per your requirement:
    SAPbobsCOM.Documents oInvoice = default(SAPbobsCOM.Documents);
                oInvoice = (SAPbobsCOM.Documents)SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
                oInvoice.CardCode = "C000003";
                oInvoice.DocDueDate = DateAndTime.Now;
                oInvoice.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oOrders);
               oInvoice.Lines.BaseEntry = Convert.ToInt32(3616);
               oInvoice.Lines.BaseLine = 1;
                oInvoice.Lines.Quantity = 3;
                oInvoice.Lines.Add();
                oInvoice.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oOrders);
                oInvoice.Lines.BaseEntry = Convert.ToInt32(3616);
                oInvoice.Lines.BaseLine = 2;
                int kth = 0;
                kth = oInvoice.Add();
                if (kth != 0)
                    int irrcode;
                    string errmsg;
                    SBO_Company.GetLastError(out irrcode, out errmsg);
                    Program.oMainSAPDI.ShowMessage(errmsg, BoStatusBarMessageType.smt_Error);
    The main thing to remember is Base Type, Based Entry and Base Line.
    Hope it helps.
    Thanks & Regards
    Ankit Chauhan

  • How can I check the date of purchase for my MacBook Pro?

    I need to fill out a claim in order to get OS X Mountain Lion and I need the date of purchase. I have tried putting in the serial code under check your service and support coverage but it just gave me a vague statement thatit was purchased mid 2012. Could someone please tell me how I can check the date of purchase?

    Well, correction, just checked mine...
    Tells you exipry date of warranty, simply take 1 year off of this or 3 if you have AppleCare.
    There is your purchase date.

  • How to execute availability check against delivery date in purchase order

    Hi all
    In MD04, I know that "available date = delivery date in purchase order + GR processing time" & "GR date = delivery date in purchase order". When I execute availability check in production order, I will get material's committed date = available date. But I hope to get material's committed date = GR date in purchase order.
    For example. delivery date in purchase order is 2012/02/06 and GR processing time is 2 days. After ATP in production order, I will get committed date 2012/02/08. But I hope it show 2012/02/06. How to customize it.
    (The GR processing time must be set 2 days for MRP calculation. it can be changed to 0.) Thanks!!

    Hi Rita,
    One Doubt, If you say that material commited has to be the GR date and you do not wish to wait for GR processing time, then why do you have the GR processing time in first place.
    For ex. My client, we get the stock as per GR in Quality inspection and so we have GR processing time considered for available time in MD04. But since the business considers the Inspection stock as avialble, The stock gets reflected in avialibility check the moment GR is done.
    So please explain your requirement in detail. There could some way to do so. If not the raise an issue with SAP.

  • Create a Purchase order using the BAPI using the data in the XML file.

    Hello Gurus,
    here is the scenario can anyone help me how to proceed explaining the procedure?
    Create a Purchase order using the BAPI using the data in the XML file.
    comprehensive explanations are appreciated.
    thanks in advance.

    hi,
      first use fm "bapi_po_create".
      then use fm "BAPI_ACC_GL_POSTING_POST"
    The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
    •     No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
    •     In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
    •     A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).

  • Need to modify Standard Purchase Order Stylesheet (PO_STANDARD_XSLFO.xsl)

    Hi
    We need to modify Standard Purchase Order Stylesheet (po_standard_xslfo.xsl) . Current stylesheet generating PO like the following.
    <FOR-EACH>
    ITEM_NUM
    ITEM_DESCRIPTION
    <FOR-EACH>
    SHIP_TO_ADDRESS_LINE1 NEED_BY_DATE QUANTITY
    </FOR-EACH>
    </FOR-EACH>
    Based on this, we are getting the output like this:
    Item Num 1
    Itme Description 1
    Ship To: Needed: Quntity
    1234. A1 Avenue JUL 200
    SomeCity, CA 90706
    1234. A1 Avenue AUG 200
    SomeCity, CA 90706
    4567 B1 Avenue JUL 100
    City2 , CA
    Itme Description 2
    Ship To: Needed: Quntity
    5689. c1 Avenue JUL 200
    SomeCity, CA 90706
    Our requirement is like this:
    Item Num 1
    Itme Description 1
    Ship To: 1234. A1 Avenue, SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 200 200 100
    Ship To: VVV4567 B1 Avenue , SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 100 200 100
    So we need to add ship_to group (ITEM/SHIP_TO) .
    How can we use group by item, ship_to..
    <fo:block> <xsl:value-of select="ITEM_NUM"/> </fo:block>
    <fo:block> <xsl:value-of select="ITEM_DESCRIPTION"/> </fo:block>
    <xsl:for-each select="/PO_DATA/LINES/LINES_ROW/LINE_LOCATIONS/LINE_LOCATIONS_ROW">
    <fo:block> <xsl:value-of select="SHIP_TO_ADDRESS_LINE1"/> </fo:block>
    <fo:block> <xsl:value-of select="substring(NEED_BY_DATE,4,3)"/> </fo:block>
    <fo:block> <xsl:value-of select="QUANTITY"/> </fo:block>
    </xsl:for-each>
    </xsl:for-each>
    In the above code I need split the data by ITEM_NUM/ SHIP_TO_ADDRESS_LINE1.
    I am new to xsl-fo. I tried different ways,but ship_to_address_line1 is generating wiith each quanty and need_by_date.
    Please guide me.
    Thank you
    Raju
    Edited by: subbaraju on May 7, 2009 2:36 PM

    Hi Chandra
    Thank you very much for your suggestion.
    I tried that way, I created some sample xml file, I created sample rtf file and I generated xsl-fo file. I copied the part of code into my PO_STANDARD_PO.XSL. I am getting some error.
    I noticed PO_STANDARD_PO.XSL is xsl version 1.0 and the generated sample data is with xsl version 2.0.
    The generated code is using “for-each_group”, “sum()”, “current-group()” etc. Is these functions will work in xslt 1? Or do we need to code different way?
    We are in Oracle APPS 12.0.4.
    Thank you
    Raju
    Edited by: subbaraju on May 26, 2009 11:56 AM

  • Net price update in creation of the purchase order

    Guys,
    I have a query, please find the details below.
    I have created a ABAP for posting the purchase orders using the BAPI function 'BAPI_PO_CREATE1', I am passing the net price value in the input file. But the system is taking the net price from the purchase info record of that material. My own net price is not considered.
    Please find my observations below.
    1. First of all system is checking whether there is a PIR maintained for the material or not. If PIR is maintained, then system is defaultly considering the net price maintained in the PIR.
    2. Later I have deleted the net price maintained in PIR. In this case, system is considering the net price of that material from the previous purchase order.
    But my query is that I don't want the system to consider the net price from previous material, I want to update my own net price to line item of the PO.
    Could anyone please suggest me how should I proceed further so solve this query?
    Thanks in advance.
    Regards,
    Vijaymadhur.

    Hi,
    Yes, this can be achieved. Don't maintain any price in inforecord. Then in SPRO > Materials Management > Purchasing > Environment Data > Define default value for buyers > Here click on settings on default values > In Inforecord update > Maintain no update fro PO and quotation.
    Now the last PO price will not be saved in Inforecord and hence this will not b carried to PO.
    Regards,
    Prabu

  • How to create purchase order using SharePoint Custom List

    Hi All,
    Can you please provide some example or link to create Purchase Order using SharePoint List / SharePoint Designer.
    Thanks

    Hi,
    It would be difficult to achieve what you want with the OOTB features of only one list.
    Per my understanding, there would be two main functionalities in the solution you want:
    1. Calculate and display the “Balance Qty” dynamically based on the values of “Order Qty” and “Deliver Qty”;
    2. Trace the “Deliver Date” and “Deliver Qty” as per “Purchase No”;
    As a workaround, I would suggest you create two lists as below:
    1. List “Orders”: Saving the upcoming orders per “Purchase No”, one “Order Qty” related to one unique “Purchase No”.
    Columns in this list:
    Purchase No(Number);
    Order Date(Date);
    Order Qty(Number);
    2. List “Deliveries”: Recording each delivery, one “Deliver Qty” to one unique existing “Purchase No” in list “Orders”.
    Columns in this list:
    Purchase No(Lookup “Purchase No” in list “Orders”);
    Order Date(Additional Lookup column along with “Purchase No”);
    Order Qty(Additional Lookup column along with “Purchase No”);
    Deliver Date(Date);
    Deliver Qty(Number);
    Balance Qty(Number);
    More information about
    Lookup column in SharePoint List:
    http://msdn.microsoft.com/en-us/library/office/ff728095(v=office.14).aspx
    http://zimmergren.net/technical/sp-2010-how-to-relational-lists-in-sharepoint-2010
    In the “Deliveries” list, we can trace each “Deliver Qty” and “Deliver Date” easily by filtering the “Purchase No” column in the list view page.
    For the dynamic values in “Balance Qty” column, Event Receiver with custom code would be needed as we will need to query the “Order Qty” in “Orders” list and all the
    existing “Deliver Qty” value per “Purchase No” in “Deliveries” list.
    An idea about
    how to implement a Purchase Order system in this blog would be helpful:
    http://ethan-deng.blogspot.jp/2013/03/purchase-order-management-system.html
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Exit for Moving sales order data to Purchase order

    Hi All,
    I have a requirement where sales order data needs to transferred to Purchase Order.
    We have few custom fields in EKKO table YY SHIP_DATE, YYMOL etc....When a sales order 3rd party is created a PR is automatically created.Based on this PR(Purchase Requistion) we are creating a PO(Purchase Order) and the custom fields needs to be populated from the sales order.
    I have checked the Exit V45E0001 Update the purchase order from the sales order.Its of no use for us as all our fields are custom fields..Please help..
    Thanks.

    Hi,
    >>>,if an error occurs while creating purchase order in ecc6.0
    one very easy and all standard
    set up workflow in receiver ECC and put a user group in WE20 for this logical system that receiver the sales orders
    then in standard when there is an error with IDOC in the inbound
    a mail will be send to the user group (and you can put as many users in this group as you wish) and they will all receive this error
    this would be the easiest idea and all in standard
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • Can't Connect to Limewire with New Mac

    Hi, hope someone can help me here -- no one responded at the Limewire forums. I'm having trouble connecting to Limewire on my new Mac: it just keeps attempting to connect but never has success.ere. I have my PC also on this network (details below) an

  • Only Boots with Snow Leopard Disc

    Sorry, this is a MBP and Boot camp question... I've been running fine with windows 7 for months and one day I went to play and all I got was a black screen. The weird thing is that I could still run the bootcamp partition of windows in Parallels. Thi

  • Link to Internal Forum

    Hi , I am a new oracle employee. And I have been working on a new jdev version which is not public yet. Can you provide me link to the internal forum where I can ask questions. Thanks and Regards, Tarun

  • A-V Service won't start on edge

    On a Lync 2013 Edge I am getting these errors.  I need to say that yesterday everything worked I just changed certificate (edge, IIS- ARR, Office web app). - EventID 22021 LS A/V edge Server LS A/V Edge Server failed to open a network endpoint. Proto

  • Battery on iphone 4s keeps dying and now i can't turn my phone off!

    Hi, for the past few days i've noticed that the battery life on my iphone 4s has started dying really quickly, within 20 hours. And now when i try to turn my phone off, it automatically switches itself back on! I select "swipe to switch" and then it