<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem during selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238073#M1381712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I have to put defaul value in selection screen,so I have calculated in initialization event.Following are the code:&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'K_PERIOD_GET_FOR_DATE_KOKRS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      KOKRS           = '9000'&lt;/P&gt;&lt;P&gt;      DATE            = SY-DATUM&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      PERIO           = V_PERIO&lt;/P&gt;&lt;P&gt;      GJAHR           = V_GJAHR&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      KOKRS_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;      DATE_INVALID    = 2&lt;/P&gt;&lt;P&gt;      OTHERS          = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in selection screen I have written like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_GJAHR FOR ZZF08_EPL-GJAHR OBLIGATORY DEFAULT V_GJAHR.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_MONAT FOR ZZF08_EPL-MONAT OBLIGATORY DEFAULT V_PERIO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But at the time of execution it is not showing any default value in select option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Sep 2009 09:15:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-30T09:15:57Z</dc:date>
    <item>
      <title>Problem during selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238073#M1381712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I have to put defaul value in selection screen,so I have calculated in initialization event.Following are the code:&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'K_PERIOD_GET_FOR_DATE_KOKRS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      KOKRS           = '9000'&lt;/P&gt;&lt;P&gt;      DATE            = SY-DATUM&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      PERIO           = V_PERIO&lt;/P&gt;&lt;P&gt;      GJAHR           = V_GJAHR&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      KOKRS_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;      DATE_INVALID    = 2&lt;/P&gt;&lt;P&gt;      OTHERS          = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in selection screen I have written like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_GJAHR FOR ZZF08_EPL-GJAHR OBLIGATORY DEFAULT V_GJAHR.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_MONAT FOR ZZF08_EPL-MONAT OBLIGATORY DEFAULT V_PERIO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But at the time of execution it is not showing any default value in select option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 09:15:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238073#M1381712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T09:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem during selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238074#M1381713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is just a timing isssue...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Default" append in your Select-Option definitions are evaluated while&lt;/P&gt;&lt;P&gt;the  variables get created at programm loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initialization is after this.&lt;/P&gt;&lt;P&gt;Just set the defaults after your calculation in initialization explicitly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so_gjahr-low = v_gjahr.&lt;/P&gt;&lt;P&gt;APPEND so_gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so_monat-low = v_perio&lt;/P&gt;&lt;P&gt;APPEND so_monat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 09:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238074#M1381713</guid>
      <dc:creator>Marcel_Wahl</dc:creator>
      <dc:date>2009-09-30T09:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem during selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238075#M1381714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;try this code&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS SO_GJAHR FOR V_GJAHR OBLIGATORY.
SELECT-OPTIONS SO_MONAT FOR MONAT OBLIGATORY .

INITIALIZATION.

CALL FUNCTION 'K_PERIOD_GET_FOR_DATE_KOKRS'
EXPORTING
KOKRS = 'IN01'
DATE = SY-DATUM
IMPORTING
PERIO = V_PERIO
GJAHR = V_GJAHR
EXCEPTIONS
KOKRS_NOT_FOUND = 1
DATE_INVALID = 2
OTHERS = 3.

so_gjahr-low = v_gjahr.
append so_gjahr.
so_monat-low = v_perio.
append so_monat.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is working fine&lt;/P&gt;&lt;P&gt;Regards Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 09:43:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238075#M1381714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T09:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem during selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238076#M1381715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN begin of BLOCK A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_GJAHR FOR ZZF08_EPL-GJAHR OBLIGATORY .&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_MONAT FOR ZZF08_EPL-MONAT OBLIGATORY .&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK A.&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'K_PERIOD_GET_FOR_DATE_KOKRS'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;KOKRS = '9000'&lt;/P&gt;&lt;P&gt;DATE = SY-DATUM&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;PERIO = V_PERIO&lt;/P&gt;&lt;P&gt;GJAHR = V_GJAHR&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;KOKRS_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;DATE_INVALID = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SO_GJAHR-sign    = 'I' .&lt;/P&gt;&lt;P&gt;  SO_GJAHR-option  = 'BT'.&lt;/P&gt;&lt;P&gt;  SO_GJAHR-low     = V_GJAHR.&lt;/P&gt;&lt;P&gt;  SO_GJAHR-high    = V_GJAHR.&lt;/P&gt;&lt;P&gt;append SO_GJAHR.&lt;/P&gt;&lt;P&gt;SO_MONAT -sign    = 'I' .&lt;/P&gt;&lt;P&gt;  SO_MONAT -option  = 'BT'.&lt;/P&gt;&lt;P&gt;  SO_MONAT -low     = V_PERIO.&lt;/P&gt;&lt;P&gt;  SO_MONAT -high    = V_PERIO.&lt;/P&gt;&lt;P&gt;append SO_MONAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sravani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 09:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238076#M1381715</guid>
      <dc:creator>sravanibellana</dc:creator>
      <dc:date>2009-09-30T09:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem during selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238077#M1381716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES : bseg,vbrk.
data: BEGIN OF itab,
        monat type T009B-POPER,
      END OF itab.
SELECT-OPTIONS SO_GJAHR FOR BSEG-GJAHR." OBLIGATORY DEFAULT V_GJAHR.
SELECT-OPTIONS SO_MONAT FOR itab-MONAT." OBLIGATORY DEFAULT V_PERIO.

INITIALIZATION.

CALL FUNCTION 'K_PERIOD_GET_FOR_DATE_KOKRS'
EXPORTING
KOKRS = '9000' " make sure you pass correct thing here, this is controlling area
DATE = SY-DATUM
IMPORTING
PERIO = SO_MONAT-low"V_PERIO i am directly passing the SO
GJAHR = SO_GJAHR-low"V_GJAHR here also
EXCEPTIONS
KOKRS_NOT_FOUND = 1
DATE_INVALID = 2
OTHERS = 3.
APPEND : SO_GJAHR, SO_MONAT. " and append&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 09:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-during-selection-screen/m-p/6238077#M1381716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T09:53:46Z</dc:date>
    </item>
  </channel>
</rss>

