Skip to Content
author's profile photo
Former Member

Quantity change using CRM_ORDER_MAINTAIN

Hi,

I'm trying to change service order quantity using CRM_ORDER_MAINTAIN function module. The code is as shown below.

LS_FIELD_NAMES-FIELDNAME = 'QUANTITY'.

LS_FIELD_NAMES-CHANGEABLE = 'X'.

INSERT LS_FIELD_NAMES INTO TABLE LS_FIELDS-FIELD_NAMES.

LS_FIELDS-REF_HANDLE = 1.

LS_FIELDS-REF_GUID = V_ITEM_GUID.

LS_FIELDS-REF_KIND = 'B'.

LS_FIELDS-OBJECTNAME = 'SCHEDLIN_I'.

INSERT LS_FIELDS INTO TABLE LT_FIELDS.

LS_QTY-GUID = V_SCHDULE_LINE_GUID.

LS_QTY-ITEM_GUID = V_ITEM_GUID.

LS_QTY-QUANTITY = 15.

LS_QTY-MODE = 'B'.

LS_QTY-EVENT_TYPE_APPL = 'CRMS'.

LS_QTY-EVENT_TYPE = 'ORDER'.

LS_QTY-SCHED_NO_EXT = '0001'.

LS_SCHEDLIN-REF_GUID = V_ITEM_GUID.

LS_SCHEDLIN-REF_HANDLE = 1.

LS_SCHEDLIN-MODE = 'B'.

INSERT LS_QTY INTO TABLE LS_SCHEDLIN-SCHEDLINES.

INSERT LS_SCHEDLIN INTO TABLE LT_SCHEDLIN.

CALL FUNCTION 'CRM_ORDER_MAINTAIN'

EXPORTING

IT_SCHEDLIN_I = LT_SCHEDLIN

CHANGING

CT_ORDERADM_I = LT_ORDERADM_I

CT_INPUT_FIELDS = LT_FIELDS

I'm also using CRM_ORDER_SAVE using the header guid.

But, the quantity is not updated in the service order.

Please advice.

Thanks

Kamal

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo
    Former Member
    Posted on Mar 02, 2006 at 10:29 AM

    Are you performing the transaction commit?

    Add comment
    10|10000 characters needed characters exceeded