<?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: Cannot Get Material Description Data to Display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324930#M1991301</link>
    <description>&lt;P&gt;Dear   &lt;SPAN class="mention-scrubbed"&gt;keega&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Text Table of MARA is MAKT.&lt;/P&gt;&lt;P&gt;Join MARA with MAKT to get material description as shown below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT mr~matnr, mk~maktx, mr~meins, mr~mtart FROM mara as mr inner join makt as mk on mr~matnr eq mk~matnr
      INTO TABLE @it_mara WHERE mr~matnr IN @mats.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jan 2021 09:05:03 GMT</pubDate>
    <dc:creator>Abdul_Waheed</dc:creator>
    <dc:date>2021-01-12T09:05:03Z</dc:date>
    <item>
      <title>Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324926#M1991297</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;I really need some guidance. I've worked on this issue for a good 4 hours and have yet to produce results. &lt;/P&gt;
  &lt;P&gt;I'm having a difficult time getting the material description column to populate in my report. I've researched, tried, copied, flipped it upside down, backward, forward, and still cannot get it to work.&lt;/P&gt;
  &lt;P&gt;What am I doing wrong?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TABLES: MARA,
        MAKT,
        ZISELECTEXIG.

*&amp;amp; SELECTION SCREEN AND SELECT OPTIONS FOR USER INPUT

SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME.
PARAMETERS: P_RAD1 RADIOBUTTON GROUP RAD DEFAULT 'X' USER-COMMAND flag, "/ SAP GUI
            P_RAD2 RADIOBUTTON GROUP RAD.                               "/ CDS View
SELECTION-SCREEN END OF BLOCK BLK1.

SELECT-OPTIONS: mats FOR mara-matnr OBLIGATORY.

TYPES:
BEGIN OF itab,
  matnr TYPE mara-matnr,
  matkl TYPE mara-matkl,
  meins TYPE mara-meins,
  mtart TYPE mara-mtart,
END OF itab.

*&amp;amp; Initialization of Events

INITIALIZATION.
*mats-low = ''.
*mats-high = ''.

APPEND mats.
AT SELECTION-SCREEN.
  IF mats-low = ' '.
    MESSAGE I000(ZKMESSAGE).
    ELSEIF mats-high = ' '.
      MESSAGE I001(ZKMESSAGE).
      ENDIF.

*&amp;amp; TOP OF PAGE EVENT

TOP-OF-PAGE.
WRITE: /20 'List:', SY-DBCNT CENTERED.
ULINE.
END-OF-PAGE.

TYPE-POOLS: slis.                               " SLIS contains all the ALV data types

*&amp;amp; Data Declaration

*DATA: it_mara     TYPE TABLE OF mara.

DATA: it_fieldcat  TYPE slis_t_fieldcat_alv,
      wa_fieldcat  TYPE slis_fieldcat_alv.

DATA: BEGIN OF it_mara OCCURS 0,
  matnr LIKE mara-matnr,
  maktx LIKE makt-maktx,
  meins LIKE mara-meins,
  mtart LIKE mara-mtart,
END OF it_mara.

*&amp;amp; START-OF-SELECTION

START-OF-SELECTION.

*Fetching data from database

IF P_RAD1 = 'X'.
*  SELECT mara~matnr, maktx, meins, mtart FROM mara
*      INNER JOIN makt on makt~matnr = mara~matnr
*      INTO TABLE @it_mara
*      WHERE matnr IN @mats.
    SELECT mara~matnr, maktx, meins, mtart FROM mara
      INTO TABLE @it_mara
      WHERE matnr IN @mats.
  ELSEIF P_RAD2 = 'X'.
    SELECT * FROM ZI_SELECTEXIG
      INTO TABLE @it_mara.
ENDIF.

INITIALIZATION.       "to set titlebar on selection screen

START-OF-SELECTION.  "to set it once list is displayed

   IF P_RAD1 = 'X'.
    sy-title = 'SAP GUI'.
      ELSE. P_RAD2 = 'X'.
      sy-title = 'CDS View'.
      ENDIF.

END-OF-SELECTION.

*      WRITE: /12 'Number of records returned:', SY-DBCNT CENTERED.
*CONCATENATE &amp;lt;STRING1&amp;gt; &amp;lt;STRING2&amp;gt; &amp;lt;STRING3&amp;gt;... INTO &amp;lt;STRING&amp;gt;.

*Build field catalog

  wa_fieldcat-fieldname  = 'MATNR'.             " Fieldname in the data table - Material Number
  wa_fieldcat-seltext_m  = 'Material Number'.   " Column description in the output
  APPEND wa_fieldcat TO it_fieldcat.            " Append work area to internal table

  wa_fieldcat-fieldname  = 'MAKTX'.             " Fieldname in the data table - Material Description
  wa_fieldcat-seltext_m  = 'Material Desc'.     " Column description in the output
  APPEND wa_fieldcat TO it_fieldcat.            " Append work area to internal table

  wa_fieldcat-fieldname  = 'MEINS'.             " Fieldname in the data table - Base Unit of Measure
  wa_fieldcat-seltext_m  = 'Unit'.              " Column description in the output
  APPEND wa_fieldcat TO it_fieldcat.            " Append work area to internal table

  wa_fieldcat-fieldname  = 'MTART'.             " Fieldname in the data table - Material
  wa_fieldcat-seltext_m  = 'Material Type'.    " Column description in the output
  APPEND wa_fieldcat TO it_fieldcat.            " Append work area to internal table

*Pass data and field catalog to ALV function module to display ALV list

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      it_fieldcat   = it_fieldcat
    TABLES
      t_outtab      = it_mara
    EXCEPTIONS
      program_error = 1
      OTHERS        = 2.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jan 2021 07:28:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324926#M1991297</guid>
      <dc:creator>keega1</dc:creator>
      <dc:date>2021-01-12T07:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324927#M1991298</link>
      <description>&lt;P&gt;Welcome
and Thank
you for visiting SAP Community to get answers to your questions. I would recommend adding a picture to your profile if you're
hoping to connect with readers. Here's how you do it: &lt;A href="https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS"&gt;https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS&lt;/A&gt;. By personalizing your profile
with a photo of you, you encourage readers to respond.&lt;/P&gt;&lt;P&gt;Regards, Svea&lt;/P&gt;&lt;P&gt;SAP
Community moderator&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 07:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324927#M1991298</guid>
      <dc:creator>sveabecker</dc:creator>
      <dc:date>2021-01-12T07:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324928#M1991299</link>
      <description>&lt;P&gt;Hi Ingrid&lt;/P&gt;&lt;P&gt;First of all make sure you have data in your itab. And then i will suggest that you use SALV with this Class cl_salv_table&lt;/P&gt;&lt;P&gt;It is quite simple. Se program SALV_DEMO_TABLE_SIMPLE&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 07:41:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324928#M1991299</guid>
      <dc:creator>jakob_steen-petersen</dc:creator>
      <dc:date>2021-01-12T07:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324929#M1991300</link>
      <description>&lt;P&gt;By the way: you use this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    SELECT mara~matnr, maktx, meins, mtart FROM mara
      INTO TABLE @it_mara
      WHERE matnr IN @mats.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What version of ERP are you in where MAKTX is included in table MARA? MAKTX is in table MAKT as you also tried with you marked out code....&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 07:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324929#M1991300</guid>
      <dc:creator>jakob_steen-petersen</dc:creator>
      <dc:date>2021-01-12T07:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324930#M1991301</link>
      <description>&lt;P&gt;Dear   &lt;SPAN class="mention-scrubbed"&gt;keega&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Text Table of MARA is MAKT.&lt;/P&gt;&lt;P&gt;Join MARA with MAKT to get material description as shown below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT mr~matnr, mk~maktx, mr~meins, mr~mtart FROM mara as mr inner join makt as mk on mr~matnr eq mk~matnr
      INTO TABLE @it_mara WHERE mr~matnr IN @mats.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jan 2021 09:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324930#M1991301</guid>
      <dc:creator>Abdul_Waheed</dc:creator>
      <dc:date>2021-01-12T09:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324931#M1991302</link>
      <description>&lt;P&gt;Hi Jakob,&lt;/P&gt;&lt;P&gt;Thank you for your response. I truly appreciate it. &lt;/P&gt;&lt;P&gt;Right now I'm trying ANYTHING to get this to work, hence the commented-out lines. It shouldn't be this difficult, but apparently, it is for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm not entirely sure what version I am using. 760, I think.&lt;/P&gt;&lt;P&gt;I'll try your suggestion a little later and let you know.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 20:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324931#M1991302</guid>
      <dc:creator>keega1</dc:creator>
      <dc:date>2021-01-12T20:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324932#M1991303</link>
      <description>&lt;P&gt;Thank you, Abdul! I've not been exposed to using the tilde in select statements as yet, but this is awesome. The query does work now. Wondering if it can be used in CDS view? I will give it a shot.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 20:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324932#M1991303</guid>
      <dc:creator>keega1</dc:creator>
      <dc:date>2021-01-12T20:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Get Material Description Data to Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324933#M1991304</link>
      <description>&lt;P&gt;Yes. You can create CDS view. Example below for reference.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@AbapCatalog.sqlViewName: 'MATTEXT' &lt;BR /&gt;@AbapCatalog.compiler.CompareFilter: true &lt;BR /&gt;@AccessControl.authorizationCheck: #CHECK &lt;BR /&gt;@EndUserText.label: 'Material with description' &lt;BR /&gt;define view ZI_MaterialText as select from makt &lt;BR /&gt;         inner join   mara on makt.matnr = mara.matnr &lt;BR /&gt;{ &lt;BR /&gt;  key mara.matnr as MaterialNum, &lt;BR /&gt;      makt.maktx            as MaterialName &lt;BR /&gt;    
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jan 2021 05:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-get-material-description-data-to-display/m-p/12324933#M1991304</guid>
      <dc:creator>Abdul_Waheed</dc:creator>
      <dc:date>2021-01-13T05:23:28Z</dc:date>
    </item>
  </channel>
</rss>

