cancel
Showing results for 
Search instead for 
Did you mean: 

ECS CUF transfer

yann_bouillut
Active Contributor
0 Kudos

Hi,

I am not a developer but did try to implement CUF in SRM50 and transfer it to ECC60.

So far, i have successfully :

- created CUF at SC and PO item level

- created CUF at PO item level in EKPO

- fill in table bbp_cufmap

However, to transfer the cuf value from SRM to ECC, it seems that i have to write some code in BBP_ECS_PO_OUT_BADI method BBP_B46B_PO_OUTBOUND ????

Could someone help me with the badi content ?

Kind regards,

Yann

Accepted Solutions (0)

Answers (2)

Answers (2)

yann_bouillut
Active Contributor
0 Kudos

Solved myself

There was a missing ci_ekpodbx

Kind regards,

Yann

yann_bouillut
Active Contributor
0 Kudos

However,

The code has to be adapted to pass more than one line item...

Can somebody adapt the code ?

Kind regards,

Yann

Former Member
0 Kudos

Hi Yann,

<u>BBP_B46B_PO_OUTBOUND method is the last chance to modify the PO fields before the transmission to the backend.</u>

I am not sure, whether you have gone through these links for sample code.

Please describe the detailed requirements. I will definitely try to help you out.

Best Regards

- Atul

yann_bouillut
Active Contributor
0 Kudos

Hi Atul,

I have already "scanned" the forum...

At SC and PO item level, i have created CUF ZTOTO

At ECC EKPO, i have append ZTOTO

in bbp_cufmap i have enter :

DOC_TYPE = PO

KEY_TYPE = Z

CUF_FIELD = ZOTO

R3_FIELD = ZTOTO

What else do i need to transfer the SRM ZTOTO to ECC ZTOTO field ?

I already read the CUF threads and it seems that the badi requires to be coded.

I need a sample of this coding

Kind regards,

Yann

Former Member
0 Kudos

Hi Yann,

In the method 'BBP_B46B_PO_OUTBOUND' of badi 'BBP_ECS_PO_OUT_BADI'

try this code in the method.

The code is as follows:

METHOD if_ex_bbp_ecs_po_out_badi~bbp_b46b_po_outbound.

DATA: ls_item TYPE bbp_pds_po_item_d,

ls_bapi_poitem TYPE bbps_if_bapimepoitem_pi.

LOOP AT ct_bapi_poitem INTO ls_bapi_poitem.

IF ls_bapi_poitem-po_item IS NOT INITIAL.

READ TABLE it_item INTO ls_item

WITH KEY number_int = ls_bapi_poitem-po_item

del_ind = ' '.

IF sy-subrc = 0.

IF ls_bapi_poitem-ztoto is initial. "Your Z Custom field

ls_bapi_poitem-ztoto = ls_item-ztoto.

modify ct_bapi_poitem from ls_bapi_poitem.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

ENDMETHOD.

Reward points if this code is useful.

Regards,

Andy

yann_bouillut
Active Contributor
0 Kudos

Hi Andy,

Thanks for your help

I get an error code :

the data object "ls_bapi_poitem" does not have a component called "ztoto"

Why not using CT_BAPI_CUSTOMER_FIELDS ?

Any help will be rewarded

Kind regards,

Yann

Message was edited by:

Yann Bouillut

yann_bouillut
Active Contributor
0 Kudos

Hi,

I also try the following code without result : no transfer to ECC

METHOD if_ex_bbp_ecs_po_out_badi~bbp_b46b_po_outbound.

data : ls_item type BBP_PDS_PO_ITEM_D,

ls_cust type BBPS_IF_CUSTOMER_FIELDS_PI.

loop at it_item into ls_item.

ls_cust-refobject = 'POITEM'.

ls_cust-fieldname = 'ZTOTO'.

ls_cust-REFFIELD1 = 'PO_ITEM'.

ls_cust-REFVAL1 = ls_item-number_int.

ls_cust-container = ls_item-ZTOTO.

ls_cust-type = 'C'.

modify ct_bapi_customer_fields from ls_cust transporting refobject reffield1 refval1 container type where fieldname = ls_cust-fieldname.

endloop.

ENDMETHOD.

Kind regards,

Yann