on 01-04-2005 5:52 PM
Hi all,
I'm working in a proyect where i like do a Sales order with a aplication web, in Sap Netweaver developer studio, and i use the bapi: "BAPI_SALESORDER_CREATEFROMDAT2".
First i have:
**********************************************************
JCO.Structure Tb = function.getImportParameterList().getStructure("ORDER_HEADER_IN");
Tb.setValue("ZNAC","DOC_TYPE");
Tb.setValue("1000","SALES_ORG");
Tb.setValue("10","DIVISION");
Tb.setValue("10","DISTR_CHAN");
JCO.Table Tab = function.getTableParameterList().getTable("ORDER_ITEMS_IN");
nfilas=Tab.getNumRows();
for(int i=0; i<nfilas;i++){
Tab.setRow(i);
Tab.setValue("000010","ITM_NUMBER");
Tab.setValue("201311630P05000032","MATERIAL");
Tab.setValue("10","TRAGET_QTY");
}
JCO.Table Tab2 = function.getTableParameterList().getTable("ORDER_PARTNERS");
nfilas=Tab2.getNumRows();
for(int i=0;i<nfilas;i++){
Tab2.setRow(i);
Tab2.setValue("AG","PARTN_ROLE");
Tab2.setValue("100003","PARTN_NUMB");
}
**********************************************************
Second execute the function:
**********************************************************
mConnection.execute(function);
**********************************************************
But the result isn't not equal that the result that i get if i have it in SAP with same value. In the table "Return" that it's where is the result isn't equal.
Any idea?
Thank's
PD: Excuse me for my english
Hi Naresh,
Thank's for your help. I have solved my problem.
Great
Vicente Zaragoza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The only change which I can suggest by looking at code is to modify the line below
Tab2.setValue("100003","PARTN_NUMB");
to
Tab2.setValue("0000100003","PARTN_NUMB");
As the Partner Number Length is "10" in the table ORDER_PARTNERS, it may help if u pad it with zeros.
Regards,
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.