Tip

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? 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

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.