Force "Update document rows according to neu BP'sData"
How can I run the command "Update document rows according to neu BP'sData" over my AddOn.
This command start automatically when GPCode change in the sales document for example.
thanks,
Marcelo
Hi,
There is no function that you can force the updating of the rows in your addon.
what you can do is to simulate how SAP B1 do the updating of the row.
You can Pop a messagebox to ask if they want to update the rows if they change the business partners.
If they select Yes then
Get the PriceList that the Business Partner is using then Parse the Rows And find the Price for that item in the Price List and update the Price Column.
else
Do nothing..
Thanks and regards,
Wilson
Similar Messages
-
FORCE TO "Update document rows to new BP's data"
How do I force to respond YES in the dialog box "Update document rows to new BP's data?" shows, when I DUPLICATE a marketing document?
Edited by: Gabriel Marroquin on Sep 25, 2008 6:46 PMI want that the user dosen´t have the option to answer NO, that´s I need that the answer always be YES. (If a sales user DUPLICATE an old quotation, wich has a lower price than the actual price of an article, and he answer NO, the actual price of the article doesn´t refresh and the company loose money.)
-
Cannot add or update this document; rows are missing [Return - Freight ]
Hello Experts,
I am using 8.8 PL15 I have implement Approval Procedure on every Return Document.After approval when I tried to add document using Logistic user it creates following error message.
Cannot add or update this document; rows are missing [Return - Freight - Freight Code][line: 0] [Message 131-198]
There is no any additional freight on Return & Delivery.There is no freight on base document also.
When i add same document through manager then it add successfully to system.
Regards,
Chetanhi,
There may be two reason for this...
1. Freight accounts are not mapped . Doesn't matter you are using or not these in document .
2. Check items are not in negative ?
regards
Deepak Tyagi -
Update 100 Row Data In One Time against a Code
Dear Expert,
How can I update a Master Data Row Table record using a particular code. Like I write a query Update Table Set U_UDF = 'Value' Where Code = 2
U_UDF is the field of Master Data Row Table's field. There are 100 Row against code 2 & I want to update all row with same value but in one time only.
How can I do that ?
Plz help me.
RegardsHi,
Try this:
SAPbobsCOM.GeneralService oGeneralService = null;
SAPbobsCOM.GeneralData oGeneralData = null;
SAPbobsCOM.GeneralDataParams oGeneralParams = null;
SAPbobsCOM.CompanyService sCmp = null;
SAPbobsCOM.GeneralData oChild = null;
SAPbobsCOM.GeneralDataCollection oChildren = null;
sCmp = SBO_Company.GetCompanyService();
oGeneralService = sCmp.GetGeneralService("UDO");
// Get UDO record
oGeneralParams = ((SAPbobsCOM.GeneralDataParams)(oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams)));
oGeneralParams.SetProperty("Code", ContractCode);
oGeneralData = oGeneralService.GetByParams(oGeneralParams);
// Add lines on UDO Child Table
oChildren = oGeneralData.Child("CONTRACTDETAIL");
// Update an existing line
oChild = oChildren.Item(LineId - 1);
DateTime dt = DateTime.Now;
oChild.SetProperty("U_STATS", "Terminated");
oChild.SetProperty("U_Updated", dt);
oChild.SetProperty("U_Remarks", "Service Terminated");
//Update the UDO Record
oGeneralService.Update(oGeneralData);
I have given you the sample. Just change it accordingly.
Hope it helps.
Thanks & Regards
Ankit Chauhan -
Purchase order document row is not change (document stutas is OPEN)
Hi all,
I am created one purchase order that are not any base or targeted document ,not any approval procedure and purchase order document status is steel open . Then how I a cannot change the document row.
thanks
arabinda palHi Deepa,
I think if you want to restrict the further editing of a particular row, then you just need to follow the simple procedure.
1. create the purchase order with your desired items & vendor & add this document
2. Now reopen it & goto that row which you want to restrict. Right click on that row & select "Close Row".
3. Select yes to confirmation message.
4.Now update the document.
Now you an check it out, in that document you will not be able to edit that row contents.
I hope this solves your issue.
Regards.
ShriX. -
Documents rows cannot be closed concurrently with the other document modify
Hello Experts !!!
Now i am using SAP BUSINESS ONE 2007 B PATCH LEVEL 19.
problem is that previously i was using patch level 4.
when i was using patch level 4 , i used to punch sales order.
now when i upgraded to patch level 19 .SAP is not allowing to update the so which was punched in patch level 4.
SCENARIO
1.so is raised of 10 pcs in patch level 4.
2.delivery was punched of 5 pcs.
3.now sap upgraded to patch level 19.
4.now m modifying that so.
5.particular so which was of 10 pcs , m reducing that 10 pcs to 5 pcs.
5.now that particular is closed .
6. when i add remaining 5 pcs below that row and update.it is throwing me an error "Documents rows cannot be closed concurrently with the other document modifications you have made"
PLEASE HELP EXPERTS
Regards
A S VAMSI KRISHNADear krishnavamsi,
I would like to ask you to read these notes and check if they are relevant to your issue:
1036601
1131943
1298236
Also, I would like to know how did the customer add the document in the previous version, manually by application or by DI API, ADD ON or any customization?
Regards,
Marcella Rivi
SAP Business One Forums Team -
Seperate Document Row with same account when post GL
Hello everyone
How I can seperate Document Row with same account when post GL
because If I post dcoument that have many rows but same account and difference detail. It will sum amount for same account in JE
and I found that will seperate if it has diference project code but it's not enough for me.
How I can config SAP B1 to seperate Doc row when post to JE if it has difference detail (as userfield or standard filed)
Sorry for my poor english
Thank,SeangHello Suthee,
Sorry to tell you, it is not possible to do so in current B1 without addon development.
There are 2 alternative.
1.Consulting Workaround:
Seperate the Item into 2 items, the account into 2 sub accounts.e.g.
Item A => Item A01 and A02
G/L Account 1001 => Sub Account 100101 and 100102
2.AddOn development to seperate the JE just after it is created document
You can update to JE to seperate just after JE are created by docuemnts.
Just Listen FormDataAdd Event.
Sample Code:
Private Sub FormDataEventHandler( _
ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
'I just listen 133 - AR invoice here,
'You may add the target documents
'Before action = true, start the transation
If BusinessObjectInfo.FormTypeEx = "133" _
And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
Or BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) _
And BusinessObjectInfo.BeforeAction = True Then
oCompany.StartTransaction()
End If
'Before Action = false,
'Update the JE in document
'Succeed, commit, otherwise rollback
If BusinessObjectInfo.FormTypeEx = "133" _
And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
Or BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) Then
If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
Dim xmlDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument
xmlDoc.LoadXml(BusinessObjectInfo.ObjectKey)
Dim objectKey As String
objectKey = xmlDoc.SelectSingleNode("//DocEntry").InnerText
Dim oDocument As SAPbobsCOM.Documents = Nothing
oDocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
If oDocument.GetByKey(CInt(objectKey)) Then
Dim oJE As SAPbobsCOM.JournalEntries
oJE = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
If oJE.GetByKey(oDocument.TransNum) Then
'*Add you code to Update oJE lines here*
lRetCode = oJE.Update
If 0 <> lRetCode Then
oApp.MessageBox("Failed to update JE")
'roll back the whole transaction, including the document
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
Exit Sub
Else
'Commit the transaction
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
End If
End If
End If
End If
End If
End Sub
Hope it helps. Thanks.
Kind Regards
-Yatsea -
Slow respon when update Document Numbering
Hi Expert,
We have 7 branch and 4 different type of sales document. and we change our document numbering every month.
We have use SAP Business One for a year. So, we have large number of document numbering.
when we update and add new row in document numbering, we get slow respon. It can about 30 minutes every update.
how can we make it faster?
*we use 8.82 PL:08 version.
Regards,
Triadi BagusHi Triadi,
Try to update Document Numbering when no user are logged on data or Ask your users to not to post any transaction during the period when you are updating Document Numbering.
This problem arise because when user are punching transactions on database as Internal Document No Changes every time a transaction is punched on Database.
This May be the reason.
Hope this help!!
Regards,
Sudhir -
Document Rows cannot be closed concurrently with the other modifications
Dear all,
We are trying to clear a small backlog of open Sales Orders in SAP. There are few rows in the Sales Orders which have remained open because of undelivered quantities. We are trying to close these rows. In most cases, the complete sales order is not to be closed.
However I am getting the following error when i close one row and click on update.
"Document Rows cannot be closed concurrently with the other modifications you have made."
We are running on SAP B1 2007 PL 11. Some of these sales order are old and were made while we were running on the older version.
Kindly let me know how i can clear these backlogs and have a match between my actual open sales orders and those open in SAP.Dear All,
It is a problem if we cannot close the rows because
1. Sometimes it so happens that all the items are not sent to the client on account of rejection. For example if the order was for 1000 nos., we have shipped him 980. the row is still open for 20 nos. we cannot close the row.
2. This causes a problem in the inventory data as well, since it appears in the committed for that item.
Could you suggest some way of closing rows of sales orders without closing the whole sales order for partial shipment? -
Exception : DI Error: (-5002) At least one amount is required in document rows
Trying to create a MaterialRevaulation object. doesn't matter what I am using I can getting this error message "Exception : DI Error: (-5002) At least one amount is required in document rows"
Formate of payload looks like
<Payload Role="X" id="atom1">
- <MaterialRevaluation xmlns="">
- <row>
<RevalType>P</RevalType>
<DocDate>20140701</DocDate>
<JournalMemo>Inventory Revaluation</JournalMemo>
<InflationRevaluation>tNO</InflationRevaluation>
</row>
</MaterialRevaluation>
- <MaterialRevulation_Lines xmlns="">
- <row>
<LineNum>0</LineNum>
<ItemCode>Item1</ItemCode>
<WarehouseCode>WH1</WarehouseCode>
<Price>14.973030</Price>
</row>
- <row>
<LineNum>1</LineNum>
<ItemCode>Item2</ItemCode>
<WarehouseCode>WH1</WarehouseCode>
<Price>15.973030</Price>
</row>
- <row>
<LineNum>2</LineNum>
<ItemCode>Item3</ItemCode>
<WarehouseCode>WH1</WarehouseCode>
<Price>13.973030</Price>
</row>
</MaterialRevulation_Lines>
</Payload>
And my SBO object call looks like this
<Payload Role="C" id="atom2" system="0010000102" status="success" b1login="Technical User" method="Synchronous Insert with fallback to Update" objectid="162" payload="atom1" keyname="" keyvalue="" DIresult="failure" DImsg="Exception : DI Error: (-5002) At least one amount is required in document rows" />
I don't think I need to put anything in KeyName or Keyvalue. Since I am insert.
But it looks like it is not even look at the XML changes. I have tried to with no change
1. Add BOM/BO admin structure
2. Rouding price difference (from 0 decimla ot 6)
3. Put in Quantity
4. Add LineNum
5.Change Item
6.Change WHS
Running out of ideas!! Any help will be appreciated. Thank You!Successful format looks like this
Strange enough, and I still don't know why. Certain item in combination give me the error message. If I break it out to individual document. Then it give me the proper error message. But if it bundled with number of item together then it become this at least one amount is needed at document row error message.
<BOM xmlns="">
<BO>
<AdmInfo>
<Object>162</Object>
<Version>2</Version>
</AdmInfo>
<MaterialRevaluation>
<row>
<DocDate>20140702</DocDate>
<RevalType>P</RevalType>
</row>
</MaterialRevaluation>
<MaterialRevaluation_lines>
<row>
<ItemCode>ITEM1</ItemCode>
<WarehouseCode>WH1</WarehouseCode>
<Price>14.587</Price>
</row>
</MaterialRevaluation_lines>
</BO>
</BOM> -
Hi,
I have a problem updating multiple rows.
I have the following update:
update POI.PERFTABLE p set P.PERF_3YEAR_ANNO =
(Select
PERF_ANNO_DAUER
rtrim(fs.match),
3
From POI.FONDSSTAMM fs ) where p.MATCH=match
but I become the error: ORA-01427: single-row subquery returns more than one row.
How must I write my SQL-Command that it works??????????
thanxx
SchoeibHhhhmmmmm,
-- So - this doesn't work .......
UPDATE POI.PERFTABLE p
SET P.PERF_3YEAR_ANNO =
( SELECT PERF_ANNO_DAUER ( RTRIM( FS.Match ), 3 )
FROM POI.FONDSSTAMM fs
WHERE P.Match = v_Match
-- Maybe - you could force the sub-select to return a single row.
UPDATE POI.PERFTABLE p
SET P.PERF_3YEAR_ANNO =
( SELECT PERF_ANNO_DAUER ( RTRIM( FS.Match ), 3 )
FROM POI.FONDSSTAMM fs
-- Restrict the sub-query to returning a single row.
WHERE FS.Some_ID = P.some_Id
WHERE P.Match = v_Match
or even
-- Since you are using a function why not adjust the function,
-- or write a simular one, so that something like this would work.
UPDATE POI.PERFTABLE p
SET P.PERF_3YEAR_ANNO = PERF_ANNO_DAUER ( RTRIM( P.Match ), 3 )
WHERE P.Match = v_Match
;Dude,
Eric Kamradt -
Update document lines user fields
Hi,
I'm trying to update a user field of a purchase invoice line through the DI API.
The Update method returns 0, but the field isn't updated!
I use this code:
Dim RetVal As Integer
Dim Doc As SAPbobsCOM.Documents = DirectCast(Company.GetBusinessObject(oPurchaseInvoices), SAPbobsCOM.Documents)
If Doc.GetByKey(_CurrentDocId) Then
Doc.Lines.SetCurrentLine(0)
Doc.Lines.UserFields.Fields.Item("U_CONAI").Value = "Y"
Doc.UserFields.Fields.Item("U_IB_OldProtI").Value = 987
RetVal = Doc.Update()
If RetVal <> 0 Then Beep()
End If
Updating a user field on the document (not on the lines) works fine!
Can anyone help me please?
I'm using SAP 8.8 SP 0 PL 11
Thank you
PaoloHi Paolo,
I think the reason behind the inability to change document row data, and also most of the header data, is due to both legal requirements and information transparency (mainly accounting, stock and taxes).
I share your view that the update function should return a value other then 0 when the document is not updated. You can suggest this change by opening a post in the Product Development Collaboration forum.
Kind Regards,
Vítor Vieira -
Document rows Cannot be closed concurrently - Purchase Orders
hello, I am trying to close Purchase Orders using DTW. When I import the files I get the following error :
Document rows Cannot be closed concurrently with the other document modifications you have made (POR1.linestatus).
These are item Purchase Orders, with 1 item in the contents of the PO.
the client is on SAP Business One 2007 A (8.00.232) SP: 01 PL: 07 and
DTW Version 2005.0.28 , API Version 8.0.181
When I use the same templates for Service Purchase orders I have no problem closing it with DTW.
this is my files - OPOR HEADER
RecordKey DocEntry
RecordKey DocEntry
1 5
POR1 LINES file
bold RecordKey LineNum LineStatus
bold RecordKey LineNum LineStatus
1 0 bost_Close
Your assistance will be much appreciated.Hi,
Check if this PO has target document or not. If a partial GRPO based on the PO, you need to close it manually.
Thanks,
Gordon -
Updating single row by multiple users at the same time
Hi,
I have been asked to develop an application where a single row from a table will be accessed by multiple users. Even multiple users can try to update the same row at the same time. So, to provide a solution of this problem should it be the best way to lock that particular row when user requesting to update it and after completion of commit the lock will be released. In the same time if some other user request to update the same row then it will be in the wait condition.
Please provide suggestion that is it the best way to handle the situation or not. If it is then can you also please provide an example (with sample code) of it.
Regards,
KoushikIt depends entirely on how the system was built.
You could relatively easily build an application that does something like
- Select a row with as last_updated_date column
- Update the row specifying the last_updated_date you had selected in your WHERE clause
- If the update updates 1 row, it was successful, otherwise inform the user that the row was already updated.
In this case, the second user would get an error indicating that the seat had already been purchased.
You could also relatively easily do a SELECT FOR UPDATE to prevent users from ever getting an error between the time they select a seat and the time they finish their transaction. Of course, if the user wanders away from the computer, or inadvertently ends up locking dozens of rows, this tends to rather problematic in practice. You may find that when the train pulls out of the station, someone that never ended up buying a ticket has locked a dozen rows so you lost a dozen sales. If you have a call center where operators are reserving seats for people on the phone, you may decide that explicit locking is more appropriate because you're confident that the operators aren't going to leave tickets locked for long periods of time and the cost of having the customer walked through the seat selection process multiple times would be higher than the cost of having rows locked longer than they need to be.
Justin -
How to update multiple rows in one query using php
i am new to this can any one help me how to update multiple rows at a time i am doing an school attendance page
Often the situation is such that you have multiple courses across a range of dates.So students may take more than one course, and you need to track attendance for each course date. The following graphic demonstrates this:
In such a situation, you need four database tables as follows:
students (student_id, student_name, etc.)
courses (course_id, course_name, etc.)
students_courses (student_id, course_id)
attendance (student_id, course_id, dater)
A fifth table may also be needed to define the dates of courses, but you may also be able to build this array programmatically by using PHP's robust date functions, which can give you, for instance, all the Tuesdays and Thursdays between a start date and end date.
The students_courses table simply keeps track of which students are taking which courses, so it has just two columns for the primary keys of both of the main tables. The attendance table is similar, but it also includes a date field. The following view of the attendance table demonstrates this:
So if David's solution does cover your needs, consider yourself lucky, because this could quickly grow from a beginner-appropriate project to a moderately advanced one.
Maybe you are looking for
-
How Do I Format My Macintosh HD for Use as Data Drive?
Hi! I recently bought two Maxline Pro 500 Gig hard drives to add to the 2 hard drives I received with my MacPro. But they're so fast and quiet I decided to use one of them as my boot drive and will be cloning the Macintosh HD to the one. I got that p
-
Sticky notes in Acrobat X default to off-the-page and extremely large
Hi! I'm fighting an issue where sticky notes that I add to any PDF will always default to the far right (off of the screen) and they tend to be large (as in, the size of about 2 letter pages). Everytime I add a sticky note to a PDF I must zoom out s
-
3rd party sales order (GL posting)
I have posted this thread in Sales forum but did not receive answer. need help urgently. i have configured 3rd party sales order where when user enter item category as TAB, PR will automatically be created and GR goes into sales order stock in MMBE.
-
I am trying to Remote desktop from my mac to my pc. I downloaded MS RDC, and set up the PC to accept remote connections. WHen I enter the IP to connect from my Mac, it doesn't connect. Is there something I am missing? My 2 machines are connected to t
-
iPLANET ISSUE Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file? CODE ServletContext context = mpiCfg.getServletConfig().getServletContext(); // Debugging out.print(context.getServerInfo());