cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BBP_PDHCF, make it language-dependent... is it possible?

matteo_montalto
Contributor
0 Kudos
294

Hi all gurus,

in our requirement, some custom table fields in SRM7 have been managed as append structure to the standard table BBP_PDHCF, which is intended for it.

Actually, some of the fields in BBP_PDHCF (say, field "ZDESCR", i.e.) should be language-dependent, so that if the user access the system in english language, then "ZDESCR" will contain a short description in english, and so on.

There's a specific WebDynpro for this table, it is called /SAPSRM/WDC_DODC_CT, common for both purchase orders and contracts; here these custom fields are shown in a table which I'd like to render lang-dependent.

I'm looking for an "easy" way to implement this, given that probably I'll have to break some standard code .

I initially thought that a text table could be a feasible solution, but since every operation on this table is at ABAP code level (no maintenance view here), this should imply that all the logic to insert and retrieve data from the text table should be managed via custom development; and also, no automatism is provided by standard to retrieve automatically entries from an eventually associated text table, so I'd probably have to modify the standard method used to retrieve data from BBP_PDHCF.

What do you think about this task? What do you think is the best effective solution to implement the desired behaviour?

Thanks in advance.

EDIT after 10+ days, has anyone any hint on the task please? Or suggest me a feasible way to implement this? Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Matteo,

If your field to be displayed is not populated by users but is a fixed one, you could try this:

1) Define your CUF display on Header level

SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Cross-Application Basic Settings > Extensions and Field Control (Personalization) > Configure Customer Fields > Define Customer Display Fields on Header Level

2) Create a specific table with all language-dependent values for your field ZDESCR

3) Manage good value to display (depending on language) using BAdI and your specific table

SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Business Add-Ins > Customer Fields > Process Customer Fields > Fill Display Fields on Header Level

Regards.

Laurent.

matteo_montalto
Contributor
0 Kudos

Thanks Laurent for your help,

my guess is that your solution doesn't meet the desiderata but probably you can help me understanding it better.

First of all; i need to translate two custom fields in BBP_PDHCF, say ZROLE and ZDESCR.

ZROLE is a fixed value field; user can assign a value from a fixed list of possible entries. ZDESCR is the associated description.

These fields are defined in :

SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Cross-Application Basic Settings > Extensions and Field Control (Personalization) > Create Table Extensions and Supply with Data > Define Customer Table Extensions on Header Level

where an APPEND structure containing ZROLE, ZDESCR and other fields have been included.

What I see by now is that data stored in BBP_PDHCF are in italian, since italian is the main system language used. That's a problem if an english-speaking user access the sistem, because those data will be shown in italian (web dynpro /SAPSRM/WDC_DODC_CT is entitled to show header's Customer table extensions).

What I'd like to have is a sort of dynamic language adaptation based on a transcode table which, on the basis of the sy-langu value, shows at runtime fields filled in the proper language.

Also, it should be able to provide values in the correct language when ZROLE's search help is triggered by the user.

Do you think there's a BADi that can help me on this task? As far as I've seen on the second customizing path you told me, that should be enabled for header's custom fields (not customer table extensions) and just for visualization purpose, which I did not understand if it's my case or not.

Thanks again.

laurent_burtaire
Active Contributor
0 Kudos

Hello Matteo,

As field ZDESCR is a free-text input, it is not possible to translate it dynamically: data displayed are those stored in DB (language independent).

Regards.

Laurent.

matteo_montalto
Contributor
0 Kudos

Hi Laurent,

I'm sorry, I explained it badly.

ZROLE is a field which contains an ID, example: LF, BA, RS... These are fixed values, and each one of these value has a counterpart in english language: as example, VN, OA, IP...

ZROLE is an inputable field with an assigned search help; only valid ID are shown, an ID non-existent will return an error.

So, we can assume this field will always contain a value chosen from a defined set we know.

ZDESC is a fixed description binded to ZROLE id; so for example, "VN" id stands for "vendor".

An example will help:

In italian:

if ZROLE is equal LF, then ZDESC will be equal to "fornitore"

If logged in english, the above values should be shown as:

ZROLE is equal to VN (as VN in english is = to LF in italian)

and ZDESC is equal to "vendor" (as "vendor" is the english term for italian's "fornitore").

Hope it's a bit clear, looking forward for your feedback

Kind regards

laurent_burtaire
Active Contributor
0 Kudos

Hello Matteo,

From where does fixed value ZDESC come from ?

If you manage this fixed value for each language, it should be displayed in correct language (as done for field ZROLE).

If it does not work, try to use specific class and its method to display sentence in correct language::

SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Cross-Application Basic Settings > Extensions and Field Control (Personalization) > Create Table Extensions and Supply with Data > Control Table Extensions and Their Fields and Actions > Configure Control of Fields of Table Extensions.

Regards.

Laurent.

matteo_montalto
Contributor
0 Kudos

Hi Laurent,

both ZROLE and ZDESC should be translated into sy-langu language for my requirement. These are not part of the key of BBP_PDHCF at DB level.

Both ZROLE and ZDESC are retrieved via RFC from a backend system; let's say that ZROLE can be chosen from a dozen of possible, admissible values, and consequently, also ZDESC behave the same.

The idea I had is to identify a "default" language, let's say, italian, to save data persistently at DB. And find a way to display such data in sy-langu language whether the user logs in in language different from italian.

laurent_burtaire
Active Contributor
0 Kudos

Hello Matteo,

I think with implementation for BAdI definition /SAPSRM/BD_PDO_FE_FILL_HEADER from enhancement spot /SAPSRM/BD_PDO_FIELD_EXTENSN it should work to display ZDESC value according to language connection.

But, you will have also to manage Configure Control of Fields of Table Extensions after document creation to not enable this field (non changeable) in order to be able to fill value with data determined with BAdI definition /SAPSRM/BD_PDO_FE_FILL_HEADER.

Regards.

Laurent.

matteo_montalto
Contributor
0 Kudos

Hi Laurent,

I tried this way, but once I'm in /SAPSRM/BD_PDO_FE_FILL_HEADER implementation I see that ZROLE and ZDESC are always blank; could this depend to the fact that there are not simply header's custom fields, but belongs to a table Extension ?

I'm trying to get something like a text table for these fields but as far as I've seen it doesn't seem to be possible.

This two fields should behave exactly like standard PARVW and VTEXT on an R/3 / ECC backend, in "Partner" section for a purchasing document; even though data in db table is stored in a default language, there are auxiliary text tables/lang routines which show values w.r.t. user's language.

Edited by: Matteo Montalto on Nov 2, 2011 5:19 PM

laurent_burtaire
Active Contributor
0 Kudos

Hello Matteo,

(...) could this depend to the fact that there are not simply header's custom fields, but belongs to a table Extension ?

(...)

Maybe...

(...)

This two fields should behave exactly like standard PARVW and VTEXT on an R/3 / ECC backend, in "Partner" section for a purchasing document; even though data in db table is stored in a default language, there are auxiliary text tables/lang routines which show values w.r.t. user's language.

(...)

I think you will have to manage on your own routine conversion for your field ZROLE and labels for field ZDESC.

Enhancement for WDC should be necessary.

Regards.

Laurent.

Answers (0)