‎2005 Sep 21 10:57 PM
Hi
I'm trying to create a Sales Document with the BAPI_SALESORDER_CREATEFROMDAT2 with SE37, i don't know what is missing, because it gives me the order number but when i call the BAPI_TRANSACTION_COMMIT, it doesn't create the document, the result of the BAPI_SALESORDER_CREATEFROMDAT2 is next:
S V4233SALES_HEADER_IN has been processed successfully
S V4233SALES_ITEM_IN has been processed successfully
W V1555The sales document is not yet complete: Edit data
S V1311Pedido Nacional 0000281711 has been saved
I feel the problem is in the parameters i'm sending, because i'm creating a sales order with VA01, and when debugging the BAPI and VA01, comparing table XVBAP at BAPI and VA01, i have difference at XVBAP-KWMENG and XVBAP-NETWR, at the BAPI'S table i don't have data, and at the VA01 transaction i have it, i give the parameters i'm sending so maybe somebody can help me.
<b>ORDER_HEADER_IN</b>
DOC_TYPE
SALES_ORG
DISTR_CHAN
DIVISION
REQ_DATE_H
PURCH_DATE
INCOTERMS1
PMNTTRMS
PRICE_DATE
PURCH_NO_C
<b>ORDER_ITEMS_IN</b>
MATERIAL
PLANT
TARGET_QTY
TARGET_QU
INCOTERMS1
ROUTE
<b>ORDER_PARTNERS</b>
PARTN_ROLE
PARTN_NUMB
And that's all.
Thanks
Best Regards.
Soraya Cervantes
‎2005 Sep 22 1:57 AM
warning does not matter. it shd create the order.
did u execute BAPI_TRANSACTION_COMMIT in separate window or using test sequence in se37
How to use test sequence
========================
In se37
from menu...
function modules->test->test sequence
1 : BAPI_SALESORDER_CREATEFROMDAT2
2 : BAPI_TRANSACTION_COMMIT
then fill the data & execute....
once u execute BAPI_SALESORDER_CREATEFROMDAT2
then go back once and once again press F8 to execute BAPI_TRANSACTION_COMMIT in sequence...
Plz reward points if helpful...
regards
gv
‎2005 Sep 22 1:16 AM
Soraya,
You need to pass in the Pricing COnditions via the ORDER_CONDITIONS_IN and ORDER_CONDITIONS_INX parameters.
eg.
tbl_bapicond-itm_number = '000010'.
tbl_bapicond-cond_type = 'ZP01'.
tbl_bapicond-cond_value = '100'.
append tbl_bapicond.
tbl_bapicondx-itm_number = '000010'.
tbl_bapicondx-cond_type = 'ZP01'.
tbl_bapicondx-update_flag = 'U'.
tbl_bapicondx-cond_value = 'X'.
append tbl_bapicondx.
Hope this helps.
Cheers,
Pat.
PS. Kindly assign Reward Points to the posts you find helpful.
‎2005 Sep 22 2:39 PM
Hi !!
Thanks, i passed ORDER_CONDITIONS_IN, but anyway it didn't create the order ok, but, now the only thing i made was to take off the INCOTERMS1 and PMNTTRMS from the ORDER_HEADER_IN, and it works ok!, now i have to call the BAPI_TRANSACTION_COMMIT.
Thanks Patrick!
Greetings
Soraya
‎2005 Sep 22 1:57 AM
warning does not matter. it shd create the order.
did u execute BAPI_TRANSACTION_COMMIT in separate window or using test sequence in se37
How to use test sequence
========================
In se37
from menu...
function modules->test->test sequence
1 : BAPI_SALESORDER_CREATEFROMDAT2
2 : BAPI_TRANSACTION_COMMIT
then fill the data & execute....
once u execute BAPI_SALESORDER_CREATEFROMDAT2
then go back once and once again press F8 to execute BAPI_TRANSACTION_COMMIT in sequence...
Plz reward points if helpful...
regards
gv
‎2005 Sep 22 2:48 PM
Hi Venkat
I did it and it works ok!!, now i can see the document i created by the BAPI_SALESORDER_CREATEFROMDAT2 at VA02!!
Thanks Venkat!
Greetings
Soraya