2025 Jun 13 10:01 AM - edited 2025 Jun 14 1:51 AM
Hi SAP Community,
I'm working on a cross-functional requirement involving SAP EHS, and I would greatly appreciate your expert advice
**Background:**
I’m an **SAP SD Consultant**, and this is my first time working in the **SAP EHS** space. I don’t have deep expertise in EHS data models or BAPIs, so please excuse any gaps in terminology. I need some guidance to approach this correctly.
**Requirement:**
I only the following input Characteristic ID (e.g.,ZSAP_EHS_9999_000_CATEGORY) and Phrase Key (e.g., CUST-TD-9999).
Using only this information, I need to retrieve a list of Material Numbers (MATNR) that are linked to substances/specifications where the characteristic matches this phrase key using BAPI_BUS1077_GETDETAIL
.My Main Questions :
**Expected Output:**
A list of **Material Codes** where:
Any support, guidance, or example logic would be very helpful.
Thank you all in advance for your help .
Regards,
Satya
Request clarification before answering.
Hello
from function point of view as mentioned): normaly the demand is solved by a user.
Step 1: by using the EHS search capability a so called "hit list" is generated
Step 2: then it need to be checked by the user: is there a material assigned to the identfied objetc and if yes. list them
The issue is the second step. Here the options in SAP standard are limited
The "BAPI" is only useful for the second step and not for the first step
BUt as the first step is done (from technical perspective) by using a "function module" to which some parameter are handed over:
You can write down a E2E process which could be done 100% by an ABAP routine
Many people "hate" the EHS data model: therefore they try to extract the data to BW or other tool for doing the same story. This is possible as well.
There is a small "but": based on the number of data the inquiry can take longer; and as the data will change over the time: any day you might get a different (but clearly correct) result
I wish the best
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
regarding the first part:
**Requirement:**
I only the following input Characteristic ID (e.g.,ZSAP_EHS_9999_000_CATEGORY) and Phrase Key (e.g., CUST-TD-9999).
Using only this information, I need to retrieve a list of Material Numbers (MATNR) that are linked to substances/specifications where the characteristic matches this phrase key using BAPI_BUS1077_GETDETAIL
This is normally achieved by a real "user" /using SAP transaction CG02) and not via ABAP" Report; but via ABAP report it is in theory possible to achieve this.
EHS does have some "powerfull search options (please check SAP online help).. Assuming the following:
The material in scope should be assigned to a "REAL_SUB": by using the CG02 search options you can get a list of specifications having the needed data. On top: you can extract than the "materials" as assigned to the REAL_SUB
But by specifying a "material number" (as part of the research) in the so called "hit list" the material name is displayed.
In a nutshell: Anyhow: the last step: here you can use then BAPI_BUS1077_GETDETAIL to read the data, For the other part: you nee to look for the function modules which are responsible for the "search". There is on function module used to search for if the input is only a "phrase key". But i propose: To get solution you should look for a functional EHS ressource and a technical resource which can help you to get the solution.
Wish you the best
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 Satya,
From technical side, you could use either the BAPI or the Table mapping.
If you just need the list as on output, I would personally prefer using the table mapping.
The tables you listed are correct. Should give you the output.
SUBID corresponds to RECN and then you can do all the mapping across above tables to get your output.
From a functional side, you have various options available:
1. Use "Advanced Search" app
2. Use "Substance Workbench" (CG02)
Hope this helps. Good luck.
Regards
Nischay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
15 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.