on 2022 Mar 05 7:49 AM
Dear all
in the SAP standard property we have some rare cases in which we have a characteristic which is linked to a "fixed value set".
One example is the "SDS distribution need".. Here you can select three values
- Blank
- 0
- 1
The "0" and the "1" does have assigned texts (descriptions).
Using standard WWI options we can display the "text".. but we would like ot retireve the "0" and/or "1" to this in an "if condition"
Nether have had the need to check this.... how can we get the "0" and "1" as the value?
The same is true (to a certain extent) if you have a characteristic of type "table based" (e.g. linked to TCG81).
Here you have a "value" and a "Description". What WWI methid need to be used to retreive the "value" or the "text"
C.B.
Request clarification before answering.
Hello Christoph,
That depends on the value of the field. If I use the EMS number underlined, it looks like this:
So if you select 1, the entry in the field is really "Yes" and that is what you nee to filter on. e.g. using this code:
<11BRG002(M,SAP_EHS_1022_029;*)>
<01G1022029FE(M:C14N_SYMBOL_STACK_NEW)[D:EmS Number 1 Underlined]>
<01G1022029FE(M:C14N_SYMBOL_STACK_PUSH)[D:EmS Number 1 Underlined]>
<15BIF001(AND:01G1022029FE(M:C14N_SYMBOL_STACK_TOP) LK "Yes")>
1
<15EIF001>
<11ERG002>
The "1" is hard coded. the output will give you "1", if yes is selected.
Best,
Ralph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ralf,
Would that coding work if the WWI templates is called in a different language? And for that language the fixed value translation is available. For Example a German "Ja".
I'm wondering if the symbol method would have access to the value from the DB Table (AUSP) right away - but at least one could re-read it from the DB via the C1F5 Api....
Kind Regards
Mark
Hi Mark,
Didn't check but I doubt it. For tests I simply printed the content of the stack and thus found out that "Yes" is stored there. When logged on in e.g. German I am quite sure the stack will be filled with "Ja" so the code above will not work.
Best,
Ralph
Hello Ralph
with the "selected" characteristic you have "hit" my requirement. But your code will not work (because of the "Yes" as this is language dependent; therefore your code will not work)
In the meantime: i found the solution (which seems to work).
Refering to https://help.sap.com/doc/865ebd534f22b44ce10000000a174cb4/3.6/en-US/bce19551abcf6472e10000000a423f68...
explain a lot of options (so called "Expansion methods" but is missing the option "K". This "K" is shared e.g.here:
https://www.sapdatasheet.org/wil/abap/prog/lc12layoutf05/dtf.html (called as:
"Expansion Parameter K ( Key)")
By using this option i am able to fetch "blank", "0" or "1" and then i can use the "If/else/ etc." options in WWi context
With best regards
C.B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello C.B
I'm not sure if understand your question correctly but let me try to clarify/answer it.
Let us assume that you have SAP_EHS_XXXX_XXX Property and it is has the Characteristic SAP_EHS_XXXX_XXX_REGLIST - Fixed Value (Regulatory list) - Ex: REACH
Fixed Value - REACH
0 (Description) – Phrase enable or free text?
1 (Description) - Phrase enable or free text?
You want to output 0,1 (Description) - Phrase based on IF Condition based on Fixed Value?
This can be used : C14N_SYMBOL_STACK_NEW&PUSH,TOP.
ether have had the need to check this.... how can we get the "0" and "1" as the value?
means the phrase/description as output? please clarify this.
I didn't understand either these are 3 different chars holding different values? please clarify this.
Cause it is not possible that a char holds a value and description.
As you mention it is standard class .. could you please tell me which one is this to understand better?
Best
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
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.