Skip to Content
author's profile photo Former Member
Former Member

CRM_ORDER_SAVE not update database

Hi,

i am using CRM_ORDER_SAVE function module. After that i commited database table but it will not effected means my database not updated. please tell me why my code is not working up to date.

Code is like that....

IF SY-SUBRC = 0.

IF L_SOFFICE <> L_SOFFICE1."and not p_check is initial.

UPDATE CRMD_ORDER_INDEX SET SALES_OFFICE = L_SOFFICE1

WHERE SALES_GROUP = L_SGROUP

and header = l_guid.

UPDATE CRMD_ORGMAN SET SALES_OFFICE = L_SOFFICE1

WHERE SALES_GROUP = L_SGROUP

and guid = L_GUID_SET .

refresh crmt_object_guid_tab1 .

insert l_guid into table crmt_object_guid_tab1 .

call function 'CRM_ORDER_SAVE'

exporting

it_objects_to_save = crmt_object_guid_tab1

importing

et_saved_objects = et_saved

exceptions

document_not_saved = 1

others = 2 .

loop at et_saved into ls_saved .

endloop.

COMMIT WORK AND WAIT.

ENDIF.

Please tell me where my code is not proper.

Regards,

gurprit bhatia

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 09:04 AM

    hello gurprit,

    Please refer notes 1048795 and see if this helps.

    Please reward points.

    regards,

    Muralidhar Prasad.C

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 09:09 AM

    Hi Gurprit,

    You should not use direct table updates; instead you should use function model 'CRM_ORDER_MAINTAIN'.

    If you set a breakpoint inside this function module and then set the sales office manually you will be able to see which import parameters to fill.

    Regards,

    Patrick.

    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.