cancel
Showing results for 
Search instead for 
Did you mean: 

Badi BBP_SC_TRANSFER_BE, method GROUP_PO

Former Member
0 Kudos

Hi All,

We are on SRM 5.0 SP07.

I want to add an additional grouping criteria for grouping backend PO's- <b>Shopping cart Line item currency</b>.

In addition to the standard grouping (which is as per the PO header fields like vendor, purchase org, purchase group, company code etc.), I want to add line item currency as one more grouping criteria.

Can someone suggest how I can do it using BADI BBP_SC_TRANSFER_BE, method GROUP_PO?

Sample code might be very useful.

Thanks,

Srivatsan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

try this (please check it correctly - it was written in NOTEPAD)

DATA:

lv_previous_currency TYPE BBP_INTERPR_ITEM-currency,

lv_new_group TYPE bbps_procurement-group_1.

FIELD-SYMBOLS:

<fs_proc_item> TYPE BBP_INTERPR_ITEM.

CLEAR: lv_new_group, lv_previous_currency.

SORT ct_proc_item BY currency

LOOP AT ct_proc_item ASSIGNING <fs_proc_item>.

IF <fs_proc_item>-currency NE lv_previous_currency.

ADD 1 TO lv_new_group.

lv_previous_currency = <fs_proc_item>-currency.

ENDIF.

<fs_proc_item>-group_1 = lv_new_group.

ENDLOOP.

Radek Hanus

Former Member
0 Kudos

Hello Radek,

Thanks for your suggestion. I implemented this peice of code in our development system. Its not working, i tried to debug and test it, ct_proc_item table is not getting filled for any of the shopping cart grouping. Could you please suggest anyother way to acheive this functionality?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Custom fields addition, go through the OSS Notes

672960 and 458591.

<b>To see the sample code, please go through the SAP OSS Notes, which is recommended here -></b>

Note 610332 BADI BBP_SC_TRANSFER_BE/BBP_RESERVATION_GRP: Customer fields

Note 1040082 BADI BBP_BS_GROUP_BE: Parameter is_object not filled

Note 980017 Follow-on document not created

Note 715213 Interface change in BAdIs in Release SRM 4.0

Note 912873 Item not filled when using PO number range BADI

Note 820404 BADI BBP_SC_TRANSFER_BE not called correctly

Do let me know.

Regards

- Atul