-
-
Save anonymous/a6126ff4897d41b7b40c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void showCustomerList() { | |
AnnotationConfiguration configuration = | |
new AnnotationConfiguration("HibersapSessionManager"); | |
SessionManager sessionManager = configuration.buildSessionManager(); | |
Session session = sessionManager.openSession(); | |
try { | |
GetCustomerList bapi = new GetCustomerList(50); | |
session.execute(bapi); | |
printCustomerData(bapi); | |
} finally { | |
session.close(); | |
} | |
} | |
private void printCustomerData(final GetCustomerList bapi) { | |
LOG.debug("Customer:"); | |
List<Customer> customers = bapi.getCustomers(); | |
for (Customer customer: customers) { | |
LOG.debug(customer.getNumber() + "\t" + customer.getName()); | |
} | |
LOG.debug("Return:"); | |
List<BapiRet2> returnValues = bapi.getReturnValues(); | |
for (BapiRet2 value: returnValues) { | |
LOG.debug(value.getMessage() + "\t" | |
+ value.getNumber() + "\t" | |
+ value.getType() + "\t" | |
+ value.getId()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment