‎2021 Mar 24 8:01 AM
Dear Experts,
How to get Material and Specification details using Standard BAPI Bapi_Bus1077_GetDetail?
What are the required parameters in bapi_bus1077_getdetail and how to display the data
Please help to solve this.
Thanks for all the support.
Regards
Sathish Samudrala
‎2021 Mar 24 8:38 AM
You can go through the Function Module Definition to understand how this BAPI needs to be used. At the bottom you can find details of all the parameters that have been used

Also, below blog might be helpful
Read and Exchange Specification Data from SAP EHS to .Net system Using ABAP Web-Services
HS specification can be read by using an ABAP Program using a standard BAPI provided by SAP BAPI_BUS1077_GETDETAIL. This BAPI takes inputs in form of FLAGs Sets and Specification details. Using this BAPI, all data for one or more specifications can be read by assigning values to certain import parameters. The selection of the data can be restricted by entering details in specific import or export tables.
The key of the specification object to be read must be specified in the specification header table SUB_HEADER of the BAPI. These flags can be set based on the sections of the specifications you want to read.
We need to pass the specification Number to the SUB_HEADER Table as shown below:

One can read the specification details for a particular USAGE by setting the relevant USAGE in PROP_USAGE table
More details on the BAPI can be easily obtained from the BAPI Documentation provided by SAP.
‎2021 Mar 25 2:51 PM
iam trying to fetch material number,description,material status,specification,specification type,specification description using bapi_bus1077_getdetail. but i got output only specification and specification type but i am unable to fetch Material number,Material description,Specification description please give me any suggestion
‎2021 Mar 26 11:50 AM
Hello
the proper use of BAPI/APi is not easy. But we have good discussion here. As explained by Taha
By using a "material" number you can identify the corresponding specification and then you can read data.
But if you are a beginner in EHS: do not start this. The use of the BAPis/APIs is challenging (because of many reasons (we need a booklet to list all the topics to check et.).
E.g. check may be
https://blogs.sap.com/2019/09/15/use-of-bapis-in-ehs-classic/
C.B.
PS: please do an search here. You will find discussions like e.g.
https://answers.sap.com/questions/11638680/get-the-property-tree-details-of-a-specification-o.html
https://answers.sap.com/questions/4689449/bapi-fm-to-fiill-data-in-ehs-view-in-material-mast.html