ODLN DOCTOTAL
how can i get total of delivery in query??
system info of total =form 140,item =29,variable =14.
Hello ,
Try this
Select T2.DocNum, SUM (T1.Price*T1.Quantity) 'Row _Total', T2.DocDotal
From ODLN T2 INNER JOIN DLN1 T1 ON T2.DocEntry=T1.DocEntry
INNER JOIN RDR1 T0 ON T0.DocEntry=T1.BaseEntry AND T0.LineNum=T1.BaseLine
WHERE T2.DocNum = '[%0]'
GROUP BY T2.DocNum, T2.DocTotal
Regards:
Balaji
Edited by: Balaji Selvaraj on Mar 6, 2012 10:34 AM
Edited by: Balaji Selvaraj on Mar 6, 2012 10:35 AM
Similar Messages
-
Hi,
I'm having trouble getting the correct serial numbers via SQL.
From PHP I run the following query to get the Delivery Notes:
select ODLN.DocEntry,ODLN.CardCode,ODLN.CardName,ODLN.DocDueDate,ODLN.DocDate,ODLN.NumAtCard,NNM1.SeriesName,ODLN.DocNum,ODLN.SlpCode,ODLN.CANCELED,ODLN.DocStatus,DLN1.ItemCode,DLN1.Dscription,DLN1.Quantity,DLN1.ShipDate,DLN1.LineStatus,ODLN.NumAtCard,ODLN.U_CodSit,ODLN.DocTotal,ODLN.DocCur,ODLN.CreateDate,ODLN.TrackNo,DLN1.SerialNum from ODLN INNER JOIN NNM1 ON (ODLN.Series = NNM1.Series) INNER JOIN OCRD ON (ODLN.CardCode = OCRD.CardCode AND OCRD.CardCode = '".$_POST["sapcode"]."' AND OCRD.Password = '".$_POST["sappwd"]."') INNER JOIN DLN1 ON ODLN.DocEntry = DLN1.DocEntry ORDER BY ODLN.CreateDate DESC,ODLN.DocEntry ASC
While I loop through the results I then try to grab the serial numbers. I tried this:
SELECT OSRI.IntrSerial FROM OSRI INNER JOIN SRI1 ON ( (SRI1.SysSerial = OSRI.SysSerial) AND (SRI1.BaseNum = ".$row['DocNum'].") ) INNER JOIN DLN1 ON (DLN1.DocEntry = SRI1.BaseEntry) WHERE ( (DLN1.DocEntry = ".$row['DocEntry'].") AND (DLN1.ItemCode = OSRI.ItemCode) AND (DLN1.ItemCode = '".$row['ItemCode']."') ) ORDER BY OSRI.IntrSerial
but it gives me incoherent results compared to what appears in the SAP b1 client. For ex., some serial numbers are fine but in other cases I get more serial numbers than accounted for (article quantity = 1 but get 2 serial numbers; in SAP B1 client only one of the two serial numbers appears, as expected).
So I then modified the query and added a check for the CardCode:
SELECT OSRI.IntrSerial FROM OSRI INNER JOIN SRI1 ON ( (SRI1.SysSerial = OSRI.SysSerial) AND (SRI1.BaseNum = ".$row['DocNum'].") AND (SRI1.CardCode = '".$_POST["sapcode"]."') ) INNER JOIN DLN1 ON (DLN1.DocEntry = SRI1.BaseEntry) WHERE ( (OSRI.CardCode = '".$_POST["sapcode"]."') AND (DLN1.DocEntry = ".$row['DocEntry'].") AND (DLN1.ItemCode = OSRI.ItemCode) AND (DLN1.ItemCode = '".$row['ItemCode']."') ) ORDER BY OSRI.IntrSerial
This query is slightly better in the sense that at least I don't get serial numbers that are not supposed to be there (eg. if quantity=1 I will not get 2 serial numbers as in the previous query). However, in some cases it works as expected and in other delivery notes it doesn't because it simply doesn't list the serial numbers (which where found in the first query).
It might be because the CardCode field isn't always thoroughly set?
If so, is it just a "user problem" so I should tell my company to review the way they fill SAP data?
Or am I doing the wrong query?
(The SDK doc regarding OSRI is confusing as it doesn't even point to SRI1 and I don't fully understand the relationships)
Regards,
VieriVieri,
you can catch (using MS SQL Profiler) the query which is executed by SBO once you click on serial nambers report from Delivery Note form.
this is one of the ways to get a solution quickly. -
Approval Query for Prepaid customers
Hi, I need help with a query. I want an approval screen to pop up when a user tries to add a delivery for a prepaid customer and the customer has not paid. The following query get me a "Could not commit transaction" error.
In our system, customers with prepaid terms have -1 in the GroupNum field.
SELECT Distinct 'TRUE' From OCRD T0 INNER JOIN ODLN T1 ON T0.CardCode = T1.CardCode WHERE $[OCRD.GroupNum] LIKE '-%' AND $[OCRD.Balance] + $[ODLN.DocTotal] <= 0
Any help would be appreciated. ThanksHi,
Try this:
SELECT Distinct 'TRUE'
From OCRD T0
WHERE T0.CardCode = $[ODLN.CardCode] AND T0.GroupNum <0
AND T0.Balance + $[ODLN.DocTotal] <= 0
Thanks,
Gordon -
Actualizar el doctotal del la orden de venta
Estimados Sres. como puedo actualizar el doctotal de la orden de venta con las facturas acutalizadas de esa venta.
saludos,
graciasHola
Prueba con esta query
SELECT T1.DocNum '# OV', T1.CardName, T0.ItemCode, T0.Quantity 'OV Cant', T0.Dscription, T3.DocNum '# Entrega', T2.Quantity,
T5.DocNum '# Factura', t4.quantity, t8.docnum '# NCredito', -t7.quantity
FROM dbo.RDR1 T0
INNER JOIN dbo.OITW T6 ON T6.ItemCode = T0.ItemCode AND T6.WhsCOde = T0.WhsCode
INNER JOIN dbo.ORDR T1 ON T1.DocEntry = T0.DocEntry
LEFT JOIN dbo.DLN1 T2 ON T2.BaseEntry = T0.DocEntry AND T2.BaseLine = T0.LineNum
LEFT JOIN dbo.ODLN T3 ON T2.DocEntry = T3.DocEntry
LEFT JOIN dbo.INV1 t4 on t4.BaseEntry = t2.DocEntry and t4.BaseLine = t2.LineNum
LEFT JOIN dbo.OINV t5 on t4.DocEntry = t5.DocEntry
LEFT JOIN dbo.RIN1 t7 on t7.BaseEntry = t4.DocEntry and t7.BaseLine =t4.LineNum
LEFT JOIN dbo.ORIN t8 on t7.DocEntry = t8.DocEntry
WHERE T1.DocDate between '[%0]' and '[%1]'
Slds
PD: no olvides calificar las respuestas -
DocTotal in words Crystal Report
Hello,
I am trying to convert DocTotal field into words and not able to do so. Please advise a formula which an help me to get the doctotal in words in Purchase Order Crystal Report Layout
For example by doctotal is 22,750.00 so I want the amount in words as
Twenty Two Thousand Seven Hundred Fifty US Dollors & Zero cents.
Please advise.
Kind Regards,
RaviHi Ravi,
Use this :
numbervar RmVal:=0;
numbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="Rupees ";
Amt := <Enter your value here or Pass field here>
if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
Amt := Amt - Rmval * 10000000;
if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " lakhs"
Else
If RmVal > 1 then InWords := InWords + " " + ToWords(RmVal,0) + "Lakhs";
Amt := Amt - Rmval * 100000;
if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);
pAmt := (Amt - truncate(Amt)) * 100;
if pAmt > 0 then
InWords := InWords + " and " + towords(pAmt,0) + " paisa only"
else
InWords := InWords + " only";
UPPERCASE(InWords) -
How to get the numeric value of DocTotal from UI API
When I hit the ADD button I need to get the DocTotal from the UI API !
All I have is the EditText which gives it in string and the problem is to double.Parse it
it's a pain to do it while there is CultureInfo related issue with it.
So It would be wise to get the numeric value directly from the UI API instead of getting the DocTotal by string and trying to convert it. So is there any way to get the numrci value of DocTotal from UI API ?Hello Marc,
Here is a function which considering the Culture Info and always working. You can speed it up by using extending admininfo to global vairables, and loading the values at startup of the addon.
Use the oEditText.value.ToString() to convert into into the doulbe number:
Public Function _string2double(ByVal s As String) As Double
Dim d As Double
' This part is fast, when regional settings equal to sap B1 settings:
Try
d = Convert.ToDouble(s)
d = Math.Round(d, 6)
Return d
Catch
End Try
' Speed up performance: extend CompaneService variables to global variables and query them at addon startup.
Try
Dim nfi As System.Globalization.NumberFormatInfo = System.Globalization.CultureInfo.CurrentCulture.NumberFormat
Dim oCompanyService As SAPbobsCOM.CompanyService = oCompany.GetCompanyService()
Dim oAdminInfo As SAPbobsCOM.AdminInfo = oCompanyService.GetAdminInfo()
Dim sbodsep As String = oAdminInfo.DecimalSeparator
Dim sbotsep As String = oAdminInfo.ThousandsSeparator
If s.IndexOf(Space(1)) > 0 Then
If oAdminInfo.DisplayCurrencyontheRight = BoYesNoEnum.tYES Then
s = s.Substring(0, s.IndexOf(Space(1)))
Else
s = s.Substring(s.IndexOf(Space(1)), s.Length - s.IndexOf(Space(1)))
End If
End If
Dim s1 As String = s.Replace(sbotsep, nfi.NumberGroupSeparator)
s1 = s1.Replace(sbodsep, nfi.NumberDecimalSeparator)
d = Convert.ToDouble(s)
d = Math.Round(d, 6)
Return d
Catch
Return 0
End Try
End Function
Regards,
J.
Edited by: János Nagy on Oct 7, 2009 8:55 AM -
SP01: DI error -5002 Invalid Total ORDR.DocTotal
Hi All,
i'm getting a strange error.
i'm adding a sales order via DI.
when the code is executed via the .net debugger it works great.
when i create an installer and install the Addon i receive the error:
-5002 Invalid Total [ORDR.DocTotal]
do someone ever had this kind of error?
btw i'm using SAPB12005A SP1 PL2
thanks
Moty MoshinHere is the code:
oNewOrder = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
'B1Connections.diCompany.StartTransaction()
Dim LinesAdded As Integer = 0
For i = 1 To intDupAmount
Try
' this loop adds the different items to the Delivery object
oNewOrder.CardCode = strBPCode
oNewOrder.Series = strSeriesCode
oNewOrder.NumAtCard = strVendorRefNo
oNewOrder.Project = strProjectCode
oNewOrder.ShipToCode = strShipToCode
oNewOrder.DocDueDate = strDocDueDate
oNewOrder.Comments = strComments
oNewOrder.PaymentGroupCode = strPaymentTerms
oNewOrder.PaymentMethod = strPaymentMethod
'Currently not available thru the DI/UI
'oNewOrder.header = OQUTHeader
'oNewOrder.Footer = OQUTFooter
Catch ex As Exception
B1Connections.theAppl.MessageBox("In For Step 1")
End Try
Try
oNewOrder.Lines.SetCurrentLine(0)
'Line item fields that are visible on the sales order form
oNewOrder.Lines.ItemCode = currSalesFormLines.ItemCode 'As String '1 'ItemCode
oNewOrder.Lines.ItemDescription = currSalesFormLines.ItemDesc 'As String '1 'ItemDesc
oNewOrder.Lines.WarehouseCode = currSalesFormLines.WhsCode 'As String '24 'WhsCode
oNewOrder.Lines.UnitPrice = currSalesFormLines.UnitPrice 'As Double '14 'UnitPrc
oNewOrder.Lines.DiscountPercent = currSalesFormLines.DiscPct 'As Double '14 'DiscPct
oNewOrder.Lines.Price = currSalesFormLines.Price 'As Double '17 'Price
oNewOrder.Lines.Quantity = currSalesFormLines.Quantity 'As Double '11 'Quantity
'Line item fields that are not visible on the sales order form
oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_EstQty).Value = currSalesFormLines.EstQty 'As Double 'U_XX_EstQty
'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_STCC).Value = currSalesFormLines.STCC.ToString 'As Double 'U_XX_STCC
'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_HSC).Value = currSalesFormLines.HSC 'As String 'U_XX_HSC
'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_CVal).Value = currSalesFormLines.CVal.ToString 'As Double 'U_XX_CVal
oNewOrder.Lines.TotalLc = currSalesFormLines.TotalLc 'As Double '21 'TotalLc
oNewOrder.Lines.Total()
oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_QtyMT).Value = currSalesFormLines.QtyMT 'As Double 'U_XX_QtyMT
oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_QtyST).Value = currSalesFormLines.QtyST 'As Double 'U_XX_QtyST
'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_DGood).Value = currSalesFormLines.DGood.ToString 'As String 'U_XX_DGood
Catch ex As Exception
B1Connections.theAppl.MessageBox("In For Step 2 - Lines")
End Try
Try
'Header level UDF's
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ConNum).Value = cLastUdfMD.ConNum
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ConTyp).Value = cLastUdfMD.ConTyp
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ConSta).Value = cLastUdfMD.ConSta
If cLastUdfMD.RefCon <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_RefCon).Value = cLastUdfMD.RefCon
End If
'Get Release number
'B1Connections.theAppl.MessageBox("Before Add Msg 2")
lngNextRelease = cReleaseNumber.GetNextNum(cUDinit.udoRn_ReleaseNumber, strSeries)
If lngNextRelease = -1 Then
B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack)
retVal = cReleaseNumber.UnLockNumbering(cUDinit.udoRn_ReleaseNumber, strSeries)
B1Connections.theAppl.MessageBox("Error - Cannot Get Next Number from NNM1")
Exit Sub
End If
releaseNumbers.Add(lngNextRelease)
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_RelNum).Value = lngNextRelease.ToString 'intRelNum
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ShDtSt).Value = cLastUdfMD.ShDtSt
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ShDtEn).Value = cLastUdfMD.ShDtEn
If cLastUdfMD.StrDt <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_StrDt).Value = cLastUdfMD.StrDt
End If
If cLastUdfMD.StrAmt <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_StrAmt).Value = cLastUdfMD.StrAmt
End If
If cLastUdfMD.AcrAmt <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_AcrAmt).Value = cLastUdfMD.AcrAmt
End If
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_CQTY).Value = cLastUdfMD.CQTY
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_LN).Value = cLastUdfMD.LN
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STerms).Value = cLastUdfMD.STerms
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Mode).Value = cLastUdfMD.Mode
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Carrier).Value = cLastUdfMD.Carrier
If cLastUdfMD.PortEntry <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_PtEnt).Value = cLastUdfMD.PortEntry
End If
If cLastUdfMD.CBrok <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_CBrok).Value = cLastUdfMD.CBrok
End If
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Fterm).Value = cLastUdfMD.FTerms
If cLastUdfMD.PriveEq <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_PrivEq).Value = cLastUdfMD.PriveEq
End If
If cLastUdfMD.Route <> "" Then
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Route).Value = cLastUdfMD.Route
End If
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_TF).Value = cLastUdfMD.TF
'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Season).Value = cLastUdfMD.Season
'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STCity).Value = cLastUdfMD.STCity
'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STCtr).Value = cLastUdfMD.STCtr
'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STSt).Value = cLastUdfMD.STSt
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_TAmtIn).Value = cLastUdfMD.TAmtIn
oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_TAmtOr).Value = cLastUdfMD.TAmtOr
Catch ex As Exception
B1Connections.theAppl.MessageBox("In For Step 3 - Header Level UDF")
End Try
' add sales order current quntity () from total (U_XX_TQTYR)
' add sales order current dollar value() from total (U_XX_TAMTR)
' Try to add the sales order object to the database
'B1Connections.theAppl.MessageBox("Before Add Msg 3")
lRetCode = oNewOrder.Add()
'B1Connections.theAppl.MessageBox("Before Add Msg 3.1")
If lRetCode <> 0 Then ' If the addition failed
B1Connections.diCompany.GetLastError(lErrCode, sErrMsg)
B1Connections.theAppl.MessageBox("Error - " & lErrCode & sErrMsg)
' B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack)
Try
B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack)
Catch ex As Exception
B1Connections.theAppl.MessageBox("Error - Add Error:" & lRetCode & " - " & ex.Message)
End Try
retVal = cReleaseNumber.UnLockNumbering(cUDinit.udoRn_ReleaseNumber, strSeries)
'B1Connections.diCompany.GetLastError(lErrCode, sErrMsg)
'B1Connections.theAppl.MessageBox("Error - " & lErrCode & sErrMsg)
Exit Sub
Else
End If
LinesAdded = LinesAdded + 1
' init the order object
oNewOrder = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
Next i
'B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_Commit)
retVal = cReleaseNumber.UnLockNumbering(cUDinit.udoRn_ReleaseNumber, strSeries) -
Add invoice from xml -- wrong vatsum -- wrong discount -- wrong doctotal
hi,
i save my invoice as a draft, save this draft as xml and then add my invoice.
The way until xml goes fine. But when i add the invoice the systems calculates wrong vatsums.In due to that there will be a discount on the document and a wrong doctotal.
When i adding my draft manually as invoice everything works well. Is this a bug? Does anybody know how to solve it?
oInvoice = moSBOCompany.GetBusinessObjectFromXML(sOLDTAXdraftFilename, 0)
oInvoice.DocumentsOwner = moSBOCompany.UserSignature 'empID
RetVal = oInvoice.Add
best regards
MarkusHi Markus,
Have you checked the information in the Xml file is correct?
Have you tried to create the same invoice with DI API without using xml?
If you are sure you are doing the same thing and the results are not the same please open a message for support, they will investigate it.
Regards
Trinidad. -
DTW invoice import - doctotal problem
I am trying to import purchase invoices through DTW, but having problem with the decimals. If I remove the decimals, the import goes fine, but the moment I put the decimals I get some error message. I have used "." as decimal separator, and 2 decimal places as configured in my company database.
I have also noticed this similar problem with importing goods issue with DTW.
Any ideas?
Thxx
VéroniqueVéronique,
When importing Purchase documents, you need not fill the Doctotal. The DocTotal is automatically calculated by the System.
Only enter the quantity and price on the lines.
Probably there is document rounding set and thats why you are getting the error.
Best wishes
Suda -
Sales Order with zero DocTotal
Is there anyway to create a Sales Order via DI-API with a zero DocTotal? In this application, the Sales Order will initially have only text lines imported from an external application. The actual inventory items will be added by customer service later, when the order is processed (based on the text lines).
The error that I'm getting is -5002: Invalid total ORDR.DocTotal. I can circumvent the error by adding a dummy item, but would prefer not to do this.
In the Authorizations for the DI-API login user, I have 'Documents with Zero Amounts' set for 'Full Authorization' in the 'Sales - A/R' section. I am able to create a zero order manually through the application. However, I'm unable to do so through DI-API.
This is on 2007A SP00 PL42.
Thanks,
Dave
Edited by: David Credicott on Jan 4, 2010 2:05 PMHello Dave,
It is possible. Maybe your code is coming from some invalid customizing settings...
for me working fine the following code:
Sub CreateSalesOrderWithZeroAmount()
Dim So As SAPbobsCOM.Documents = oCompany.GetBusinessObject(BoObjectTypes.oOrders)
So.CardCode = "CUSTOMERCODE"
So.DocDueDate = Today
So.SpecialLines.SetCurrentLine(0)
So.SpecialLines.LineType = BoDocSpecialLineType.dslt_Text
So.SpecialLines.AfterLineNumber = -1
So.SpecialLines.LineText = "TEST"
If So.Add <> 0 Then
sbo_application.MessageBox(String.Format("{0}-{1}", oCompany.GetLastErrorCode, oCompany.GetLastErrorDescription))
End If
End Sub
Regards,
J. -
Hi Is it possible show in ODLN PLD a written 'TOTAL AMOUNT IS:'...
Hi
Is it possible show in ODLN PLD a written 'TOTAL AMOUNT IS:' + (variable 91)
only when ODLN,peymethed is a well specified value.
Thanks,
marcoHi Fidel,
Thanks for your message but my problem is that I have 5 differents values for ODLN.peymethod and I want that a special written appear on delivery document only when 1 of above value peymethod is selected. In basic I'll wrote an istruction like:
If (ODLN.peymethod='my specified value')
THEN
variable XXX='TOTAL AMOUNT IS: '+string(VARIABLE 91)
else
variable XXX=' '
end if
could you help me to write something similar, valid for SAP PLD, to abtain a solution to my question.
Thanks -
Invalid total [ORDR.DocTotal] Error when loading sales order
Hi Experts,
Our cutomer hass upgraded to SAP B1 2007A from SAP B1 2005A.When the customer is trying to load data into salesorder object using our add-on we are getting the following error called "Invalid total [ORDR.DocTotal]" and also "Invalid BP Code" even though tthe corresponding Business partner is available.
Please help me in finding the issue. What may be the possible reason for this. This is a critical customer issue kindly help.
Regards,
Ranjani Sampath.Hi,
First of all check with the addon vendor whether the addon is compatible with 2007.
Some changes might be required in the Addon to be compatible with 2007 version.
If its your own addon kindly check it in the test system,after verifying the functionality of the addon proceed with the live system,untill then i suggest you not to use that addon.
Also check note:[781944|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E¬e_numm=0000781944],[978706|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E¬e_numm=0000978706] might be related to your issue. -
ODLN.StampNum through DI API
Hi,
Can the ODLN.StampNum field be accessed through the DI API (v8.8) ?
I was not able to find it under that name or clear synonyms.
Cheers,
JohanHi Johan,
You may check this: Re: Returns -- Stamp No. field (Logistics tab)
Thanks,
Gordon -
Stored Procedure to block DN for specified BP unless ODLN.NumAtCard contain 6-digit number
Hello experts
I am trying to us SPTN block delivery for specified BP unless supplier reference field contains 6 digit number (this is Customer PO number format)
--Block CCOR001 DN unless 6 figure number in ODLN.NumAtCard
IF @object_type = '15' AND @transaction_type = 'A'
BEGIN
IF EXISTS(SELECT T0.[Docentry] FROM ODLN T0 WHERE T0.[CardCode] = 'CCOR001' AND T0.[NumAtCard] != ###### AND T0.docentry = @list_of_cols_val_tab_del)
SELECT @error = 1, @error_message = N'Cannot deliver without 6 digit Purchase Order number'
END
I am working on above query needing assistance with how to specify 6-digit number here ###### ?
Regards,
KarenHi Nagarajan,
Thank you for assistance these queries are functioning well and due to improving knowledge I have added another condition to because when I tested I discover it is possible to add DN by putting "Verbal" in the field. Because we have many customers who do not require formal purchase orders it is necessary to block 'Verbal' and 'To be confirmed' 'TBC' 'follow' and so on.
Here is query: It seems to work fine with basic testing so far..
IF @object_type = '15' AND @transaction_type IN ('A','U')
BEGIN
IF EXISTS(SELECT T0.[Docentry] FROM ODLN T0 WHERE T0.[CardCode] = 'CCOR001' AND T0.[NumAtCard] is null AND ISNUMERIC( T0.NumAtCard ) = 0 OR LEN(CAST(T0.[NumAtCard] As nvarchar(4000))) <> 6 AND T0.docentry = @list_of_cols_val_tab_del)
SELECT @error = 1, @error_message = N'Cannot deliver without 6 digit Purchase Order number'
END -
Query to link ORDR, ODLN, OINV, ORIN
Dear Experts,
Can anybody help me how to develop a query to get Delivary Doc No, Invoice No , Credit Memo No generated for each sales order according to Posting Date. ie. I need a report like this
Post.Date SO.No Deliv.No Inv.No CreditMemo.No
we are using SBO 2007 B PL 8
Regards
Srinihi,
try this:
SELECT DISTINCT dbo.ORDR.DocDate, dbo.ORDR.DocNum AS SO_No, dbo.ODLN.DocNum AS Del_No, dbo.OINV.DocNum AS InvoiceNo, dbo.ORIN.DocNum AS CreditNo
FROM dbo.ORIN INNER JOIN
dbo.RIN1 ON dbo.ORIN.DocEntry = dbo.RIN1.DocEntry RIGHT OUTER JOIN
dbo.ORDR LEFT OUTER JOIN
dbo.DLN1 INNER JOIN
dbo.ODLN ON dbo.DLN1.DocEntry = dbo.ODLN.DocEntry INNER JOIN
dbo.OINV INNER JOIN
dbo.INV1 ON dbo.OINV.DocEntry = dbo.INV1.DocEntry ON dbo.ODLN.DocEntry = dbo.INV1.BaseEntry ON dbo.ORDR.DocEntry = dbo.DLN1.BaseEntry ON
dbo.RIN1.BaseEntry = dbo.OINV.DocNum
in here it only relation SO - DO - AR - ARC . you can use BaseType field in (DLN1 ,INV1 ,RIN1 ) distinguish base document.
thanks,
H2
Maybe you are looking for
-
Claims Based Authentication and Editing User Profiles
Hi All, I have an interesting issue where I have a SharePoint Farm setup with both the intranet and mysites web applications setup using Claims Based Authentication. While everything seems to work fine, you are able to search for users, view properti
-
Report Template href with column value
I have created a Report template and want to have a field that is a href with link to other page passing column value. I'm having trouble passing the column value. If I hard code the value the href code works. If I try to pass #1# or the column name
-
Adding multiple clips to a track
I read the manual and I know it`s possible to add more than one clip to a single track. I never done it before. I just want to add 3 clips one after the other. I`d like to know if this works well, if there isn`t any known issues. Is this compatible w
-
Hi, I got a very simple flex app which has a height that is bigger than the default height of the web browser. When it was run in a browser (had been maximized and both IE and FF had the same problem), sadly there was no scroll bar and thereby the bo
-
Smart form Issue..
Hi All.. I need to print a square Box in the smartform ( 1 * 1 cm).. ( User takes the Print out of smart form and use this box to mark from his pen manually) How to do it...???