10-10-2006 9:40 AM
Hi,
I am using BAPI_CUSTOMERRETURN_CREATE to create return orders. Parameters Passed are
IMPORT
SALESDOCUMENTIN-vbeln = GKCNKETAN1
RETURN_HEADER_IN-REFDOCTYPE = H
DOC_TYPE = ZR20
SALES_ORG
DISTR_CHAN
DIVISION
REQ_DATE_H
PURCH_DATE
ORD_REASON = 102
TABLES
RETURN_ITEMS_IN-ITM_NUMBER
MATERIAL
BATCH
PLANT
STORE_LOC
TARGET_QTY
TARGET_QU
T_UNIT_ISO
ITEM_CATEG
PURCH_NO_C
PURCH_DATE
RETURN_PARTNERS-PARTN_ROLE = SP
PARTN_NUMB
RETURN_CONDITIONS_IN-ITM_NUMBER = 10
COND_TYPE = PR00
COND_VALUE
CURRENCY = INR
COND_UNIT = VIA
COND_P_UNT = 1
But Still the return order is not getting created. It gives message as
SALES_HEADER_IN has been processed successfully
SALES_ITEM_IN has been processed successfully
SALES_CONDITIONS_IN has been processed successfully
The sales document is not yet complete: Edit data
C&S:Dom Ret Ord C&S GKCNKETAN1 has been saved
How to solve this error, is there any other parameters to be passed.
Regards,
Karthik.k
10-10-2006 9:42 AM
10-10-2006 9:42 AM
10-10-2006 12:38 PM
I am executing this function module thru SE37.
Thanks & Regards,
Kathik k
10-10-2006 2:33 PM
Hi
As standard BAPIs are not followed by COMMIT stmt,
U have to create one custom ZBAPI which will call the standrd BAPI 'BAPI_CUSTOMERRETURN_CREATE ' and fill the parameters as u have done.
then call 'BAPI_TRANSACTION_COMMIT' in the same program to commit the transaction.
Then it will be updated in SAP.
Otherwise not.
if helpful reward me points
Regs
Manas Ranjan Panda.
10-11-2006 6:34 AM
One thing I am not understanding I am just executing the BAPI in SE37 diectly & passing the values for testing. Why should I use BAPI for commit in this case.
I am able to create sales order in the same manner. I am not executing thru any Z progams.How this bapi alone will require commit externally.
Can anybody help me in creating a return order thru any bapi.It would be great if you can help me in passing the right parameters(also kindly see the parameters I have passed & logs above)
Regards,
Karthik.k