Hi All,
I have resolve this problem.Issue was distribution lock was not in the status if order is save with hold status, so if order is replicated into the r3 system with such kind of stutus where u dont want to sent to r3. so check at run time the status. i am posting the solution for other who may need help.
We can solve this by 2 ways.
First - Assign distrubution lock at the user status. status path given in the above.
Secong
At run time , we can aatached Distribution lock.
gc_status-do_not_transfer type crm_j_status value 'I1026',
CALL FUNCTION 'CRM_STATUS_SET_INTERN_OW'
EXPORTING
iv_objnr = guid_ref
iv_status = gc_status-do_not_transfer
iv_ref_kind = 'A'
EXCEPTIONS
object_not_found = 1
status_inconsistent = 2
status_not_allowed = 3
OTHERS = 4.
Please reward point if helpful.
Thank
Imran