cancel
Showing results for 
Search instead for 
Did you mean: 

Derive GL code based on UNSPSC from catalog

Former Member
0 Kudos

Hi,

We are planning to add logic for defaulting GL account based on the UNSPSC sent back from the catalog. For this we will add an additional column to ZBBP_DET_ACCOUNT and use the BADI BBP_DETERMINE_ACCT. The problem is that the UNSPSC passed from the catalog is not available in ITEM_DATA (Í believe it is later saved in field MFR_NO_EXT in BBP_PDIGP). How can we access this field from the BADI?

Thanks for your help

/Per

Accepted Solutions (1)

Accepted Solutions (1)

Ramki
Active Contributor
0 Kudos

Hi

AM not sure, if this is a feasible solution..just thinking aloud..

Is it possible to map UNSPSC with product category in a z-table ?

As product category is available in BADI, you can get UNSPSC from this z table.

second thought ...if you can map like this then you could even have mapped GL account with product category!! Sorry ..I do not have a better solution.

Best regards

Ramki

Former Member
0 Kudos

Thanks Ramki,

There is a one to many relationship between the product category and UNSPSC so it is not feasible to get this from a separate table. The thought is to for some commonly ordered products have a default GL account so the user does not have to select one (which these products are are determined by UNSPSC).

Br,

Per

Former Member
0 Kudos

Is it possible to call BBP_PD_SC_ITEM_GETDETAIL from the BADI? Looks like we have to pass CRMT_OBJECT_GUID but I don't think this info is available in the BADI...

/Per

Ramki
Active Contributor
0 Kudos

Why don't you try this ?

Try using BBP_DOC_CHANGE_BADI to change GL account data based on UNSPSC taken from catalog into shopping cart.

Best regards

Ramki

Former Member
0 Kudos

Hi

Yes that is quite possible inside the BADI itself.

Regards

- Atul

Former Member
0 Kudos

Atul,

Do you mean it is possible inside BBP_DETERMINE_ACCT? If it is possible this seems to be the most straight forward and less complicated solution. Can you give me some hint on how to access the OBJECT_GUID within the function?

When is BBP_DOC_CHANGE_BADI called? Is it called when the SC data is transferred from the external catalog and during updates to the SC through the GUI?

Thanks for your help

Former Member
0 Kudos

Hi,

Does anyone have more details on my questions?

- Can BBP_PD_SC_ITEM_GETDETAIL be called from within BBP_DETERMINE_ACCT (need to access the field MFR_NO_EXT in structure BBP_PDS_SC_ITEM_D)

- If not, is there any other way of accessing MFR_NO_EXT from BBP_DETERMINE_ACCT or do we have to use BBP_DOC_CHANGE_BADI to implement the requirement?

Br,

Per

-

Former Member
0 Kudos

Hi

<u>Incase you need only ITEM Data and Account Assignment data, then in that case

BBP_DETERMINE_ACCT</u>

Else,

<b>Go for the BADI Definition -> BBP_DOC_CHANGE_BADI </b>

Before doing anything, you must read the relavant standard BADI Definition documentation so as to analyze whether that will suit your requirements or not.

<b>I hope, Inside BBP_DOC_CHANGE_BADI , you can all the required details as mentioned here.</b>

Hope this will help.

Please reward suitable points.

Regards

- Atul

Ramki
Active Contributor
0 Kudos

Hi Per

I am not sure of calling BBP_PD_SC_ITEM_GETDETAIL as you will not have SC by then.

So, I guess you will have to try BBP_DOC_CHANGE_BADI.

Best regards

Ramki

Answers (3)

Answers (3)

Former Member
0 Kudos

-

former_member195032
Active Contributor
0 Kudos

Please provide some more details on your requirement.

See the thread if this helps.

regards,nishant

markusher
Discoverer
0 Kudos

How did this work out? It sounds an interesting approach.