on 2022 Nov 30 3:08 PM
Dear All,
I have following Business Requirement,
I need to display components with specific details as below for a particular Real Sub.
Below components are maintained in VAT SAP_EHS_1012_022 i.e. Hazardous Ingredients (GHS).
Also I have a condition that out of the below components I only need to further display the components who have Regulatory List TSCA maintained in VAT SAP_EHS_1023_012 (Notification status) and Notification value as “Yes” for each Component.
Lets Say in the components, the Notification status data is maintained for Spec 1 and Spec 2 as Regulatory List TSCA and Notification value as “Yes” then below should be my final Output.
If Data is not maintained for any of the components then I need to display below output.
***********************************************************************************************************************************
Now below is the piece of code I have written,
<01GESTRSUBID(M:C14N_SYMBOL_STACK_NEW)[D:Specification]>
<11BRG046(M,SAP_EHS_1012_022 ;*)>
<11BRG047(S:POS;*)>
<11BRG048(M,SAP_EHS_1023_012;*)>
<15BIF049(AND:01G1023012B1 LK "TSCA",01G1023012C1 LK "Yes")>
<01GESTRSUBID(M:C14N_SYMBOL_STACK_PUSH)[D:Specification]>
<15EIF049>
<11ERG048>
<11ERG047>
<11ERG046>
<13BNG066(*:01GESTRSUBID(M:C14N_SYMBOL_STACK_TOP))>
<13CNG066>
13ENG066>
When I try to execute the code below is my output,
The output of 'Value' is blank. The reason I understood is when I pass the code of conditional output with Repetition group of SAP_EHS_1023_012 (Notification status) whose Value Category is C i.e. Composition, The code now tries to fetch composition output of 'Value' from SAP_EHS_1023_012 (Notification status) where there is no data maintained. So it returns me a blank value. But I need the value to be fetched from SAP_EHS_1012_022 i.e. Hazardous Ingredients (GHS) from the main Real Sub.
Can you please check my code and let me know what correction should I make to get output as below,
Regards,
Rohan
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello
code like "<15BIF049(AND:01G1023012B1 LK "TSCA",01G1023012C1 LK "Yes")>" will not work
You should not compare with "Yes". I have discussed this issue in a different thread created by myself (some time ago).
Looking on your requirement:
"Also I have a condition that out of the below components I only need to further display the components who have Regulatory List TSCA maintained in VAT SAP_EHS_1023_012 (Notification status) and Notification value as “Yes” for each Component."
Most of the consultants i know try to solve this by using WWI technique. But in many cases it is better to look for a "rule set"option
This could run like: you need a "special" rating (Let us assume we call the rating "Yes"). Then in your generation variant you need a sequence like. Prio 1: look for "Yes"; Prio 2 look for Standard
Then by analysing the data in the property (e.g. reading wih may be STANDARD/US) the rule set will determine the "relevant" component. Now the rule set will generate a new data record in the same propery with rating "Yes" (in combination with may be US)
Using this approach you avoid that WWI "calculates"
Anyhow: your logic is not able to "remember" the value (average value). You remeber the spec id... and then by using this spec id you can read identifiers etc. but the "value" is lost; according to my understanding of the "stack" option: you can not move a "combination" of data to the stack (so specid and related value)
I propose a change of "business logic".
Just accept the data on component level (not check for "Yes" or "TSCA"): The "problem" is the data on component
Normally if you have a "TSCA" status... you have many "TSCA variants".. (e.g. registred with TSCA, not regersiterd with TSCA 12b)
If we assume the data would be "simple": then we can assume: on component level you have only one data record with usage STANDARD/US
Then just using the data you can get this:
SpecId / CAS Number / Product Name / TSCA Status / Value
In the column "TSCA Status" you just print the "Yes" or "No" or whatever status is correct (e.g. like "OEL Limits)
C.B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
satyanarayana.reddy9 Thanks for posting your suggestion.
christoph.bergemann Thanks for replying. I accept code like "<15BIF049(AND:01G1023012B1 LK "TSCA",01G1023012C1 LK "Yes")>" will not work due to language dependency. So in reality I've used a phrase for comparison and it works fine.
Now for the main code below is what I did,
I used a 2 step Stack function approach to write the code. Also I wrote different code for VAT when Value Category is C i.e. Composition and different code for Value Category is B i.e. Listing.
For Value Category is B i.e. Listing.:- In the first step, I introduced a stack function to filter out the specs which needs to fulfil my conditional output. Then I used the push function to move them in an internal table. Then pushed them to go through my final output structure.
For Value Category is C i.e. Composition: I slightly used a different approach in writing the code and the stack function C14N_SYMBOL_STACK_EQUAL along with Push function.
This worked for me.
So now I get the below output as expected.
Once again thanks for your support.
Mainly I need to thank goeril.moeschner for helping me offline solve this issue.
Regards,
Rohan Somji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
i believe using the "Stack" option you will not get a result. The problem is you need to remember "Spec number" and value at the same time.
Story could (may be) like this:
You use the "main group" and you use the "pos" group
<11BRG046(M,SAP_EHS_1012_022 ;*)>
<11BRG047(S:POS;*)>
and then use a customer specific symbol (for blank compression) for checking the data on component level
So the idea could be: by using the customer specific symbol you just check the "condition" (tsca +Yes) per component. If the conditon is fullfilled you can print "Name", CAS Number, Value; if not you can skip the output
May be this could help using your demand.
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 Rohan,
Can try to remove <11BRG047(S:POS;*)> till
<11ERG047> and test what is the output.
SAP_EHS_1012_022 i.e. Hazardous Ingredients (GHS). This VAT at the top level and needs to show components in it?
Best
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Satya,
Thanks for replying.
Yes the the component from SAP_EHS_1012_022 i.e. Hazardous Ingredients (GHS) this VAT at the top level needs to show the component. But component must fulfil the conditional output criteria i.e. Regulatory List 'TSCA' maintained in VAT SAP_EHS_1023_012 (Notification status) and Notification value as “Yes” for each Component.
If the conditional output is successful lets say for 2/4, then I need to display
If conditional output fails for all the components then I need to display below output.
If I remove remove <11BRG047(S:POS;*)> till <11ERG047> then I won't enter in the components of SAP_EHS_1012_022.
Looking forward for your reply. Thanks.
Regards,
Rohan
User | Count |
---|---|
3 | |
2 | |
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.