cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_ORDER_SAVE not update database

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello gurprit,

Please refer notes 1048795 and see if this helps.

Please reward points.

regards,

Muralidhar Prasad.C

Answers (1)

Answers (1)

Patrick_McMahon
Contributor
0 Kudos

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.