on 2016 Aug 04 7:15 PM
Let us say that within a specification property tree I have a class called Chemical attributes. One of the characteristics in Chemical attributes is Customer where customer number KUNNR is displayed. My users want me to display Customer Name concatenated with Customer number in the value assignment field. Is there any way I can use the characteristic definition to do this? Right now the characteristic is linked to KNA1-KUNNR. A screen shot is attached.
Request clarification before answering.
Hello Deepak,
Yes - this can be done - and in fact is done for phrases in CG02.
However one would need to write ABAP code to get this done.
Just have a look how phrase based characteristics are set up and set break-points in the C14K_* Function modules and you will see how it is done:
Hope this helps
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Deeapak
the answer of Mark is in my opinion not "100%" correct and might be misleading (but not 1000% sure !!)
Example: for phrases : if the phrase is still maintained (if i remember correct) you will see in the dialug the "phrase text" (only). Only if you hit F4 then you will see code and text. BUt there is an enhancement option available so that you can now show code or text or both.
I am not 100% sure if the function module is the "right" one (as shwon by MArk). As you are looking for "display" and not for "search".
But: if you define a characteristic (<= 30 characters) you can assign a function module. Here you can doit "customer specific" and you could e.g. populate a F4 help to search for customer number using "name" etc....
E.g. take a look in this discussion:
If you check "ABAP" code of teh BADi mentioned you willfind the "parameter" to define (in customizing) so that you can show in CG02 ither phrase text, phrase ocde or wahtsoever.
May be this is teh "better" place. That means: using the FM module you look for the customer number and stores this in database. But for the display may be this extension (whcih is related to the table baesed valus assignment set up) you could try to show customer number and some "text" as concatenated. I am nto sure if you can exceed here in the "display" the CHAR 30 definition. We are not using this option up to know (even considering the fact that it is a nice enhancement)
IN contetx of similar demand we used other option to solve more orless teh same demand. I am not allowed to share solutio here,
Dear Mark
I am not sreu about the "code" of the "phrase check" FM. I never analyzed it. I would more assume it is used to "select" in the F4 dialog the right phrase; but it is not "used" to define disaply in CG02; But may be you have deeper/better knowlegde here. Never investigated.
C.B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christoph,
Christoph Bergemann wrote:
Dear Mark
I am not sreu about the "code" of the "phrase check" FM. I never analyzed it. I would more assume it is used to "select" in the F4 dialog the right phrase; but it is not "used" to define disaply in CG02; But may be you have deeper/better knowlegde here. Never investigated.
C.B.
The FMs in C14K* are for switching from the technical value stored in Table AUSP (For phrases the phase ID) to the display value (Phrase Code or Phrase Text or Both - however you set up your system).
Kind Regards
Mark
Dear Mark
thanks for feedback. If i have more time in future i will invest once again time here. What i can only remember is that with some set up you can change the behaviour of CG02 display. This is new (i believe ma ybe with EnhPack 5 ?). Doing short survey of function moduel I was not able to find the parameter there.. but i know there is something..
C.B.
PS: just found the link and topic:
https://www.consolut.com/en/s/sap-ides-access/d/s/doc/YP-RELNEHS_617_EHSCI4_PS_S
with this text:
In the Customizing activity Set Up Table-Based Value Assignment, the activity Create Entries for the Value Assignments (report RC1TCG11_02) has been extended to include the Phrase Representation group box. You can specify for individual value assignment types whether the assigned phrase-enabled characteristics (data type CHAR) appear as the phrase text, phrase code, or phrase code and text. Phrase text is set by default. The settings selected in this activity for the phrase representation apply to all phrase-enabled characteristics of the value assignment type. In the activity Set Up Table-Based Value Assignment, you can define the phrase representation individually for the characteristics of a value assignment type.
If Phrase Code or Phrase Code and Text is selected for a characteristic but a phrase code does not exist for the assigned phrase, only the phrase text is displayed in the table-based value assignment
.
Hi Christoph,
I tried the BADI EHSB_VAI_ADD_INF. It has a method called GET_OUTTAB. Using this I can modify the display value. The problem is the method gets triggered only for the first time display and change in CG02. After this method GET_ADD_CLASS_DEF gets triggered but the method does not have the parameters as GET_OUTTAB for me to modify the display.
Thanks for the input, but when we talk of phrase sets it looks like it is analogous to a domain value range in the data dictionary. For this particular characteristic we are supposed to create the phrase text dynamically from the customer data in KNA1. No texts exist for these values in the EHS tables.
Using phrase text will definitely simplify the situation but that will mean that a customer number has to exist in the value range of the characteristic before it is used in CG02. Am I right in understand this?
thanks,
Deepak
Dear Deepak
I haven't anlyzed this BADI. I have some "problems" with you statements (may be you would like to explain something different):
"The problem is the method gets triggered only for the first time display and change in CG02" => i would expect this: you are in CG02; you switch to property tree, you switch to data record. Now you can move with in property tree do fifferent property and then come back: I would assume that the BADi should/must be called once again to show the same as at the first time.
You can explain your statement "only for the first time"? As well I would assume if you do proper set up etc. it should as well work if you use C02 in "display" mode
We have had "similar" challenge but used different approach.
Clearly this is "stable". you define a new characteristic and assign it to property. YOu define a suitable Function module which can be used in F4 help modus (e.g. to search for customer from KNA1). BUt if you just store the number you will not see "text" (e.g. describing the customer). The issue might be now: what exactly you would like to achieve. A characteristic can have 30 CHAR not more. So in just checking CG012 you can not show more data and there is (according to my knowledge) no "tooltip" like option (so if you move with move cursor you will get more data displayed).
What you might try is: you can "assign" to a characteristic a special user defined text. Now if you select in CG02 a customer number(via F4 help in characteristic) you can try to read data from KNA1 etc. and collect any data you would like to collect and store this data in user defined text.
The positive effect is: if you use e.g. output variant "Valuation" you would see the data record including the user deifned text (so that yo have a "link" between KNA1 number and additional data
The still "negative" effect is: you can only see KNA1 number in CG02 dispaly or EDIT mode.
The "trouble" is a little bit the demand. Using "AUSP" etc. you can store not more than 30 CHAR. But if you "concatenate" KNA1 number and text you loose (in my opnion) the option to have a suitable F4 help to search for KNA1 number...
I am not allowed to share our solution. But this solution is still only a kind of "workaround"
It does not really make sense (but is an option to do it like:)
In background you have some good designed process running. This process checks any update in KNA1 (what ever is relevant). Now in the background phrases are generated "automatic" and assigned automatic to a phrase set.
E.g. KNA1 number could move to "phrase code", and customer text can move to phrase text. For phrase text you can use any number of CHAR (but still in CG02 you can only display CHAR 30)
Now you can use this "dynamicly! generated phrase set for data maintenance.
C.B:
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.