on 06-29-2011 8:55 AM
Hi All ,
We have an requirement where we need display the timezone ,language and one custom field on mobile .
we have done by implementing CRM_BADI_BUPA_MOBILE_GETDETAIL.
Now if any changes done for these fields on the mobile(backend) ,update SAP CRM and display with the changed values.
to change the timezone ,language should i use BUPA_ADDRESS_CHANGE.
how the data can be captured i.e from mobile ?
Thanks,
Anitha.
Hi Anita,
Timezone and language fields are not part of address but part of standard BP details. So you can use the regular BUPA_CHANGE function module itself.
Coming to changing the values of these custom fields on mobile, I guess if you have followed the standard enhancement concepts defined by Sybase then by default you should be able to change them on WM device. Not sure about other platforms when it comes to change but I guess you can definitely display them.
Best Regards,
Siva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva ,
Thanks for your quick reply.
Actually for Get Details we used :
DATA: ls_bupa_header_details TYPE crms_bupa_mob_bpheader,
ls_address TYPE bapibus1006_address,
ls_custom type BUS000_EEW ,
lt_bupa_header_details TYPE STANDARD TABLE OF crms_bupa_mob_bpheader,
ls_ce_bupa_hdr TYPE crms_mobile_cust_enhance,
lt_ce_bupa_hdr TYPE STANDARD TABLE OF crms_mobile_cust_enhance.
lt_bupa_header_details[] = et_bupa_header_details[].
LOOP AT lt_bupa_header_details INTO ls_bupa_header_details.
CALL FUNCTION 'BUPA_ADDRESS_READ_DETAIL'
EXPORTING
iv_partner = ls_bupa_header_details-partner
iv_xaddress = 'X'
IMPORTING
es_address = ls_address
EXCEPTIONS
no_partner_specified = 1
no_valid_record_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'BUPA_CENTRAL_CI_GET_DETAIL'
EXPORTING
IV_PARTNER = ls_bupa_header_details-partner
IV_PARTNER_GUID =
IMPORTING
ES_BUS000_EEW = ls_custom
ET_RETURN =
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_ce_bupa_hdr-partner = ls_bupa_header_details-partner.
ls_ce_bupa_hdr-field_name = 'ZTIME_ZONE'.
ls_ce_bupa_hdr-field_text = 'Addresstimezone'.
ls_ce_bupa_hdr-data_type = 'CHAR'.
ls_ce_bupa_hdr-data_length = '6'.
ls_ce_bupa_hdr-decimals = '0'.
ls_ce_bupa_hdr-field_value = ls_address-time_zone.
APPEND ls_ce_bupa_hdr TO lt_ce_bupa_hdr.
CLEAR ls_ce_bupa_hdr.
ls_ce_bupa_hdr-partner = ls_bupa_header_details-partner.
ls_ce_bupa_hdr-field_text = 'LanguageKey'.
ls_ce_bupa_hdr-data_type = 'CHAR'.
ls_ce_bupa_hdr-data_length = '2'.
ls_ce_bupa_hdr-decimals = '0'.
ls_ce_bupa_hdr-field_value = ls_address-languiso.
APPEND ls_ce_bupa_hdr TO lt_ce_bupa_hdr.
CLEAR ls_ce_bupa_hdr.
ls_ce_bupa_hdr-partner = ls_bupa_header_details-partner.
ls_ce_bupa_hdr-field_name = 'IndustryExperience'.
ls_ce_bupa_hdr-field_text = 'IndustryExperience'.
ls_ce_bupa_hdr-data_type = 'NUM'.
ls_ce_bupa_hdr-data_length = '2'.
ls_ce_bupa_hdr-decimals = '0'.
ls_ce_bupa_hdr-field_value = ls_custom-ZZAFLD000002.
APPEND ls_ce_bupa_hdr TO lt_ce_bupa_hdr.
CLEAR ls_ce_bupa_hdr.
ENDLOOP.
ce_bupa_header[] = lt_ce_bupa_hdr[].
ENDMETHOD.
so now when these fields get changed in mobile ,what are the steps to implement the change BADI ,BUP_CHANGE ,i dont find in se37
Thanks,
Anitha.
Hi Anitha,
You exactly have to do the same but in reverse manner. When these enhanced fields are updated in mobile device, they come as a part of CE_BUPA_HDR(not sure of exact structure because currently i dont have access to the system).
As a part of standard functionality the standard fieldsare updated by standard Change funtion module and then the control will be given to BADI. Inside the BADI, you just need to read these fields and call BUPA_ADDRESS_CHANGE by filling all mandatory fields.
Best Regards,
Siva.
Hi Siva ,
I'm still confused how to get values from ce_header ,as we passed data as name/value pair .
CE header is containing
ET_BUPA_EMPLOYEE
CE_BUPA_SALESAREA
CE_BUPA_CONTACTS
CE_BUPA_EMPLOYEE
CE_BUPA_ROLE
CE_BUPA_NOTE
CE_BUPA_RELTYP
CE_BUPA_HEADER
ET_BUPA_HEADER_DETAILS
ET_BUPA_SALESAREA
ET_BUPA_CONTACTS
ET_BUPA_RELTYP
ET_BUPA_ROLE
ET_BUPA_NOTE
RETURN.
DATA: ls_bupa_header_details TYPE crms_bupa_mob_bpheader,
ls_address TYPE bapibus1006_address,
ls_custom type BUS000_EEW ,
lt_bupa_header_details TYPE STANDARD TABLE OF crms_bupa_mob_bpheader,
ls_ce_bupa_hdr TYPE crms_mobile_cust_enhance,
lt_ce_bupa_hdr TYPE STANDARD TABLE OF crms_mobile_cust_enhance.
lt_ce_bupa_hdr[] = CE_BUPA_Header[].
LOOP AT lt_bupa_header_details INTO ls_bupa_header_details.
CALL FUNCTION 'BUPA_ADDRESS_CHANGE'
EXPORTING
IV_PARTNER = ls_bupa_header_details-partner
IV_PARTNER_GUID =
IV_ADDRNUMBER =
IV_ADDRGUID =
IS_ADDRESS = ?? /*i should pass the languiso and time_zone to BAPI ,but how to get these values from mobile
IS_ADDRESS_X =
IV_DUPLICATE_MESSAGE_TYPE =
IV_ACCEPT_ERROR = ' '
IV_X_SAVE = 'X'.
Thanks,
Anitha
Hi Anitha,
In CRM_BUPA_MOBILE_CHANGE function module at line 1316 there is a call to the BADI. By then the standard update functionality would have been executed.
Inside the BADI Implementation your code should be to read the changed values of the enhanced fields and execute function module 'BUPA_ADDRESS_CHAGE'
Your code should be something like this in your BADI Implementation:
DATA: ls_address TYPE bapibus1006_address,
Have all your declarations.
Read FROM TABLE ce_bupa_header into ls_bupa_header WHERE FIELD_NAME = "CE_LANGUAGE". (Assuming one of the field is CE_LANGUAGE).
IF SY-SUBRC = 0
ls_address-language = ls_bupa_header-CE_LANGUAGE.
ENDIF.
Similarly you need to read other fields and finally call function module 'BUPA_ADDRESS_CHAGE' as you mentioned in your previous reply.
Best Regards,
Siva.
Hi Siva ,
DATA: ls_bupa_header_details TYPE crms_bupa_mob_bpheader,
ls_address TYPE bapibus1006_address,
ls_custom type BUS000_EEW ,
lt_bupa_header_details TYPE STANDARD TABLE OF crms_bupa_mob_bpheader,
ls_ce_bupa_hdr TYPE crms_mobile_cust_enhance,
lt_ce_bupa_hdr TYPE STANDARD TABLE OF crms_mobile_cust_enhance.
Read TABLE ce_bupa_header into ls_ce_bupa_hdr WITH KEY FIELD_NAME = 'ZTIME_ZONE'.
IF SY-SUBRC = 0.
ls_address-time_zone = ls_ce_bupa_hdr-FIELD_VALUE.
ENDIF.
Read TABLE ce_bupa_header into ls_ce_bupa_hdr WITH KEY FIELD_NAME = 'LanguageKey'.
IF SY-SUBRC = 0.
ls_address-languiso = ls_ce_bupa_hdr-FIELD_VALUE.
ENDIF.
Read TABLE ce_bupa_header into ls_ce_bupa_hdr WITH KEY FIELD_NAME = 'IndustryExperience'.
IF SY-SUBRC = 0.
ls_custom-ZZAFLD000002 = ls_ce_bupa_hdr-FIELD_VALUE.
ENDIF.
CALL FUNCTION 'BUPA_ADDRESS_CHANGE'
EXPORTING
IV_PARTNER = ls_bupa_header_details-partner
IV_PARTNER_GUID =
IV_ADDRNUMBER =
IV_ADDRGUID =
IS_ADDRESS = ls_custom
IS_ADDRESS_X =
IV_DUPLICATE_MESSAGE_TYPE =
IV_ACCEPT_ERROR = ' '
CALL FUNCTION 'BUPA_CENTRAL_CI_CHANGE'
EXPORTING
IS_BUS000_EEW = ls_custom
IS_BUS000_EEW_X =
IV_XSAVE = 'X'
IMPORTING
ET_RETURN =
.
I have coded this way and i need to check the tables in CRM ,if the changed values are reflecting .right?.
Hi Anitha,
Yes you are correct. Your code is perfectly fine except one thing. In your call to FM 'BUPA_ADDRESS_CHANGE' you are passing ls_custom to both address and your enhanced fields.
Correct that and your problem is resolved.
Best Regards,
Siva.
Edited by: Siva R Krishna on Jun 30, 2011 10:18 AM
Thanks siva,
By mistake i have givem ls-custom in both BAPI's
I have some doubts ,please help me in clarifying them
1)Like status (drop down in crm) and also on mobile it is standard field on mobile.
In this scenario , if we make changes on crm side for drop down ,the changes can be seen on
mobile.
In this case BADI(create ,change) has to be implemented?/* changes done on mobile..would reflect automatically in this case?
the data flows automaticallyy?
2)we have many BADI's for Activity ,lead ,BP ...,
For contact related changes we need BP BADI?
For appointment Reasons we need to for activity?
3)create BADI ...when we use this ?
Thanks,
Anitha.
Hi Anitha,
I will definitely answer your quetsions. But a small request. If your actual problem in the thread is solved, then can you close that and open a new thread to keep threads independent.
Here are your answers:
1. For status changes - yes if you want to change these values, then change them in the customization and execute delta download from DOE for MAS_CUSTOMIZATION object. The changes can be automatically seen on the device. No need to implement the BADI in this case.
2. Coming to various BADI's involved -
For each functional scenario like BP, Activity, Lead, Opportunity, Sales Order - we have different BADI's. And each of the operations have different methods like CREATE, Detail, List, Change etc.
In a case where you only want to display these cusotm fields on the mobile device, then you only have to implement BADI method in GetDetail.
In a case where you only want to create custom fields from mobile device, then you have to implement BADI method in Create FM.
In a case where you want to edit the custom fields already downloaded then you have to implement BADI methods in both GetDetail & Change FM's.
Hope you now got a better picture.
Best Regards,
Siva.
Hi siva ,
We are unable to make changes in CRM ,Change BADI not getting Triggered .
checked the queue in DOE
it says Function parameter "ET_RETURN" is unknown
This error can occur due to 2 reasons
1. the export parameters are not returned properly
2. there is a type mismatch between the export parameter in change BAPI wrapper and the same parameter in DOE
Any help?
Thanks,
Anitha.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.