Posts

Showing posts from April, 2012

Dynamic Selection Screen Base on TCODE

SELECTION-SCREEN BEGIN OF BLOCK SO WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,"Sales order number                   S_VBELND FOR LIKP-VBELN,"Delivery number                     S_VBELNI FOR VBRK-VBELN,"Invoice number                      S_VBELNP FOR VBKD-BSTKD."PO number            SELECTION-SCREEN END OF BLOCK SO.                            
*--- EVENT AT SCREEN OUTPUT ------------------------------- AT SELECTION-SCREEN OUTPUT.                                          CASE SY-TCODE.                                                       WHEN 'ZEDI6'.                                                        LOOP AT SCREEN.                                                      CASE SCREEN-GROUP4.                                                  WHEN '001'.                  "Sales order select                     SCREEN-ACTIVE = '1'.       "1=Active, 0=Don't display              MODIFY SCREEN.�����������������…

Dynamic selection screens based on user input parameters

Dynamic selection screens based on user input parameters with dropdowns and execute button disabled.
The selection screen  push button does the functionality of the disabled execute button
REPORT  zsscr.

*TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS

TYPE-POOLS : vrm,
             icon.

*SELECTION SCREEN FIELDS
TABLES : sscrfields.

*GLOBAL DECLARATIONS

DATA : flag TYPE c,
      tablename(10),
      mmtable LIKE dd02l-tabname,
      sdtable LIKE dd02l-tabname,
      hrtable LIKE dd02l-tabname.

*DECLARATIONS FOR SELECTION SCREEN STATUS

DATA it_ucomm TYPE TABLE OF sy-ucomm.

**********SELECTION-SCREENS*********************

Dynamic Table Selection

REPORT zdany_dynamic_select.

* We use some parameters to dynamically control the select, this is not very
* clever but this is just a test program !!
PARAMETER : p_tabnam TYPE tabname DEFAULT 'SFLIGHT',
            p_selfl1 TYPE edpline DEFAULT 'CARRID',
            p_selfl2 TYPE edpline DEFAULT 'CONNID',
            p_selfl3 TYPE edpline DEFAULT 'FLDATE',
            p_selfl4 TYPE edpline DEFAULT 'PRICE',
            p_selfl5 TYPE edpline DEFAULT 'CURRENCY',
            p_where1 TYPE edpline DEFAULT 'PRICE > 300',
            p_where2 TYPE edpline DEFAULT 'AND CURRENCY = ''EUR'''.

FIELD-SYMBOLS :  TYPE ANY TABLE,
                 TYPE ANY,
                 TYPE ANY.

DATA: lt_where    TYPE TABLE OF edpline,
      lt_sel_list TYPE TABLE OF edpline,
      lt_group    TYPE TABLE OF edpline,
      l_having    TYPE string,
      l_wa_name   TYPE string,
      l_sel_list  TYPE edpline,
      dref        TYPE…