Quantity converting incorrectly
Hello,
I've got some code in a userexit (userexit_save_doc_prepare) that needs to convert a sales order's quantity (vbap-kwmeng) to an integer so that I can do further calculations with it. However, the automatic conversion routines seem to be misfiring, and they also seem to be dependent on user settings (comma decimals vs. period decimals). Here is a summary of the code and what it is doing:
DATA: temp_quantity_out TYPE I.
LOOP AT xvbap.
temp_quantity_out = xvbap-kwmeng.
ENDLOOP.
When I go to this part of the code in debug mode after entering '2' in the quantity of the material, the value it shows for xvbap-kwmeng is '2.000'. However, after executing the conversion, the field temp_quantity_out has the value of '2000', instead of the '2' I was expecting. This is throwing future calculations off. How do I get a value of '2' from this field?
I've tried using a packed number. I've tried using 'write to'. I've tried using it to calculate without converting. None of these have worked. I even tried to find a conversion function, but didn't see anything. Can you help?
Thanks,
Nathan Beeler
Nathan, I believe that you are seeing this behavior due to an attribute of the program itself. In the MAIN program, SAPMV45A, click Go To->Attributes. In the dialog that appears, check to see if "Fix-Point Arithmatic" is checked. If it is not, then this is causing your problem. An easy fix is to check this on, but make sure that you test everything else thoroughly and make sure that every is ok. Otherwise, you will need to divide by 1000 when moving to your INT field.
It would be safer to divide by 1000, instead of marking as "Fix point arithmatic", SAP has left it off for a reason.
Regards,
Rich Heilman
Similar Messages
-
SO quantity convert problem -_-
code :
Tables s906.
data : int1 type i.
select single * from s906 into s906 where bstnk = 'SY05'.
if sy-subrc = 0.
int1 = s906-aemenge . (s906-aemeng = 12.000)
BREAK-POINT.
endif.
The table 'S906' is a info structure of SO . It collect the quantity of one matiral in all SO when a SO create.
The 'aemenge' is the SO item quantity to base unit.
The field is 'P'.
When I create a test programe by SE38, the 'int1' is 12.
When I add the code to 'MV45AFZZ' which is a userexit for SO save event , the 'int1' is 12000.
SAME CODE.
Help.plz.The fact is .....
In 'MV45AFZZ'
data int1 type i.
p1 type p decimals 3.
p1 = 12.
int1 = p1.'
the result is 'int1 = 0.012'.
But in my test prograem
The result is 12. -
ICS Provided timezone converting incorrectly in iCal
I'm attempting to use a CalDav data source and the source application timezone doesn't seem to be arriving in iCal correctly. For example, a timezone of "US/Eastern" in the source application appears as "Eastern Standard Time" in iCal. Syncing the same CalDAV calendar on my iPhone works correctly. Here is a sample of the ICS data that is coming across the network during a CalDAV sync.
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Starfield Technologies, Inc.//Stg GCal//3.1.09_caldav r7160//EN
METHOD:REQUEST
X-WR-CALNAME:Calendar
X-APPLE-CALENDAR-COLOR:
X-PUBLISHED-TTL:PT30M
X-WR-CALDESCRIPTION:Calendar
X-LIC-LOCATION:
X-WR-TIMEZONE:
BEGIN:VTIMEZONE
TZID:US/Eastern
BEGIN:STANDARD
TZNAME:US/Eastern
TZOFFSETFROM:-0500
TZOFFSETTO:-0500
DTSTART:19700101T000000
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:US/Eastern
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
DTSTART:19700101T000000
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:daylighttime0000000001
DTSTAMP:20100324T164601Z
DTSTART;TZID=US/Eastern:20100330T120000
DTEND;TZID=US/Eastern:20100330T123000
SUMMARY:Daylight Time
DESCRIPTION:
LOCATION:
SEQUENCE:0
CREATED:20100324T164133Z
LAST-MODIFIED:20100324T164133Z
STATUS:CONFIRMED
TRANSP:OPAQUE
CLASS:PUBLIC
END:VEVENT
BEGIN:VEVENT
UID:standardtime0000000001
DTSTAMP:20100324T164601Z
DTSTART;TZID=US/Eastern:20100302T120000
DTEND;TZID=US/Eastern:20100302T123000
SUMMARY:Standard Time
DESCRIPTION:
LOCATION:
SEQUENCE:0
CREATED:20100324T164239Z
LAST-MODIFIED:20100324T164239Z
STATUS:CONFIRMED
TRANSP:OPAQUE
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR
When syncing this into iCal with timezone support enabled and the timezone set to Mountain Standard Time these events show up at 10am (two hour offset) and should be 10am in standard and 9am in daylight. When iCal is set to Pacific time the events show up at 9am in standard and 10am in daylight when they should both be showing 9am.
So, is this a problem with the ICS data that's coming across or iCal's interpretation of the timezone name? The fact that this same ICS data appears correctly on the iPhone and in Google's calendar leads me to believe that iCal is doing something incorrectly.I have experienced the same problem Seems to be a mail issue rather than an ical issue as any import into ical other than double clicking in mail (or automatically importing) works fine. I have totally reinstalled OS 10.8 ( and dealth with the resulting challenges of getting everything synced back up again) and the problem has resurfaced within 24 hours
Thanks for the drag and drop solution. I had been accepting on my iphone or ipad to avoid the issue. -
Word.doc converting incorrectly...
I have tried to covert my Word.doc to a .pdf file twice using
the Adobe PDF Online and both times it chaged information on my
document. I want to purchase the monthly subscription but I need
for it to work. Could you please tell me if I'm doing something
wrong the reason my documents aren't converting correctly.Hi pamelcello,
Here is a small snippet from the Buzzword FAQ about some of
the fonts.
[snip]
Built-in fonts make sure everyone has the same fonts, and
therefore sees exactly the same document.
We want to limit the size of the download so that the user is
up and running quickly. To that end we're only downloading 7 font
families to start. In future releases, we'll look at accommodating
additional fonts without impacting the download times.
[snip]
There currently isn't a way for users to customize their font
list, but keep checking in the future for more options!
cheers,
Pete -
Sales BOM - Delivery Quantity check during post goods issue
I am working on a problem in my company. We are running ECC6.0 ehp 4. We are using standard ERLA functionality with sales bom (5) for product kits. Delivery manager has requested that we investigate a system check during delivery post goods issue. THe problem is that when shipper processes delivery, if they have to backorder they update pick and delivery quanity on the TAE item. They should also update TAQ delivery quantity, so that backorder amount is correct. If they make data entry error, backorder quantity is incorrect. The delivery manager has tried a number of attempts to re-train and correct mistakes. He is now asking that SAP issue a hard error if TAQ and TAE delivery item quantities are not the same.
I have searched on SAP Notes, Forms, and Google and do not see solution. I know that at delviery item category there is a minimum qty check for the item category. I've not found a user exit or configuration point that checks quanities. Does anyone know of out of the box solution? Or where would I put in custom user exit?
Test Case
Create Standard Order
Enter Material with Sales BOM
ITEM A Qty 10
BOM explodes with Item categories
ITEM A TAQ parent
ITEM B TAE child
Create Delivery
Delivery has item categories TAQ and TAE
TAE is pickable, TAQ no pick
Process TAE
Pick quantity of 5 items
Change delivery quantity to 5 items
Forget to change TAQ delivery quantity
Pack 5 items
Post Goods Issue the delivery.
Is there are requirement/routine than can be run at time of PGI that checks TAQ delivery quantity is the same as TAE delivery quantity. If quanities are not the same, show hard error and message do not allow PGI to complete.
Thank you
Tony RomainI tried setting that field in the sale order this morning. By defaulting it to "C"; I was able to get warning message for TAE line. I was able to post goods with TAE and TAQ, being different quantities. I need the check to determine if TAE and TAQ delivery quantity are different. Using this fields seems to be line specific. Thanks for the suggestion. I now know what that field does to the delivery.
I rewarded points.
Thanks,
Tony -
Jsp newbie - quantity*price=�total - help!
Hi, im new to jsp and have made a few pages, and can display them using Tomcat, ive made a page counter and managed some validation of a form, but i cannot get this to work:
i have a form where you can select a product, then type in the price and quantity, so when you press order, it should display a page showing you what you chose and the total cost, (tryin to also use dp2??) , but im gettin in a right mess! i have ziped the two pages here: http://www.severnvalebathrooms.co.uk/ordermarbrex.zip
if someone could have a look, any help would be great!
thankswhat level feedback do you have on your server.
look at variable names,
you have:
<%
String quantity = request.getParameter( "quantity" );
String price = request.getParameter( "price" );
// Create a convert for 2 decimal places
java.text.DecimalFormat dp2
= new java.text.DecimalFormat( "�#,##0.00" );
// convert a string to type int
int quantity = Integer.parseInt( quantity );
// convert a string to type double
double price = Double.parseDouble( price );
String strips = request.getParameter( "strips" );
String whofor = request.getParameter( "whofor" );
String bluemosaic = request.getParameter( "bluemosaic" );
String greenmosaic = request.getParameter( "greenmosaic" );
String beigemarble = request.getParameter( "beigemarble" );
String delivery = request.getParameter( "delivery" );
if( bluemosaic == null ) bluemosaic = "";
if( greenmosaic == null ) greenmosaic = "";
if( beigemarble == null ) beigemarble = "";
%> you should have like;
<%
String quantity = request.getParameter( "quantity" );
String price = request.getParameter( "price" );
// Create a convert for 2 decimal places
java.text.DecimalFormat dp2
= new java.text.DecimalFormat( "�#,##0.00" );
// convert a string to type int
int quantities = Integer.parseInt( quantity );
// convert a string to type double
double dPrice = Double.parseDouble( price );
String strips = request.getParameter( "strips" );
String whofor = request.getParameter( "whofor" );
String bluemosaic = request.getParameter( "bluemosaic" );
String greenmosaic = request.getParameter( "greenmosaic" );
String beigemarble = request.getParameter( "beigemarble" );
String delivery = request.getParameter( "delivery" );
if( bluemosaic == null ) bluemosaic = "";
if( greenmosaic == null ) greenmosaic = "";
if( beigemarble == null ) beigemarble = "";
%> then change output vars to reflect this at bottom of page.
also i would do some checking of input vars
try calling this;
process_marbrex.jsp?quantity=xyzkind regards,
g00fy -
Quantity conversion fault in conditions
Dear all,
with pricing procedure iam getting the price of the material in purchase order.
for a p.o of 100 quantity the price is coming as the total for 100 quantity but iam getting a price like XXXXX and quantity 1 pc.
we are able to save the document.what would be the fault why we are not getting the quantity converted in conditions.
Regards
KrisHi
In M/06 for your condition type check what is there in scales tab. It needs to be quantity based.
Regards
Antony -
Negetive Commited Quantity showing
Hi to All,
I am using SAP B1 2005 B PL 25.
I have noticed that there is one item in item master which is showing negetive value in committed. I have checked Inventory in Warehouse Report. when I moved to committed, it is showing negetive.
Can anybody has idea for this or can any body guide me to resolve this ?
Warm Regards,
Chintesh SoniHi Chintesh,
Incorrect negative committed quantities was a common problem with many of my clients when they were on the old 2005 version.
If the quantity is incorrect (sometimes it should be a negative quantity as explained by the posts above) then you can run a routine to recalculate the stock balance.
If I remember in 2005 it is in Administration / Utilities / Restore / Restore Item Balances.
Enter your offending stock item number in the from and to field and click OK.
This should then correct the negative quantity. Please ensure you backup your database first.
Regards,
Adrian -
Total Quantity generated from Process Order
Dear Experts,
Can you help me on how to find the total quantity generated from process order.
Example: I want to see for a particular material what is the total quantity converted in COR6N for a particular period.
ThanksGot the report from COOISPI items list. Thanks
-
Purchase Orders without prices
Hi,
I' m creating Purchase orders using code, this is ok, but, when check in the puchase orders forms and find the document, the column price is not setting and in the DB (table POR1) the price column is setting. The code is:
SAPbobsCOM.Documents oDocuments = null;
oDocuments = (SAPbobsCOM.Documents)SAP_Utils.company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders);
oDocuments.CardCode = mRow["Proveedor"].ToString();
oDocuments.DocTotal = Convert.ToDouble(mRow["Cantidad"]) * Convert.ToDouble(mRow["Precio"]);
oDocuments.DocDate = DateTime.Now;
oDocuments.Lines.ItemCode = mRow["Producto"].ToString();
oDocuments.Lines.Quantity = Convert.ToDouble(mRow["Cantidad"]);
oDocuments.Lines.Price = Convert.ToDouble(mRow["Precio"]);
oDocuments.Lines.Currency = mRow["Moneda"].ToString();
oDocuments.Lines.WarehouseCode = mRow["Bodega"].ToString();
oDocuments.Lines.LineTotal = Convert.ToDouble(mRow["Cantidad"]) * Convert.ToDouble(mRow["Precio"]);
oDocuments.Lines.BaseEntry= 0;
oDocuments.Lines.BaseLine= 0;
iReturn = oDocuments.Add();
What is the problem?
tks for your help..Hi Ian,
It's true that we can get the decimal places setting of company database using sbobobscom. But the problem I'm facing is not that.
Let me give you an example to show you the incorrect total that I mentioned:
If you create a Goods Receipt:
1. Item A with qty=1000 with unitPrice= $1.7755
Note: Decimal places for Prices is set to 3.
So, if i enter the unit price and quantity, i will end up getting the total = $1,776
(because unitprice is $1.7760 instead of $1.7755)
And it's not correct because I should actually get the total = $1,775.50.
And that's the reason why I want to enter Total instead of unitPrice so that I can have total = $1,775.50.
This is really confusing, because the rounding method of the system is different between SBO2004 and SBO2005.
In 2004, if you set the decimal places to 3, even when you enter value with more than 3digits after decimal point, it will still save the whole number but only show 3digits after decimal point.
However in 2005, it will save and show 3digits after decimal point.
cheers
erwine -
How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F
hello there !!!!
i m in Great Trouble please help me out..
i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
Try
Dim Count As Int32
If FormUID.Equals("Allowance") Then
If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
If pVal.Row = 0 Then
'BubbleEvent = False
End If
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
Count = o_Matrix.RowCount()
SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
Validate(pVal, EventEnum, FormUID, BubbleEvent)
End If
End If
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
Dim Row, ii As Integer
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
o_Matrix.FlushToDataSource()
Try
For Row = 2 To o_Matrix.RowCount
StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit Sub
End If
For ii = Row To DBtable.Rows.Count - 1
If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
BubbleEvent = False
Exit Sub
End If
Next
If CDbl(StrName) < 0 Then
SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit Sub
End If
End If
Next Row
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End SubHello there
sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
here is my Sample Code...n i have to update in the validate portion...
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
Try
Dim oCellValue As SAPbouiCOM.EditText
If FormUID.Equals("Allowance") Then
If (pVal.ItemUID = "MatAllow") Then
If pVal.Row = 0 Then Exit Sub
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
oForm = SBO_Application1.Forms.Item(FormUID)
If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
If pVal.Row = 0 Then Exit Sub
oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
oCellValue.Active = True
BubbleEvent = False
Exit Sub
End If
End If
End If
End If
End If
Validate(pVal, EventEnum, FormUID, BubbleEvent)
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
Dim str, str1 As String
Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
Dim o_Matrix As SAPbouiCOM.Matrix
Dim Sum As Integer
Dim oRecordset As SAPbobsCOM.Recordset
Dim Container As Integer
Dim Count As Int32
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Try
For Count = 0 To DBtable.Rows.Count - 1
CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
Dim Sql As String
Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
oRecordset.DoQuery(Sql)
End If
Next Count
SBO_Application1.MessageBox("Record was Updated")
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub -
Como generar una factura de clientes con lotes
Como Generar Una factura de Clientes con lotes, es Decir buscas? Busca otros Una Lista de Materiales Con Todos SUS Hijos, Tener pecado Una generada Orden de venta.
Mi codigo es el siguiente, en solitario ingreso CUANDO Que El artículo De Una Lista de Materiales no me géneros la factura.
Espero me puedan Ayudar.
Consulta_SAP = new SqlDataAdapter ("SELECT Código como Código DESDE DONDE ITT1 Padre = '" + artículo + "'", DB_SAP);
Datos_SAP = new DataTable ();
Consulta_SAP.Fill (Datos_SAP);
cadena codigo_ = "";
codigo_ = Datos_SAP.Rows [0] [0] .ToString ();
for (int y = 0; y <Datos_SAP.Rows.Count; y ++)
dg_items.Rows.Add (Datos_SAP.Rows [y] [0] .ToString ());
for (int n = 0; n <dg_items.Rows.Count; n ++)
items_hjos = Convert.ToString (dg_items.Rows [n] .Cells [0] .Value.ToString ());
Facturas.Lines.SetCurrentLine (c);
Facturas.Lines.BatchNumbers.InternalSerialNumber = "67";
Facturas.Series = Convert.ToInt32 ("49");
Facturas.CardCode = CI;
Facturas.DocCurrency = "$";
Facturas.Lines.Address = direccion;
Facturas.UserFields.Fields.Item ("U_Orden") Valor = "Reto" + + reto ".";
Facturas.Lines.Quantity = 1;
Facturas.Lines.TaxCode = "IVAP16";
Facturas.Lines.BatchNumbers.BatchNumber = "145134514000396";
Facturas.Lines.BatchNumbers.Quantity = Convert.ToDouble ("1.0");
Facturas.Lines.BatchNumbers.SetCurrentLine (0);
Facturas.Lines.BatchNumbers.Add ();
Facturas.Lines.Add ();
c = c + 1;Hola
Nuevamente gracias por tu respuesta
La nota que mencionas la he revisado junto con otras varias, te cuento como me fue con estas
El cambio de estatus solo esta habilitado para las facturas de deudores que no son de anticipo, esto lo que me permite es hacer la nota de crédito de esa factura y así cancelar el pago recibido de la factura de Anticipo y esto me libera una parte del Anticipo,
Ahora al tratar de hacer la nota de crédito de la factura de Anticipo el sistema invierte los importes, donde el total aplicado de la factura se convierte en el total pendiente en la nota de crédito,
FACT
Total Pendiente 970 (DEL PAGO CANCELADO)
Total aplicado 30
NOTA DE CRÉDITO
Total Pendiente 30
Total aplicado 970 (DEL PAGO CANCELADO)
Esto es lo que me tiene detenida :s
Saludos -
Derive method of characteristic relationship with exit class BI IP
Hi All,
We have below four fileds in real time planning cube.
Quantity
Unit of measure
Converted Quantity
Converted UOM
We have implemented characteristic relationship of type exit between UOM and converted UOM. We need to populate values of converted UOM using characteristic relationship.
do we need to implement derive method to fulfil this requirement ?
if yes, when derive method of exit class is getting called ?
Awaiting for your reply.
Regards,
Mitesh.Hi Andrey,
Thanks for your reply.
I have tried approach suggested by you however break-point did not stop yet to derive method.
I will give little more details on what i have implemented, probably it may help you.
I implemented CREATE method and generated below combinations. No other method has been implemented yet.
UOM Converted UOM
G KG
KG G
clear ls_unit.
ls_unit-unit = 'G'.
ls_unit-unit1 = 'KG'.
APPEND ls_unit to lt_unit.
clear ls_unit.
ls_unit-unit = 'KG'.
ls_unit-unit1 = 'G'.
APPEND ls_unit to lt_unit.
E_TH_CHAS = lt_unit[] .
Kindly suggest,
1. any specific configuration at query level is required to call derive method
2. what code should i need to write if i want to derive above combination using derive method
Thanks,
Mitesh. -
How to connect an early 2009 MacBook Pro to a TV via HDMI
I have the cables and adapter but am only getting one image when all is hooked up.......what else need I do?
I've seen youtube instructions but I seem to lack the "arrangement menu under the "displays" preference.......
Is this MacBook unable to run to a TV with HDMI plug?Hi mate,
Two options - either turn on mirroring in the Displays Preference panel, or have a look at the arrangement section of that panel, you should see the second monitor positioned in relation to the laptop monitor - it's "extending" the desktop - move a window from your main monitor towards the second monitor's relative location as shown and you should see it appear on your TV.
If you start your movie (DVD player or whatever) in window mode, move the window to the second monitor, then make it fullscreen - it should fill your TV and play there. You may need to muck around with the aspect ratio (16:9, 16:10 or 4.3 depending on your source) to get it right on the second display. VLC does this nicely especially if your source was converted incorrectly.
Also tick the box to display the monitor settings in your menu bar - it's handy IMO.
hth
Papa -
Newbie needing help with code numbers and if-else
I'm 100% new to any kind of programming and in my 4th week of an Intro to Java class. It's also an on-line class so my helpful resources are quite limited. I have spent close to 10 hours on my class project working out P-code and the java code itself, but I'm having some difficulty because the project seems to be much more advanced that the examples in the book that appear to only be partly directly related to this assignment. I have finally come to a point where I am unable to fix the mistakes that still show up. I'm not trying to get anyone to do my assignment for me, I'm only trying to get some help on what I'm missing. I want to learn, not cheat.
Okay, I have an assignment that, in a nutshell, is a cash register. JOptionPane prompts the user to enter a product code that represents a product with a specific price. Another box asks for the quanity then displays the cost, tax and then the total amount plus tax, formatted in dollars and cents. It then repeats until a sentinel of "999" is entered, and then another box displays the total items sold for the day, amount of merchandise sold, tax charged, and the total amount acquired for the day. If a non-valid code is entered, I should prompt the user to try again.
I have this down to 6 errors, with one of the errors being the same error 5 times. Here are the errors:
C:\PROGRA~1\XINOXS~1\JCREAT~1\MyProjects\Sales.java:50: 'else' without 'if'
else //if invalid code entered, output message
^
C:\PROGRA~1\XINOXS~1\JCREAT~1\MyProjects\Sales.java:39: unexpected type
required: variable
found : value
100 = 2.98;
^
C:\PROGRA~1\XINOXS~1\JCREAT~1\MyProjects\Sales.java:41: unexpected type
required: variable
found : value
200 = 4.50;
^
C:\PROGRA~1\XINOXS~1\JCREAT~1\MyProjects\Sales.java:43: unexpected type
required: variable
found : value
300 = 6.79;
^
C:\PROGRA~1\XINOXS~1\JCREAT~1\MyProjects\Sales.java:45: unexpected type
required: variable
found : value
400 = 5.29;
^
C:\PROGRA~1\XINOXS~1\JCREAT~1\MyProjects\Sales.java:47: unexpected type
required: variable
found : value
500 = 7.20;
^
And finally, here is my code. Please be gentle with the criticism. I've really put a lot into it and would appreciate any help. Thanks in advance.
import java.text.NumberFormat; // class for numeric formating from page 178
import javax.swing.JOptionPane; // class for JOptionOPane
public class Sales {
//main method begins execution ofJava Application
public static void main( String args[] )
double quantity; // total of items purchased
double tax; // total of tax
double value; // total cost of all items before tax
double total; // total of items including tax
double totValue; // daily value counter
double totTax; // daily tax counter
double totTotal; // daily total amount collected (+tax) counter
double item; //
String input; // user-entered value
String output; // output string
String itemString; // item code entered by user
String quantityString; // quantity entered by user
// initialization phase
quantity = 0; // initialize counter for items purchased
// get first code from user
itemString = JOptionPane.showInputDialog(
"Enter item code:" );
// convert itemString to double
item = Double.parseDouble ( itemString );
// loop until sentinel value read from user
while ( item != 999 ) {
// converting code to amount using if statements
if ( item == 100 )
100 = 2.98;
if ( item == 200 )
200 = 4.50;
if ( item == 300 )
300 = 6.79;
if ( item == 400 )
400 = 5.29;
if ( item == 500 )
500 = 7.20;
else //if invalid code entered, output message
JOptionPane.showMessageDialog( null, "Invalid code entered, please try again!",
"Item Code", JOptionPane.INFORMATION_MESSAGE );
} // end if
} // end while
// get quantity of item user
itemString = JOptionPane.showInputDialog(
"Enter quantity:" );
// convert quantityString to int
quantity = Double.parseDouble ( quantityString );
// add quantity to quantity
quantity = quantity + quantity;
// calculation time! value
value = quantity * item;
// calc tax
tax = value * .07;
// calc total
total = tax + value;
//add totals to counter
totValue = totValue + value;
totTax = totTax + tax;
totTotal = totTotal + total;
// display the results of purchase
JOptionPane.showMessageDialog( null, "Amount: " + value +
"\nTax: " + tax + "\nTotal: " + total, "Sale", JOptionPane.INFORMATION_MESSAGE );
// get next code from user
itemString = JOptionPane.showInputDialog(
"Enter item code:" );
// If sentinel value reached
if ( item == 999 ) {
// display the daily totals
JOptionPane.showMessageDialog( null, "Total amount of items sold today: " + quantity +
"\nValue of ites sold today: " + totValue + "\nTotal tax collected today: " + totTax +
"\nTotal Amount collected today: " + totTotal, "Totals", JOptionPane.INFORMATION_MESSAGE );
System.exit( 0 ); // terminate application
} // end sentinel
} // end message
} // end class SalesHere you go. I haven't tested this but it does compile. I've put in a 'few helpful hints'.
import java.text.NumberFormat; // class for numeric formating from page 178
import javax.swing.JOptionPane; // class for JOptionOPane
public class TestTextFind {
//main method begins execution ofJava Application
public static void main( String args[] )
double quantity; // total of items purchased
double tax; // total of tax
double value; // total cost of all items before tax
double total; // total of items including tax
// double totValue; // daily value counter
// double totTax; // daily tax counter
// double totTotal; // daily total amount collected (+tax) counter
// Always initialise your numbers unless you have a good reason not too
double totValue = 0; // daily value counter
double totTax = 0; // daily tax counter
double totTotal = 0; // daily total amount collected (+tax) counter
double itemCode;
double item = 0;
String itemCodeString; // item code entered by user
String quantityString; // quantity entered by user
// initialization phase
quantity = 0; // initialize counter for items purchased
// get first code from user
itemCodeString = JOptionPane.showInputDialog("Enter item code:" );
// convert itemString to double
itemCode = Double.parseDouble ( itemCodeString );
// loop until sentinel value read from user
while ( itemCode != 999 ) {
* 1. variable item mightnot have been initialised
* You had item and itemCode the wrong way round.
* You are supposed to be checking itemCode but setting the value
* for item
// converting code to amount using if statements
if ( item == 100 )
{itemCode = 2.98;}
else if ( item == 200 )
{itemCode = 4.50;}
else if ( item == 300 )
{itemCode = 6.79;}
else if ( item == 400 )
{itemCode = 5.29;}
else if ( item == 500 )
{itemCode = 7.20;}
else {//if invalid code entered, output message
JOptionPane.showMessageDialog( null, "Invalid code entered, please try again!",
"Item Code", JOptionPane.INFORMATION_MESSAGE );
} // end if
} // end while
// get quantity of item user
itemCodeString = JOptionPane.showInputDialog("Enter quantity:" );
* 2.
* You have declared quantityString here but you never give it a value.
* I think this should be itemCodeString shouldnt it???
* Or should you change itemCodeString above to quantityString?
// convert quantityString to int
// quantity = Double.parseDouble ( quantityString ); // old code
quantity = Double.parseDouble ( itemCodeString );
// add quantity to quantity
quantity = quantity + quantity;
// calculation time! value
value = quantity * itemCode;
// calc tax
tax = value * .07;
// calc total
total = tax + value;
//add totals to counter
* 3. 4. and 5.
* With the following you have not assigned the 'total' variables a value
* so in effect you are saying eg. "total = null + 10". Thats why an error is
* raised. If you look at your declaration i have assigned them an initial
* value of 0.
totValue = totValue + value;
totTax = totTax + tax;
totTotal = totTotal + total;
// display the results of purchase
JOptionPane.showMessageDialog( null, "Amount: " + value +
"\nTax: " + tax + "\nTotal: " + total, "Sale", JOptionPane.INFORMATION_MESSAGE );
// get next code from user
itemCodeString = JOptionPane.showInputDialog("Enter item code:" );
// If sentinel value reached
if ( itemCode == 999 ) {
// display the daily totals
JOptionPane.showMessageDialog( null, "Total amount of items sold today: " + quantity +
"\nValue of ites sold today: " + totValue + "\nTotal tax collected today: " + totTax +
"\nTotal Amount collected today: " + totTotal, "Totals", JOptionPane.INFORMATION_MESSAGE );
System.exit( 0 ); // terminate application
} // end sentinel
} // end message
} // end class SalesRob.
Maybe you are looking for
-
Urgent help: How to remove the accumaltion when show movies step by step with buttons
I want to show the movie step by step by clicking the next button. Inside each frame, many movie clips are generated dynamically at runtime, and they can be played interactively. I achieves the step-by-step display of those frames by adding another l
-
Change content-disposition in email attachment
I am using apex_mail (in Apex 4.1) to send emails with an attachment. v_mail_id := apex_mail.send( p_to => '[email protected]' ...etc... apex_mail.add_attachment( p_mail_id => v_mail_id ,p_attachment =>
-
ITunes will not Sync song to iPhones 4s
Hey there, I'm pretty new here but I'm an having an issue. I just downloaded "remind me- Brad Paisley" and attempted to sync it to my iPhone 4s, when I plugged it in but for some reason it doesn't give me an error or anything, it just doesn't show up
-
Problem in executing User Decision Step in Background
Hi Gurus, I have written a method which is called in background activity step to execute a User decision step. I have used SAP_WAPI_DECISION_COMPLETE fm and have given the value for parameters like Workitem ID , Decision Key. So the problem is wh
-
hi, I have two questions: 1) I have a document in folder /public/docs and i want to read its contents from a jsp file. The only method i found in the javadoc is getDocumentContent that returns an InputStream. Still, it requires as a parameter a Docum