cancel
Showing results for 
Search instead for 
Did you mean: 

BAdI: Determine Target Object in BE System

Former Member
0 Kudos

Hi all

We have recently done an upgrade to SRM 5.0 and I realised that the BAdI for determining target object is different.

In the EBP 3.5 system in the SPRO, the BAdI name was BBP_TARGET_OBJECT. It seems that the BAdI name is now BBP_TARGET_OBJTYPE.

Can anyone confirm that I can no longer use BBP_TARGET_OBJECT and must switch to BBP_TARGET_OBJTYPE?

Thanks.

Nicholas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nicholas,

I confirm that BBP_TARGET_OBJECT has been replaced by BBP_TARGET_OBJTYPE (this is written in SRM 5.0 release notes).

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi all/Christophe

I have found the BAdI but it seems that it is very different from the old one. Furthermore the documentation also seems to be old.

In my implementation, I want to be able to change a Purchase <b>Order</b> to a Purchase <b>Requisition</b> depending on some checks.

I used to do it by setting <i>ITEM_DATA-OBJ_TO_GEN</i> = '2' and clearing <i>ITEM_DATA-AGREEMENT</i>, <i>ITEM_DATA-AGMT_ITEM</i> and <i>ITEM_DATA-FIXED_VEND</i>.

To perform my check I used to need <i>ITEM_DATA-MAT_GRP</i> and <i>ITEM_DATA-QUANTITY</i>.

So far I can only find <i>FIXED_VEND</i> and <i>QUANTITY</i> in the new BAdI.

Anyone with any ideas how to handle this?

Many thanks

Nicholas

Former Member
0 Kudos

Hi Nicholas,

instead of ITEM_DATA-MAT_GRP, use CT_ITEM-CATEGORY_ID.

instead of ITEM_DATA-QUANTITY, use CT_ITEM-QUANTITY.

instead of ITEM_DATA-AGREEMENT, clear CT_ITEM-CTR_GUID,

CTR_ITEM_NUMBER, CTR_HDR_NUMBER, CTR_HDR_GUID.

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi Christophe

You are a saint.

Will give it a try.

One last thing, how about the OBJ_TO_GEN?

Do I have to change it from 3 to 2?

Thanks

Nicholas

Former Member
0 Kudos

???

Isn't it the goal of your mods ? to create a PR instead of a PO ?

Then yes, change 3 (PO) to 2 (PR).

Last point: If your goal is also to delete aggreements and fixed vendor and so on, this has to be done in BADI CHANGE, because I don't think that the result of the BADI to determine the target object will be used to change other fields than OBJ_TO_GEN...

Rgds

Christophe

Former Member
0 Kudos

Hi Christophe

Sorry I did not make myself clear.

I meant that I cannot find the field OBJ_TO_GEN.

As far as I can see, there are two input parameters:

1) IT_ACCOUNT of type BBPT_PDS_ACC

2) IT_CUSTOMIZING of type BBP_DETERMINE_TARGET_CUST

There is one changing parameter:

1) CT_ITEM of type BBPT_BS_OBJTYPE_BE_LIST

I cannot find the OBJ_TO_GEN in the changing parameter.

Thanks.

Nick

Former Member
0 Kudos

Nicholas, you would miss a cow in a corridor !!!

Look at the end ot table CT_ITEM.

Rgds

Christophe

Former Member
0 Kudos

Hi Christophe

Maybe I would miss a cow in a corridor.

But good golly I still do not see it.

THe structure I am looking at is BBPS_BS_OBJTYPE_BE_LIST.

Is that the same one you are?

Let me give you all the information:

Definition name: BBP_TARGET_OBJTYPE

Method: DETERMINE_TARGET_OBJECT_TYPES

I did a search and did not find it... really...

Nicholas

Former Member
0 Kudos

Nicholas,

I am on customer site, without access to any SRM 5.0. So I can not check it.

But yes, it should be one of the fields of structure BBPS_BS_OBJTYPE_BE_LIST, used for CT_ITEM.

Rgds

Christophe

Former Member
0 Kudos

Hi Nicholas,

I checked the structure BBPS_BS_OBJTYPE_BE_LIST: it's the first field: PACK_OBJTYPE...

But we don't use 1,2,3 anymore, but real backend business objects instead:

PO: BUS2012

PR: BUS2105

RS: BUS2093

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi Christophe

Thanks heaps. You really are a life-saver.

Nicholas

Answers (0)