Hi all,
I have a couple of questions which are strictly connected:
1. Does anybody know if BAPI BAPI_BUSPROCESSND_CHANGEMULTI, in CRM application is suitable for adding a new item in a sales order already created?
The fact we have set up parameter <b>A (CREATE)</b>, in the internal table ITEM , but after a long debuggins Bapi return us the parameter<b> A (MODIFY).</b>
CALL FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
TABLES
HEADER = CT_ORDERADM_H
ITEM = CT_ORDERADM_I
SALES = it_sales
ORGANISATION = it_organiz
PRICING = it_pricing
APPOINTMENT = it_appointment
TEXT = it_text
INPUT_FIELDS = ct_input
RETURN = it_return_bapi
CONDITION_CREATE = it_preciopos
SCHEDULELINE = it_repartos
BILLING = it_billing_maintain.
LOOP AT it_return_bapi.
IF it_return_bapi-TYPE = 'E' OR
it_return_bapi-TYPE = 'A'.
MESSAGE it_return_bapi-message type 'I'.
ENDIF.
ENDLOOP.
2 . <b>CRM_ORDER MAINTAIN</b> used in another version of the program, return us the new position but unfortunately it create <b>PRICE CONDITIONS INACTIVE</b>, filled with 0.
So far we do not know why it create inactive conditions, especially the price one as, this condition is not statistical.
The code is the following:
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_BILLING = it_billing_maintain
IT_SCHEDLIN_I = IT_SCHEDLIN_maintain
IT_PRIDOC = IT_PRIDOC
IT_TEXT = IT_TEXT
IMPORTING
ET_EXCEPTION = ET_EXCEPTION
CHANGING
CT_ORDERADM_H = CT_ORDERADM_H
CT_ORDERADM_I = CT_ORDERADM_I
CT_INPUT_FIELDS = CT_INPUT
CT_DOC_FLOW = CT_DOC_FLOW
EXCEPTIONS
ERROR_OCCURRED = 1
DOCUMENT_LOCKED = 2
NO_CHANGE_ALLOWED = 3
NO_AUTHORITY = 4
OTHERS = 5.
Any suggestions are welcomed.
Many thanks in advance,
Andrea