Tip

Avoid customizing e-mails from Describe Select-Options

The tip e-mail you sent on Describe Select-Options may be useful. However, you would need to customize it for each select-option/parameter in program's selection screen. That is tedious, time consuming, and error prone.

Why not use a standard FM? This routine that I have written code can be dropped in to any program as is, no mods.
It shows only options with values, leaves out "no-display" selections, and has a pretty frame to boot!


DATA: BEGIN OF INFO OCCURS 0,
      FLAG,
      OLENGTH TYPE X,
      LINE  LIKE RSVAR-INFOLINE,
      END OF INFO,
      DELETE_INDEX LIKE SY-TABIX.
.
.
.
PERFORM FRONT_PAGE.

FORM FRONT_PAGE.
CALL FUNCTION 'RS_COVERPAGE_SELECTIONS'
     EXPORTING
          REPORT            = SY-CPROG
          VARIANT           = ' '                    "sy-slset
          NO_IMPORT         = ' '
     TABLES
          INFOTAB           = INFO
     EXCEPTIONS
          ERROR_MESSAGE     = 1
          VARIANT_NOT_FOUND = 3
          OTHERS            = 2.
*         others            = 4.

LOOP AT INFO.
*  Clean up blank lines and "No selections"
   IF INFO-LINE CS 'No selections'
   OR INFO-LINE+1(77) IS INITIAL.
     DELETE_INDEX = SY-TABIX - 1.
     DELETE INFO INDEX SY-TABIX.
     READ TABLE INFO INDEX DELETE_INDEX.
     IF NOT INFO-LINE+2(1) IS INITIAL.
       DELETE INFO INDEX DELETE_INDEX.
     ENDIF.
     CONTINUE.
   ENDIF.
ENDLOOP.
PERFORM WRITE_COVER.
ENDFORM.

FORM WRITE_COVER.
LOOP AT INFO.
    IF INFO-LINE CS 'Invisible'.

    Requires Free Membership to View

INFO-LINE = SY-ULINE. WRITE: / INFO-LINE. EXIT. ENDIF. WRITE: / INFO-LINE. ENDLOOP. NEW-PAGE. ENDFORM.

This was first published in March 2001

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.