Skip to Content

crm_order_maintain

Hi,

I am trying to create sales order using crm_order_maintain fm.

Sales order id is getting created but product id and quantity fields are not coming( Item data).

I am passing the product and qunatity fields like below.

******For product*******

wa_orderi-ORDERED_PROD = 'NA2 BOWSPBEARING7/8'. "wa_parts-PART.

wa_orderi-MODE = 'A'.

clear : wa_fieldname,wa_inputfields.

wa_inputfields-ref_handle = 1.

wa_inputfields-ref_kind = 'A'.

wa_inputfields-objectname = 'ORDERADM_I'.

wa_inputfields-logical_key = space.

wa_fieldname-fieldname = 'MODE'.

append wa_fieldname to wa_inputfields-FIELD_NAMES.

wa_fieldname-fieldname = 'ORDERED_PROD'.

append wa_fieldname to wa_inputfields-FIELD_NAMES.

insert wa_inputfields into table it_inputfields.

append wa_orderi to it_orderi.

  • For Quantity*********

wa_scheduleline-QUANTITY = '10'. "wa_parts-quantity.

append wa_scheduleline to it_scheduleline.

wa_schedule-SCHEDLINES = it_scheduleline.

append wa_schedule to it_schedule.

clear : wa_fieldname,wa_inputfields.

wa_inputfields-ref_handle = 1.

wa_inputfields-ref_kind = 'A'.

wa_inputfields-objectname = 'SCHEDLIN'.

wa_inputfields-logical_key = space.

wa_fieldname-fieldname = 'QUANTITY '.

append wa_fieldname to wa_inputfields-FIELD_NAMES.

insert wa_inputfields into table it_inputfields.

clear : wa_fieldname,wa_inputfields.

Can you help me on this?

Regards,

Indhra.E

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 04, 2007 at 03:03 PM

    Hi Indhra,

    Place a breakpoint inside CRM_ORDER_MAINTAIN and then create your sales order manually. Compare what you have in the debug session with what you are building in your code.

    Regards,

    Patrick.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 11:27 AM

    Solved.

    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.