Screen program

Screen program
By Bernd Matzke

This tip is excerpted from ABAP/4: Programming the SAP R/3 System, by Bernd Matzke and published by Addison

    Requires Free Membership to View


If you want to enter more values in a screen program and the screen program does not have enough space, you can enter these values in a 'follow-on' screen program. To make it easier to work with this kind of screen program, the next screen is often displayed as multiply-nested dialog boxes. So that users do not have to run through all the screen programs step by step when they finish entering data, the closing function code is available in all the dialog boxes.

For example:

Screen program 400:
* Subscreen 500 is called and processed.
* The function is closed e.g. by function code DATU
* (transfer data) and EABB (cancel)
* The function code is stored in global field FCODE.
* The function code in screen program 500 is not deleted.

   CLEAR FCODE. "Only in the first dialog box


The statements shown above result in the following procedure:

Screen program 400 is to be called. This screen program is to be the first dialog box to be called from an initial screen. The lines shown above derive from the flow logic of screen program 400. Screen program 500 is called and processed, also as a dialog box. This screen program should contain the function keyes COPY DATA (function code DATU) and CANCEL (EABB). The COPY DATA key should allow you to return to the initial screen and therefore close all the dialog boxes at the same time. For this reason, the FCODE in the screen program 500 is not deleted, but is passed on to screen program 400. There the FCODE is evaluated immediately after the CALL SCREEN statement and the screen program is closed. To preven undesirable side effects in the calling initial screen, the FCODE is initialized beforehand.

If an abnormal end occurs over several levels, the statements are transferred from screen program 400 as appropriate into all the other screen programs. You can then of course only initialize FCODE in the screen program that you have called from the initial screen.

To read more about ABAP/4: Programming the SAP R/3 System, click here.

This was first published in November 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.