‎2021 Aug 31 7:12 PM
JCoTable tbl_CURRENCYAMOUNT = tables.getTable("CURRENCYAMOUNT"); tbl_CURRENCYAMOUNT.appendRow(); tbl_CURRENCYAMOUNT.setRow(1); tbl_CURRENCYAMOUNT.setValue("ITEMNO_ACC","0000000001"); tbl_CURRENCYAMOUNT.setValue("CURRENCY","MMK"); tbl_CURRENCYAMOUNT.setValue("AMT_DOCCUR","100"); tbl_CURRENCYAMOUNT.appendRow(); tbl_CURRENCYAMOUNT.setRow(2); tbl_CURRENCYAMOUNT.setValue("ITEMNO_ACC","0000000002"); tbl_CURRENCYAMOUNT.setValue("CURRENCY","MMK"); tbl_CURRENCYAMOUNT.setValue("AMT_DOCCUR","-100");
Error as below
|E|RW |609|Error in document: BKPFF $ DEVCLNT779 | |000000|BKPFF |$ |DEVCLNT779 | | |00000000| |DEVCLNT779| |E|RW |008|FI/CO interface: Inconsistent currency information
‎2021 Sep 01 6:59 AM
Hello myominkhaing
Your question is very concise. You are not showing all of your code and not explaining what you are trying to do. I can only assume, you are trying to post a document with the accounting interface.
Still you get two error messages: RW609 and RW608. Consult their long texts available in the SE91 transaction. RW609 just says there is an error during a document posting posting. RW608 says:
Short Text
FI/CO interface: Inconsistent currency information
Diagnosis
The FI/CO document does not contain any currency information for the following item:
• Reference document ""
• Reference organization ""
• Item number ""
System Response
The system expects at least one currency item for each FI/CO document line item.
You may consult SAP support notes on RW008 error or double check the data with which you call the accounting interface.
Best regards
Dominik Tylczynski
‎2021 Sep 01 6:36 AM
This is not serious
‎2021 Sep 01 6:59 AM
Hello myominkhaing
Your question is very concise. You are not showing all of your code and not explaining what you are trying to do. I can only assume, you are trying to post a document with the accounting interface.
Still you get two error messages: RW609 and RW608. Consult their long texts available in the SE91 transaction. RW609 just says there is an error during a document posting posting. RW608 says:
Short Text
FI/CO interface: Inconsistent currency information
Diagnosis
The FI/CO document does not contain any currency information for the following item:
• Reference document ""
• Reference organization ""
• Item number ""
System Response
The system expects at least one currency item for each FI/CO document line item.
You may consult SAP support notes on RW008 error or double check the data with which you call the accounting interface.
Best regards
Dominik Tylczynski
‎2021 Sep 01 7:16 AM
These are functional errors, so you should change the tag from ABAP Development to something related to Finance...
You can also search the Web:
RW609 site:sap.com
or
RW008 site:sap.com
‎2021 Sep 01 2:08 PM
frdric.girod this is pretty serious. You can tell it because after the "Please help", that guy used TWO exclamation signs.
So I'll drop all my workload, tell my boss I'll not be able to work until this matter is solved and will refuse to be paid until the question is marked as answered.
You do not want to know what I'd do if there were three marks.
‎2021 Sep 01 4:18 PM
Thanks for your replied.
Now it's fixed and I changed Bankor cash Account ITEMNO_ACC "01" and Customer's ITEMNO_ACC "02"
Let me share the code as below:
package MGS_DMS;
import com.sap.conn.jco.AbapException;
import com.sap.conn.jco.JCoContext;
import com.sap.conn.jco.JCoDestination;
import com.sap.conn.jco.JCoException;
import com.sap.conn.jco.JCoFunction;
import com.sap.conn.jco.JCoParameterList;
import com.sap.conn.jco.JCoStructure;
import com.sap.conn.jco.JCoTable;
import com.sap.conn.jco.JCoDestinationManager;
import java.util.Date;
public class JCOPayment_WOSOS {
static SAPCON con=new SAPCON();
public static void main(String[] args) throws JCoException{
// TODO Auto-generated method stub
con.createProperties();
BAPI_Invoice_CREATEFROMDAT2();
}
public static void BAPI_Invoice_CREATEFROMDAT2() throws JCoException {
JCoDestination destination = JCoDestinationManager.getDestination("mySAPSystem");
JCoFunction function = destination.getRepository().getFunction("BAPI_ACC_DOCUMENT_POST");
JCoContext.begin(destination);
if (function == null) {
throw new RuntimeException("Function not found in SAP.");
} else {
JCoParameterList importParameterList = function.getImportParameterList();
System.out.println(importParameterList);
JCoStructure input_header = importParameterList.getStructure("DOCUMENTHEADER");
input_header.setValue("USERNAME", "APP");
input_header.setValue("COMP_CODE", "1000");
input_header.setValue("DOC_DATE", new Date());
input_header.setValue("PSTNG_DATE", new Date());
input_header.setValue("TRANS_DATE", new Date());
//input_header.setValue("FISC_YEAR", "2021");
//input_header.setValue("FIS_PERIOD", "8");
input_header.setValue("DOC_TYPE", "DZ");
input_header.setValue("REF_DOC_NO", "ACE TEST");
//input_header.setValue("AC_DOC_NO", "1400000018");
JCoParameterList tables = function.getTableParameterList();
System.out.println(tables);
JCoTable tbl_ACCOUNTGL = tables.getTable("ACCOUNTGL");
tbl_ACCOUNTGL.appendRow();
tbl_ACCOUNTGL.setRow(1);
tbl_ACCOUNTGL.setValue("ITEMNO_ACC","0000000001");//***1 is for Bank Account
tbl_ACCOUNTGL.setValue("GL_ACCOUNT","0010000115");//Bank Account
//0100000194
//tbl_ACCOUNTGL.setValue("AC_DOC_NO","0010000115");
JCoTable tbl_AR = tables.getTable("ACCOUNTRECEIVABLE");
tbl_AR.appendRow();
tbl_AR.setRow(1);
tbl_AR.setValue("ITEMNO_ACC","0000000002"); //***2 is for Customer Account
tbl_AR.setValue("CUSTOMER","0001000206");
JCoTable tbl_CURRENCYAMOUNT = tables.getTable("CURRENCYAMOUNT");
tbl_CURRENCYAMOUNT.appendRow();
tbl_CURRENCYAMOUNT.setRow(1);
tbl_CURRENCYAMOUNT.setValue("ITEMNO_ACC","0000000001");
tbl_CURRENCYAMOUNT.setValue("CURRENCY","MMK");
tbl_CURRENCYAMOUNT.setValue("AMT_DOCCUR","100.0000");
//tbl_CURRENCYAMOUNT.setValue("AMT_BASE","100.0000");
tbl_CURRENCYAMOUNT.appendRow();
tbl_CURRENCYAMOUNT.setRow(2);
tbl_CURRENCYAMOUNT.setValue("ITEMNO_ACC","0000000002");
tbl_CURRENCYAMOUNT.setValue("CURRENCY","MMK");
tbl_CURRENCYAMOUNT.setValue("AMT_DOCCUR","-100");
//tbl_CURRENCYAMOUNT.setValue("AMT_BASE","100.0000");
try {
function.execute(destination);
JCoParameterList exportParameterList = function.getExportParameterList();
System.out.println(exportParameterList);
String value = exportParameterList.getValue("OBJ_KEY").toString();
System.out.println("Payment Slip:"+ value);
//Check Point
JCoParameterList tables1 = function.getTableParameterList();
System.out.println(tables1);
JCoTable table_R = tables1.getTable("RETURN");
System.out.println(table_R);
System.out.println(table_R.getString("MESSAGE"));
System.out.println(table_R.getString("TYPE"));
con.TRANSACTION_COMIT();
//BAPI_DELIVERYORDER_PIG_CREATEFROMDAT2(DELIVERYID);
} catch (AbapException e) {
System.out.println(e.toString());
return;
}
}
}
}