on 02-22-2018 7:29 PM
Hello Experts
In a Mexico localization company with electronic document CFDI 3.3 configuration, In an A/R Invoice I need to save in Reference information table (INV21) information about referenced documents (transaction type, document number, reference type...) but I cant find the service or object in DI API, is it already exposed?
Thank you
Alvaro
Hi Alvaro,
As far as I have checked this, it seems it is not exposed to DI API.
Kind regards,
ANKIT CHAUHAN
SAP SME Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is how you can manage the documents to add in Reference.
Here I have done this, after adding an adjustment journal entry I have tagged that to respective A/R Invoice's Reference Document i.e. in INV21.
This below workout code is in C# :-
int result = journalEntry.Add();
// Check if the journal entry was successfully added
if (result == 0)
{
// Get the generated JournalEntry number
string generatedJournalEntryNumber = company.GetNewObjectKey().ToString();
Console.WriteLine("Journal entry added successfully. Journal Entry Number: " + generatedJournalEntryNumber);
// Create a new line in INV21 table to establish the relation
Documents invLine = company.GetBusinessObject(BoObjectTypes.oInvoices);
invLine.GetByKey(invoiceEntry);
invLine.DocumentReferences.ReferencedObjectType = ReferencedObjectTypeEnum.rot_JournalEntry;
invLine.DocumentReferences.ReferencedDocEntry = Convert.ToInt32(generatedJournalEntryNumber);
invLine.DocumentReferences.IssueDate = DateTime.Today.AddDays(2);
invLine.DocumentReferences.Add();
int UpdateResult = invLine.Update();
if (UpdateResult == 0)
{
Console.WriteLine("Invoice line updated successfully with Journal Entry.");
}
else
{
int errorCode;
string errorMessage;
company.GetLastError(out errorCode, out errorMessage);
Console.WriteLine("Failed to update invoice line. Error Code: " + errorCode + ", Error Message: " + errorMessage);
}
}
else
{
int errorCode;
string errorMessage;
company.GetLastError(out errorCode, out errorMessage);
Console.WriteLine("Failed to add journal entry. Error Code: " + errorCode + ", Error Message: " + errorMessage);
company.Disconnect();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, the designated channel for SAP Business One requirements is Customer Influence. Make sure that your requirements are in there and voted for! This is the only way we can prioritize in line with the market and realize your relevant requirements.
See this blog: Are you wondering how you can improve SAP Business One? You are SAP Business One!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having customers ask for this feature as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.