使用ABSL的日记帐凭证未保存

2020-08-19 04:19发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)专家们, 我有一个ABSL来创...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


专家们,

我有一个ABSL来创建日记帐凭证,我尝试调试并执行代码,但没有保存。 下面是代码。

关于

威尔逊

导入ABSL;
 将AP.Common.GDT导入为apCommonGDT;
 导入AP.FinancialAccounting.Global;


 var accountingEntryData:AccountingEntry的元素;
 accountingEntryData.AccountingClosingStepCode =" 010";
 accountingEntryData.AccountingDocumentTypeCode =" 00047";
 accountingEntryData.BusinessTransactionTypeCode =" 601";


 accountingEntryData.CompanyID =" 21200";
 accountingEntryData.EntryDate = ABSL:Date.ParseFromString(" 2020-05-11");
 accountingEntryData.PostingDate = ABSL:Date.ParseFromString(" 2020-05-11");
 accountingEntryData.TransactionCurrencyCode =" PHP";
 accountingEntryData.Note.languageCode = ABSL:LanguageCode.ParseFromString(" EN");
 accountingEntryData.Note.content ="硬币ID";


 var accountingEntry = AccountingEntry.Create(accountingEntryData);

 var accountingEntryItemData1:AccountingEntry.Item的元素;
 var accountingCodingBlockTypeCode:AccountingCodingBlockTypeCode;
 accountingCodingBlockTypeCode.content =" ACC";
 accountingEntryItemData1.AccountingCodingBlockTypeCode = accountingCodingBlockTypeCode;
 accountingEntryItemData1.ChartOfAccountsItemCode.content =" 4000";
 accountingEntryItemData1.DebitCreditCode =" 1";
 accountingEntryItemData1.TransactionCurrencyAmount.content = 150;
 accountingEntry.Item.Create(accountingEntryItemData1);


 var accountingEntryItemData2:AccountingEntry.Item的元素;
 accountingEntryItemData2.AccountingCodingBlockTypeCode = accountingCodingBlockTypeCode;
 accountingEntryItemData2.ChartOfAccountsItemCode.content =" 00011000";


 accountingEntryItemData2.DebitCreditCode =" 2";


 accountingEntryItemData2.TransactionCurrencyAmount.content =(-1 * 100);


 accountingEntry.Item.Create(accountingEntryItemData2);


 var accountingEntryItemData3:AccountingEntry.Item的元素;
 accountingEntryItemData3.AccountingCodingBlockTypeCode = accountingCodingBlockTypeCode;
 accountingEntryItemData3.ChartOfAccountsItemCode.content =" 111101";


 accountingEntryItemData3.DebitCreditCode =" 2";


 accountingEntryItemData3.TransactionCurrencyAmount.content =(-1 * 50);


 accountingEntry.Item.Create(accountingEntryItemData3);

 accountingEntry.SubmitForPosting();
 accountingEntry.Post(); 
5条回答
callcenter油条
2020-08-19 04:37 .采纳回答

你好,

调试时是否有任何错误或警告消息?

如何进行一些更改并尝试这样操作。 我们可以使用以下逻辑成功创建。

导入ABSL;
 将AP.Common.GDT导入为apCommonGDT;
 导入AP.FinancialAccounting.Global;




 var accountingEntryData:AccountingEntry的元素;

 accountingEntryData.Note.languageCode = ABSL:LanguageCode.ParseFromString(" EN");
 accountingEntryData.Note.content ="硬币ID";
//首先创建根
 var accountingEntry = AccountingEntry.Create(accountingEntryData);

 accountingEntry.AccountingClosingStepCode =" 010";
 accountingEntry.AccountingDocumentTypeCode =" 00047";
 accountingEntry.BusinessTransactionTypeCode =" 601";


 accountingEntry.CompanyID =" 21200";
//accountingEntry.EntryDate = ABSL:Date.ParseFromString(" 2020-05-11");
//accountingEntry.PostingDate = ABSL:Date.ParseFromString(" 2020-05-11");
 accountingEntry.TransactionCurrencyCode =" PHP";

 var accountingEntryItemData1:AccountingEntry.Item的元素;
 var accountingCodingBlockTypeCode:AccountingCodingBlockTypeCode;
 accountingCodingBlockTypeCode.content =" ACC";
 accountingEntryItemData1.AccountingCodingBlockTypeCode = accountingCodingBlockTypeCode;
 accountingEntryItemData1.ChartOfAccountsItemCode.content =" 4000";
 accountingEntryItemData1.DebitCreditCode =" 1";
 accountingEntryItemData1.TransactionCurrencyAmount.content = 150;
 accountingEntry.Item.Create(accountingEntryItemData1);




 var accountingEntryItemData2:AccountingEntry.Item的元素;
 accountingEntryItemData2.AccountingCodingBlockTypeCode = accountingCodingBlockTypeCode;
 accountingEntryItemData2.ChartOfAccountsItemCode.content =" 00011000";




 accountingEntryItemData2.DebitCreditCode =" 2";




 accountingEntryItemData2.TransactionCurrencyAmount.content =(-1 * 100);




 accountingEntry.Item.Create(accountingEntryItemData2);




 var accountingEntryItemData3:AccountingEntry.Item的元素;
 accountingEntryItemData3.AccountingCodingBlockTypeCode = accountingCodingBlockTypeCode;
 accountingEntryItemData3.ChartOfAccountsItemCode.content =" 111101";




 accountingEntryItemData3.DebitCreditCode =" 2";




 accountingEntryItemData3.TransactionCurrencyAmount.content =(-1 * 50);




 accountingEntry.Item.Create(accountingEntryItemData3);

 accountingEntry.SubmitForPosting();
 accountingEntry.Post();
 

问候,

May

一周热门 更多>