Home > SAP Tips > ABAP/Java developer tips > Creating neat, collapsible sub-screens for cleaner design
SAP Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ABAP/JAVA DEVELOPER TIPS

Creating neat, collapsible sub-screens for cleaner design


Prashanth Prabhu
05.30.2006
Rating: -3.83- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Many times when we design a screen, we end up putting a lot of things on just that one screen. Collapsible sub-screens are great in that they prevent clutter while not missing out on displaying important data.

For example, consider wanting to display the following:
+ ABC
XYZ

Here ABC is some contents with a button to collapse and expand. Below it is some other contents XYZ.

Logic:
We call a Screen 0100.

Screen 100 has two Sub screen areas sub1 and sub2.
Sub1 has ABC and sub2 has XYZ.

PBO makes call to both the subscreens. The trick is that the Screen No Sub1 calls is dynamic. It either calls 101 or 201, based on if the subscreen 1 is expanded or collapsed.

-->Screen 101 has a button with icon collapse. Its functional code is "EXPCO'. Next to it, it has the contents ABC. (This represents the expanded mode).

-->Screen 201 has a button with icon EXPAND. Its functional code is also "EXPCO'. As it is in the collapsed mode, the contents ABC is not displayed.

On the functional code of 100 for the button EXPCO, we toggle the subscreen number to be called.

Code

REPORT  Z_PP_EXPANDER.

data:
  gv_screen type sy-DYNNR value '0101',
  ok_code   type sy-ucomm.

call screen 0100.


* SCreen 0100

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.

  CALL SUBSCREEN sub1 INCLUDING sy-repid gv_screen.

  CALL SUBSCREEN sub2 INCLUDING sy-repid '0300'.

*
PROCESS AFTER INPUT.
 MODULE USER_COMMAND_0100.


module USER_COMMAND_0100 input.

  data:
    lv_okcode type sy-ucomm.

  lv_okcode = ok_code.
  clear ok_code.

  if lv_okcode = 'EXPCO'.
    if gv_screen = '0101'.
      gv_screen = '0201'.
    else.
      gv_screen  = '0101'.
    endif.
  endif.

endmodule.                 " USER_COMMAND_0100  INPUT


Now define the other subscreens 101, 201 and 300.

Rate this Tip
To rate tips, you must be a member of SearchSAP.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
ABAP/Java developer tips
Select Text fields: Case-insensitive
Finding BADIs you can use
Is this the quickest way to find a BADI?
ABAP Objects in SAP Workflow to provide improved performance
Easily debug error messages in SAP processes
Accessing private attributes in ABAP Objects
Find a BADI in a minute
Top 10 SAP tips of 2007
How to transport an SAP query in R/3 4.6x
How to switch off message determination in BAPI_PO_CREATE1

SAP ABAP
The difference between an SAP system and a non-SAP system
Is C, C++ and Java knowledge required when learning SAP?
Getting started with a NetWeaver career
How to be a self-taught NetWeaver and ABAP expert
Is SAP BI knowledge advantageous to an ABAP user?
An ABAP user wants to learn XI
Select Text fields: Case-insensitive
Finding BADIs you can use
Is ABAP knowledge necessary for SAP BI?
Quiz: SAP ABAP development
SAP ABAP Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ABAP  (SearchSAP.com)
ABAP Objects  (SearchSAP.com)
ABAP Workbench  (SearchSAP.com)
BAPI  (SearchSAP.com)
CATT  (SearchSAP.com)
R/3 Repository  (SearchSAP.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

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.

HomeNewsTopicsBlogsTipsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts