Two data elements in one table

When writing a program, it may be useful to know: Is there a DB-table, containing the data elements of two screen fields?

When writing a program, it may be useful to know: Is there a DB-table, containing the data elements of two screen fields? Next clear code may help in some cases. It can be easily developed up to selecting by domains or fieldnames in addition to or instead of data elements. Another idea is to use wildcards, because screen structure field/data element (accessed via F1-F9 help) may have a name, which sometimes differs from DB-table's...

ones.


REPORT ZTWO_DATELS .
tables: DD03L, DD02L.

select-options ROLL  for DD03L-rollname no intervals default 'TABNAME'.
select-options ROLL1 for DD03L-rollname no intervals default 'TABCLASS'.
select-options TABCL for DD02L-tabclass no intervals default 'TRANSP'.
*            try also:        'CLASTER', 'POOL', 'VIEW'.
select-options TABNAME  for DD03L-tabname no intervals.

data: begin of itab occurs 0,
        tabname    like dd02L-tabname,
        tabclass   like DD02L-tabclass,
        fieldname  like DD03L-fieldname,
        rollname   like DD03L-rollname,
        fieldname1 like DD03L-fieldname,
        rollname1  like DD03L-rollname,
      end of itab .

  select distinct DD02L~tabname
                  DD02L~tabclass
                  DD03L~fieldname
                  DD03L~rollname
                  a~fieldname
                  a~rollname
    into table itab
    from ( DD03L inner join DD03L as a on a~tabname = DD03L~tabname
                 inner join DD02L      on DD02L~TABNAME = DD03L~TABNAME
         )
    where DD03L~TABNAME  in TABNAME
      and DD02L~TABCLASS in TABCL
      and DD03L~ROLLNAME in ROLL
      and     a~ROLLNAME in ROLL1.

  loop at itab.
    write: at /(16) itab-tabname hotspot color col_group,
               (08) itab-tabclass,
               (12) itab-fieldname quickinfo itab-fieldname,
               (12) itab-fieldname1 quickinfo itab-fieldname1,
               (12) itab-rollname quickinfo itab-rollname,
               (12) itab-rollname1 quickinfo itab-rollname1.
    hide itab-tabname.
  endloop.
  clear itab-tabname.

at line-selection.
  set parameter id 'DTB' field itab-tabname.
  call transaction 'SE11'. " 'SE16' and skip first screen.

This was first published in August 2002
This Content Component encountered an error

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close