CFL on Sales Order Matrix
Hi Experts,
Can you please let me know how to add choose from list in Sales Order Matrix for User defined field. I have tried lot but not able to find proper answer. I have also tried by adding new user defined column to matrix but unfortuanately it is not allowing me to add new row. Do any one know how to add Choose from List in SAP system Matrix.
Interestingly my code to add new column in matrix work for Landed Cost, but it does not work for Orders and Invoice. I know we can use formatted search as an alternative but Formatted search doesn't look pretty and it is not so good for finding.
Will wait to hear from you
Thanking you,
Naresh
Try using grid matrix. Easier to implement.
Similar Messages
-
How to load to a Sales order Matrix from database?
I have created a user defined field in Item Master data called "Discount". Now, from the sales order form - when i click on the matrix to choose the item, I have to display the "Discount" I entered in the Item Master data to the "DiscPrcnt" i.e the discount column in the matrix of the sales order..How can I do that??
Please Provide the Code to read the data and to enter it in the matrix ??
Thanks
Vibin VargheseI tried your code....FMS- But i dont under stand how to write the query for that...
select U_Disc from OITM Where ItemCode='??????? '
how can i set the where condition. The item code is get while I select the item from the sales order matrix....
if i gave select query with out the where condition,SAP display's whole U_Disc of different items..But I only need the discount of the particular item I selected....Plz Help. -
Dear all,
When sale order form is in "add Mode", i can't read the matrix's line data via DB data source(rdr1). Sould i read it through user data source?? If so, how could i know which user data source is bind to that matrix??
Regards,
KitChun:
i did this, but I only got the first row of the matrix.
Im traying to do oOrderMat.getLineData(2) to get the second line, but without success.
Any ideas?
Thanks
Harold Gómez V. -
How do I get the line number of the sales order and how do I save info?
I am trying to create a form that is able to be called from a right click on the sales order matrix and will display some of the user defined fields associated with the line.
I've managed to create a form and add a menu option to the right click but I'm now stuck because of the following:
1. How to I know which line the user selected? I need the REAL Line Number from the RDR1 table because I need to use it on the data filter of the form.
2. I hard coded a line to just to see if I can load a form and it appears to load and bind the data to the controls, but how do I save changes made? There are several text fields, combo boxes, and a picture control.Hi Coleman,
1. The pVal returned form a menu event does no provide the LineId, but a pVal from a Item Event does. I suggest you use a DoubleClick or Control + Click on the Line to trigger an event that you can catch and use to launch your form.
2. Please note that if the Sales Order line is closed you'll not be able to update the values. If it's not, then you need to instantiate a Sales Order document, get the correct document with the GetByKey method and update whatever fields you need.
Dim oSalesOrder As SAPbobsCOM.Documents = oCompany.GetBusinessObject(BoObjectTypes.oOrders)
If oSalesOrder.GetByKey(docentry) = True Then
oSalesOrder.Lines.SetCurrentLine(pVal.Row - 1)
oSalesOrder.Lines.UserFields.Fields.Item("U_MyUDF").Value = ""
oSalesOrder.Update()
End If
Regards,
Vítor Vieira -
Modify Sales order line item Type
Hey Guys,
I was wondering if there is a way through the DI or UI that I can change the type of a line item in a sales order matrix. I can change it through the Business One client to sub total or text on a line item and add comments. Is it possible to do this through code via DI or UI?
Any examples would be helpful.Something like this.
ComboBox cb = (ComboBox)oMatrix.Columns.Item("COLUID").Cells.Item("row").Specific;
cb.Select("ValueToSelect",BoSearchKey.psk_ByValue);
Normal lines have "" (empty) value
Textlines have "T" value
Subtotals have "S" value -
How to add data through matrix from sales order row level to
user defined document type table ...
i created matrix in user defined form, i placed one edit text box on that form
when i entered docnum of sales order the data of sales order row level should have to
upload to matrix , after fill up the some data in matrix that data should have to add to the user defined document type table
any one have code pls post it
thanqHi rajeshwar
Here is a sample function related to ur senario. just check it out and use the concepts.
Here I have used a CFL to get the itemcode and I have used a query to add data to matrix.
This is a function used.
Private Sub AddValuesInMatrix(ByRef name As String)
Try
'Dim quantemp As Double
oForm = SBO_Application.Forms.Item("itemdts")
oMatrix = oForm.Items.Item("matrix").Specific
Dim rs As SAPbobsCOM.Recordset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
'//gitemdesc = "SELECT T0.[ItemName] FROM OITM T0 WHERE T0.[ItemCode] ='" & name & "'"
oMatrix.Clear()
rs.DoQuery("SELECT T0.[DocEntry], T0.[ItemCode], T0.[Dscription], T0.[Quantity], T0.[Price], T0.[TaxCode] FROM dbo.[POR1] T0 WHERE T0.[ItemCode] ='" & name & "'")
rscount = rs.RecordCount
If (rscount < 1) Then
SBO_Application.StatusBar.SetText("No Items Found", SAPbouiCOM.BoMessageTime.bmt_Short)
Else
oForm.Freeze(True)
ITE = True
For i As Integer = 1 To rs.RecordCount
oMatrix.AddRow()
oMatrix.Columns.Item("V_5").Cells.Item(i).Specific.Value = rs.Fields.Item("DocEntry").Value
oMatrix.Columns.Item("V_4").Cells.Item(i).Specific.Value = rs.Fields.Item("ItemCode").Value
oMatrix.Columns.Item("V_3").Cells.Item(i).Specific.Value = rs.Fields.Item("Dscription").Value
oMatrix.Columns.Item("V_2").Cells.Item(i).Specific.Value = rs.Fields.Item("Quantity").Value
'quansum = quansum + rs.Fields.Item("Quantity").Value
oMatrix.Columns.Item("V_1").Cells.Item(i).Specific.Value = rs.Fields.Item("Price").Value
'pricesum = pricesum + rs.Fields.Item("Price").Value
oMatrix.Columns.Item("V_0").Cells.Item(i).Specific.Value = rs.Fields.Item("TaxCode").Value
SBO_Application.SetStatusBarMessage("Data Loading In Progress Please Wait.....>>> " & i & " / " & rs.RecordCount, SAPbouiCOM.BoMessageTime.bmt_Short, False)
rs.MoveNext()
Next
ITE = False
oMatrix.AutoResizeColumns()
SBO_Application.StatusBar.SetText("Data Loading Completed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
oForm.Freeze(False)
oForm.Refresh()
End If
Catch ex As Exception
SBO_Application.MessageBox("Matrix Load Function : " & ex.Message)
ITE = False
End Try
End Sub
-Anto -
Sap afs - how to customize matrix grid in sales order creation
Hello,
can anyone help to understand how to customize the matrix grid shown at sales order creation/change (VA01 - AFS Item overview tab - Matrix entry pushbutton). Here system, starting from inserted material nr, shows all possible combination from material's sales grid. The requirement asks to manage the matrix grid before it is shown to the user.
Thanks in advance for your help
maurizioHi
It depends on master data of your material
Max -
Problem binding a matrix in the Sales Order Form
Hi everybody!
I am working in an Add-On. What I do is modify the sales order form in runtime. I catch the event when the form is loading and then I add a new folder with some fields and a matrix.
I've got a matrix in this form with the employees that participate in an order and when I go through all the orders by using the next and previous record buttons I have to rebind it to show the participants in a specific order. The code for the event is the following:
If (pVal.ItemUID = "57") And pVal.Before_Action = False And pVal.EventType = et_ITEM_PRESSED Then
BindParticipantGrid
BubbleEvent = False
End If
After bind the grid, BO shows a System message indicating that the form has been changed and asking me if I want to save the changes to the order. Looks like, whenever the bind function finds rows to add to the matrix it changes the mode of the form by adding rows to the matrix. How can I prevent that when I'm in view mode?
This is the code for the binding function
Sub BindParticipantGrid()
Dim myForm As SAPbouiCOM.Form
Dim oMatrix As SAPbouiCOM.Matrix
Dim rs As sapbobsCOM.Recordset
Dim strSQL, OrdreNr As String
Dim oText As SAPbouiCOM.EditText
Set myForm = SBOApplication.Forms.GetFormByTypeAndCount(139, 1)
Set oText = myForm.Items("8").Specific
If oText.Value <> "" Then
OrdreNr = oText.Value
Else
OrdreNr = "0"
End If
Set oMatrix = myForm.Items("matrix").Specific
oMatrix.Clear
Set rs = myCompany.GetBusinessObject(sapbobsCOM.BoObjectTypes.BoRecordset)
strSQL = "SELECT [@HL_PART].Code as Code, [@HL_PART].U_DocNum as DocNum, [@HL_PART].U_EmpId as EmpId, [@HL_PART].U_EmpName as EmpName, [@HL_PART].U_Message as Message, [@HL_PART].U_MessRead as MessRead, [@HL_PART].U_MainPart as MainPart, [@HL_PART].U_StartDt as StartDt, [@HL_PART].U_StartHr as StartHr, [@HL_PART].U_FinishDt as FinishDt, [@HL_PART].U_FinishHr as FinishHr, [@HL_PART].U_Finished as Finished FROM [@HL_PART] WHERE [@HL_PART].U_DocNum = " & OrdreNr
rs.DoQuery strSQL
While Not rs.EOF
myForm.DataSources.UserDataSources.Item("EmpId").Value = rs.fields("EmpId").Value
myForm.DataSources.UserDataSources.Item("EmpName").Value = rs.fields("EmpName").Value
myForm.DataSources.UserDataSources.Item("Message").Value = rs.fields("Message").Value
myForm.DataSources.UserDataSources.Item("MessRead").Value = rs.fields("MessRead").Value
myForm.DataSources.UserDataSources.Item("MainPart").Value = rs.fields("MainPart").Value
myForm.DataSources.UserDataSources.Item("StartDt").Value = rs.fields("StartDt").Value
myForm.DataSources.UserDataSources.Item("StartHr").Value = rs.fields("StartHr").Value
myForm.DataSources.UserDataSources.Item("FinishDt").Value = rs.fields("FinishDt").Value
myForm.DataSources.UserDataSources.Item("FinishHr").Value = rs.fields("FinishHr").Value
myForm.DataSources.UserDataSources.Item("Finished").Value = rs.fields("Finished").Value
oMatrix.AddRow
rs.MoveNext
Wend
oMatrix.SelectionMode = ms_Auto
End Sub
I will apreciate all king of help
Thanks in advance.You have a property of the form which allows you to change the mode
myForm.Mode = fm_ADD_MODE
myForm.Mode = fm_EDIT_MODE
myForm.Mode = fm_VIEWMODE_MODE
You may change it after you modify you matrix data to fm_VIEWMODE_MODE and I guess you won't have the system question again.
Sebastien -
Problem - Sales Order when i fill Matrix in Mode is changed
Hello,
I have one problem in Sales order.
In Add functionality everything is working fine.
But In Navigation it is by default changed mode update when i click tab in sales order.
In Tab i have fill one matrix when click on tab by default mode is changed update
Can any one help me for this
Thanks,
LeenaHello ,
Here I am sending you my code ..
If pVal.FormType = 139 And pVal.ItemUID = "TBDesign" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.Before_Action = True Then
oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
oForm.PaneLevel = 5
oMatrix = oForm.Items.Item("matGarFile").Specific
oItem = oForm.Items.Item("TBDesign")
Dim sno As String
sno = oForm.Items.Item("8").Specific.value
oForm.Freeze(True)
oItem.AffectsFormMode = False
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
fillgridfromTemp(oForm, oMatrix, sno, pVal)
ElseIf oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
fillgridfromGar(oForm, oMatrix, sno, pVal)
ElseIf oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Then
fillgridfromTemp(oForm, oMatrix, sno, pVal)
ElseIf oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then
fillgridfromGar(oForm, oMatrix, sno, pVal)
End If
oForm.Freeze(False)
End If
I done affectmode false but yet not solved my problem. -
Error retrieving BOM type from sales order line matrix
Hi All
I have a problem with an add-on which works in SBO version 2007 but now fails in version 8.8. The fault occurs when the code attempts to retrieve the BOM type from the sales order line matix as follows:
objCombo = mtxOrder.Columns.Item("39").Cells.Item(intCount).Specific
strBomType = objCombo.Selected.Value
Where mtxOrder represents the sales order line marix extracted from form type 139
Under version 8.8 this code generates an error "unable to cast COM object ... to interface type SAPbouiCOM.ComboBox ....". If the code is replaced by the following, the error does not occur.
objEditBox = mtxOrder.Columns.Item("39").Cells.Item(intCount).Specific
strBomType = objEditBox.Value
Any assistance or explanation would be greatly appreciated.
Thanks
DavidIt just looks to me like it was a combo box in the 2007 version and has been changed to just be an edit text in 8.8... from what you have explained anyways, that seems to be what is happening. Sometimes there are small changes like this - it's better to directly access the datasource so you can avoid being hit with these sort of changes
so for example
strBomType = oForm.Datasources.DbDataSources.Item("RDR1").GetValue(TreeType, i);
//where i is the linenumber-1 in the matrix -
Sale Order Query Print layout/Crystal Report Query required
Hi Experts,
I created a Sale Order. Items included in it are service and material.
(I created a BOM, bound the child material item to the parent service item. Moreover child item will have unit price where as parent item will not have unit price)
I need the report on it please let me know how i can do it.
I tried with below query
select a.DocEntry, a.DocNum, a.CardCode, a.CardName, b.DocEntry,b.ItemCode, b.Dscription, b.Quantity, b.Price, b.LineTotal, a.DocTotal, a.VatSum
from ORDR a inner join RDR1 b on a.DocEntry = b.DocEntry
--and b.TreeType <> 'N'
where a.docnum = '14240621'
output of above query is
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
2493.76
43940.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0001
Material for PROVIDING & LAYING
17.62
2800
49336
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
1980
19908.9
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0002
Material for BM CM INCLUDING CEMENT
10.055
1650
16590.75
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
116.5
7572.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0003
Material for P/APPLYING
65
65
4225
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
31625.05
70618.74
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0004
Material for P& FIXING
2.233
44000
98252
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
3593
10779
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0005
Material for PROVIDING RMC
3
4847
14541
354652
18888.46
and my desired output is
Unit price of both child item and parent item should be display in single column. ie. cumulative in Unit Price Column and Linetotal respectively.
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
5293.76
93276.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
3630
36499.65
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
181.5
11797.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
75625.05
168870.7
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
8440
25320
354652
18888.46
please let me know the update on this.
with regardsHi Nagarajan,
thanks for reply..
1) Yes, i.e i have taken into BomType: Template
2) i did not get any helpful output by using treetype by keeping 'S' and 'N', i kept in comment.
3) Actually MT0001-05 - these are material item- unit prices are fixed. see in attached image
for parent item, unit prices are not fixed. I give the price for them in Sale Order.
I want unit price for parent and child should be summed/cumulative for Sale Order print.
(in my above post, first matrix exactly same as sale order line items plz check it)
Please help me, how i can achieve this by query(for PLd or Crystal report)
With Regards -
Assorted Free Goods Problems in Sales Order
Hello All,
The problem is related to Assorted Free Goods Pricing in Sales Order.I have two queries which are provided below with example:-
In the sales order I am giving 2 Line Items. -
Material A & Material B of total quantity 10PC Then 1 PC of the Material C as 3rd line item
in the sales order is populated which is maintained as an assorted free good having Manual Free Item Category for eg. ZFV5.
Similarly line items A & B combined of 10 PC = 1 PC of Material C having Manual Free Item Category for eg. ZFV5.
Again if 10 PC of Material A or B are chosen respectively = 1 PC of Material C having Manual Free Item Category for eg. ZFV5 .
_Now I want to configure the following**_ -
1) The system will include the cost of the Assorted Free Good Item within the Main Item.
2) While raising a Sales Return Order for the above mentioned Sales Order it is observed that the manual free item category ZFV5 is changed to the Return Main Item Category whereas I want the item category to be picked up is Return Free Item Category against the Manual Item category .
Now considering the above scenarios please suggest solutions to attain my requirement.
Looking forward to some valuable suggestions.
Thanks & Regards
PriyankaHi Priyanka
As far as what i understood from your post your requirement doesnt seem to be possible in standards
If you want the cost to be transferred to the main item then in VTFL at item level there is a check box of cumulative cost
That has to be ticked
Constraintsin free goods in R3
Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
Free goods are only supported for sales orders with document category C (for example, not quotations).
Free goods are not supported for deliveries without reference to a sales order.
Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
Regards
Raja -
PR/ Sales order value not coming in condition value routine
As per the requirement while creating a PO I need to add a new condition type and need to calculate condition price for this newly added condition based on some matrix.
For this requirement PO will always be created with reference to PR and with account assignment category as 'E' .
(Hence sales order number /item will be copied from PR to PO in account assignment tab )
Now I have created a new pricing requirement routine ( To add the condition type ) and new condition routine to calculate and update the price.
These routines are working fine if i check them with hard coded price values.
But the problem is that I need the PR number(which we put in item overview ) / Sales order item number (from account assignment ). these values are not coming in pricing tables in the routine...structure EKPO come blank, KOMP-AUBEL is also blank).
Please give your suggestions how i can i get PR/ SO in the condition values routine .
Please replyresolved my self
-
Error while updating Sales Order : Another user Modified Table (RDR1 )
Hi All,
I am getting an error message while running the following steps.
Steps
1) Pull an entry from sales order.
2) Add new data to line.
3) Update the sales order.
a) Sap updated the data.
b) Through code using DI API we updated some UDF.
4) With out closing / Pressing OK button
5) We added new data to line.
6) Then Press update.
An Error will through by B1 as Another user modified the table(RDR1 ). Before going to the code where we are handling the update of UDF.
But after the 3rd step above when we do
4) Close the window or pressed ok
5) take the sales order window again pull the data
6) Add new Data to line.
7) Update sales order then it will go smoothly.(Updating by B1 and from code )
Can anybody tell me why this happens?And any workarounds to solve this?
Deepeshare u adding a matrix row thru the code? I get this error when I am adding rows and I get the rownumber out of sync.
if so get the max (lineid) from rdr1 and then check against the matrix.rowcount before adding a row. if lineid is greater that matrix.rowcount take lineid + 1 and assign it to the matrix.row, else take the rowcount + 1
if not, and as a workaround, then you can try using the SBO_SP_transactionnotification stored procedure. -
Hi All,
I am facing problems while updating a sales order. I have some custom actions in the middle. I am loading another custom window when tabbing out of Quantity field in Salesorder matrix. In that window I am updating batch quantity for the Sales order line from which I tabbed out using DI API to zero quantity. After that action,I am trying to update the Sales Order. Then I am receiving the error "There is a difference between the document total and its components. [Sales Order - Document Total (FC)] [Message 439-138]". Please help me on this issue.
Thanks
JishaHi John,
Thank you for the updation. Yes. I am working with an addon.
Let me explain my current environment and requirments.
I have 2 cases which I am mentioning below. In the given 2 cases , first case(adding Sales Order works well for me). Problem occurs while updation.
Adding Sales Order
When I am adding a new Sales Order, I am updating the batch allocation for the line items using DI API in the FORM_DATA_ADD_Event - Action success true section. (This section work successfully)
Updating the Sales Order
In the update mode, If I am changing the quantity for the Sales Order lines(I am mentioning here only the case when I am reducing quantiy) , the custom window opens for me to reallocate the batches for the new quantity. In this window, I am not updating the new batch allocation. Just I am clearing the existing batch allocation using DI API so that I can give the new batch allocation in the Sales Order window - FORM_DATA_UPDATE_Event - Action success true section.
After this step, when I am trying to update the Sales Order , I am getting the error"There is a difference between the document total and its components. [Sales Order - Document Total (FC)] [Message 439-138]".
Can you please give me a solution for this?
One more thing to note, If the unit price field for the line item is zero, the Sales Order is getting updated successfully. If the price is greater than zero, then only the problem occur.
Please let me know, if you need further details.
Thanks
Jisha
Maybe you are looking for
-
Flash Pro not open or create files.
Hi, I have Flash CS5.5, but this problem happens to all the Flashes I use, the CS4, CS5, CS5.5... I dont Have the Flash CS6/CC (My PC don't runs the trial), but the problem not apply in CC and CS6 versions... The problem specifically is this: I open
-
How do u down load music from your flash drive to your older ipod nano 2gb
how do u down load music from a flash drive to an older apple ipod nano 2gb
-
How do i edit out the dark places in a pdf?
how do i edit out the dark places in a pdf? I xeroxed pages from a book, and the xeroxes were not of great quality--lots of shadows where the book opened on the copier glass. When I had the xeroxes scanned, the dark places turned deep black and made
-
Mapping over more than 1 schema
Hi, I have to do the following mapping: Workspace user: user_ws Transfer data from user send_user.table1 to get_user.table2 Whe I create 2 locations (localtion_send_user and location_get_user the 2 owners of the 2 tables) I can see the 2 tables (1 in
-
dear oracle-experts, I try to upgrade a Oracle 9.2.0.1.0 database to 9.2.0.4.0. After installing the new Univeras Installer I tried to perform the path. During the installation of the patch the program stated that there were some background processes