cancel
Showing results for 
Search instead for 
Did you mean: 

CRM Sales Document EEWB

karuna_gangireddy
Contributor
0 Kudos

Hi All,

It another EEWB on my side. I added a custom field in HEADER of the sales transaction. I want to map this custom field with another custom field from ECC header. This is what i did:

1. I added a custom field in CRM using EEWB and checke the R/3 SCE check box. I

generated the extension successfully.

2. Also i appended the ECC structures BAPE_VBAK,BAPE_VBAKX,VBAKKOM and

VBAKKOMX with the custom field from ECC side.

Am i still missing any link there. Because the values are not replicating yet. Could any one please let me know if i am missing any BADI implementation or.....?

Thanks in advance,

Karuna.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use user exit CRM0_200 to map the fields

Sharif

karuna_gangireddy
Contributor
0 Kudos

Hi Sharif,

If you check the Note 1053817 - Distributing customer-specific fields from CRM to R/3 it says all that we need to extend the structures and the BAPIPAREX will be updated accordingly. I checked for my field in this structure but for some reason it is not in there. I think this could be the reason for not replicating. Do you have any idea what maked this structure gets updated?

Thanks,

Karuna.

karuna_gangireddy
Contributor
0 Kudos

Hi Sharif,

i implemented the user exit CRM0_200 in ECC in which i called another function module and wrote the following code. This FM was getting triggered when the sales order was saved.

-


FUNCTION Z_U_EXIT_SALESDOC_ENHANCE.

*"----


""Local Interface:

*" TABLES

*" T_INT_TABLES STRUCTURE BAPIMTCS

*" T_BAPISTRUCT STRUCTURE BAPIMTCS

*" T_MESSAGES STRUCTURE BAPICRMMSG

*" T_OTHER_INFO STRUCTURE BAPIEXTC

*"----


Data: wa TYPE BAPIMTCS,

cust_data TYPE CRMCH4000.

*-- Structures Definition

data: wa_BAPIPAREX type BAPIPAREX,

ta_BAPIPAREX type table of BAPIPAREX initial size 0.

*-- Field Symbols

field-symbols:

<x_container> type x,

<x_struc> type x,

<x_container1> type x,

<x_struc1> type x.

LOOP AT T_BAPISTRUCT INTO wa.

assign wa-data to <x_container> casting.

CASE wa-TABNAME.

WHEN 'BAPIPAREX'.

assign wa_BAPIPAREX to <x_struc> casting.

<x_struc> = <x_container>.

wa_BAPIPAREX-STRUCTURE = 'BAPE_VBAK'.

wa_BAPIPAREX-VALUEPART1 = '0005325695000000000001234674769'.

cust_data = wa_BAPIPAREX.

wa-data = cust_data.

MODIFY T_BAPISTRUCT FROM wa

TRANSPORTING data WHERE TABNAME = wa-TABNAME.

wa_BAPIPAREX-STRUCTURE = 'BAPE_VBAKX'.

wa_BAPIPAREX-VALUEPART1 = '0005325695X'.

cust_data = wa_BAPIPAREX.

wa-data = cust_data.

MODIFY T_BAPISTRUCT FROM wa

TRANSPORTING data WHERE TABNAME = wa-TABNAME.

ENDCASE.

ENDLOOP.

ENDFUNCTION.

-


I hardcoded the order number, but even then the changes are not replicating to CRM. As far as my understanding we do not have to write any code in CRM. Since we are updating the values in BAPIPAREX directly. But since the values are not replicating i am not sure now. I also have another question. If we do not hardcode the values how else can we map the zfields? Do you have any idea? If you have any suggestions please let me know. That would be very helpfull.

Thanks,

karuna.

Answers (0)