SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Using two different selection screens



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming
View previous topic :: View next topic  
Author Message
vga
Мастер
Мастер


Age: 160
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Sat Nov 29, 2008 4:23 pm    Post subject: Using two different selection screens Reply with quote

Use cases, there are some for which a second selection screen is useful:
  • trimmed down selection screen (only necessary)
  • additional selection fields
  • Designing a pre
  • possibly at different authorizations necessary
  • if the procurement data to be modified

The current selection screen can of course sy-dynnr queried.
The special treatment may be good at 'AT SELECTION-SCREEN' held

Code:
*======================================================================*
*               SELEKTIONSBILDSCHIRM                                   *
*======================================================================*

* Version für eigene Patente
SELECTION-SCREEN BEGIN OF SCREEN 1010.
SELECTION-SCREEN BEGIN OF BLOCK block_1 WITH FRAME TITLE text-001.
PARAMETERS:
  p_veran  LIKE it_eigene_patente-veran.
SELECT-OPTIONS:
  so_matnr  FOR it_daten-matnr,
  so_paten  FOR it_daten-patent,
  so_aktiv  FOR it_daten-aktiv,
  so_prodo  FOR it_daten-prod_ort,
  so_relev  FOR it_daten-relevant,
  so_erfas  FOR it_daten-erfas,
  so_bemer  FOR it_daten-bemer.
SELECTION-SCREEN END OF BLOCK block_1.
SELECTION-SCREEN END OF SCREEN 1010.

* normaler Selektionsbidschirm
SELECTION-SCREEN BEGIN OF BLOCK block_2 WITH FRAME TITLE text-001.
SELECT-OPTIONS:
  s_matnr  FOR it_daten-matnr,
  s_patent FOR it_daten-patent,
  s_aktiv  FOR it_daten-aktiv,
  s_prod_o FOR it_daten-prod_ort,
  s_relev  FOR it_daten-relevant,
  s_erfas  FOR it_daten-erfas,
  s_bemer  FOR it_daten-bemer.
SELECTION-SCREEN END OF BLOCK block_2.

AT SELECTION-SCREEN.
  PERFORM sonderbehandlung_screen_1010.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'P_VERAN'.
      screen-input = '0'.
      MODIFY SCREEN.
    ENDIF. " screen-name = 'P_VERAN'
  ENDLOOP. " AT SCREEN


<snip>


*&---------------------------------------------------------------------*
*&      Form  sonderbehandlung_screen_1010
*&---------------------------------------------------------------------*
FORM sonderbehandlung_screen_1010.
  SELECT patent veran FROM  zmmpat000 CLIENT SPECIFIED
    INTO CORRESPONDING FIELDS OF TABLE it_eigene_patente
   WHERE mandt = sy-mandt
     AND veran = p_veran.
ENDFORM.                    " sonderbehandlung_screen_1010


*&---------------------------------------------------------------------*
*&      Form  daten_holen
*&---------------------------------------------------------------------*
FORM daten_holen.
* Daten selektieren
  IF sy-dynnr = '1010'.
    SELECT * FROM zmmpat003
      INTO CORRESPONDING FIELDS OF TABLE it_daten
      FOR ALL ENTRIES IN it_eigene_patente
     WHERE patent = it_eigene_patente-patent
       AND matnr       IN s_matnr
       AND patent      IN s_patent
       AND aktiv       IN s_aktiv
       AND prod_ort    IN s_prod_o
       AND relevant    IN s_relev
       AND erfas       IN s_erfas
       AND bemer       IN s_bemer.
  ELSE. " sy-dynnr = '1010'
    SELECT * FROM zmmpat003
      INTO CORRESPONDING FIELDS OF TABLE it_daten
     WHERE matnr       IN s_matnr
       AND patent      IN s_patent
       AND aktiv       IN s_aktiv
       AND prod_ort    IN s_prod_o
       AND relevant    IN s_relev
       AND erfas       IN s_erfas
       AND bemer       IN s_bemer.
  ENDIF. " sy-dynnr = '1010'
* nur fortfahren wenn mindestens 1 Satz selektiert wurde
  DESCRIBE TABLE it_daten LINES sy-tfill.
  IF sy-tfill = 0.
    MESSAGE i010(es). " nix gefunden
  ENDIF. " sy-tfill = 0
ENDFORM.                    " daten_holen


***************
*             *
*  T       T  *
*      N      *
*             *
*    `---´    *
*             *
***************
Back to top
View user's profile Send private message Blog Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.