Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MARD and MCHB table join for stock display

Dear Experts,

I've a requirement to develop a report which generates the output with the freestock for which i've joining th 2 tables of MCHB and MARD  with the key field is matnr. .

If i pass the material into the selection screen the material stock present in MCHB is only flowing and the material which is in MARD is not flowing.

Need help . It's urgent requirement

Piece of coding is as below.

LOOP AT GT_MCHB INTO GS_MCHB.
     GS_FINAL-MATNR = GS_MCHB-MATNR.
     GS_FINAL-WERKS = GS_MCHB-WERKS.
     GS_FINAL-LGORT = GS_MCHB-LGORT.
     GS_FINAL-CHARG = GS_MCHB-CHARG.
     GS_FINAL-J_3ASIZE = GS_MCHB-J_3ASIZE.
     GS_FINAL-CLABS = GS_MCHB-CLABS.

  READ TABLE GT_MAKT INTO GS_MAKT WITH KEY MATNR = GS_MCHB-MATNR.
  GS_FINAL-MAKTX = GS_MAKT-MAKTX.

READ TABLE GT_MARD INTO GS_MARD WITH KEY MATNR = GS_MAKT-MATNR.
GS_FINAL-MATNR = GS_MARD-MATNR.


  APPEND GS_FINAL TO GT_FINAL.


Best rgds/thnks,

Srikanth.




Former Member
Not what you were looking for? View more on this topic or Ask a question