The following java files are generated -
- InputBapi_companycode_getdetail.java
- Bapi0002_2.java
- Bapi0002_3.java
- Bapireturn.java
- OutputBapi_companycode_getdetail.java
InputBapi_companycode_getdetail.java
com.sap.generated ;package
// Generated on Tue Apr 01 15:34:41 EST 2003
public class InputBapi_companycode_getdetail implements java.io.Serializable {
private java.lang.String COMPANYCODEID; //Company code
public void setCOMPANYCODEID( java.lang.String obj ){ this.COMPANYCODEID=obj; }
public java.lang.String getCOMPANYCODEID()
{ return this.COMPANYCODEID; }
}
Bapireturn.java
com.sap.generated ;package
// Generated on Fri Mar 28 16:53:26 EST 2003
public class Bapireturn implements java.io.Serializable {
private java.lang.String TYPE; //Message type:S success, E error, W warning, I information
private java.lang.String CODE; //Message code private java.lang.String MESSAGE; //Message text private java.lang.String LOG_NO; //Application log: log number private java.math.BigInteger LOG_MSG_NO; //Application log: message serial number private java.lang.String MESSAGE_V1; //Message variable private java.lang.String MESSAGE_V2; //Message variable private java.lang.String MESSAGE_V3; //Message variable private java.lang.String MESSAGE_V4; //Message variable public void setTYPE( java.lang.String obj ){ this.TYPE=obj; }
public java.lang.String getTYPE()
{ return this.TYPE; }
public void setCODE( java.lang.String obj )
{ this.CODE=obj; }
public java.lang.String getCODE()
{ return this.CODE; }
public void setMESSAGE( java.lang.String obj )
{ this.MESSAGE=obj; }
public java.lang.String getMESSAGE()
{ return this.MESSAGE; }
public void setLOG_NO( java.lang.String obj )
{ this.LOG_NO=obj; }
public java.lang.String getLOG_NO()
{ return this.LOG_NO; }
public void setLOG_MSG_NO( java.math.BigInteger obj )
{ this.LOG_MSG_NO=obj; }
public java.math.BigInteger getLOG_MSG_NO()
{ return this.LOG_MSG_NO; }
public void setMESSAGE_V1( java.lang.String obj )
{ this.MESSAGE_V1=obj; }
public java.lang.String getMESSAGE_V1()
{ return this.MESSAGE_V1; }
public void setMESSAGE_V2( java.lang.String obj )
{ this.MESSAGE_V2=obj; }
public java.lang.String getMESSAGE_V2()
{ return this.MESSAGE_V2; }
public void setMESSAGE_V3( java.lang.String obj )
{ this.MESSAGE_V3=obj; }
public java.lang.String getMESSAGE_V3()
{ return this.MESSAGE_V3; }
public void setMESSAGE_V4( java.lang.String obj )
{ this.MESSAGE_V4=obj; }
public java.lang.String getMESSAGE_V4()
{ return this.MESSAGE_V4; }
}
Bapi0002_2.java
com.sap.generated ;package
// Generated on Tue Apr 01 15:34:41 EST 2003
public class Bapi0002_2 implements java.io.Serializable {
private java.lang.String COMP_CODE; //Company code
private java.lang.String COMP_NAME; //Name of the company code or company private java.lang.String CITY; //City private java.lang.String COUNTRY; //Country key private java.lang.String CURRENCY; //Currency key private java.lang.String LANGU; //Language key private java.lang.String CHRT_ACCTS; //Chart of accounts private java.lang.String FY_VARIANT; //Fiscal year variant private java.lang.String VAT_REG_NO; //VAT registration number private java.lang.String COMPANY; //Company private java.lang.String ADDR_NO; //Address number private java.lang.String COUNTRY_ISO; //Country ISO code private java.lang.String CURRENCY_ISO; //ISO currency code private java.lang.String LANGU_ISO; //Language according to ISO 639 public void setCOMP_CODE( java.lang.String obj ){ this.COMP_CODE=obj; }
public java.lang.String getCOMP_CODE()
{ return this.COMP_CODE; }
public void setCOMP_NAME( java.lang.String obj )
{ this.COMP_NAME=obj; }
public java.lang.String getCOMP_NAME()
{ return this.COMP_NAME; }
public void setCITY( java.lang.String obj )
{ this.CITY=obj; }
public java.lang.String getCITY()
{ return this.CITY; }
public void setCOUNTRY( java.lang.String obj )
{ this.COUNTRY=obj; }
public java.lang.String getCOUNTRY()
{ return this.COUNTRY; }
public void setCURRENCY( java.lang.String obj )
{ this.CURRENCY=obj; }
public java.lang.String getCURRENCY()
{ return this.CURRENCY; }
public void setLANGU( java.lang.String obj )
{ this.LANGU=obj; }
public java.lang.String getLANGU()
{ return this.LANGU; }
public void setCHRT_ACCTS( java.lang.String obj )
{ this.CHRT_ACCTS=obj; }
public java.lang.String getCHRT_ACCTS()
{ return this.CHRT_ACCTS; }
public void setFY_VARIANT( java.lang.String obj )
{ this.FY_VARIANT=obj; }
public java.lang.String getFY_VARIANT()
{ return this.FY_VARIANT; }
public void setVAT_REG_NO( java.lang.String obj )
{ this.VAT_REG_NO=obj; }
public java.lang.String getVAT_REG_NO()
{ return this.VAT_REG_NO; }
public void setCOMPANY( java.lang.String obj )
{ this.COMPANY=obj; }
public java.lang.String getCOMPANY()
{ return this.COMPANY; }
public void setADDR_NO( java.lang.String obj )
{ this.ADDR_NO=obj; }
public java.lang.String getADDR_NO()
{ return this.ADDR_NO; }
public void setCOUNTRY_ISO( java.lang.String obj )
{ this.COUNTRY_ISO=obj; }
public java.lang.String getCOUNTRY_ISO()
{ return this.COUNTRY_ISO; }
public void setCURRENCY_ISO( java.lang.String obj )
{ this.CURRENCY_ISO=obj; }
public java.lang.String getCURRENCY_ISO()
{ return this.CURRENCY_ISO; }
public void setLANGU_ISO( java.lang.String obj )
{ this.LANGU_ISO=obj; }
public java.lang.String getLANGU_ISO()
{ return this.LANGU_ISO; }
}
Bapi0002_3.java
com.sap.generated ;package
// Generated on Tue Apr 01 15:34:41 EST 2003
public class Bapi0002_3 implements java.io.Serializable {
private java.lang.String ADDR_NO; //Address number
private java.lang.String FORMOFADDR; //Title private java.lang.String NAME; //Name 1 private java.lang.String NAME_2; //Name 2 private java.lang.String NAME_3; //Name 3 private java.lang.String NAME_4; //Name 4 private java.lang.String C_O_NAME; //c/o name private java.lang.String CITY; //City private java.lang.String DISTRICT; //District private java.lang.String CITY_NO; //City code for city/street file private java.lang.String POSTL_COD1; //City postal code private java.lang.String POSTL_COD2; //PO box postal code private java.lang.String POSTL_COD3; //Company postal code (for large customers) private java.lang.String PO_BOX; //PO Box private java.lang.String PO_BOX_CIT; //PO Box city private java.lang.String DELIV_DIS; //Post delivery district private java.lang.String STREET; //Street name private java.lang.String STREET_NO; //Street code for city/street file private java.lang.String STR_ABBR; //Abbreviation of street name (e.g in Spain) private java.lang.String HOUSE_NO; //House number private java.lang.String STR_SUPPL1; //Street 2 private java.lang.String STR_SUPPL2; //Street 3 private java.lang.String LOCATION; //Street 5 private java.lang.String BUILDING; //old: building (no. or abbreviation) private java.lang.String FLOOR; //Floor in building private java.lang.String ROOM_NO; //Room or appartment number private java.lang.String COUNTRY; //Country key private java.lang.String LANGU; //Language key private java.lang.String REGION; //Region (State, Province, County) private java.lang.String SORT1; //Search term 1 private java.lang.String SORT2; //Search term 2 private java.lang.String TIME_ZONE; //Address time zone private java.lang.String TAXJURCODE; //Tax jurisdiction code private java.lang.String ADR_NOTES; //Address notes private java.lang.String COMM_TYPE; //Communication type (key) (Central address management) private java.lang.String TEL1_NUMBR; //First telephone no.: dialling code+number private java.lang.String TEL1_EXT; //First telephone no.: extension private java.lang.String FAX_NUMBER; //First fax no.: dialling code+number private java.lang.String FAX_EXTENS; //First fax no.: extension public void setADDR_NO( java.lang.String obj ){ this.ADDR_NO=obj; }
public java.lang.String getADDR_NO()
{ return this.ADDR_NO; }
public void setFORMOFADDR( java.lang.String obj )
{ this.FORMOFADDR=obj; }
public java.lang.String getFORMOFADDR()
{ return this.FORMOFADDR; }
public void setNAME( java.lang.String obj )
{ this.NAME=obj; }
public java.lang.String getNAME()
{ return this.NAME; }
public void setNAME_2( java.lang.String obj )
{ this.NAME_2=obj; }
public java.lang.String getNAME_2()
{ return this.NAME_2; }
public void setNAME_3( java.lang.String obj )
{ this.NAME_3=obj; }
public java.lang.String getNAME_3()
{ return this.NAME_3; }
public void setNAME_4( java.lang.String obj )
{ this.NAME_4=obj; }
public java.lang.String getNAME_4()
{ return this.NAME_4; }
public void setC_O_NAME( java.lang.String obj )
{ this.C_O_NAME=obj; }
public java.lang.String getC_O_NAME()
{ return this.C_O_NAME; }
public void setCITY( java.lang.String obj )
{ this.CITY=obj; }
public java.lang.String getCITY()
{ return this.CITY; }
public void setDISTRICT( java.lang.String obj )
{ this.DISTRICT=obj; }
public java.lang.String getDISTRICT()
{ return this.DISTRICT; }
public void setCITY_NO( java.lang.String obj )
{ this.CITY_NO=obj; }
public java.lang.String getCITY_NO()
{ return this.CITY_NO; }
public void setPOSTL_COD1( java.lang.String obj )
{ this.POSTL_COD1=obj; }
public java.lang.String getPOSTL_COD1()
{ return this.POSTL_COD1; }
public void setPOSTL_COD2( java.lang.String obj )
{ this.POSTL_COD2=obj; }
public java.lang.String getPOSTL_COD2()
{ return this.POSTL_COD2; }
public void setPOSTL_COD3( java.lang.String obj )
{ this.POSTL_COD3=obj; }
public java.lang.String getPOSTL_COD3()
{ return this.POSTL_COD3; }
public void setPO_BOX( java.lang.String obj )
{ this.PO_BOX=obj; }
public java.lang.String getPO_BOX()
{ return this.PO_BOX; }
public void setPO_BOX_CIT( java.lang.String obj )
{ this.PO_BOX_CIT=obj; }
public java.lang.String getPO_BOX_CIT()
{ return this.PO_BOX_CIT; }
public void setDELIV_DIS( java.lang.String obj )
{ this.DELIV_DIS=obj; }
public java.lang.String getDELIV_DIS()
{ return this.DELIV_DIS; }
public void setSTREET( java.lang.String obj )
{ this.STREET=obj; }
public java.lang.String getSTREET()
{ return this.STREET; }
public void setSTREET_NO( java.lang.String obj )
{ this.STREET_NO=obj; }
public java.lang.String getSTREET_NO()
{ return this.STREET_NO; }
public void setSTR_ABBR( java.lang.String obj )
{ this.STR_ABBR=obj; }
public java.lang.String getSTR_ABBR()
{ return this.STR_ABBR; }
public void setHOUSE_NO( java.lang.String obj )
{ this.HOUSE_NO=obj; }
public java.lang.String getHOUSE_NO()
{ return this.HOUSE_NO; }
public void setSTR_SUPPL1( java.lang.String obj )
{ this.STR_SUPPL1=obj; }
public java.lang.String getSTR_SUPPL1()
{ return this.STR_SUPPL1; }
public void setSTR_SUPPL2( java.lang.String obj )
{ this.STR_SUPPL2=obj; }
public java.lang.String getSTR_SUPPL2()
{ return this.STR_SUPPL2; }
public void setLOCATION( java.lang.String obj )
{ this.LOCATION=obj; }
public java.lang.String getLOCATION()
{ return this.LOCATION; }
public void setBUILDING( java.lang.String obj )
{ this.BUILDING=obj; }
public java.lang.String getBUILDING()
{ return this.BUILDING; }
public void setFLOOR( java.lang.String obj )
{ this.FLOOR=obj; }
public java.lang.String getFLOOR()
{ return this.FLOOR; }
public void setROOM_NO( java.lang.String obj )
{ this.ROOM_NO=obj; }
public java.lang.String getROOM_NO()
{ return this.ROOM_NO; }
public void setCOUNTRY( java.lang.String obj )
{ this.COUNTRY=obj; }
public java.lang.String getCOUNTRY()
{ return this.COUNTRY; }
public void setLANGU( java.lang.String obj )
{ this.LANGU=obj; }
public java.lang.String getLANGU()
{ return this.LANGU; }
public void setREGION( java.lang.String obj )
{ this.REGION=obj; }
public java.lang.String getREGION()
{ return this.REGION; }
public void setSORT1( java.lang.String obj )
{ this.SORT1=obj; }
public java.lang.String getSORT1()
{ return this.SORT1; }
public void setSORT2( java.lang.String obj )
{ this.SORT2=obj; }
public java.lang.String getSORT2()
{ return this.SORT2; }
public void setTIME_ZONE( java.lang.String obj )
{ this.TIME_ZONE=obj; }
public java.lang.String getTIME_ZONE()
{ return this.TIME_ZONE; }
public void setTAXJURCODE( java.lang.String obj )
{ this.TAXJURCODE=obj; }
public java.lang.String getTAXJURCODE()
{ return this.TAXJURCODE; }
public void setADR_NOTES( java.lang.String obj )
{ this.ADR_NOTES=obj; }
public java.lang.String getADR_NOTES()
{ return this.ADR_NOTES; }
public void setCOMM_TYPE( java.lang.String obj )
{ this.COMM_TYPE=obj; }
public java.lang.String getCOMM_TYPE()
{ return this.COMM_TYPE; }
public void setTEL1_NUMBR( java.lang.String obj )
{ this.TEL1_NUMBR=obj; }
public java.lang.String getTEL1_NUMBR()
{ return this.TEL1_NUMBR; }
public void setTEL1_EXT( java.lang.String obj )
{ this.TEL1_EXT=obj; }
public java.lang.String getTEL1_EXT()
{ return this.TEL1_EXT; }
public void setFAX_NUMBER( java.lang.String obj )
{ this.FAX_NUMBER=obj; }
public java.lang.String getFAX_NUMBER()
{ return this.FAX_NUMBER; }
public void setFAX_EXTENS( java.lang.String obj )
{ this.FAX_EXTENS=obj; }
public java.lang.String getFAX_EXTENS()
{ return this.FAX_EXTENS; }
}
OutputBapi_companycode_getdetail.java
com.sap.generated ;package
// Generated on Tue Apr 01 15:34:41 EST 2003
public class OutputBapi_companycode_getdetail implements java.io.Serializable {
private Bapi0002_3 COMPANYCODE_ADDRESS;
private Bapi0002_2 COMPANYCODE_DETAIL;
private Bapireturn RETURN;
public void setCOMPANYCODE_ADDRESS( Bapi0002_3 obj )
{ this.COMPANYCODE_ADDRESS=obj; }
public Bapi0002_3 getCOMPANYCODE_ADDRESS()
{ return this.COMPANYCODE_ADDRESS; }
public void setCOMPANYCODE_DETAIL( Bapi0002_2 obj )
{ this.COMPANYCODE_DETAIL=obj; }
public Bapi0002_2 getCOMPANYCODE_DETAIL()
{ return this.COMPANYCODE_DETAIL; }
public void setRETURN( Bapireturn obj )
{ this.RETURN=obj; }
public Bapireturn getRETURN()
{ return this.RETURN; }
}
How to use these files --
To make calls from Java to R3 use the class SAPClientBase. Here is how you can invoke the function module BAPI_COMPANYCODE_GETDETAIL in SAP and get the results through the java objects generated by the plugin.
public class SAPClient extends SAPClientBase{
public static void main( String a[] ) {
SAPClient s = new SAPClient("sapdev", "130", "uname", "pass");
InputBapi_companycode_getdetail in = new InputBapi_companycode_getdetail();
in.setCOMPANYCODEID("1000");
s.execute("BAPI_COMPANYCODE_GETDETAIL", in);
Object r [] = s.getOutput();
com.sap.generated.Bapi0002_3 rr = (Bapi0002_3) r[0];
System.out.println ( rr.getNAME() + " ," + rr.getCITY() );
om.sap.generated.Bapi0002_2 r2 = (Bapi0002_2) r[1];
System.out.println ( r2.getCOMP_CODE() + " ," + r2.getCOUNTRY() );
}
public SAPClient(String host,String clientID,String userName,String passWord ){
super( host,clientID,userName,passWord);
}
}
//end class