Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic selection list based on selection screen values ?

former_member186143
Active Contributor
0 Kudos

I have a requirement which I can't solve in one step in a selection screen

first field I have to select the contract like you do with me33k

in the second field I have to select the position of the contract filled in at the first field ?

if the position is selected I have to fill other fields in the selection screen and block them for altering the information entered by the position selected

anybody got some sample on how to do this ??

kind regards

arthur de smidt

1 REPLY 1

former_member186143
Active Contributor
0 Kudos

I really don't understand why it's not working. after input of the parameter field debugging doesn't start when is it evaluated ??

I want the screen modified at every change of p_contr.


SELECTION-SCREEN: BEGIN OF BLOCK s01 WITH FRAME TITLE text-s01.
parameters:       p_bukrs like ekko-bukrs MEMORY ID BUK obligatory,
                  P_WERKS like EKPO-WERKS MEMORY ID WRK OBLIGATORY,
                  p_ekorg like ekko-ekorg MEMORY ID EKO obligatory,
                  P_EKGRP like EKKO-EKGRP MEMORY ID EKG OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK s01.

SELECTION-SCREEN: BEGIN OF BLOCK s05 WITH FRAME TITLE text-s05.

parameters:       p_contr AS CHECKBOX USER-COMMAND contr,
                  p_konnr like EKKO-ebeln  MATCHCODE OBJECT MEKK ,
                  P_KTPNR like EKPO-ktpnr.
SELECTION-SCREEN: END OF BLOCK s05.



SELECTION-SCREEN: BEGIN OF BLOCK s02 WITH FRAME TITLE text-s02.
parameters:       p_lifnr like ekko-lifnr modif id CTR,
                  p_EVERK like EKKO-VERKF," obligatory,
                  p_afnam type zafnam,
                  p_uwkenm like EKPO-TXZ01,

                  P_IHRAN like EKKO-IHRAN DEFAULT SY-DATUM,
                  P_KDATB like EKKO-KDATB," obligatory,
                  P_KDATE like EKKO-KDATE," obligatory,
                  p_cntVU LIKE RP50G-PERNR OBLIGATORY
                              MATCHCODE OBJECT PREM,
                  p_advies type lifnr.
SELECTION-SCREEN: END OF BLOCK s02.
SELECTION-SCREEN: BEGIN OF BLOCK s03 WITH FRAME TITLE text-s03.
SELECTION-SCREEN  PUSHBUTTON /1(17) WERK USER-COMMAND WERK.
parameters:       P_TXZ01 like EKPO-TXZ01 obligatory,
*                 p_txt9  type tline,
                  P_MATKL like EKPO-MATKL DEFAULT 'DNST-02' OBLIGATORY.
selection-screen begin of line.
SELECTION-SCREEN COMMENT 1(31) TEXT-001 FOR FIELD p_menge.
parameters:       P_MENGE like EKPO-MENGE DEFAULT '1' OBLIGATORY,
                  P_MEINS like EKPO-MEINS DEFAULT 'ST' OBLIGATORY.
selection-screen end of line.
selection-screen begin of line.
SELECTION-SCREEN COMMENT 1(31) TEXT-002 FOR FIELD p_netpr.
parameters:       P_NETPR like EKPO-NETPR obligatory,
                  P_EPEIN like EKPO-BPRME DEFAULT 'ST' OBLIGATORY.
SELECTION-SCREEN POSITION 55.
parameters:       p_schpr like ekpo-schpr.
selection-screen end of line.
parameters:       p_saknr like mepoaccounting-sakto obligatory,
                  p_aufnr like mepoaccounting-aufnr obligatory.
SELECTION-SCREEN: END OF BLOCK s03.



************************************************************************
initialization.
  clear h_exit.
  set pf-status 'STANDAARD'.
  move 'Werkomschrijving' to WERK.


at selection-screen on p_contr.
loop at screen.
if p_contr = 'X'.
      if screen-group1 = 'CTR'.
        screen-input = 0.
        screen-active = 0.
        screen-required = 0.
        modify screen.
      else.
        screen-input = 0.
        screen-active = 1.
        screen-required = 1.
        modify screen.
      endif.
endif.
endloop.

at selection-screen on exit-command.
  case sy-ucomm.
    when '&F03' or '&F015' or '&F12'.
      leave program.
  endcase.




at selection-screen on block S01.
  case sy-ucomm.
    when 'ONLI'.
      type_doc = 'B'.
    when 'ONLI1'.
      type_doc = 'O'.
  endcase.
perform checks_org.

at selection-screen on block S02.
  perform checks_lev.

at selection-screen on block s03.
  check sy-ucomm(4) eq 'ONLI'.
  perform checks_werk.

at selection-screen.
  case sy-ucomm.
    when 'WERK'.
      perform lange_omschrijving.
    when 'SPOS'.
      CALL FUNCTION 'RS_VARIANT_SAVE_FROM_SELSCREEN'
        EXPORTING
          CURR_REPORT = 'ZBESTELLING'.
  endcase.

start-of-selection.