Select option date format

Hi abap gurus,
i  have select option for date.
when i select that option it will take date format (DD/MM/YYYY)
but i want (MM/DD/YYYY)
how can i chage this.
Thanks,.
Jack

You might not be having access to SU01.
Go to T-code SU3 and change the date format to MM/DD/YYYY.
Or
From Menu go to System-User Profile-Own Data and change the date format to MM/DD/YYYY.
cheers
Amandeep.

Similar Messages

  • SELECT OPTIONS DATE.

    Hello , I need your help ,  to access to  every date in an interval of the select option , in order to execute a function module that use date in one of its parameters .
    select-options : dat for sy-datum .
       CALL FUNCTION 'ZPRUEBA''
         EXPORTING
           offic                =
           chdsk                =
           inicio_periodo       =
         FIM_PERIODO          =  dat  "but i need here every date of the interval
         NO_UPDATE            =
       IMPORTING
         NR_COBRANCAS         =
       ENDSELECT.
    How can I do that ? , tnhx.

    hi
    put the function module in the loop.
    data : date like sy-datum.
    select-options : s_date for date.
    while ( s_date-low LE s_date-high ).
    CALL FUNCTION 'ZPRUEBA''
    EXPORTING
    offic =
    chdsk =
    inicio_periodo =
    FIM_PERIODO = s_date-low
    NO_UPDATE =
    IMPORTING
    NR_COBRANCAS =
    add 1 to s_date-low.
    endwhile.
    reward if helpful
    prasanth

  • Select -option Date field in MM/YYYY format!

    Hi.. Friends..
       Iam having DATE field as selection screen SELECT_OPTION parameter.
    And I am fetching records from one of my tables with where condition of this select-option.
    Now my reuirement is to modify that DATE select-option with 7 characters i.e. MM/YYYY
    So if user enters 09/2008 as DATE-LOW.. I have to fetch all records of September 2008.
    If user enters 09/2008(lower limit) and 02/2009(Upper limit)...
    I have to fetch records between... September 1st 2008 to 28th february 2009.
    What is the simplest way to impliment this?
    Thanks,
    Naveen.I

    Hi
    Use data element SPMON as in below code.
      TABLES: S001.
      DATA: l_year(4)  TYPE n,
            l_month(3) TYPE n,
            g_sdate TYPE sy-datum,
            g_edate TYPE sy-datum.
      RANGES: gr_pdate FOR sy-datum.
      CONSTANTS: lc_low   TYPE sy-datum VALUE '00010101',
                 lc_high  TYPE sy-datum VALUE '99990101'.
      SELECT-OPTIONS:   s_spmon  FOR  s001-spmon.
      l_year  = s_spmon-low(4).
      l_month = s_spmon-low+4(2).
    * Get the first day of PERIOD-LOW
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = 'K2'
          i_poper        = l_month
        IMPORTING
          e_date         = g_sdate
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      l_year  = s_spmon-high(4).
      l_month = s_spmon-high+4(2).
    * Get the last day of PERIOD-HIGH
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = 'K2'
          i_poper        = l_month
        IMPORTING
          e_date         = g_edate
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      IF NOT s_spmon-low IS INITIAL.
        gr_pdate-low = g_sdate.
      ELSE.
        gr_pdate-low = lc_low.
      ENDIF.
      IF NOT s_spmon-high IS INITIAL.
        gr_pdate-high = g_edate.
      ELSE.
        gr_pdate-high = lc_high.
      ENDIF.
      IF NOT s_spmon-low IS INITIAL OR NOT s_spmon-high IS INITIAL.
        gr_pdate-option = 'BT'.
        gr_pdate-sign = 'I'.
        APPEND gr_pdate.
      ENDIF.
    " SELECT RECORDS
    " >>> SELECT field1 field2 FROM TAB1 WHERE erdat IN gr_pdate. <<<

  • Problem in Passing the select-options data in smartforms

    Dear ABAPers,
    I have developed new layout for Delivery Chellan using smartforms.
    using parameters i am getting document no, corresponding all details getting print.
    but the client wants to use multiple document no.
    in function module also i am passing only one import parameter (i.e. doc.no).
    my requirement is how to pass multiple data in smartfroms.
    Thanks & Regards,
    Ashok

    Dear ABAPers,
    Here i give my code Please check it out and tell me where i am going wrong.
    *& Report  ZMM_DC_FORM                                                 *
    REPORT  ZMM_DC_FORM                            .
           Data Declaration
    tables : mseg,
             mkpf,
             ekpo,
             ekko,
             objk,
             mbew,
             ser03,
             twlad,
             makt,
             adrc.
    data : begin of struct_mblnr,
           mblnr type mblnr,
           end of struct_mblnr.
    data : it_mblnr like table of struct_mblnr with header line.
    data : begin of i_struct,
           mblnr like mseg-mblnr,
           mjahr like mseg-mjahr,
           matnr like mseg-matnr,
           erfmg like mseg-erfmg,
           werks like mseg-werks,
           lgort like mseg-lgort,
           ebeln like mseg-ebeln,
           ebelp like mseg-ebelp,
           umwrk like mseg-umwrk,
           end of i_struct.
    data : begin of bednr_struct,
           matnr type ekpo-matnr,
           bednr type ekpo-bednr,
           end of bednr_struct.
    data : begin of price_struct,
           matnr type mseg-matnr,
           verpr type mbew-verpr,
           stprs type mbew-stprs,
           end of price_struct.
    data : begin of serial_struct,
           matnr like objk-matnr,
           sernr like objk-sernr,
           end of serial_struct.
    data : begin of fi_struct,
           matnr type mseg-matnr,
           maktx type makt-maktx,
           bednr type ekpo-bednr,
           erfmg type mseg-erfmg,
           verpr type mbew-verpr,
           val_p type mbew-verpr,
           end of fi_struct.
    data : it_tab like table of i_struct with header line.
    data : it_add1 type table of adrc with header line,
           it_add2 type table of adrc with header line.
    data : it_bednr like table of bednr_struct with header line.
    data : it_price like table of price_struct with header line.
    data : it_ser type table of ZMM_DC_SERIAL with header line.
    data : it_final like table of fi_struct with header line.
    data : s_date like mkpf-budat.
    data : s_ebeln like ekpo-ebeln.
    DATA : FM_NAME TYPE RS38L_FNAM.
            Selection Screen Variables
    selection-screen : begin of block b1 with frame title text-001.
    select-options : s_mblnr for mseg-mblnr.
    parameters : s_mjahr type mseg-mjahr.
    selection-screen : end of block b1.
              Start of Selection
    start-of-selection.
    select mblnr from mseg into table it_mblnr where mblnr ge s_mblnr-low
                                     and   mblnr le s_mblnr-high.
    delete adjacent Duplicates  from it_mblnr.
    *loop at it_mblnr.
    *write : it_mblnr-mblnr.
    *endloop.
    loop at it_mblnr.
    select mblnr
           mjahr
           matnr
           erfmg
           werks
           lgort
           ebeln
           ebelp
           umwrk from mseg into table it_tab where mblnr = it_mblnr-mblnr
                                           and   mjahr = s_mjahr
                                           and   xauto <> 'X'.
    read table it_tab index 1.
    *code for PO Number
    s_ebeln = it_tab-ebeln.
    *code for Supplying plant address
    select single adrnr from twlad into twlad-adrnr where werks = it_tab-werks
                                                    and   lgort = it_tab-lgort.
    select single * from adrc into it_add1 where addrnumber = twlad-adrnr.
    clear twlad-adrnr.
    *code for receiving plant address
    select single lgort from ekpo into ekpo-lgort where ebeln = it_tab-ebeln
                                                  and   ebelp = it_tab-ebelp.
    select single adrnr from twlad into twlad-adrnr where werks = it_tab-umwrk
                                                    and   lgort = ekpo-lgort.
    select single * from adrc into it_add2 where addrnumber = twlad-adrnr.
    clear : twlad-adrnr,
            ekpo-lgort.
    *code for the Material Document Date
    select single budat from mkpf into s_date where mblnr = it_mblnr-mblnr
                                                  and   mjahr = s_mjahr.
    loop at it_tab.
    it_final-matnr = it_tab-matnr.
    it_final-erfmg = it_tab-erfmg.
    *Code for Material Description
    select single maktx from makt into makt-maktx where matnr = it_tab-matnr.
    it_final-maktx = makt-maktx.
    clear makt-maktx.
    *Code for Service order Number
    select single matnr
                  bednr from ekpo into it_bednr where ebeln = it_tab-ebeln
                                         and   ebelp = it_tab-ebelp
                                         and   matnr = it_tab-matnr.
    it_final-bednr = it_bednr-bednr.
    *Code for Price for the Material
    select single matnr
                  verpr
                  stprs from mbew into it_price where matnr = it_tab-matnr
                                                and   bwkey = it_tab-werks.
    if it_price-verpr <> 0.
    it_final-verpr = it_price-verpr.
    else.
    it_final-verpr = it_price-stprs.
    endif.
    it_final-val_p = it_final-erfmg * it_price-stprs.
    append it_final.
    clear it_final.
    endloop.
    *Code for Serial Number
    select single obknr from ser03 into ser03-obknr where mblnr = it_mblnr-mblnr
                                                    and   vorgang = 'MMSL'.
    select matnr
           sernr from objk into table it_ser where obknr = ser03-obknr.
    clear ser03-obknr.
    *Calling Function Module for Smartform
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZMM_DC_FORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = FM_NAME
    EXCEPTIONS
      NO_FORM                  = 1
      NO_FUNCTION_MODULE       = 2
      OTHERS                   = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION FM_NAME
    EXPORTING
    L_MBLNR = it_mblnr-mblnr
    L_DATE = S_DATE
    L_EBELN = S_EBELN
    IT_ADD1 = IT_ADD1
    IT_ADD2 = IT_ADD2
    TABLES
    IT_FINAL = IT_FINAL
    IT_SER = IT_SER.
    endloop.
    Please help me to solve this problem.It is very urgent.
    Thanks & Regards,
    Ashok.

  • Selection OPTION: Date input problem in Module POOL through Subscreen

    Dear ALL,
    Being new to ABAP, I am struck in a Problem.
    Requirement:
    I want an option on the Screen( My Screen 9000) for Date Range. Through this Date-Range I want to filter and pull some data from
    Database.
    As Date Range Selection option is possible only through Sub-Screen integration. Hence I integrated a Sub-Screen 400 (as below) and named the Sub-Screen area as SEL on my screen.
    Problem: As soon as I enter the dates on the screen, then those dates are not taken up by the code.
    During debugging I saw the the S_datum-low and S_datum-high are empty (in fact 00000000)
    The code follows:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_9000.
      Call SUBSCREEN SEL  INCLUDING sy-repid '400'.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_9000.
    DATA:  gv_datum     Type   dats,
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
        SELECT-OPTIONS: s_datum FOR gv_datum.
    SELECTION-SCREEN END OF SCREEN 400 .
    Plz help where I am missing something.
    Regards
    Chandan

    Call the subscreen during the AT SELECTION-SCREEN event.
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    SELECT-OPTIONS: s_datum FOR gv_datum.
    SELECTION-SCREEN END OF SCREEN 400 .
    AT SELECTION-SCREEN.
       CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
       SET PF-STATUS '0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
       CASE sy-ucomm.
         WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
           LEAVE TO SCREEN 0.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

  • Select option data recovery

    Hi,
    I have developed a selection screen. There's a button that lauches an action to perform when the selection screen fields are filled. When the user inputs bad data, the program warn the user that the filled entries have an error and clear the screen inputs.
    How can I manage to display back the data that was previously filled ? Should I use the INITIALIZATION key word ?
    Thanks in advance for your help.
    Thibault

    Here is a point,
    I am at least trying to initialize the select option range value, so that the user does not have to type in a value (I am trying to do that for test purpose only):
    selection-screen begin of screen 1 as subscreen.
    select-options  S1        for
         VBAP-VGBEL
         modif id  001.
    selection-screen end of screen 1 .
    INITIALIZATION.
    DATA: lv_s1Low TYPE VGBEL,
          lv_s1High TYPE VGBEL.
    lv_s1Low = '888'.
    lv_s1High = '889'.
    MOVE: 'BT' TO  S1,
          lv_s1Low TO S1-LOW,
          lv_s1High TO S1-HIGH.
    APPEND S1.
    When executing the program, nothing happens, the input fields are still empy !!When this will be working, I will be able to get back the previously typed in values.
    Thanks in advance for your help.
    Thibault

  • Geting select options data into variable

    hey ,
    when i get the value of select options i have to use a variable with type any
    and to assign it to field symbol type table.
    DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
    .* Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
    how can i pass RT_CARRID or <FS_CARRID> to a varible with type vbap-netgrw ( net weight ) ?
    thanks
    ASA

    posted in other forum

  • Date selection and date format in MSSQL

    i have to make a select transaction with a microsoft SQL db. I have to select the entry in a given range of time. So i've made my little form with the datepicker of jquery. The datetime field in the database has this output:
    Jan 1 2014 12:00:00:000AM
    This is the format of the jquery datepicker:
    {dateFormat: 'M dd yy'}
    WHen i receive the GET call (but i've tested even with a POST and the output is the same)from the form i add the hours to the date (I'm using Zend framework 1.12):
    $startdate= $this->getRequest()->getParam('datepicker');
    $startdate= $startdate." 12:00:00:000AM";
    $enddate= $this->getRequest()->getParam('datepicker1');
    $enddate= $enddate." 12:00:00:000AM";
    But it probably is not the right one as my select query:
    SELECT [Document No_],[Sell-to Customer No_],[Planned Delivery Date],[Description],[Description 2] FROM dbo.SyncroPlanningTable WHERE CAST([Planned Delivery Date] as datetime)>='".$startdate."' AND CAST([Planned Delivery Date] as datetime)<='".$enddate."' ORDER BY [Planned Delivery Date] ASC
    doesn't give any output. What am I doing wrong?

    >>Jan 1 2014 12:00:00:000AM
    I am not sure(I am also not so good in Zend,but still would like to give it a shot), should the format be like this?
    Jan 1 2014 12:00:00.000 AM
    Also SQL stores the date in the format YYYY-MM-DD hh:mm:ss.fff(2014-02-12 21:41:00.293). So I think, if you pass the date in that format your query would work fine
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Assigning Data-Type Select-Option from Report to Method

    Hi Specialists,
    How can I solve the following task smart?  It’s a quiet simple task. In my Report I’ve some Select-Option-Data-Types and I want to assign this data-type an Abpab-Object-Method. Is it possible to do this in a smart fashion. I’ve fight with the Abap-Syntax und at the end I’ve found a tricky way of assigning the Select-Option parameter to the Abap-Object-Method.
    If somebody have a smart idea for this problem, pleas let me know.
    Thankx.
    Hallo Spezialisten,
    ich hätte da eine Frage wie man folgende Aufgabe elegant lösen kann.
    Es ist ganz einfach, ich möchte von einen Report einen Select-Option-Datentyp an eine Abapobject Methode übergeben. Ich hatte sehr lange gekämpft bis ich ein umständlichen weg gefunden habe die parameter vom reprot an die mehtode zu übergen.
    Falls jemand da eine gut Idee hätte wäre mir das nächste mach sehr geholfen.
    Danke

    Hi 
    Here is the Program with  Selection screen and   the Class & Methods.
    REPORT demo_abap_objects_methods NO STANDARD PAGE HEADING.
    * Global Selection Screens
    SELECTION-SCREEN BEGIN OF: SCREEN 100 TITLE tit1, LINE.
    PARAMETERS members TYPE i DEFAULT 10.
    SELECTION-SCREEN END OF: LINE, SCREEN 100.
    SELECTION-SCREEN BEGIN OF: SCREEN 200 TITLE tit2.
    PARAMETERS: drive    RADIOBUTTON GROUP actn,
                stop     RADIOBUTTON GROUP actn,
                gearup   RADIOBUTTON GROUP actn,
                geardown RADIOBUTTON GROUP actn.
    SELECTION-SCREEN END OF: SCREEN 200.
    * Class Definitions
    CLASS: c_biker DEFINITION DEFERRED,
           c_bicycle DEFINITION DEFERRED.
    CLASS c_team DEFINITION.
      PUBLIC SECTION.
        TYPES: biker_ref TYPE REF TO c_biker,
               biker_ref_tab TYPE STANDARD TABLE OF biker_ref
                                           WITH DEFAULT KEY,
               BEGIN OF status_line_type,
                 flag(1)  TYPE c,
                 text1(5) TYPE c,
                 id       TYPE i,
                 text2(7) TYPE c,
                 text3(6) TYPE c,
                 gear     TYPE i,
                 text4(7) TYPE c,
                 speed    TYPE i,
               END OF status_line_type.
        CLASS-METHODS: class_constructor.
        METHODS: constructor,
                 create_team,
                 selection,
                 execution.
      PRIVATE SECTION.
        CLASS-DATA: team_members TYPE i,
                    counter TYPE i.
        DATA: id TYPE i,
              status_line TYPE status_line_type,
              status_list TYPE SORTED TABLE OF status_line_type
                               WITH UNIQUE KEY id,
              biker_tab TYPE biker_ref_tab,
              biker_selection LIKE biker_tab,
              biker LIKE LINE OF biker_tab.
        METHODS: write_list.
    ENDCLASS.
    CLASS c_biker DEFINITION.
      PUBLIC SECTION.
        METHODS: constructor IMPORTING team_id TYPE i members TYPE i,
                 select_action,
                 status_line EXPORTING line TYPE c_team=>status_line_type.
      PRIVATE SECTION.
        CLASS-DATA counter TYPE i.
        DATA: id TYPE i,
              bike TYPE REF TO c_bicycle,
              gear_status  TYPE i VALUE 1,
              speed_status TYPE i VALUE 0.
        METHODS biker_action IMPORTING action TYPE i.
    ENDCLASS.
    CLASS c_bicycle DEFINITION.
      PUBLIC SECTION.
        METHODS: drive EXPORTING velocity TYPE i,
                 stop  EXPORTING velocity TYPE i,
                 change_gear IMPORTING change TYPE i
                             RETURNING value(gear) TYPE i
                             EXCEPTIONS gear_min gear_max.
      PRIVATE SECTION.
        DATA: speed TYPE i,
              gear  TYPE i VALUE 1.
        CONSTANTS: max_gear TYPE i VALUE 18,
                   min_gear TYPE i VALUE 1.
    ENDCLASS.
    * Class Implementations
    CLASS c_team IMPLEMENTATION.
      METHOD class_constructor.
        tit1 = 'Team members ?'.
        CALL SELECTION-SCREEN 100 STARTING AT 5 3.
        IF sy-subrc NE 0.
          LEAVE PROGRAM.
        ELSE.
          team_members = members.
        ENDIF.
      ENDMETHOD.
      METHOD constructor.
        counter = counter + 1.
        id = counter.
      ENDMETHOD.
      METHOD create_team.
        DO team_members TIMES.
          CREATE OBJECT biker EXPORTING team_id = id members = team_members.
          APPEND biker TO biker_tab.
          CALL METHOD biker->status_line IMPORTING line = status_line.
          APPEND status_line TO status_list.
        ENDDO.
      ENDMETHOD.
      METHOD selection.
        CLEAR biker_selection.
        DO.
          READ LINE sy-index.
          IF sy-subrc <> 0. EXIT. ENDIF.
          IF sy-lisel+0(1) = 'X'.
            READ TABLE biker_tab INTO biker INDEX sy-index.
            APPEND biker TO biker_selection.
          ENDIF.
        ENDDO.
        CALL METHOD write_list.
      ENDMETHOD.
      METHOD execution.
        CHECK NOT biker_selection IS INITIAL.
        LOOP AT biker_selection INTO biker.
          CALL METHOD biker->select_action.
          CALL METHOD biker->status_line IMPORTING line = status_line.
          MODIFY TABLE status_list FROM status_line.
        ENDLOOP.
        CALL METHOD write_list.
      ENDMETHOD.
      METHOD write_list.
        SET TITLEBAR 'TIT'.
        sy-lsind = 0.
        SKIP TO LINE 1.
        POSITION 1.
        LOOP AT status_list INTO status_line.
          WRITE: / status_line-flag AS CHECKBOX,
                   status_line-text1,
                   status_line-id,
                   status_line-text2,
                   status_line-text3,
                   status_line-gear,
                   status_line-text4,
                   status_line-speed.
        ENDLOOP.
      ENDMETHOD.
    ENDCLASS.
    CLASS c_biker IMPLEMENTATION.
      METHOD constructor.
        counter = counter + 1.
        id = counter - members * ( team_id - 1 ).
        CREATE OBJECT bike.
      ENDMETHOD.
      METHOD select_action.
        DATA activity TYPE i.
        tit2 = 'Select action for BIKE'.
        tit2+24(3) = id.
        CALL SELECTION-SCREEN 200 STARTING AT 5 15.
        CHECK NOT sy-subrc GT 0.
        IF gearup = 'X' OR geardown = 'X'.
          IF gearup = 'X'.
            activity = 1.
          ELSEIF geardown = 'X'.
            activity = -1.
          ENDIF.
        ELSEIF drive = 'X'.
          activity = 2.
        ELSEIF stop = 'X'.
          activity = 3.
        ENDIF.
        CALL METHOD biker_action( activity ).
      ENDMETHOD.
      METHOD biker_action.
        CASE action.
          WHEN -1 OR 1.
            CALL METHOD bike->change_gear
                              EXPORTING change = action
                              RECEIVING gear = gear_status
                              EXCEPTIONS gear_max = 1
                                         gear_min = 2.
            CASE sy-subrc.
              WHEN 1.
                MESSAGE i315(at) WITH 'BIKE' id
                                      ' is already at maximal gear!'.
              WHEN 2.
                MESSAGE i315(at) WITH 'BIKE' id
                                      ' is already at minimal gear!'.
            ENDCASE.
          WHEN 2.
            CALL METHOD bike->drive IMPORTING velocity = speed_status.
          WHEN 3.
            CALL METHOD bike->stop  IMPORTING velocity = speed_status.
        ENDCASE.
      ENDMETHOD.
      METHOD status_line.
        line-flag = space.
        line-text1 = 'Biker'.
        line-id = id.
        line-text2 = 'Status:'.
        line-text3 = 'Gear = '.
        line-gear  = gear_status.
        line-text4 = 'Speed = '.
        line-speed = speed_status.
      ENDMETHOD.
    ENDCLASS.
    CLASS c_bicycle IMPLEMENTATION.
      METHOD drive.
        speed = speed  + gear * 10.
        velocity = speed.
      ENDMETHOD.
      METHOD stop.
        speed = 0.
        velocity = speed.
      ENDMETHOD.
      METHOD change_gear.
        gear = me->gear.
        gear = gear + change.
        IF gear GT max_gear.
          gear = max_gear.
          RAISE gear_max.
        ELSEIF gear LT min_gear.
          gear = min_gear.
          RAISE gear_min.
        ENDIF.
        me->gear = gear.
      ENDMETHOD.
    ENDCLASS.
    * Global Program Data
    TYPES team TYPE REF TO c_team.
    DATA: team_blue  TYPE team,
          team_green TYPE team,
          team_red   TYPE team.
    DATA  color(5) TYPE c.
    * Program events
    START-OF-SELECTION.
      CREATE OBJECT: team_blue,
                     team_green,
                     team_red.
      CALL METHOD: team_blue->create_team,
                   team_green->create_team,
                   team_red->create_team.
      SET PF-STATUS 'TEAMLIST'.
      WRITE '                   Select a team!             ' COLOR = 2.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'TEAM_BLUE'.
          color = 'BLUE '.
          FORMAT COLOR = 1 INTENSIFIED ON INVERSE ON.
          CALL METHOD team_blue->selection.
        WHEN 'TEAM_GREEN'.
          color = 'GREEN'.
          FORMAT COLOR = 5 INTENSIFIED ON INVERSE ON.
          CALL METHOD team_green->selection.
        WHEN 'TEAM_RED'.
          color = 'RED '.
          FORMAT COLOR = 6 INTENSIFIED ON INVERSE ON.
          CALL METHOD team_red->selection.
        WHEN 'EXECUTION'.
          CASE color.
            WHEN 'BLUE '.
              FORMAT COLOR = 1 INTENSIFIED ON INVERSE ON.
              CALL METHOD team_blue->selection.
              CALL METHOD team_blue->execution.
            WHEN 'GREEN'.
              FORMAT COLOR = 5 INTENSIFIED ON INVERSE ON.
              CALL METHOD team_green->selection.
              CALL METHOD team_green->execution.
            WHEN 'RED '.
              FORMAT COLOR = 6 INTENSIFIED ON INVERSE ON.
              CALL METHOD team_red->selection.
              CALL METHOD team_red->execution.
          ENDCASE.
      ENDCASE.
    Reward  points if it is usefull ....
    Girish

  • How to set a dynamic variant for date in select-options in the upper field

    Hi  Variant experts Good Evening!
           I have the following problem while setting up a dynamic varinat .
    Ex: select-options: dat for sy-datum.  
    I am able to save the lower limit as a dynamic value but not able to save the upper values as dynamic in the select-options. Could any of you please help me in this.
    Regards
    Ravi.

    i hope dynamic variant concept is not there,
    but u can use the fn module DYPRO_GET_VALUES  and
    DYNPRO_SET_VALUES
    DYNPRO_GET_VALUES gets the values in the screen,
    DYNPRO_SET VALUES sets the values.
    first get the values, compare and set the values as u want

  • Select-options split date into month and assign to low and high

    Hi,
       In my select-options i am giving BEDAT (01.04.2004 TO 30.10.2005).I need to split month and
    year in separate fields.that is
    select-option_low-month in one field
    select-option_high-month in second field
    select-option_low-year in third field
    select-option_high-year in fourth field.
    Finally i need to move these four fields to it_final.
    select * from mbewh into corresponding fields of table it_mbewh
               for all entries in it_final where matnr = it_final-matnr and
               bwkey = it_final-werks and lpmon = ? and lfgja = ?
               and  bklas <> ' '.
    what input i have to give in lpmon and lfgja in select query to get for lfmon (04 to 10)
    and lfgja (2004 to 2005).
    suggest some ideas.

    Hi ,
    Can you please check the following code.
    Hi ,
    data :  l_low_yr(4),
              l_high_yr(4),
              l_low_mon(2),
              l_high_mon(2).
    Splitting the select option date to month and year into low and higher values
    l_low_yr        =   s_date-low+00(04). "  Year low value from the date range
    l_low_mon    =   s_date-low+04(02). "  Month low value from the date range
    l_high_yr      =   s_date-high+00(04)."  Year high value from the date range
    l_high_mon   =   s_date-high+04(02)." Month high value from the date range
    selecting the data from the table mbewh based on some conditions.
    select * from mbewh into corresponding fields of table it_mbewh
               for all entries in it_final where matnr = it_final-matnr and
               bwkey = it_final-werks and lfmon BETWEEN  l_low_mon and l_high_mon
    and lfgja BETWEEN l_low_yr and l_high_yr   and  bklas EQ  ' '.
    This select will retrive the desired data records from the table MBEWH.
    Please let me know if this works according to your requirement.
    Thanks and Regards
    Saritha

  • Set of default values for Select-Options

    Hi Gurus,
    I have a requirement where I need to set default values for select options
    ex: SELECT-OPTIONS: S_MTART FOR MARA-MTART
    default values must be ERSA - HIBE- FHMI - DIEN - GEST
    Please tell me how to do it.
    Effective replies will be rewarded with full points
    Karthik

    Hi,
    For each SELECT-OPTION, you can only specify one DEFAULT.
    You must specify the default value g in its internal format, e.g. "SELECT-OPTIONS DATE FOR SY-DATUM DEFAULT '19931224'", not "... DEFAULT '24.12.1993'".
    The default value g should normally be a literal because, at runtime when you use SUBMIT, it is transferred to the selection options table sel so early that no value can be assigned to the field g. System fields like SY-DATUM are an exception here because the system usually assigns values to them as soon as the report processing starts.
    When you use user-defined selection screens in your programs that you do not call using SUBMIT, the DEFAULT value is transfered when the selection screen is first called. In this case, therefore, you can use other fields g.
    regards,
    sowjanya
    Message was edited by: sowjanya suggula

  • [Help] Multiple Selection at Select Options.

    People, I've coded following Select Options:
    DATA: g_created TYPE zapomatxref-erdat,
                g_modif   TYPE zapomatxref-aedat,
                g_matnr   TYPE zapomatxref-pr1_material.
    SELECT-OPTIONS: s_creat FOR g_created,
                                   s_modif FOR g_modif,
                                   s_matnr FOR g_matnr OBLIGATORY.
    Thing is, when I execute the program and hit the Multiple Selection, an error pops up saying "Fill in all required fields".
    I know it goes through PBO validating that OBLIGATORY so I can't enter the multiple selection screen.. But is there a way to enter the multiple selection screen without changing the OBLIGATORY adition ?
    Thanks in advance.
    PS: This is an executable program, not module pool. Also I want to enter Mutliple Selection screen without filling s_matnr.

    Guys, solved the problem. You have to remove the OBLIGATORY addition and set the following code.
    ("Percentage symbol" below is the traditional percentage centessimal symbol we know, the mozilla wont let me insert it...)
    TOP Include:
    CONSTANTS: c_per002     TYPE c    VALUE '(percentage symbol)002'.
    MAIN PROGRAM:
    AT SELECTION-SCREEN ON s_matnr.
      IF sy-ucomm NE c_per002.
        IF s_matnr[] IS INITIAL.
          MESSAGE e025(ycapo).
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
    PS: c_per002 comes to be the sy-ucomm value when hitting Multiple Selection Button at Selection Screen.. As any action validates the whole screen, you just set a clause when you don't want to validate if sy-ucomm not equals (different from) c_per002.

  • Select option as parameter in FM.

    Ho to pass select options as a parameters in function module.

    There are ways to do it...
    In the Function module using the Table parameter you can do it.
    Have a table parameter to hold the select option , Don't type refer to any DDIC structure or field.
    In the implementation of the function module you can do some thing like this,.
    "example you want to pass matnr select option
    data: r_selopt type range of matnr.
    data: wa_opt like line of r_selopt.
    r_selopt = table_param[].
    in the call function side you pass the select option directly to the table parameter directly.
    call function 'ZTEST_FUNCTION_SLECTOPTION'
    tables
    table_param = s_matnr.

  • Dynamic variant for select option High value

    Hi ,
    Please help me in creating dynamic variable for a select option date field high value.
    II tried the following method:
    1. Enter the values in the selection screen
    2. Save the variant using the SAVE button
    3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
    4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    5. Save the variant.
    But it is saving the date value in Field LOW of select option( From value).
    I need it in TO field( High value).
    Please help.
    regards,
    Sheeba

    Hi Sheeba
        we can do it other way .. Select the same steps as you have done but after the assigning the value current date to low ..click on the selection option push button at the application bar and choose the 'less than or equal to' option to your select option value and try the same ....
    I guess this would throw you same results as that of the value in the high value button
    Cheers,
    Jacks.

Maybe you are looking for