static void FAN_GLImport(Args _args)
{
AxLedgerJournalTable header = new AxLedgerJournalTable();
AxLedgerJournalTrans trans = new AxLedgerJournalTrans();
container ledgerDim, offsetDim;
LedgerJournalNameId ledgerJournalNameId = "GeneralJR";
DimensionAttributeValueCombination ledgerDimension;
LedgerJournalACType accType, offsetAccType;
BankAccountTable bankAccountTable; ;
accType = LedgerJournalACType::Ledger;
offsetAccType = LedgerJournalACType::Bank; header.parmJournalName(ledgerJournalNameId);
header.save(); trans.parmAccountType(accType);
trans.parmJournalNum(header.ledgerJournalTable().JournalNum); //If account type is Ledger
ledgerDim = ["142102-C-ADMIN","","C","ADMIN"];//First is Display value, followed by Main Account and then dimensions. //If account type is other than ledger then Switch case statement can be written to get RecId from DimensionAttributeValueCombination Table. trans.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(ledgerDim));
trans.parmAmountCurDebit();
trans.parmOffsetAccountType(offsetAccType); switch(offsetAccType)
{
case LedgerJournalACType::Bank : select firstOnly bankAccountTable
join RecId from ledgerDimension
where ledgerDimension.DisplayValue == bankAccountTable.AccountID
&& bankAccountTable.AccountID == "ICICI Bank";
trans.parmOffsetLedgerDimension(ledgerDimension.RecId); //Same cases has to be written for others like Vendor, Customer. Except Account type ledger
//If offset account type is ledger then trans.parmOffsetLedgerDimension() will only be supported.
} //trans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(offsetDim));
trans.save(); }

How to using x++ code create GL journal[AX2012]的更多相关文章

  1. How to using to code import to GL journal[AX2012]

    static void THK_importLedgerJournalTrans(Args _args) { Filename fileName = "C:\\Users\\ksiu3880 ...

  2. Visual Studio Code create the aps.net core project(Visual Studio Code 创建asp.net core项目)

    Install the C# plug-in as shown below: Perfom the dotnet new --help command as shown below: Enter a ...

  3. Oracle Applications Multiple Organizations Access Control for Custom Code

    档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code ...

  4. How to: Synchronize Files by Using Managed Code

    The examples in this topic focus on the following Sync Framework types: FileSyncProvider FileSyncOpt ...

  5. 转载:Character data is represented incorrectly when the code page of the client computer differs from the code page of the database in SQL Server 2005

    https://support.microsoft.com/en-us/kb/904803 Character data is represented incorrectly when the cod ...

  6. URAL 1780 G - Gray Code 找规律

    G - Gray CodeTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view ...

  7. 002.Create a web API with ASP.NET Core MVC and Visual Studio for Windows -- 【在windows上用vs与asp.net core mvc 创建一个 web api 程序】

    Create a web API with ASP.NET Core MVC and Visual Studio for Windows 在windows上用vs与asp.net core mvc 创 ...

  8. Object Detection with 10 lines of code - Image AI

    To perform object detection using ImageAI, all you need to do is Install Python on your computer sys ...

  9. WPS 2019 How To Create New Sheets For Each Row In Excel?

    https://www.extendoffice.com/documents/excel/3197-excel-create-new-sheet-for-each-row.html  How To C ...

随机推荐

  1. Spring SpEL表达式的理解

    Spring的IOC本质就一个容器,也就是一个对象的工厂,我们通过配置文件注册我们的Bean对象,通过他进行对象的组装与床架. SpEL表达式就是一种字符串编程,类似于JS里面的EVAL的作用,通过它 ...

  2. C# 版dll 程序集合并工具

    C# 版dll 程序集合并工具 最近要开发一个控件给同事用,开发中会引用一些第三方DLL,这样交给用户很不方便,希望的效果是直接交付一个DLL文件.网上找了一些资料. 1.       使用 Cost ...

  3. Android开发-API指南-<grant-uri-permission>

    <grant-uri-permission> 英文原文:http://developer.android.com/guide/topics/manifest/grant-uri-permi ...

  4. 普通session vs MemcachedSession vs RedisSession

    一.普通session(数据存储在内存中) #!/usr/bin/env python # -*- coding:utf-8 -*- from hashlib import sha1 import o ...

  5. 保护企业的Word文档

    保护企业的Word文档 通常,我们可以对Word文件进行加密码.设置为只读.禁止复制甚至是将内容变成图片加以保护,但这仅限于个人少量文档,如果是企业每天生产大量的word文档好用这种方法就不行,今天为 ...

  6. json与gson

    json:java中将json字符串转换成实体对象时,key值不能大写.将实体对象转换成json时,会默认把key值改成小写 gson:java中将json字符串转换成实体对象时,要与实体对象的字段值 ...

  7. verilog实现奇数倍分频

    在学习FPGA的过程中,最简单最基本的实验应该就是分频器了, 同时分频器也是FPGA设计中使用频率非常高的基本设计之一, 尽管在芯片厂家提供的IDE中集成了锁相环IP, 如altera 的PLL,Xi ...

  8. leetcode 101

    101. Symmetric Tree Given a binary tree, check whether it is a mirror of itself (ie, symmetric aroun ...

  9. py2.7+pyqt4开发端口检测工具

    使用工具:python2.7,pyqt4,pyinstaller,pywin32 先贴代码 import sys from PyQt4 import QtGui,QtCore import threa ...

  10. hdu2099

    注意是两位数,必须输出01,02,03,这种 #include <stdio.h> int main(){ int begin,end; int i; ]; int cnt; int si ...