Skip to Content
Author's profile photo Marcello Urbani

Everything You Always Wanted to Know About Dynamic reporting * But Were Afraid to Ask

Foreword

Standard ABAP reports provide several facilities for dynamic programming. In this entry I’ll cover mostly dynamic select options and selection screen display control.The end result will be a SE16 clone based on the class described in a Yet another webdynpro (ABAP) se16 clone. As usual the full source code is available in my google code page as saplink packages.

Since the core logic is handled by the above mentioned class, most of this is related to the select-options handling.Most of the actual code is in a local class zse16_urb; the only real advantage of this over a series of subroutines is to keep the report cleaner (fewer global data).

h2. *Dynamic select-options – how they work *

As you can see from sap’s help, these are pretty straightforward: 

    data c000 like tabfield-lfieldname.
    select-options:so000 for (c000).

so000 will be defined as a range for a character field of length 45, but after putting the name of a DDIC defined field in C000 (i.e. SFLIGHT-CARRID) it’ll look as a select option for that field, complete with field description and search help.

This syntax doesn’t allow creation or deletion of select-options, so it forces us to declare every select option and every fieldname variable we might want to use.

h2. Caveat:

IObjects of class zcl_se16_core (described in an Yet another webdynpro (ABAP) se16 clone) have two public attributes to provide the field lists described above: userfields and mainfields.These are filled when the object is created.     suffix = screen-name4(3).<br />  endif.<br />  if screen-name(2) = ‘SO’.<br />    suffix = screen-name2(3).

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hi Marcello:

      Look pretty nice -:) But don't you think a small picture would be helpful?

      Keep on coding! -:D

      Greetings,

      Blag.

      Author's profile photo Marcello Urbani
      Marcello Urbani
      Blog Post Author
      Thanks for pointing it out pal, I think now it's a little better.

      Marcello