The invention relates to the technical field of
data exchange between an SAP
system and
JAVA software, and provides a
code translation method based on an SAP and
JAVA software system and related equipment thereof.The
code translation method comprises the steps that when an ABAP code of the SAP
system needs to be translated into a
JAVA language, an ABAP variable of the SAP system is read, the
data type of the ABAP variable is judged according to the read ABAP variable, and according to the
data type of the ABAP variable, the code of the SAP system is translated into the JAVA language. According to the method, JAVA entity class codes are generated, the JAVA entity class codes comprise a JAVA main entity
class code and a plurality of JAVA sub-entity class codes, and the JAVA main entity
class code and the plurality of JAVA sub-entity class codes are used for being output into a
text file, so that when an SAP system and a JAVA system use a common interface to carry out
data exchange, after the SAP determines an interface, the JAVA entity class codes are output into the
text file, and the JAVA entity class codes are output into the
text file. The JAVA interface entity
class code can be accurately and automatically generated, and the problem that developers repeatedly communicate and confirm the interface and repeatedly modify the
JAVA code is solved.