<?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 Re: Selection texts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420531#M1049942</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use this logic to get this texts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: texte_request     type ref to cl_wb_request,
        l_object_name     type seu_objkey,
        l_inclname        type seu_objkey,
        l_object_type     type seu_objtyp,
        l_operation       type seu_action,
        l_WB_DATA_CONTAINER type  REF TO CL_WB_DATA_CONTAINER,
        l_textpool_state  type ref to cl_wb_textpool_state,
        source_instance   type ref to cl_wb_source,
        l_context         type ref to cl_wb_context,
        l_context_program type ref to cl_wb_program_context,
        l_wb_todo_request type ref to cl_wb_request,
        l_lines           type sy-index,
        l_index           type sy-index,
        progdir_entry     type progdir,
        rahmen            type seu_objkey.

  data: l_editor_state    type editorstat.

  data: begin of maintab occurs 10,
          name like trdir-name,
        end of maintab.


  create object l_textpool_state.
  case type.
    when sedi_fc_list_top.
      l_textpool_state-&amp;gt;texttype = 'H'.
    when sedi_fc_sel_texts.
      l_textpool_state-&amp;gt;texttype = 'S'.
    when sedi_fc_num_texts.
      l_textpool_state-&amp;gt;texttype = 'I'.
  endcase.
  call method abap_pgeditor-&amp;gt;abap_editor-&amp;gt;get_source_instance
                importing
                        source_object = source_instance.
  progdir_entry = source_instance-&amp;gt;l_progdir_entry.
  l_context = abap_pgeditor-&amp;gt;abap_editor-&amp;gt;context.
  l_context_program ?= l_context-&amp;gt;context_object.
  rahmen        = l_context_program-&amp;gt;rahmen.
  l_inclname    = l_context_program-&amp;gt;include.
* nur zur Sicherheit, eigentlich sollte CONTEXT gefüllt sein
  if l_inclname eq space.
    call method abap_pgeditor-&amp;gt;abap_editor-&amp;gt;get_editor_state
                importing
                   state = l_editor_state.
    l_inclname    = l_editor_state-edinclude.
  endif.
  l_object_name = rahmen.
  l_object_type = swbm_c_type_prg_textelement.
  if progdir_entry-subc = 'I' or
     rahmen eq space.
* Bestimmung Rahmenprogramm
    call function 'RS_GET_MAINPROGRAMS'
         exporting
              dialog                 = 'X'
              fulltab                = 'X'
              name                   = l_inclname
         importing
              number_of_mainprograms = l_lines
              tindex                 = l_index
         tables
              mainprograms           = maintab
         exceptions
              cancelled              = 01.
    if sy-subrc ne 0.
      exit.
    else.
      if l_lines &amp;gt; 0.
        read table maintab index l_index.
        l_object_name = maintab-name.
      else.
        l_object_name = l_inclname.
      endif.
    endif.
  else.
    l_object_name = rahmen.
  endif.
  if abap_pgeditor-&amp;gt;abap_editor-&amp;gt;edit-app_disp = space or
     abap_pgeditor-&amp;gt;abap_editor-&amp;gt;edit-app_disp = 'A'.
    l_operation = swbm_c_op_edit.
  else.
    l_operation = swbm_c_op_display.
  endif.
  create object texte_request
        exporting p_object_type = l_object_type
                  p_object_name = l_object_name
                  p_object_state = l_textpool_state
                  p_operation   = l_operation.
  call method
       abap_pgeditor-&amp;gt;if_wb_program~wb_manager-&amp;gt;request_tool_access
          exporting
             p_wb_request   = texte_request
          importing p_wb_todo_request = l_wb_todo_request
          changing
             P_WB_DATA_CONTAINER = l_WB_DATA_CONTAINER
          exceptions action_cancelled = 1
                     no_tool_found    = 2.
  if sy-subrc = 0 and not l_wb_todo_request is initial.
    if l_wb_todo_request-&amp;gt;operation = swbm_c_op_end.
      set screen 0. leave screen.
    else.
      perform process_int_nav_request using l_wb_todo_request.
    endif.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2008 13:29:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-04T13:29:55Z</dc:date>
    <item>
      <title>Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420527#M1049938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I hope it will be easy for you &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Each program has 3 text types: selection texts, text symbols and list headers.&lt;/P&gt;&lt;P&gt;I know text symbols can addressed from the code this way: TEXT-001, or TEXT-abc. Fine.&lt;/P&gt;&lt;P&gt;Is there a way to retrieve the selection texts from the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if I have a select-option S_MATNR FOR mara-matnr. it is checked to read from the dictionary.&lt;/P&gt;&lt;P&gt;I would like to use it's text in the source code ("material number"). How can retrieve this text in the code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420527#M1049938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420528#M1049939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can take a look at the data element for MATNR in SE11, you will be able to find the tab FIELD label. The same text will be fetched for the select-option when you tick the checkbox in selection texts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This info is stored in table DD04T. To fetch the data give the ROLLNAME as MATNR and DDLANGUAGE as EN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420528#M1049939</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420529#M1049940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may like to write a selet query to DD04T.&lt;/P&gt;&lt;P&gt;All short, medium and long texts are stored here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420529#M1049940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420530#M1049941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to read it from the selection texts, because it might be different from the data dictionary.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420530#M1049941</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420531#M1049942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use this logic to get this texts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: texte_request     type ref to cl_wb_request,
        l_object_name     type seu_objkey,
        l_inclname        type seu_objkey,
        l_object_type     type seu_objtyp,
        l_operation       type seu_action,
        l_WB_DATA_CONTAINER type  REF TO CL_WB_DATA_CONTAINER,
        l_textpool_state  type ref to cl_wb_textpool_state,
        source_instance   type ref to cl_wb_source,
        l_context         type ref to cl_wb_context,
        l_context_program type ref to cl_wb_program_context,
        l_wb_todo_request type ref to cl_wb_request,
        l_lines           type sy-index,
        l_index           type sy-index,
        progdir_entry     type progdir,
        rahmen            type seu_objkey.

  data: l_editor_state    type editorstat.

  data: begin of maintab occurs 10,
          name like trdir-name,
        end of maintab.


  create object l_textpool_state.
  case type.
    when sedi_fc_list_top.
      l_textpool_state-&amp;gt;texttype = 'H'.
    when sedi_fc_sel_texts.
      l_textpool_state-&amp;gt;texttype = 'S'.
    when sedi_fc_num_texts.
      l_textpool_state-&amp;gt;texttype = 'I'.
  endcase.
  call method abap_pgeditor-&amp;gt;abap_editor-&amp;gt;get_source_instance
                importing
                        source_object = source_instance.
  progdir_entry = source_instance-&amp;gt;l_progdir_entry.
  l_context = abap_pgeditor-&amp;gt;abap_editor-&amp;gt;context.
  l_context_program ?= l_context-&amp;gt;context_object.
  rahmen        = l_context_program-&amp;gt;rahmen.
  l_inclname    = l_context_program-&amp;gt;include.
* nur zur Sicherheit, eigentlich sollte CONTEXT gefüllt sein
  if l_inclname eq space.
    call method abap_pgeditor-&amp;gt;abap_editor-&amp;gt;get_editor_state
                importing
                   state = l_editor_state.
    l_inclname    = l_editor_state-edinclude.
  endif.
  l_object_name = rahmen.
  l_object_type = swbm_c_type_prg_textelement.
  if progdir_entry-subc = 'I' or
     rahmen eq space.
* Bestimmung Rahmenprogramm
    call function 'RS_GET_MAINPROGRAMS'
         exporting
              dialog                 = 'X'
              fulltab                = 'X'
              name                   = l_inclname
         importing
              number_of_mainprograms = l_lines
              tindex                 = l_index
         tables
              mainprograms           = maintab
         exceptions
              cancelled              = 01.
    if sy-subrc ne 0.
      exit.
    else.
      if l_lines &amp;gt; 0.
        read table maintab index l_index.
        l_object_name = maintab-name.
      else.
        l_object_name = l_inclname.
      endif.
    endif.
  else.
    l_object_name = rahmen.
  endif.
  if abap_pgeditor-&amp;gt;abap_editor-&amp;gt;edit-app_disp = space or
     abap_pgeditor-&amp;gt;abap_editor-&amp;gt;edit-app_disp = 'A'.
    l_operation = swbm_c_op_edit.
  else.
    l_operation = swbm_c_op_display.
  endif.
  create object texte_request
        exporting p_object_type = l_object_type
                  p_object_name = l_object_name
                  p_object_state = l_textpool_state
                  p_operation   = l_operation.
  call method
       abap_pgeditor-&amp;gt;if_wb_program~wb_manager-&amp;gt;request_tool_access
          exporting
             p_wb_request   = texte_request
          importing p_wb_todo_request = l_wb_todo_request
          changing
             P_WB_DATA_CONTAINER = l_WB_DATA_CONTAINER
          exceptions action_cancelled = 1
                     no_tool_found    = 2.
  if sy-subrc = 0 and not l_wb_todo_request is initial.
    if l_wb_todo_request-&amp;gt;operation = swbm_c_op_end.
      set screen 0. leave screen.
    else.
      perform process_int_nav_request using l_wb_todo_request.
    endif.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420531#M1049942</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420532#M1049943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you do some thing like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_OPTION_01.
data: matnr type matnr.
data: text type table of TEXTPOOL.
select-options: s_matnr for matnr.


start-of-selection.

call function 'RS_TEXTPOOL_READ'
  exporting
    objectname                 = sy-repid
   ACTION                     = 'S'
*   LANGUAGE                   = SY-LANGU
  tables
    tpool                      = text
* EXCEPTIONS
*   OBJECT_NOT_FOUND           = 1
*   PERMISSION_FAILURE         = 2
*   INVALID_PROGRAM_TYPE       = 3
*   ERROR_OCCURED              = 4
*   ACTION_CANCELLED           = 5
          .

          break-point.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text consists of all texts.&lt;/P&gt;&lt;P&gt;you can filter what ever text you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:34:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420532#M1049943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selection texts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420533#M1049944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx, it is a bit harder than what I found... I'll just simply use the "READ TEXTPOOL" statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-texts/m-p/4420533#M1049944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:34:33Z</dc:date>
    </item>
  </channel>
</rss>

