Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8620

Re: Runtime table names

$
0
0

Hi,

 

first create an internal sorted table MYTABLE from T6B2F, where you have the two fields KOBOG and a field for the table name, for example TABNAME, which you can contactenate from 'KOTE' and T6B2F-KOTABNR. UNIQUE KEY should be KOBOK and TABNAME.

 

From KONA you have also field KOBOG.

 

You have to code something like

 

LOOP AT mytable     WHERE kobog = kona-kobog.

  SELECT  COUNT( * ) FROM (mytable-tabname)

  WHERE   knuma        EQ kona-knuma.

 

  IF sy-dbcnt          GT 1. 
    SELECT ddtext    FROM DD02T

    WHERE  tabname     EQ mytable-tabname.

 

*   Now you have your text, do something here

  ENDIF.

ENDLOOP.

 

Regards,

 

Klaus


Viewing all articles
Browse latest Browse all 8620

Trending Articles



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