cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Custom fields to Req and PO

Former Member
0 Kudos

Hi,

We are on SRM 5.0 and ECC 5.0.We are using the classic scenario .I am trying to transfer the catalog ID from SRM shopping cart to R3 Req .There are number of threads in this forum that describe the procedure, which i understand.

But now if the Req is converted to PO in R3 either manually or auto, does the custom fields also get transferred automatically ,if i maintain the same custom fields in CI_EKPODB & CI_EKPODBX? or is there anything else i need to do.

Thanks

Raghu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Atul and Yann.

As i mentioned i am on SRM 5.0 and ECC 5.0. The badi i am using in SRM is BBP_CREATE_BE_RQ_NEW. This is the recomended new BADI in SR> 5.0 release notes.The structure here is different.

See my code below in SRM system in BADI implementation of BBP_CREATE_BE_RQ_NEW.

DATA: s_item_sc TYPE bbp_pds_transfer_item,

s_extension TYPE bbps_badi_extension.

DATA: v_item_no(5).

LOOP AT is_sc_document-item INTO s_item_sc.

s_extension-structure = 'BAPI_TE_REQUISITION_ITEM'.

v_item_no = s_item_sc-number_int+5(5).

CONCATENATE v_item_no s_item_sc-catalogid

INTO s_extension-valuepart1 .

CONDENSE s_extension-valuepart1 NO-GAPS.

APPEND s_extension TO cs_rq_document-it_extensionin.

ENDLOOP.

I guess SRM system calls an RFC and creates PR using BAPI_PR_CREATE.I am hoping the above works as i have not yet tested.

Now, what i am looking for is ,assuming that the above works fine and the field is passed to the R3 PR from SRM. How do i pass this to the followon document which is the PO.I know i need to append CI_EKPODB & CI_EKPODBX. But i don't think i need to use BBP_CUFMAP.I guess this is for the old BADI.

Guys, let me know if my approach is wrong.

Regards

Raghu

yann_bouillut
Active Contributor
0 Kudos

Hi,

As i told you before :

For this you have to implement ECC badis :

ME_PROCESS_PO_CUST to transfer PR CUF field to PO CUF field

Kind regards,

Yann

Former Member
0 Kudos

Thanks Yann. Let me try this and get back to you.

Regards

Raghu

Former Member
0 Kudos

Hi Yann,

This BADI does not seem to be triggered when i try to create a PO for a Preq automatically.Any ideas? I double checked if the BADI implementation is active.

Thanks

Raghu

yann_bouillut
Active Contributor
0 Kudos

Hi,

I confirm you that this badi enable you to transfer PF cuf field into PO cuf field

If you want to display the CUF in PO screen, then you also have to implement the second badi i have given to you.

Kind regards,

Yann

Former Member
0 Kudos

Hi Yann,

Yes it works but not completely, atleast for me here.

I am using transactions ME21N to create a PO w.r.t a Preq. The BADI gets triggered and everthing works fine.

Whne i use the transaction ME59N to convert Preq to PO automatically. The BADI gets triggered but does not create a PO.I get an error messahe saying unable to pass date from BADI.But when i deactivate the BADI it works fine.

I found a note 893531 . Not sure if this will fix the issue.

Regards

Raghu

yann_bouillut
Active Contributor
0 Kudos

Hi,

I did not used the ME59N trnasaction thus cannot help you on this particular point.

However, when a create a PO from ME21N by drag and drop of PR, the CUF data are copied to the PO.

Kind regards,

Yann

Please reward helpful answers

Former Member
0 Kudos

The below is the code i the method PROCESS_ITEM in BADI ME_PROCESS_PO_CUST

DATA: ls_mepoitem TYPE mepoitem.

CLEAR : ls_mepoitem.

ls_mepoitem = im_item->get_data( ).

ls_mepoitem-zzcatalogid = 'ABCD123'.

im_item->set_data( ls_mepoitem ).

When i run the transaction ME59N to convert a PReq to PO automatically.I get the error,

PO could not be created.

PO header data still faulty.

Data from Business Add-in ME_PROCESS_PO_CUST not transferred

Requesition could not be created.

But when i comment the line " im_item->set_data( ls_mepoitem )" in the BADI and execute ME59N again. It works fine.

Any ideas??

Thanks

Raghu

yann_bouillut
Active Contributor
0 Kudos

Hi,

No the CUF field in PR is not automatically transfered to PO.

For this you have to implement ECC badis :

ME_PROCESS_PO_CUST to transfer PR CUF field to PO CUF field

ME_GUI_PO_CUST if you want to display and control the cuf data in the PO (additional tab)

Kind regards,

Yann

Former Member
0 Kudos

Hi

Besides BBP_CUFMAP, you have to of course :

- create the same Zdata element datain ECC as you have done it in SRM.

- maintain CI_EKPODB with append of your Zdata element

- create CI_EKPODBX and activate it !

Then you will be able to sea your Zdata element (or CUF) in the EKPO table.

You don't need to use BBP_PO_INBOUND !

<u>Also, Please refer to SAP OSS Notes 672960 and 485891.</u>

<b>The BADIs in SRM which can used in this case, using transaction SE18 are </b>

<u>BBP_TARGET_OBJECTS</u>

<u>BBP_TARGET_OBJTYPE</u>

<b><u>In SRM Customization</u></b>

In the following step : " Go to SRM --> SRM Server --> Cross Application Settings --> Define Objects in Backend System --> go to external procurement and select the function from the drop down box", it says "purchase order if item data is complete, otherwise Purchase Requsition.

<b>Related links for source code and other configuration -></b>

Do let me know, incase you face any issues.

Regards

- Atul