Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8914

How to link kondd and kotd001 tables with field as knumh.

$
0
0

FS is

Pass Material# to KONDD-SMATN & get KONDD-KNUMH. Pass KONDD-KNUMH to KOTD001-KNUMH

And display KOTD001-MATWA for whom KOTD001-KAPPL=V & KOTD001-KSCHL=Y001. If no value is found then display blank.


I wrote the logic as below. But when i keep a break point of select statement nd checking step by step, it is not taking KOTD001 table. It is directly going to endform. Here material number is taken from j_1iexcdtl table.


if it_j_1iexcdtl is not initial.
   SELECT knumh
          smatn
           FROM kondd
           INTO TABLE it_kondd
           FOR ALL ENTRIES IN it_j_1iexcdtl
           WHERE smatn EQ it_j_1iexcdtl-matnr.
endif.

   IF it_kondd is not INITIAL.

    SELECT kappl                                                     "Application
           kschl                                                     "material determination type
           matwa                                                     "material entered
           knumh                                                     "condition record numbe
          FROM kotd001
           INTO TABLE it_kotd001
          FOR ALL ENTRIES IN it_kondd
           WHERE knumh EQ it_kondd-knumh
             AND   kappl EQ 'V'
             AND   kschl EQ 'Y001'.
  ENDIF.


Viewing all articles
Browse latest Browse all 8914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>