Calculate Shipping Costs based upon warehouse location

My client has three warehouse locations.  Some products are shipped from one location, some from another.  How can I properly calculate shipping cost based upon which product(s) are placed in the cart given they could be shipping from multiple warehouses on a single order? 

My attempt at this was to write some jquery
I setup multiple shipping options for different postcodes (the option for a description in BC does not work so you end up with multiple entries with the same name... can this be fixed please).
jQuery(function($){
var sel = document.getElementById('ShippingOptions');
for(var i=sel.options.length-1;i>=0;i--){
if(sel.options[i].value == "-1")
sel.options[i].text = "Select postage";
if(sel.options[i].value == "75554")
sel.options[i].text = "NSW Express Delivery";
if(sel.options[i].value == "75555")
sel.options[i].text = "NSW Standard Delivery";
$('#shippingSpan').text("Select postage");
The only issue is my weakness in jQuery
It works for the initial load but if you change the shipping location a 2nd time it defaults back to the original.
If someone can help with fixing this it would be appreciated.
Regards
Michael

Similar Messages

  • ME21N: COST CENTER DETERMINATION BASED ON STORAGE LOCATION

    Hi,
    When creating a purchase order (ME21N) I need to determine the cost center based on storage location. How can I solve this problem?
    If the solution goes through creating an USER EXIT, please, have in mind that my knowledge about ABAP is really poor.
    Thanks in advance.
    Luis Álvarez.

    Hello Priyanka,
    first of all, thanks for your quick response.  By COA I suppose you mean Controlling Area.
    Secondly, isn't possible to implement something like this for purchase orders?:
    https://forums.sdn.sap.com/click.jspa?searchID=18930382&messageID=6494959
    Regards,
    Luis.
    Edited by: LUIS ÁLVAREZ on Nov 20, 2008 8:28 AM

  • Calculate value based upon checkbox selection

    G'day people,
    I've got myself a bit stuck on a job I've got here, this javascript is getting the better of me.
    The idea is that this script takes the sub total, and adds a creditcard surcharge (as a percentage) based upon a checkbox selection, then spits out the value to be entered into another field.
    If anyone could have a quick look over the following and let me know where I've gone wrong, it would be appreciated.
    var subtotal = this.getField("SubTotal").value;
    var mastercardTick = this.getField("MasterCard");
    var visaTick = this.getField("Visa");
    var amexTick = this.getField("Amex");
    var surcharge = this.getField("CreditSurcharge").value;
    var creditcard = this.getField("PayCredit").value;
    if (creditcard.value === "Off") {
         event.value = 0;
    } else {
              if (mastercardTick.value === "Yes") {
                 surcharge.value= (1.2 / 100) * subtotal.value;
        } else if (visaTick.value === "Yes") {
                 surcharge.value = (1.2 / 100) * subtotal.value;
        } else if (amexTick.value === "Yes") {
                   surcharge.value = (3.75 / 100) * subtotal.value;
        } else {
              event.value = 0;

    Thanks George, I've given this a whirl and got very close... I got a NaN error, and found I was calling "SubTotal" a value twice, which was playing funny buggers!
    I've got rid of one part (the if creditcard.value === "Off") as it wasn't acting like it should. I think I had to put it in a seperate function, to be called seperately then the rest of the code... However, I need to get the job out and it wasn't crucial.
    Thanks for your help mate, appreciated.
    For anyone else that's interested, amended code is as follows:
    var subtotal = this.getField("SubTotal");
    var mastercardTick = this.getField("MasterCard");
    var visaTick = this.getField("Visa");
    var amexTick = this.getField("Amex");
    // var surcharge = this.getField("CreditSurcharge").value;
    var creditcard = this.getField("PayCredit").value;
              if (mastercardTick.value === "Yes") {
                 event.value = (1.2 / 100) * subtotal.value;
        } else if (visaTick.value === "Yes") {
                 event.value = (1.2 / 100) * subtotal.value;
        } else if (amexTick.value === "Yes") {
                   event.value = (3.75 / 100) * subtotal.value;
        } else {
              event.value = 0;
    Not the nicest, but hey, it worked.

  • How we do shipping cost  step by step

    hi
    as a sd consultant how we do shipping cost  can any one know how to do it sap sd .  please give me the details
    thanks in advance

    Hi
    Create shipment doc. t.code: VT01n
    Create shipment cost doc. t.code: VI01
    Shipment cost settlement and documents
    Use
    After the shipment cost settled in shipment cost document, it has the following affects:
    •It creates a service entry sheet that refers to the purchase order determined.
    •It posts acceptance of services performed.
    •It creates an accounting document for the accruals.
    •Further subsequent documents are created in FI.
    Now we check some of the above documents by using the document flow.
    Procedure
    1.Access the transaction using:
    Menu Logistics  Logistic Execution  Transportation Shipment cost  Display Single document
    Transaction code VI02
    2.Enter values like this in selection screen:
    Field Name Value Comments
    Shipment cost No. Enter the no. you note down in previous step.
    3.Press enter, on the Standard display – Overview: Freight Cost Items screen, press document flow button.
    4.Double click the service acceptance line and you can see the system post a service goods receipts upon the purchase order, also you can check the accounting document.
    5.Exit the shipment cost document.
    Settlement with forwarding agency
    Use
    After the shipment document was settled, it generates a record in GR/IR, and after we receive invoice from the vendor and post incoming invoice, the GR/IR account is cleared and the vendor’s A/P account is debited.
    The following steps are included:
    • check the GR/IR account
    • check the vendor’s A/P account
    • post invoice from the vendor by using Logistic invoice verification,
    • check GR/IR account and vendor’s account again.
    Procedure
    1.For checking GR/IR account, Access the transaction using
    Menu Logistics  Material Management Logistic Invoice Verification GR/IR account maintenance  Maintain GR/IR account
    Transaction code MR11
    2.Enter values like this in selection screen:
    Field Name Value Comments
    Company code
    Posting date Today’s date The valid posting date
    Purchase order date from to Appropriate range
    3.Press the execute button, then the relative GR/IR account listed, you can check the related PO date in which, the service items can be shown.
    4.For checking A/P account, Access the transaction using
    Menu Accounting  Financial Accounting  Accounts Payable 
    Account  Display balance
    Transaction code FK10N
    5.Enter values like this in selection screen:
    Field Name Value Comments
    Vendor
    Company code
    Fiscal year Current year
    6.Press execute button
    7.In this case, system should tell you there is no records find in the fiscal year because we do not post any information for this vendor, the amount still in GR/IR account.
    8.For posting invoice from the vendor, Access the transaction using
    Menu Logistics  Material Management Logistic Invoice Verification Enter invoice
    Transaction code MIRO
    9. Enter values like this in selection screen:
    Field Name Value Comments
    Invoice date Today’s date
    PO reference tab
    Select Transportation service Agent
    More allocation criteria The next button
    Shipment cost header On the pop up screen
    Shipment cost number The no. you processed in the previous step
    10.Execute, you can see the relative cost amount is bring from the shipment cost document
    11.Press Basic data tab and enter the same amount as the filed amount in PO reference tab. you may calculate the tax by yourself or by the system, but make sure the balance is zero (the traffic light is green). If the system asks for baseline date, enter system date.
    12.Post the document by pressing the save button.
    13.Check the invoice
    14. Check the GR/IR account, you can use t-code or by menu like in step 1-3, here, you will find the GR/IR acc. cleared.
    reward if it helps
    regards
    Prasanna R

  • Posting of Commission Exp to calculate the Cost of Goods Sold

    Hi Team,
    I do work in an automobile manufacturing organization and is new to SAP FI module. I have a business requirement which I need to fulfill; I would appreciate if all you gurus help me with finding the solution.
    Business Scenario:  at present, we are posting the following entries to record the commission we paid to dealers for selling vehicles.
    Commission Exp (DR)
         Customer (CR)
    Customer (DR)
         Dealer (CR)
    With these entries we are not been able to track the commission based on vehicle variants i.e. Toyota GLI, XLI etc.
    New Requirement:
    To calculate the Cost of Goods Sold for a variant, I need to track the commission expense based on vehicleu2019s variants. Please help me in finding the solution.
    Thanks

    Thanks for quick response.
    Let me give little more details of type of commission entries we have
    1) Normal Commission - Fixed commission variant wise and is derived from SD.
    2) Additional Commission - No predefined formula, this is totally based on top management discretion. Management decides how much would be paid to a particular dealer.
    3) Sliding Commission deduction - Deduction of certain amount from commission on late payments.
    4) Additional Sliding Commission - Payment of additional commission based on early payment terms.
    Currently, FI department is calculating all these figures on Excel sheets and then post a JV for each type of above mentioned commission.
    How can I configure the system to calculate these amounts automatically without involving Excel Sheet help?
    and how to post these amounts variant wise along with dealers and customers.

  • Freight posting in MIRO based upon multiple goods receipt.

    Hi
    In one of the companies they are requesting the freight charge to be broken into multiple lines (based upon multiple goods receipt)  instead of one consolidated balances in the invoice (MIRO).  Right now each time we do a MIGO against the same PO the system creates a seperate material document and the entry is (and that is correct) :
    Inventory  -      XXXX
    GR/IR (Cost)- XXXX
    GR/IR (Freight) XXXX
    PPV                  XXXX
    for example if migo is done 3 times against the same PO the system posts 3 seperate material document and everything is correct. 
    When we do a MIRO the system generates 3 seperate lines for GR/IR (Cost) but it consolidates GR/IR(freight) and posts the entire value in one line. 
    Requirement is : We want the system to break freight cost into 3 seperate in the invoice. 
    Did anyone come across this issue before.
    Thanks
    Joseph

    Hi Joseph,
    I guess you can use MIRO 3 times, and post separated delivery costs into 3 freight invoices.
    During each time, you can choose only 1 line to carry out the posting.
    Thanks and regards,
    Polly

  • How can I show shipping costs in my search results? Where is "Customize view" link?

    Ebay has this help page: http://pages.ebay.ca/help/search/questions/shipping-column.html It says "Click the 'Customize view' link located at the top of your search results." I can't find the "Customize view" link, and there call center person wasn't much help.  Does the ability top see the shipping cost in the search results still exist? 

    quixotix wrote:
    Ebay has this help page: http://pages.ebay.ca/help/search/questions/shipping-column.html It says "Click the 'Customize view' link located at the top of your search results." I can't find the "Customize view" link, and there call center person wasn't much help.  Does the ability top see the shipping cost in the search results still exist?  Are you viewing on a mobile device or desktop? My search results on a desktop computer shows shipping on a line under the price for the item. 

  • PS : Cost-Based POC

    I have a question regarding Cost Based POC Method..
    Example:
    All costs on project incurred in January. We set status TECO on the project on 10th of February and post delivery and outgoing invoice. On 15th February we have settlement - period end closing for January. The system does not calculate RA because of the TECO status and only actual costs remain on project  and are posted to COPA...In February revenues are posted to COPA.
    In my opinion, system should calculate RA for january and cancel RA in february...the system does not check the date when status is set
    How to do proper settings?
    Many thanks,
    Barbara

    Hi Barbara,
    If you deal with Production environment you always have to be careful...  The system will start to log a status information as time dependent for Result Analysis only on a going forward basis, so it will not impact your old projects.
    I think you can setup a test in your QA environment to switch the function in the middle of existing project (result analysis) calculation life cycle and see if you need to move the status back and forward again to populate time dependency data.
    Regards,

  • ISE posture based upon switch user is connected to

    OK, I am a new ISE user and definitely an early beginner on creating ISE policies. I have successfully created a policy that can determine if you are using a corporate asset or not and using 802.1x authentication grant you access to corporate resources or not. This policy also assigns the VLAN the user is placed into. Seems to work quite well so far at least as a baby step in policy creation.
    Our building has different VLANS based upon floors and the like and I would like the policy(s) take this into consideration when assigning the VLAN. Is there a way to include which switch the postureing process is flowing through to assist in assigning the VLAN? I am thinking I would have separate policies based upon the switch / stack but not sure how to include that in the logic. I figured it would be similar to my policy where I check corporate assets and that you are wireless and that you have a valid AD account but have been unable to figure out the endpoint part. I have created network groups for my network devices but am stumped after that. Is there something else I should or could be doing instead? Do I need a completely different train of thought?    
    Brent

    Hello Brent, using "Network Device Groups" can definitely make this possible for you. For instance, you can create a "Location" based group hierarchy that looks like something like this:
    All Locations > HQ > Floor-1
    All Locations > HQ > Floor-2
    All Locations > DR > Floor-1
    etc
    Then you can reference that group in your authorization policy by using something like this
    If "Conditions > Device > Location" = All Locations > HQ > Floor-1
    then
    Permissions = "HQ_Floor-1-Posture"
    If "Conditions > Device > Location" = All Locations > HQ > Floor-2
    then
    Permissions = "HQ_Floor-2-Posture"
    I hope this helps and addresses your issue. 
    Thank you for rating helpful posts!

  • Purchase Requisition Authorization based on Storage Location

    Hi MM Gurus,
    Our client has got a specific requirement to control the security of purchase requsition creation, change and release based on the storage locations. We have found the authorization object M_BANF_LGO which is to restrict the access of PR based on storage location in purchase requsitions.
    The issue is the purchase requsition BAPI does not check this authorization object as per standard SAP.
    Does anyone know how to handle the security of purchase requsition based on storage location?
    FYI - Our PR release strategy is at item level and not at document level.
    Thanks,
    Shekhar

    Thank you for the reply. In case of purchase requsition for cost center, you can still enter the value of storage location. The storage location comes into picture when the goods receipts are posted against this purchase. However, the storage location value can be entered at PR level.
    We have storage location field as "Required" field in all purchase requsitions as there is only one plant and each storage location represents the division.

  • Results Analysis - Cost based POC method without margin

    Hello Experts,
    I would like to use the standard method - 03 , Cost based POC method but without margin. That means,
    1. System will calculate POC based on the actual costs and planned costs.
    2. Calulated revenue is created by multiplying the POC and the planned revenue.
    Here, Till the actual revenue is more than the planned costs, calculated revenue should be made equal to the actual costs.
    I have created standard method -03 and in the expert mode i have changed the profit indicator to " E - Profit Realization if actual revenue greater than planned costs"
    This works for first period when there is no actual revenue. After the actual revenue which is less than the planned cost,
    this does not work.
    Please let me know if you have any suggestion
    Thanks
    Regards
    Srinivasan Desingh

    in our projects I used to sit with CO consultant and do a lot of RA testing by changing different fields and finally reach the required result. Hit and Trial method (so it is hard to remember exactly what happen while changing a single field as there are many fields in expert mode). May be you can also try the same.

  • Shipping from a Specific Warehouse

    I'm looking for a way to have apps "intuitively" select a warehouse to ship from based on the customer's ship to address.
    (e.g.) Product exists in PA and CA. Customer lives in PA. I want the product to ship from the PA warehouse.
    Any suggestions how to make it happen?

    The limitation with using a defaulting rule is that this is going to populate the warehouse on the order prior to attempting to schedule or check ATP. It will then try to schedule against only that inventory org. If there is not availability there it is NOT going to know that you have availability in another warehouse in the next state.
    Ask yourself if this is what you want ... ie. it will only consider the default warehouse for availability and if you have huge stocks in the next state the system will not know.
    What you could potentially do is set up a bill of distribution & use the Global ATP functionality ... although there's a lot of setup & maintenance if you have to do 52 states & more than just the US. In simple terms, this would check first against your default warehouse & if there is not availability there then it will check against the next priority warehouse defined in the Bill of Distribution. Suggest if interested you read up on this as it's pretty involved.
    Back to the defaulting rule ... at the Customer Ship-To in AR you can define a Warehouse & set up your defaulting rule to use this as the first option. This assumes that your business process allows for the person creating the customer record in AR knowing the correct warehouse, but this merely transfers the issue from being one of order entry to one of customer setup. There is no standard way to have the warehouse default in the Customers Standard form.

  • Cost Based Optimizer (CBO)

    not sure if this is a daft question or what. but i am trying to find out where exactly it exists.
    i know, when performing ST05 and viewing the execution plan, we see what the CBO has used, but is the CBO purely performed at the database server, and not at the SAP Application.
    When updating the statistics, are these passed to the database server, and once again, the CBO utilizes them for the execution plan, or do the database statistics actually reside in the database server.
    finally, in viewing the execution plan, the statement "execution costs = xxx" (xxx being a numeric value). what exactly is xxx. maybe an internal index used to compare  execution plans, or maybe the number of blocks required to read the "estimated #rows".
    anyone  ??
    thanks
    glen

    Hello Glen,
    So far as my knowledge is concerned, the statistics are actually located on the database server. That is what appears to be more logical too. what is the use of maintaining the access paths on tha application server ? Most of the modern database servers are equipped with the CBO functionality. And Cost-Based-Optimizing is dependent on the database.
    Here's what the documentation says:
    <i>You can update statistics on the Oracle database using the Computing Center Management System (CCMS). The transactions to be used are DB20 and DB21.
    By running update statistics regularly, you make sure that the database statistics are up-to-date, so improving database performance. The Oracle cost-based optimizer (CBO) uses the statistics to optimize access paths when retrieving data for queries. If the statistics are out-of-date, the CBO might generate inappropriate access paths (such as using the wrong index), resulting in poor performance.
    From Release 4.0, the CBO is a standard part of the SAP System. If statistics are available for a table, the database system uses the cost-based optimizer. Otherwise, it uses the rule-based optimizer.</i>
    Regards,
    Anand Mandalika.

  • ESB Routing service based upon XSD contains reference to localhost

    Hello,
    I've created the following simple ESB scenario and run into some behaviour which I can't explain.
    - Create a ESB project
    - Import a XSD definition file
    - Create a routing service based upon the XSD definition file (Generate WSDL From schemas)
    - Deploy the ESB project to the ESB server (on a different machine)
    So far, so good
    Go to the ESB Console, click on the created Routing Service, go to the Definition tab and click on the Concrete WSDL URL.
    In the service part a 'localhost' reference appears, which results in an error when running the routing service.
    <service name="execute_pptService">
    <port name="__esb_RoutingTest_execute_ppt" binding="tns:__esb_RoutingTest_execute_ppt" />
    <port name="__soap_RoutingTest_execute_ppt" binding="tns:__soap_RoutingTest_execute_ppt">
    <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    location="http://localhost:8888/event/TEST/RoutingTest" />
    </port>
    </service>
    This definition appears in the ..routing..esbsvc file. When I change in this file 'localhost' to the server IP address and redeploy the ESB project, the server IP address is replaced to 'localhost' by JDeveloper.
    What causes this behaviour and how can I avoid it?
    Regards Leon

    I enabled "validate payload at runtime" option in the definition.
    The instance erred out and I got the below payload in the Error tab.
    <actionData xmlns="http://xmlns.oracle.com/bpel/sensor">
    <header>
    <sensor sensorName="ActivitySensor_1" classname="oracle.tip.pc.services.reports.dca.agents.BpelActivitySensorAgent" kind="activity" target="Assign_1" xmlns:pc="http://xmlns.oracle.com/bpel/sensor" xmlns:tns="http://xmlns.oracle.com/BPELProcess1">
    <activityConfig evalTime="completion">
    <variable outputDataType="StatusInformation" outputNamespace="http://www.oracle.com/bpel_esb" target="$jmsInput"/>
    </activityConfig>
    </sensor>
    <instanceId>30014</instanceId>
    <processName>BPELProcess1</processName>
    <processRevision>1.0</processRevision>
    <domain>default</domain>
    <timestamp>2007-11-01T16:27:20.966+05:30</timestamp>
    <midTierInstance>PC-SRGNANAS-IN:8888</midTierInstance>
    </header>
    <payload>
    <activityData>
    <activityType>assign</activityType>
    <evalPoint>completion</evalPoint>
    </activityData>
    <variableData>
    <dataType>2005</dataType>
    <data>
    <StatusInformation xmlns="http://www.oracle.com/bpel_esb">
    <processName>BPELProcess1</processName>
    <timeStamp>2007-11-01T16:27:20</timeStamp>
    </StatusInformation>
    </data>
    <queryName/>
    <target>$jmsInput</target>
    <updaterName>Assign_1</updaterName>
    <updaterType>assign</updaterType>
    </variableData>
    </payload>
    </actionData>
    Thanks again for the response.

  • How to calculate the costs of every item categary in costing run

    Hello Experts,
    Could anyone explain how to calculate the costs of every item categary when I carry out the costing run. For example, item categary: M, E, G.
    Thank you in advance.
    Maria

    This Applesctipt will add comma's to the file count:
    (Copy into Applescript Editor, and Save as File Format: App, then just click the App to run)
    set x to choose folder with prompt "Choose Folder to Count Files" default location alias (the path to pictures folder as text)
    set filecount to do shell script "find " & POSIX path of x & " ! -type d ! \\( -name \".*\" -or -name \"Icon*\" \\) | wc -l"
    display dialog "File Count: " & comma_delimit(trim(filecount))
    on trim(someText)
              repeat until someText does not start with " "
                        set someText to text 2 thru -1 of someText
              end repeat
              repeat until someText does not end with " "
                        set someText to text 1 thru -2 of someText
              end repeat
              return someText
    end trim
    on comma_delimit(this_number)
              set this_number to this_number as string
              if this_number contains "E" then set this_number to number_to_text(this_number)
              set the num_length to the length of this_number
              set the this_number to (the reverse of every character of this_number) as string
              set the new_num to ""
              repeat with i from 1 to the num_length
                        if i is the num_length or (i mod 3) is not 0 then
                                  set the new_num to (character i of this_number & the new_num) as string
                        else
                                  set the new_num to ("," & character i of this_number & the new_num) as string
                        end if
              end repeat
              return the new_num
    end comma_delimit

Maybe you are looking for