cancel
Showing results for 
Search instead for 
Did you mean: 

Join ESTDH table to Estrh and then to Estmj

surajhny
Explorer
0 Kudos

Hi team I want to generate a report where I want to see if the material associated with a specification is extended to plant or not ..

So the experts on this Forum suggested me to Join ESTDH table with Estrh and then to Estmj to get the desired output

Could you please let me know on what fields I can join ESTDH and Estrh ( is it based on Recn ) or can I use Subid..

Also how to join Estrh to Estmj .. kindly let me know

Accepted Solutions (0)

Answers (2)

Answers (2)

christoph_bergemann
Active Contributor
0 Kudos

Hello

after rereading you question:

Hi team I want to generate a report where I want to see if the material associated with a specification is extended to plant or not ..

There is a misinterpretation (if iÍ have understood yout topic correct)

The "extension" of a material to a new plant is NOT handled in EHS. This is the wrong place to check.

I believe we are talking "different languages"

Therefore i try to explain (hoping that this explanation fits your expectation)

Example:

Assuming that material X is assigned to plant Y. Now in the process you can extend that to plant Z

This has no direct significance for EHS (in most cases)

The significance comes up as part of a logistic process (purchasing, selling/delivering or producing).

Example: if now the material is extended to plant Z you could;

1.) purchase this material (so that you generate a "stock" in the plant)

2.) produce the material (Sames as before: you generate now a "stock" in the plant)

2.) or sell the material (here you reduce the stock of the material in the plant)

BUt now different EHS processes have to be triggered (to complex to explain all the potential consequences)

So it is not clear what "exactly you would like to know.

PLease explain better you need.

C.B.

turkaj
Active Participant
0 Kudos

Hi Suraj,

for the join to join ESTRH to ESTMJ you can look at the Database View /PLMB/V_RSP_MAT

And you can jopin ESTDH with ESTRH in the field SUBID --> ESTDH-SUBID = ESTRH-SUBID

The linking of all tables could look like this:

SELECT estdh~subid estrh~recn estrh~actn estmj~recn estmj~actn
  INTO CORRESPONDING FIELDS OF TABLE @DATA(lt_result)
  FROM estdh
  INNER JOIN estrh ON estdh~subid = estrh~subid
  INNER JOIN estmj ON estrh~recn = estmj~recnroot AND estrh~actn = estmj~actn.
Regards
Jim