Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9269

Re: How to Update crmd_customer_h TABLE Using CRMV_EVENT Through Funtion Module

$
0
0

Hi

 

I configure Above Fm for below Event

 

 

Configurationg In crmv_event:-

Trasaction Cat:- BUS2000115

Execution Time:-78

Priority:-100

Object Name:- ORDER

Event :- Before_save

Funtion:- ZSE_SALES_SET_TRAIL_ORDER_EC1

 

Requirement:- when try to save the service order this FM Get called and check the trasaction type in the code "ZRV0(Service order process Type)But in code it wont find why bcoz we are only given "ZGO1(Trail order Process_type)

after save the service order i am going to create follow up for that service order as Trail order(Sales Order)

when i try to save the trail order this FM Will Triger due to its configured for Sales Bus.obj 115 and Before_Save Order.

in the code part i am checking transaction type and i got as ZG01 And now as per my requirement(When service order created and for that order if any follow up is created as Trail order then Flag value must be set for Service order)

for that reason in code part i am try to set the Flag which is created in CUSTOMER_H Table

 

in code using Maintain_ow i am unable to set the Flag

that's Reason i am using Like below

 

IF _process_type eq 'ZG01'.

 

     call function 'CRM_DOC_FLOW_READ_OB'

       exporting

         iv_header_guid  = iv_header_guid

       importing

         et_doc_flow_wrk = lt_doc_flow.

 

     read table lt_doc_flow with key objtype_a = 'BUS2000116' into wa_doc_flow.

     if sy-subrc = 0.

       wa_customer_h-guid          = wa_doc_flow-objkey_a.

       wa_customer_h-zztrail_flag  = 'X'.

       modify crmd_customer_h from wa_customer_h.

       clear wa_customer_h.

     endif.

endif.

 

*Clearing local variables

   clear: lv_process_type,

          lw_cust_h_com,

          ls_field_names.

 

*Free internal tables

   free: lt_doc_flow,

         lt_field_names.



But using modify crmd_customer_h from wa_customer_h. is very bad way but i dont have any other option to do that if i use  CRM_CUSTOMER_H_MAINTAIN_OW its not updating the Flag value for service order



please help me with code part i can i write?


Viewing all articles
Browse latest Browse all 9269

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>