cancel
Showing results for 
Search instead for 
Did you mean: 

Classic scenario CUF to R3

Former Member
0 Kudos

I've been reading about Extended Classic Scenario (ECS) and how to get customer fields (CUF) to R3 using a BADI. Is something possible for the classic scenario also?

I've defined CUF in INCL_EEW_PD_ITEM_CSF* and they show up, but I want to map the CUF to R3 fields.

Maybe it's just a matter of defining the ZFields in the appropriate append-structure??

Regards, Léon Hoeneveld

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Atul,

we have a 4.7 R/3 system so the BAPI is, I think, b470_po_create. As far as I can see the structures all have an append for my ZFIELD, and mapping is done with move-corresponding statements.

I've added the ZFIELD to the EKPO in R/3, maintained the table BBP_CUFMAP, also tried append structures to other tables, using the clues in different notes, with no effect.

At least it is possible to change a standard field of the EKPO table so may be I can use this with a customer-exit to get it in the ZFIELD of table EKPO.

Regards, Léon

Former Member
0 Kudos

Sorry I found the BAPI on R/3, but I think all the appends are present. Do I need to make a mapping in modification?

Former Member
0 Kudos

Hello,

I've got the following code in the BADI:

LOOP AT po_items INTO wa_po_items.

l_tabix = sy-tabix.

read table it_cuf_item into wa_cuf_item index l_tabix.

if sy-subrc = 0.

wa_po_items-zfield= wa_cuf_item-zfield.

MODIFY po_items FROM wa_po_items TRANSPORTING ZFIELD.

endif.

ENDLOOP.

The idea is that I can fill my appended field ZFIELD in the EKPO table. But this does not work. I think a mapping is not present for ZFIELD.

But it should also be possible to change my it_cuf_field table. So that the backend can read the customer field and set this in the EKPO table.

Any suggestions?

Former Member
0 Kudos

Hi

<b>I guess you still have trouble with BADI BBP_CREATE_PO_BACK.</b>

<u>You have to create this Z field in both SRM (in Include structures - Refer OSS Note 672960/458591) and in the R/3 backend system (in EKKO/EKPO) tables.</u>

<u>In the SRM BADI - BBP_CREATE_PO_BACK, you have map this SRM Z field content to R/3 standard field in SRM structure of the BAPI - BAPI_PO_CREATE1/ BAPI_PO_CREATE. Once this is done. The SRM system will call this R/3 BAPI using RFC and will pass over all the field contents/data to R/3 Purchase order.

Please check the same in ME23N, once everything works fine in SRM and R/3 backend.</u>

<u>Do let me know, incase you still face any issues.</u>

Regards

- Atul

Former Member
0 Kudos

I still have trouble with BADI BBP_CREATE_PO_BACK. In structure IT_ITEM_CUF an appendstructure shows my Z-field.

I've tried code like:

loop at po_items into wa_items.

wa_items_add_data-ztmb = 'X'.

wa_items_add_data-po_item = wa_items-po_item.

append wa_items_add_data to po_items_add_data.

endloop.

but this gives an error.

Maybe I should read it_cuf_itm and get the value for ZTMB to add this to the data?

I could find no examples for code I could use.

Regards, Léon Hoeneveld

Former Member
0 Kudos

Hi

<u><b>Please go through the pointers/links for all detailed sample code and issues you are currently facing -></b></u>

<b>Hope this will definitely help.</b>

Do let me know.

Regards

- Atul

Former Member
0 Kudos

Hi,

You need to use the BADI "BBP_CREATE_PO_BACK "/"BBP_CREATE_REQ_BACK " for this.

Also refer the foll threads for more info:

BR,

Disha.

Pls reward points for useful answers.

Former Member
0 Kudos

Is it possible/easy for you to give me a sample of the coding in the BADI?

I haven't seen it working yet. An implementation in CMOD should only be necessary to map the fields to other fields. Is this correct?

Regards, Léon Hoeneveld

Former Member
0 Kudos

Hi,

For sample code,refer the foll link:

https://wiki.sdn.sap.com/wiki/display/SRM/SRMBADIRepository

At R/3 side,maintain the same fields in maintained the same field in Backend system in customer includes .

Alternatively if you dont want to create the custom fields in SRM but only in R/3 doc then you create an implementation in CMOD and just fetch the values from SRM and populate that in the R/3 doc.For more details refer the foll link:

BR,

Disha.

<b>Pls reward points for useful answers.</b>

Former Member
0 Kudos

I understand that you use the BADI only if you want to change fields. It should be easy just to get the defined customer fields that are already feilled into the backend.

I've created the fields in the appropriate structures in SRM. Now I probably need to create fields in structures in my R/3 4.7 system. Do yo know which structures? I've added the Zfields to the EKPO and EKKO with no effect.