Run Labview as different windows user (for database connectivity)
I have to connect to a corporate remote MSSQL-Database on the network, using the database connectivity toolkit for LabVIEW.
The db-authentification is realized checking the windows user (ads) who acceses the datebase (not a database user / password which is standard in the database vis)
Therefore I have to run LabVIEW as the defined windows user, different than the logged in user on the pc.
Is that possible to realize with LabVIEW?
Other Windows-tools allow to define the windows user/password which "run" an application - how can I do that with LabVIEW?
Hi Zav. There is a windows command 'runas' which _may_ let you do what you want; I haven't
tried what you need to do, but is has worked for other tasks for us. Try 'runas /?' for the switches.
You will have to build your LV program into an executable, then use runas to launch it. Is there
a reason you can't just login to Windows as the required user?
If you can get your db admin to allow dbuser/password authentication that would be a much better
way to go.
Matt
Similar Messages
-
Is it possible to add Sa as a user for Database(user defined) Security
When am adding login SA as user for database am getting this error ,
How can i fix this errror.
Emergency.
thanks in advance....You are trying to create users SA which will be mapped to
login SA which is not allowed.Actually SA has complete access to every resource
so there is no point in mapping it as user
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Could not load library for database connection LCA
Hi,
I am facing RFC connection prblem while connectiong to database. I have installed SCM5.1 and live cache in single server
Please find the logs.
Work process log:
B Mon Jul 20 11:19:13 2009
B create_con (con_name=LCA)
B Loading DB library 'E:\usr\sap\SC7\DVEBMGS03\exe\dbsdbslib.dll' ...
M *** ERROR => DlLoadLib: LoadLibrary(E:\usr\sap\SC7\DVEBMGS03\exe\dbsdbslib.dll) Error 126 [dlnt.c 241]
M Error 126 = "The specified module could not be found."
B *** ERROR => Couldn't load library 'E:\usr\sap\SC7\DVEBMGS03\exe\dbsdbslib.dll'
[dbcon.c 4731]
B ***LOG BYG=> could not load library for database connection LCA [dbds#1 @ 1035] [dbds 1035 ]
A
A Mon Jul 20 11:21:58 2009
A GENER starting remote generation: /SAPAPO/OM_SYNC_LC_DB (requested by W1).
B
SM21:
No shared library found for the database with ID LCA|
No shared library found for the database with ID LCA
/SAPAPO/OM17|/SAPAPO/OM_SYNC_LC_DB|K |SAP Web AS Problem|SBAC |
Documentation for system log message BY G :
As well as the standard connection, an attempt was made to set up
another database connection, under the specified ID. The Shared Library
for this second database could not be found.
The Shared Library is usually found in the the Executable
directory (profile parameter DIR_LIBRARY) under the name dbs
<dbs>slib<os_ext>. <dbs> stands for the database type and <os_ext>
stands for the operating system-specific extension of the Shared
Libraries.
The database type is determined from the entry that corresponds to the
specified DB ID in the table DBDCON. Check whether the data in this
entry is correct.
ST22
Runtime Errors DBIF_DSQL2_CONNECTERR
Exception CX_SY_NATIVE_SQL_ERROR
Date and Time 20.07.2009 11:22:21
Short text
Error setting up a secondary database connection
What happened?
Connection to database system not possible with identifier "LCA".
|----
System environment
SAP-Release 700
Application server... "
Network address...... "
Operating system..... "Windows NT"
Release.............. "5.2"
Hardware type........ "8x AMD64 Level"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 8
Shortdump setting.... "full"
Database server... "
Database type..... "ORACLE"
Database name..... "SC7"
Database user ID.. "SAPSC7"
Terminal................. " "
Char.set.... "C"
SAP kernel....... 701
created (date)... "Jul 6 2009 23:47:55"
create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
Database version. "OCI_10201_SHARE (10.2.0.2.0) "
Patch level. 50
Patch text.. " "
Database............. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE 10.2.0.."
SAP database version. 701
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
NT 6.0"
Information on where terminated
Termination occurred in the ABAP program "SAPLSLCAPPS" - in
"LCA_EXISTS_LCA_ROUTINE".
The main program was "/SAPAPO/TS_BATCH_RUN ".
In the source code you have the termination point in line 23
of the (Include) program "LSLCAPPSU05".
The program "SAPLSLCAPPS" was started as a background job.
Job Name....... "MACROS"
Job Initiator.. "SC7GEN"
Job Number..... 10222002
The termination is caused because exception "CX_SY_NATIVE_SQL_ERROR" occurred
in
procedure "LCA_EXISTS_LCA_ROUTINE" "(FUNCTION)", but it was neither handled
locally nor declared
in the RAISING clause of its signature.
The procedure is in program "SAPLSLCAPPS "; its source code begins in line
1 of the (Include program "LSLCAPPSU05 ".
Please help me to resolve the issue.
SurajHi Natalia Khlopina,
I have raised OSS message to SAP.
Below is the information
E:\usr\sap\SC7\SYS\exe\uc\Copy_ of_NTAMD64_15062009>sdbregview -l
Server Utilities e:/sapdb/programs 7.7.02.08 64 bit valid
DB Analyzer e:/sapdb/programs 7.7.02.08 64 bit valid
PCR 7301 e:/sapdb/programs 7.3.01.21 valid
PCR 7500 e:/sapdb/programs 7.5.00.42 64 bit valid
SAP Utilities e:/sapdb/programs 7.7.02.08 64 bit valid
APO LC APPS f:/sapdb/lcs/db/sap 6.00.004 64 bit valid
Redist Python e:/sapdb/programs 7.7.02.08 64 bit valid
Base e:/sapdb/programs 7.7.02.08 64 bit valid
JDBC e:/sapdb/programs 7.6.03.02 valid
Messages e:/sapdb/programs MSG 0.5010 valid
ODBC e:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC 77 e:/sapdb/programs 7.7.02.08 64 bit valid
Database Kernel f:/sapdb/lcs/db 7.7.02.08 64 bit valid
Loader e:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC e:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC 76 e:/sapdb/programs 7.6.01.15 64 bit valid
Fastload API e:/sapdb/programs 7.7.02.08 64 bit valid
C:\Documents and Settings\sc7adm>disp+work
disp+work information
kernel release 701
kernel make variant 701_REL
compiled on NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00
compiled for 64 BIT
compilation mode UNICODE
compile time Jul 6 2009 23:47:55
update level 0
patch number 50
source id 0.050
supported environment
database (SAP, table SVERS) 700
701
operating system
Windows NT 5.0
Windows NT 5.1
Windows NT 5.2
Windows NT 6.0
Thanks for quick responce.
Suraj -
Differnt interface languages for different windows users
I'd like to set one language for a windows user account and another language for different account. I install Firefox localized by one language and add second one's pack. But the pack is not working. And if I reinstall Fitefox localized by second language on second account I receive one localization on both accounts.
Firefox 6.0 & Windows 7Mmmm... I think you need to do a little coding. I'd create a table that would contain USER - Languaje. Then in the home page (or wherever) I'd call a plsql (that the user will not notice) that would use portal apis to check the language. If the language is not the same as the user has assigned in the table then the page will reload with the appropiate language. It is pretty mucha what portal does but without making the user clikck on the language. Hope it helps. Regards, Mere.
-
I have recently bought a laptop running Windows 8 and downloaded iTunes. I subscribe to iTunes Match and have a large amount of purchased music and imported CDs, along with some films purchased from iTunes.
I have downloaded all of the music and the films to the laptop using iTunes Match when logged in under my User Account in Windows 8. However, when we switch to my girlfriend's User Account, she can load up iTunes but all the music and films have the cloud symbol on them indicating that they need to be downloaded
Is is necessary to download everything to the computer twice (I can't really believe this is the answer) or are we missing something in terms of using iTunes with two different User Accounts?
Thank you.Step 1
Create a new user account on your device. For Mac users, choose “System Preferences” from the Apple Menu and navigate to the “View” menu. Click on “Accounts” and select the “+” button to add a new user account to your machine. Edit the user information and grant any relevant privileges by following the on-screen prompts.
For Windows users, click on the Windows "Start" button, select “Control Panel” and choose “Add or Remove User Accounts.” A new window will open. Click “Create a New Account.” Name the account and set any relevant privileges by following the on-screen prompts.
Step 2
Sign in to the new user account you created.
Step 3
Open iTunes and click “Sign in.” Enter your Apple ID and password and log in.
Step 4
Download purchases through the iTunes store. All files related to these purchases are stored under the separate user account, thus separating both iTunes accounts and their libraries on the same computer.
Step 5
You can share music from both libraries by dragging your music library to a publicly accessible location on your computer. Click “Preferences” from the iTunes menu and deselect “Copy files to iTunes Media Library when adding to library file.” Add the shared folder to your library from the “File” menu.
Tip
Create more than one library from the same user account by deselecting “Copy files to iTunes Media Library when adding to library file” from the “Preferences” menu. Add the files you want to iTunes by dragging and dropping or by opening from the “File” menu and sync your device to that library. Quit iTunes after the sync and reopen iTunes while holding the "Shift" key in Windows or the "Option" key on a Mac.
(tour du lịch nước ngoài) -
Run Labview program on Windows 7 Ultimate
Has anyone run labview program (built application) on Windows 7 Ultimate? Is there any issues? I'm trying to define the system requirement for my application installation and run time. Windows 7 Ultimate was required by my coworker for another application and I want to make sure this requirement won't affect my labview application.
Thanks very much!I'm sorry to say you're screwed, it only works on W7 Home Premium.
Nah! Just kidding, from a programming point there's no noticable difference between the different W7 versions.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
I tried to configure 2 windows users accounts using a single library per the instructions in HT1203. My iTunes library is on an external drive. I cannot get this to work. Any suggestions?
To give other users read-only access to your iTunes library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
If you want to give full read/write access to more than one user, see the support article linked below.
iTunes: How to share music between different accounts on a single computer
There is a way to share the library without moving it to a secondary volume. If you really need to do that, ask for instructions. -
Setting credential mppings to windows user for the fileadapter?
When I tried to access a network drive with the fileadapter this did not work at first. In the end I figured out you need to run the weblogic/soa_server process as a user that has rights to access network drives. So instead of the Local System user I configured the node manager service (windows 2008) to logon as a special user. This does not look like a very elegant solution. In the file Adapter you can configure credental mappings. When I tried to use this with a windows user this does not work. Am I missing something. Is it possible to have weblogic server running under the default system user but use some kind of credential mapping in the file adapter so I can access network drives and not only local drives. Accessing local drives is pretty useless to my opinion. You would not use that in real life.
you can map the remote drive to a drive letter within weblogic and then use that to access from file adapter.
Some approaches for mapping network drives within weblogic process are discussed here:
http://atheek.wordpress.com/2011/12/21/mapping-network-drives-in-weblogic-windows/ -
Error Code 37 running labview 6 with windows XP
I've checked most of the posts concerning this Generic error code 37. Here is my dilemma..Currently running Labview 6 on a windows NT system. That computer is on its last legs and we want to upgrade to XP...I installed labview 6 on an XP machine and the program runs fine..and I actually get data from my external device except I get the ERROR 37...The big thing is I cannot run a SUBVI that creates a linear fit because once I get the error 37, the SUBVI stops. I can't understand how I can read data from my external device, yet get the device not found msg. I've even tried installing LV 7, and LV 8 yet get the same results.
Solved!
Go to Solution.Thanks for the information...Unfortunately I tried all the suggestions and still no luck. The weird thing is I can get individual data from the analog device to output from the VI (i get actual data to show where it is supposed to show in the output boxes), yet I still get the "ERROR 37" message. The one big problem is that I cannot standardize the device through the LV program and therefore the individual data is not calibrated properly. In the standardize VI, the programs runs through a series of samples, and creates a calibration curve. Then when we run individual analyses the calibration curve is used. The problem that occurs in the standardize VI is that the program doesn't advance past the first sample (error 37)so I cannot generate the calibration curve.
All of the suggestions are greatly aprreciated. What I really do not understand is that without changing anything (just copying files from one computer to another) how the error code comes about. One thing I am going to try over the weekend is to add another COMM port and see what happens.
This may seem ignorant, but How do you "CLOSE" a COMM port??? -
Run labview exclusively on windows
Hi,
This may not be a question specific to LabView. I appologize in advance.
I need to run a labview program while preventing user doing anything else. The user can operate the labview program but cannot run any other applications. Is there a way to do that?
Thanks.
BoIs this a permissions issue, or you want the PC to look like it runs only your program? If it's the latter, you can replace the windows shell with your application. There are some caveats you will want to look into, however. I would google "replace windows shell" and see what you can find. I know it has been successfully done with LabVIEW applications because there were presentations on it at the CLA Summit this year.
CLA, LabVIEW Versions 2010-2013 -
Unable to have same library from two different windows user accounts
I recently spent about a week organizing and getting info correct on all my "millions" of songs. All of my music is in my itunes music folder, and organized.
I went over to my wife's windows user profile, and on itunes the library was incomplete. so i used the "add folder to library" function, to update her library to include all of the songs in the itunes music folder. It worked fine. but when i went back to my windows user profile, i got the "original file could not be found" message, on the majority of my songs. as a quick fix I deleted my library and used the "add folder to library" function, to update.
now I get the "original file could not be found" message on her library.
the files don't move, the just are not recognized by itunes on more than one "side" of windows.
it goes back and forth like this.
how can i get itunes on both windows user profiles linked to the same library, or pointed in the same place?
thanks for the helpIf I understand correctly, your library file is the good one.
The default path in XP is
C:\Documents and Settings\ username \My Documents\My Music\iTunes
Try this article about multiple libraries, and see if you can open your library in her account:
http://docs.info.apple.com/article.html?path=iTunesWin/7.6/en/15502.html
You will need to brwose to the path in your account. She needs enough windows privileges to read/write it.
She'll need full access if you're on Vista, and it will be a sightly different path. -
Report in production prompts for database connection info
Hi,
I'm using SAP Crystal Reports version for VS 2010 SP1. I'm trying to implement the most basic need--to create reports in a development environment and move them to production by just copying the .rpt files. I want to rely on the database connection string from web.config, but don't see how that is done. I've tried using ADO.NET DataSets from Project Data and can get the report to run while developing, but when I move to another server I'm always prompted with the "The report you requested requires further information" dialog.
I tried this solution, which keeps the db server name in a web.config variable:
ReportDocument boReportDocument = new ReportDocument();
boReportDocument.Load(Server.MapPath(rmCR.SelectedItem.Value.ToString()));
ConnectionInfo boConnectionInfo = new ConnectionInfo();
boConnectionInfo.ServerName = ConfigurationManager.AppSettings["dbServerName"];
boConnectionInfo.DatabaseName = "dbCMRP_Employees";
boConnectionInfo.IntegratedSecurity = true;
ModifyConnectionInfo(boReportDocument.Database, boConnectionInfo);
// Modify the ConnectionInfo for all tables in all subreports
foreach (ReportDocument boSubreport in boReportDocument.Subreports)
ModifyConnectionInfo(boSubreport.Database, boConnectionInfo);
Session.Add("Report", boReportDocument);
Response.Redirect("CrystalReportsViewer.aspx");
and this works fine in development, but when moved to a different server I get the "The report you requested requires further information" dialog. I've made sure that the db has the correct security settings, but can't find anything missing.
I'm sure I'm missing something basic, but can't seem to find any solution after searching for days. Any solution that allows me to create the report in VS 2010 and copy to a production server will be appreciated.
Thanks,
DanThanks for your replies.
I think I've done what's outlined in the Troubleshooting Guide link that Ludek gave me. I did install Process Monitor and found the "Access Denied" entry, but I'm not sure which folder needs permission given to IIS APPPOOL\ASP.NET v4.0.
Here's the entry from Process Monitor:
Description: IIS Worker Process
Company: Microsoft Corporation
Name: w3wp.exe
Version: 7.5.7601.17514
Path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Command Line: C:\Windows\SysWOW64\inetsrv\w3wp.exe -ap "ASP.NET v4.0" -v "v4.0" -l "webengine4.dll" -a
.\pipe\iisipm461f344a-3d68-4e7c-b42e-ca18eac4553c -h "C:\inetpub\temp\apppools\ASP.NET v4.0\ASP.NET v4.0.config" -w "" -m 0 -t 20
PID: 7512
Parent PID: 3892
Session ID: 0
User: IIS APPPOOL\ASP.NET v4.0
Auth ID: 00000000:00465886
Architecture: 32-bit
Virtualized: False
Integrity: High
Started: 8/29/2011 1:03:58 PM
Ended: (Running)
Modules:
w3wp.exe 0x120000 0x8000 C:\Windows\SysWOW64\inetsrv\w3wp.exe Microsoft Corporation 7.5.7601.17514
Microsoft.Web.Administration.dll 0x28ae0000 0x24000 C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\7.0.0.0__31bf3856ad364e35\Microsoft.Web.Administration.dll Microsoft Corporation 6.1.7601.17514
App_Web_822ce1a1f503e532a2e860f7ce344f6d0d0f2eba.ascx.3417f053.eb4fk61t.dll 0x28b10000 0x8000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\intranet\58a686e6\86baa618\App_Web_822ce1a1f503e532a2e860f7ce344f6d0d0f2eba.ascx.3417f053.eb4fk61t.dll n/a 0.0.0.0
App_Web_aed28e8a45aa161f6c9fc3f563283cb89b317bdc.ascx.3417f053.rodqolhn.dll 0x28c90000 0x8000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\intranet\58a686e6\86baa618\App_Web_aed28e8a45aa161f6c9fc3f563283cb89b317bdc.ascx.3417f053.rodqolhn.dll n/a 0.0.0.0
pvlocale-1-0.dll 0x2fc80000 0x76000 C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\pvlocale-1-0.dll SAP BusinessObjects 14.0.0.760
System.Data.Entity.ni.dll 0x2fd50000 0xcb8000 C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Data.Entity\978e8514751373383f79c3fdd667aa2b\System.Data.Entity.ni.dll Microsoft Corporation 4.0.30319.1 -
Dynamic Parameter Prompting for Database Connection Password When schedulin
I'm having problems with Dynamic Parameters when I try to schedule a report in InfoView.
I create the report in Crystal Reports XI and publish it to the Crystal Server. I go into CMC and under Process:Database set the correct data source and enter the server, database, user and password.
When the report is run I can choose a dynamic parameter and the reports runs fine - it's when I try to schedule the report and choose the parameter that I am asked to enter the user and password for the database.
If the parameter is static it's fine and I don't get prompted. Because I want the end-users to schedule their own reports I need to have the user and password embedded in the report.
From what I've read in the forums, there seems to be a lot of issues with dynamic parameters and database logons, and no real solutions. But this is just weird that it's only failing when I try to schedule the report!I am having the same issue.
Issue started on 9/25/2008
Existing BO 11r2 installation including service pack 2
Windows Server 2003 Service pack 2
Existing scheduled reports do not exhibit this behaviour and run correctly.
Add new or update existing report. Log into the CMC as administrator and set process for database and parameters.
Exit CMC
log into Infoview. Click on report and run (as administrator OR as existing user with permissions) NO PROBLEM.
Log into Infoview as Administrator or existing users with permissions) as attempt to schedule report. All reports Any dynamic parameter and request for user name and password opens. Once the correct info is entered the report can be scheduled.
This is a new issue on our installation, we have been running without problems for over a year.
Any help appreciated. -
Windows user needs help connecting PS2
Please, I'm begging for some help. Here's my situation:
I'm a windows user (I know, I'm sorry). My set-up is this. I have a DSL modem connected to a D-LINK DI-614+ wireless router. I have a laptop running Windows XP. I bought an Airport Express for two reasons:
My office is where my wireless router is connected. My PS2 is in the living room, along with my stereo. I want be able to BOTH stream music from iTunes to my stereo, AND use the Airport Express to connect my PS2 to the internet. I hate having to run a 100 ft. ethernet cable across the house to get online.
How do I set this up?
Thanks,
RobSorry... but you can't do this.
The ethernet port on the Airport Express is only active when the Airport Express is configured as a remote base station in a wireless distribution system (WDS). Problem is, your D-Link wireless router does not support Apple's implementation of a WDS. You must use your Airport Express in wireless client mode with your D-Link wireless router - a mode in which Airtunes may be streamed to the Airport Express, but the Airport Express ethernet port is inactive.
You will need to use different method of connecting your PS2 to your wireless network. Linksys, D-Link, and Netgear all sell "wireless game adapters" designed specifically for this purpose. -
Exception for database connectivity
I am executing a procedure that calls some functions that get data over a dblink. Now I want to add some code to check for database availablity etc upfront in my procedure before calling the function and raise exception and end it.
I was thinking of trying like
select sysdate into t_date from dua@dblink
Now I am not sure how to check the status of this sql statement .
Any comments/advise is appreciated
ThxHope this helps; Handling Errors in Remote Procedures -> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_appdev.htm#i1007937
When the database executes a procedure locally or at a remote location, four types of exceptions can occur:
* PL/SQL user-defined exceptions, which must be declared using the keyword EXCEPTION
* PL/SQL predefined exceptions such as the NO_DATA_FOUND keyword
* SQL errors such as ORA-00900 and ORA-02015
* Application exceptions generated using the RAISE_APPLICATION_ERROR() procedure
When using local procedures, you can trap these messages by writing an exception handler such as the following
BEGIN
EXCEPTION
WHEN ZERO_DIVIDE THEN
/* ... handle the exception */
END;
Notice that the WHEN clause requires an exception name. If the exception does not have a name, for example, exceptions generated with RAISE_APPLICATION_ERROR, you can assign one using PRAGMA_EXCEPTION_INIT. For example:
DECLARE
null_salary EXCEPTION;
PRAGMA EXCEPTION_INIT(null_salary, -20101);
BEGIN
RAISE_APPLICATION_ERROR(-20101, 'salary is missing');
EXCEPTION
WHEN null_salary THEN
END;
When calling a remote procedure, exceptions can be handled by an exception handler in the local procedure. The remote procedure must return an error number to the local, calling procedure, which then handles the exception as shown in the previous example. Note that PL/SQL user-defined exceptions always return ORA-06510 to the local procedure.
Therefore, it is not possible to distinguish between two different user-defined exceptions based on the error number. All other remote exceptions can be handled in the same manner as local exceptions.
Maybe you are looking for
-
How do I move my movies from iTunes to a portable drive in oder to free up disk space?
I have less than 10% of disk space free and often receive a message that my strat up disk is nearly full. I therefore want to free up space by moving my movies to a portable drive. How? I want to keep the movies on my iPad, though.
-
Got a white screen on my brand new iPod touch. Any ideas how to fix it?
Got a brand new iPod touch last night & as soon as I turned it on I got a white screen. It connected to iTunes fine & I did try to restore it with no luck. Any sugggestions would be appreciated!
-
When visiting a site I frequent I tried to download a linked .pdf file. Previously I've used Firefox 7.0.1 to download the link with no problem. Using Firefox 8 however I the browser does not recognize the .pdf link's mime type. Instead of recognizin
-
Why do Drum strips have to be constantly refreshed? Workaround?
Hi -- I'm performing with a pad controller and triggering multiple instruments simultaneously within Mainstage3. MS2 has been great for me but I find that when I open my concerts (imported from MS2) in MS3 (using the legacy instruments), The drum s
-
I am looking to get the shipment cost calculation working for a delivery with multiple items. Currently it only assign the costs to one of the items instead of calculate on basis of the weight and assign the costs to all items.