Skip to Content
avatar image
Former Member

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.




Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 25, 2014 at 06:27 AM

    Hi Srikanth,

    As per my understanding from the above query, the data for a particular material is being fetched from MCHB but its corresponding data from MARD is not coming.

    If this is the case then please also share the select query where data is being fetched from both tables.

    Regards,

    Aashika

    Add comment
    10|10000 characters needed characters exceeded