on 08-20-2015 3:44 PM
Hi i am working with creation of Purchase Order using JCO3. I am having difficulty in printing the return structure or the response. Could someone help in understanding what line of java code i have to add to print the response.
// Print the Return Message | ||
//JCoStructure returnStructure = createPurchaseOrderFunction.getTableParameterList().getStructure("RETURN"); | ||
// | JCoTable table = createPurchaseOrderFunction.getTableParameterList().getTable("Number"); | |
// | System.out.println("Field" + createPurchaseOrderFunction.getExportParameterList().getValue("Number")); | |
//System.out.println(table.); | ||
//System.out.println("RETURN: \n" + returnStructure.getString("MESSAGE")); |
I am not sure how to print and check the result of Purchase Order creation. Please tell me the exact table and structure with java code so that i can understand what wrong i am doin.
Hi,
Do you have access to the backend SAP system so that you can test the call of the BAPI directly with your data? It will also enable you to look at what the RETURN object looks like when it completes. If you don't have this access, sit with someone who does who is an ABAPer and can talk you through what the BAPI is doing and how it works.
The RETURN object is actually a table and could contain multiple entries. Also, EXPPURCHASEORDER is the field that will be populated with the PO number if your create was successful - I'm not sure where you have got the NUMBER attribute from?
And don't forget, if you call this BAPI you also need to call BAPI_TRANSACTION_COMMIT to save the PO into SAP, as part of the same session.
Cheers,
G.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
System.out.println("Field" + createPurchaseOrderFunction.getExportParameterList().getValue("Number")); //System.out.println(table.);
what data is printing here. where did you check the data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.