Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

GetObjectCode

The GetObjectCode returns the DocEntry. is there anyway I can get the newly added DocNum ? Because it returns 0

if (Document.Add() != 0)

{

oCompany.GetLastError(out ErrorCode, out ErrorMsg);

rtfResult.Text += (FortSum.General.IsFrench ? "Fichier : " : "File : ") + SelectedFile.Trim() + ", " + ErrorCode.ToString() + " " + ErrorMsg + Environment.NewLine;

}

else

{

Need the newly added DocNum !

//rtfResult.Text += "Document #" + ObjectCode + (FortSum.General.IsFrench ? " créé avec succès..." : " created successfuly...");

rtfResult.Text += "Document " + (FortSum.General.IsFrench ? " créé avec succès..." : " created successfuly...");

MoveToBackup();

Former Member
Former Member replied

Hi Marc,

There's no standard way to get the DocNum. You'll have to query the particular object table or use the GetByKey(newDocEntry) method of the Document to get the DocNum as a property.

HTH,

Ian

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question