Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

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

    Are you performing the transaction commit?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.