Additional expenses in a documents
Hi
I need to add the additionalexpenses (with SDK) before to save the invoice with the client. I try to use the documentadditionalexpenses object but I have some problems to use this object.
The first problem is that there isn't the docentry of the document that is the key of the inv3 table.
Can you help me?
thanks
Rita
try something like this
oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
oDelivery = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
'Looping through the expenses
For y = 0 To oDelivery.Expenses.Count - 1
'Setting the Delivery expense
oDelivery.Expenses.SetCurrentLine(y)
If y > 0 Then
oInvoice.Expenses.Add()
End If
'Checking if the total is NOT 0
If oDelivery.Expenses.LineTotal <> 0 Then
oInvoice.Expenses.BaseDocEntry = iDeliveryNote
oInvoice.Expenses.BaseDocLine = oDelivery.Expenses.LineNum
oInvoice.Expenses.BaseDocType = 15
End If
Next y
Similar Messages
-
Internal Error (-5002) on adding Additional Expenses in a sales-document
Hi All,
I try to add an additional expense in a sales-document. I receice an internal error (-5002) What is the problem ?
I want to transfer the additional expense from a sales-order to my target delivery note.
See my example in C#:
oDlvNote.CardCode = cuno;
oDlvNote.DocDueDate = oDate;
string queryvx2 = "Select ExpnsCode, LineTotal, Comments,
DocEntry, LineNum From " + tablenameexp + " Where DocEntry
= " + origornov;
using (System.Data.SqlClient.SqlDataReader sqlReadervx2 =
SwissAddonFramework.B1Connector.GetB1Connector().ExecuteQuery(queryvx2))
while (sqlReadervx2.Read())
expcode = sqlReadervx2.GetInt32(0);
linetotexp =
Decimal.ToDouble((Decimal)sqlReadervx2.GetSqlDecimal(1));
remarksexp = sqlReadervx2.GetString(2);
docentryexp = sqlReadervx2.GetInt32(3);
linenumexp = sqlReadervx2.GetInt32(4);
oDlvNote.Expenses.BaseDocEntry = docentryexp;
oDlvNote.Expenses.BaseDocLine = linenumexp;
oDlvNote.Expenses.BaseDocType = objectnr;
oDlvNote.Expenses.ExpenseCode = expcode;
oDlvNote.Expenses.LineTotal = linetotexp;
oDlvNote.Expenses.Remarks = remarksexp;
---> oDlvNote.Expenses.Add();
oDlvNote.Lines.ItemCode = Artikel;
Regards,
RolandHi Roland,
I think it's the same issue as here:
-5002,if you reference production in a row,so all rows should be refer prod
Regards,
Frank
PS: Expenses are a "lines" type oject - just like Document_Lines - which are handled in the TB1300
Message was edited by:
Frank Moebius -
Hi All,
We are using SAP 8.8 PL 15.
We take following steps for a import cycle.
PURCHASE ORDER
GOODS RECEIPT PO
LANDED COST
AP INVOICE
WHEN WE RECEIVE FREIGHT , CLEARING , INSURANCE ETC BILLS (The additional expenses occured in import) we book them .
After that we are interested in knowing raw material cost. Because we are unable to link our freight bills to the LANDED COST
DOCUMENT which is pulled from GRPO.
Any help would be greatly appreciated.
Thanks
Malhaaar.Hi Rahul,
Our inventory is getting re valuated properly.
Only thing is that , when we see a service invoice let us say for clearing charges in A/P Invoice then we are unable to make out against which shipment we paid this clearing charges.
Or to put it in other words , If in a financial year we pay X amount towards clearing charges to S.J Thacker then we do not know the shipments associated with the bills.
Through Form Settings, I displayed base ref , base type etc columns but no trace. They are blank.
Thanks
Malhaar -
List of invoices where some additional expenses were posted
Dear All ,
Is there any reports to list the of invoices, where some additional expenses were posted ?
Thanks,
DashI assume you have a specific document type for your invoice posting. If you have, a simple GL line item list will suffice for your requirement. Use the Document Type and the Expense GL account as parameters.
-
Additional expenses on existing delivery
Im trying to add additional expenses on delivery which is created already and has no invoice (customer direction).
I have code
Dim odocument As SAPbobsCOM.Documents
odocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
If odocument.GetByKey(docentry) Then
odocument.Expenses.Add()
odocument.Expenses.SetCurrentLine(1)
odocument.Expenses.ExpenseCode = 1
odocument.Expenses.LineTotal = value
Dim err_code As Integer
err_code = odocument.Update()
Dim err_msg As String
If err_code <> 0 Then
oCompany.GetLastError(err_code, err_msg)
MsgBox(err_msg)
End If
End If
but it alwazs ends with internal error after .update. Is it even possible to update existing delivery with expenses through DI?Have you tried manually update this existing delivery with additional expenses? If you can, update should work from DI too. Otherwise, it is not possible.
Thanks,
Gordon -
Additional fields in FI Document - BAdI FI_HEADER_SUB_1300
Hi,
I need to add some additional fields in FI document via transaction F-43.
I added them in an append structure in BKPF, implemented BADI FI_HEADER_SUB_1300 and programmed the screen with the corresponding fields. But it didn´t work with my new fields, the only fields that are updated in BKPF are XREF1_HD and XREF2_HD.
Does anyone know if it's possible to add new fields with badi FI_HEADER_SUB_1300 ? Do I need to consider something extra?
Best Regards,
NataliaHello Natalia,
Did you solve your problem?
I got a similar one, I'm trying to add some Z fields (added to BKPF via append struc.) to screens of transactions: F-43, F-63, FV60, FB60 (this badi could work for F-43, but I need to find another exit / badi for the others transactions).
I implemented the mentioned badi, but after debugging it, it looks like that after exiting the Z implementation, the only fields enabled to be transfered in the end, are XREF1_HD and XREF2_HD, no matter if you add any other else.
Please, let me know if you got further information.
Thanks in advance.
José Gabriel.
Edited by: José Gabriel on Oct 14, 2009 11:13 AM -
Additional data in Vendor document header - Planning Group
Dear all
We which to change the planning group of various vendor line items. We will be using the mass change function in FBL1N and have updated this to include the planning group field as per SAP note. I understand that we also need to update the planning group in additional items in the header for this to work.
Can you please help me on how we can include the planning group in the additional data on the document header.
PRGThank you for yor reply. The problem I am having is that the field 'planning group' is not availalbe in the document header or in the additional fields so I can not update the transactional data not even individually. We have updated all the vendor master data but need to do this for the transactional data. My question is how to add this field?
Many thanks
PRG -
Travel Expense Management Configuration Document
Hi Friends,
Can anyone please guide me where I can get complete travel expense management configuration document explaining all the configuration nodes.
Regards,
ReemaHi,
It is very difficult to give the complete travel expense configuration. It differs based on client requirement and there is no standard set of configurations.
Just go through the below link for understanding and basics.
[http://help.sap.com/saphelp_erp60_sp/helpdata/en/6e/6bf037f1d6b302e10000009b38f889/frameset.htm]
Hope this helps.
Regards,
S.Srikanth -
Reading Additional info for Material Document (Movement Types 313, 201)
Hi SAP Gurus,
I am currently working on a requirement for Material Document Interface.
<u><b>The Requirement is as below:</b></u>
(1) The user creates/modifies a material document using MB01/MB03/MIGO for movement types 313 and 201 separately.
(2) The user maintains additional information by creating a NOTE using the option
SERVICES FOR OBJECT --> CREATE NOTE.
(3) To Print the materail document information.
<u><b>The Approach is followed is:</b></u>
1) I have to retrieve the Address for From and To Locations respectively along with document data and display it as Simple List output.
Approach:
I retrieved the data from MKPF and MSEG tables respectively.
Also retrieved the data for FROM and TO locations using table TWLAD and function module ADDR_GET.
(2) I also need to retreive additional information created by the user using the option SERVICES FOR OBJECT --> CREATE NOTE.
<b>Approach:
Request your guidance and inputs to solve the point (2) mentioned above.</b>
I have debugged the SAP Standard tcode MB01, MB03 ,MIGO which have the option SERVICES FOR OBJECT --> CREATE NOTE.
I have also used ST05 to trace the transaction to get a proper solution.
But, i was able to observe that only a table SOOD provides the initial required info only which points to a office document type.
Looking forward to your valuable inputs, so that i can retrieve the data entered using the option SERVICES FOR OBJECT --> CREATE NOTE.
Thanks in advance for spending time and
guiding me to deliver the development on time.
With best regards,
SudhakarHi,
Try this..
TABLES: MSEG.
PARAMETERS: P_DATE LIKE MKPF-BUDAT.
SELECT-OPTIONS SO_BWART FOR MSEG-BWART.
SELECT-OPTIONS SO_MATNR FOR MSEG-MATNR.
DATA: BEGIN OF ITAB OCCURS 0,
MBLNR LIKE MKPF-MBLNR,
GJAHR LIKE MKPF-MJAHR,
MATNR LIKE MSEG-MATNR,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
END OF ITAB.
SELECT AMBLNR AMJAHR BMATNR BMENGE B~MEINS
INTO TABLE ITAB
FROM MKPF AS A INNER JOIN MSEG AS B
ON AMBLNR = BMBLNR AND
AMJAHR = BMJAHR
WHERE A~BUDAT = P_DATE
AND B~BWART IN SO_BWART
AND B~MATNR IN SO_MATNR
<b> AND B~MENGU = 'X'.</b>
The field MENGU might be used to check if the
material movement has affected the stock..
Also I have used posting date = given date in P_DATE..
LOOP AT ITAB.
WRITE: / ITAB-MBLNR,
ITAB-GJAHR,
ITAB-MATNR,
ITAB-MENGE,
ITAB-MEINS.
ENDLOOP.
Thanks,
Naren -
[Oracle Text]How to register additional datas when indexing documents ?
Hello,
For the moment we index documents (Word, excel, pdf, ppt, html, xml...) from the filesystem and it works well.
Now, we need to attach some informations on each documents and we must be able to search on these attributes, for instance :
We can index a Word document and we would like some additionnal index informations like :
YEAR
SIZE
NUMBER
These informations are stored in a table, the table contains also the path to the documents on the filesystem.
We are able to query a text on the index mixed with a filter on the columns above.
We tought with the solution to store these informations directly in the index, but we don't know if it's a good solution (in term of speed, structure...)
So, Is there any solution to index the documents on the filesystem with extra information at index time ?
Is it possible ? How can we do that ?
What do you think about that ?
Thanks by advance1. If you're using 12c, you can use ctx_doc.policy_languages. (https://docs.oracle.com/database/121/CCREF/cdocpkg011.htm#CCREF24102)
2. If you want multiple stoplists based on each document's language, you have to use the multi-lexer. For world_lexer, there is one stoplist; since the stoplists are somewhat dynamic (you can add but not remove them), the most accurate way to fetch the list is using ctx_report.describe_index or ctx_report.create_index_script and parse the report. -
Additional field in material document list
Dear Expert,
In the T.code MB51 ( material document list) in the ITEM DATA i need to add origin group field , is it possible ?
kindly help the above issue,,
Regards
AkshayaHi,
Yes its possible..............
procedure is to use the below tocde
Transaction variant SHD0 is the transaction code.
Using this tocde you can make a particular field as mandatory and hide the filed, gray the filed...
Thanks
Ramakrishna Pathi -
Add Additional Expenses to Invoice
Hi,
I have a problem that I hope you can help me with. See description below:
Workflow
1. User genrates delivery in B1 and adds info. Performs external process to calculate shipping expenses.
2. The expenses calculated in step get filled in a UDF on the Delivery.
3. User opens A/Rinvoice and converts the delivery added in Step 1 to an invoice.
At this stage, I would like to be able to pull the expenses from the UDF on the delivery to the invoice.
Please advise on best solution.
This is a big problem for us. Any help is appreaciated.
Thanks.Hi,
I think you can try this approach:
1. Create a UDF in the Invoice to store the info (if its already created just for testing create another one).
2. In the Invoice UDF create a Formatted search that based on the BaseType and BaseEntry of the first line of the invoice (Table INV1), query the UDF Field in the delivery (ODLN).
If the invoice is based in more than one delivery this approach will not work and you will have to develop a solution for this (that is not that difficult).
Hope it helps :-D
-M -
Need Additional Field in sales document
Hi Experts,
I have some issue in marketing documents.
My client needs an extra field named LR NO(Lorry Receipt No) and MRP in sales invoice document and it needs to be updated in the database everytime when the sales invoice document is added.
I heard of creating an User defined table and user defined tables will solve this issue.
Pls guide me by giving proper navigation steps and help me in solving the issue.
Thanx in advance,
Regards,\
VamsiHi Vamsi,
You have posted the exactly same question here yesterday:
Re: Extra Fields
As you know, if your question is not solved, you may need to rephrase your question and just keep the part that is not solved. Only you yourself would be the best person to solve your client's problem. If you don't have a complete understanding of their requests, I don't think any others could point you to the right direction.
Thanks,
Gordon -
Hi,
How i can print additional expences in PLD line by line.
eg.
Packing Charge = 10
Freight = 20
Total 30
regards
Suresh SSuresh,
The forum that you have posted your question in is for questions related to the SAP Business One SDK. Your question seems application related to the SAP Business One PLD. While you may get a response here, you may receive a faster response by posting your question in the SAP Business One Discussion Forum or entering a message with SAP Support.
Eddy -
Hi
I wrote an add-on that save an invoice when the user click on the add button in the invoice form (133). My program add automatically some additional expenses to the document. If I save the invoice with a VATGRoup as CA the invoice is created, if I use the VATGRoup V2 I have this error "-2028 OACT No match record found". If I save the invoice without my add-on and I use VATGroup V2 the document is created.
Can you help me?
Thanks
RitaHi
If I use my add-on on another database it saves the invoice correctly.
vFattura.DocNum = .Items("8").Specific.String
If .Items("78").Specific.Checked = True Then
vFattura.HandWritten = tYES
Else
vFattura.HandWritten = tNO
End If
vFattura.DocCurrency = "EUR"
vFattura.DocObjectCode = oInvoices
vFattura.CardCode = Trim(.Items("4").Specific.String)
vFattura.CardName = .Items("54").Specific.String
vFattura.Address = .Items("6").Specific.String
vFattura.DocDate=.Items"10").Specific.String
vFattura.DocDueDate =.Items("12").Specific.String
vFattura.NumAtCard = .Items("123").Specific.String
vFattura.Comments = .Items("16").Specific.String
vFattura.JournalMemo = .Items("18").Specific.String
vFattura.TaxDate=.Items("46").Specific.String
dTotDoc =.Items("29").Specific.String
dIVA=.Items.("27").Specific.String
vFattura.PaymentGroupCode = .Items("47").Specific.Selected.Value
If .Items("3").Specific.Selected.Value = "I" Then
vFattura.DocType = dDocument_Items
Else
vFattura.DocType = dDocument_Service
End If
For i = 1 To matRighe.RowCount - 1
Set colRead = matRighe.Columns.Item("1")
Set txtRead = colRead.Cells.Item(i).Specific
If txtRead.String <> "" Then
vFattura.Lines.ItemCode = txtRead.String
Set colRead = matRighe.Columns.Item("3")
Set txtRead = colRead.Cells.Item(i).Specific
vFattura.Lines.ItemDescription = txtRead.String
Set colRead = matRighe.Columns.Item("11")
Set txtRead = colRead.Cells.Item(i).Specific
vFattura.Lines.Quantity = txtRead.String
Set colRead = matRighe.Columns.Item("17")
Set txtRead = colRead.Cells.Item(i).Specific
vFattura.Lines.Price=txtRead.String
vFattura.Lines.Price = Mid(txtRead.String, 5)
vfattura.lines.Vatgroup="V2"
vFattura.Lines.AccountCode = "310101"
If i < matRighe.RowCount - 1 Then
vFattura.Lines.Add
end If
Maybe you are looking for
-
Merge pdf's forms, change text field name and Acrobat x pro closes automatically
I merged 20 pdfs in one interactive pdf, but when I try to change the name of the text fields (in orden to make the interactive independent from the other fields) the program close automatically. I tried to change the name of the text fields in each
-
Resize Firefox 26 to a width of less than 400px
Since the upgrade to Firefox 26.0, it seems to be no longer possible to resize a window to be smaller than a width of approx. ~400px. I run a custom web-application in its own Firefox instance, which requires far less horizontal space, and therefore
-
I just got it on Thursday, It keeps becoming unresponsive and then sometimes it would turn black and not turn back on and I had to use the Command, Option, P, R I am doing a restore on it using the preserve settings. Has anyone had these problems and
-
Use of Nokia service in my NokiaC2-06
How can get nokia ovi service in my NokiaC2-06 Phone
-
Plantronics Voyager PLT-510 not audible with iPhone
http://discussions.apple.com/thread.jspa?threadID=1701919 http://discussions.apple.com/thread.jspa?messageID=8877788 I'm just following up from the above prematurely archived threads (what is with this forum doing that before an issue is resolved!).