<?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: EMPTY RESULT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293665#M1989647</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;afsane_salehi&lt;/SPAN&gt; Please use the CODE button please, thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2020 06:00:37 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-11-23T06:00:37Z</dc:date>
    <item>
      <title>EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293661#M1989643</link>
      <description>&lt;P&gt;Hi Expert &lt;/P&gt;
  &lt;P&gt;Although I got the value of name1 and wgbez from the relevant table, but These values are not displayed in the report output These values were OK before I displayed the two fields MATNR and MAKTX in blue&lt;/P&gt;
  &lt;P&gt;Where is my mistake?&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;TYPES : BEGIN OF TY_T023T ,&lt;BR /&gt; MATKL TYPE T023T-MATKL,&lt;BR /&gt; WGBEZ TYPE T023T-WGBEZ,&lt;BR /&gt; END OF TY_T023T.&lt;BR /&gt;DATA : IT_T023T TYPE STANDARD TABLE OF TY_T023T .&lt;BR /&gt;DATA : I_T023T TYPE TY_T023T .&lt;BR /&gt;&lt;BR /&gt;TYPES : BEGIN OF TY_T001W ,&lt;BR /&gt; WERKS TYPE T001W-WERKS,&lt;BR /&gt; NAME1 TYPE T001W-NAME1,&lt;BR /&gt; END OF TY_T001W.&lt;BR /&gt;DATA : IT_T001W TYPE STANDARD TABLE OF TY_T001W .&lt;BR /&gt;DATA : I_T001W TYPE TY_T001W .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TYPES : begin of TY_marafinal ,&lt;BR /&gt; matnr like ZSTR_MARAFINAL-matnr ,&lt;BR /&gt; maktx like ZSTR_MARAFINAL-maktx ,&lt;BR /&gt; werks like ZSTR_MARAFINAL-WERKS ,&lt;BR /&gt; matkl like ZSTR_MARAFINAL-MATKL ,&lt;BR /&gt; wgbez like ZSTR_MARAFINAL-WGBEZ ,&lt;BR /&gt; name1 like ZSTR_MARAFINAL-name1,&lt;BR /&gt; cellcolor TYPE lvc_t_scol ,&lt;BR /&gt; end of TY_marafinal.&lt;BR /&gt;&lt;BR /&gt;DATA : IT_MARAFINAL TYPE STANDARD TABLE OF TY_MARAFINAL,&lt;BR /&gt; I_MARAFINAL TYPE TY_MARAFINAL .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DATA : IDX TYPE I .&lt;BR /&gt;DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV .&lt;BR /&gt;DATA : WA_FCAT TYPE SLIS_FIELDCAT_ALV.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.&lt;BR /&gt;DATA :IT_CELLCOLOR TYPE LVC_S_SCOL.&lt;BR /&gt;&lt;BR /&gt;SELECT-OPTIONS : S_MATNR FOR I_MARAFINAL-MATNR.&lt;BR /&gt;SELECT-OPTIONS : S_WERKS FOR I_MARAFINAL-WERKS.&lt;BR /&gt;SELECT-OPTIONS : S_MATKL FOR I_MARAFINAL-MATKL.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;START-OF-SELECTION.&lt;BR /&gt; PERFORM GET_DATA.&lt;BR /&gt; PERFORM VALIDATE_FCAT.&lt;BR /&gt; PERFORM VALIDATE_LAYOUT .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;END-OF-SELECTION.&lt;BR /&gt; PERFORM DISPLAY_ALV.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FORM GET_DATA.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; SELECT MARA~MATNR MAKT~MAKTX&lt;BR /&gt; MARC~WERKS MARA~MATKL&lt;BR /&gt; INTO CORRESPONDING FIELDS OF TABLE IT_MARAFINAL&lt;BR /&gt; FROM MARA&lt;BR /&gt; INNER JOIN MARC ON MARC~MATNR = MARA~MATNR&lt;BR /&gt; INNER JOIN MAKT ON MAKT~MATNR = MARA~MATNR&lt;BR /&gt; AND MAKT~MATNR = MARC~MATNR&lt;BR /&gt; WHERE MARA~MATNR IN S_MATNR&lt;BR /&gt; AND MARA~MATKL IN S_MATKL&lt;BR /&gt; AND MARC~WERKS IN S_WERKS&lt;BR /&gt; AND MAKT~SPRAS = 'E'.&lt;BR /&gt; SORT IT_MARAFINAL BY MATNR .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; IF IT_MARAFINAL[] IS NOT INITIAL .&lt;BR /&gt;&lt;BR /&gt; SELECT T001W~WERKS T001W~NAME1&lt;BR /&gt; INTO TABLE IT_T001W&lt;BR /&gt; FROM T001W&lt;BR /&gt; FOR ALL ENTRIES IN IT_MARAFINAL&lt;BR /&gt; WHERE WERKS = IT_MARAFINAL-WERKS AND SPRAS EQ 'E'.&lt;BR /&gt;&lt;BR /&gt; SELECT T023T~MATKL T023T~WGBEZ&lt;BR /&gt; INTO TABLE IT_T023T&lt;BR /&gt; FROM T023T&lt;BR /&gt; FOR ALL ENTRIES IN IT_MARAFINAL&lt;BR /&gt; WHERE MATKL = IT_MARAFINAL-MATKL AND SPRAS EQ 'E'.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; LOOP AT IT_MARAFINAL[] INTO I_MARAFINAL .&lt;BR /&gt;&lt;BR /&gt; IT_cellcolor-fname = 'MATNR'.&lt;BR /&gt; IT_cellcolor-color-col = 4.&lt;BR /&gt; IT_cellcolor-color-int = '1'.&lt;BR /&gt; IT_cellcolor-color-inv = '0'.&lt;BR /&gt; APPEND IT_cellcolor TO I_MARAFINAL-cellcolor.&lt;BR /&gt; CLEAR: IT_cellcolor.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; IT_cellcolor-fname = 'MAKTX'.&lt;BR /&gt; IT_cellcolor-color-col = 4.&lt;BR /&gt; IT_cellcolor-color-int = '1'.&lt;BR /&gt; IT_cellcolor-color-inv = '0'.&lt;BR /&gt; APPEND IT_cellcolor TO I_MARAFINAL-cellcolor.&lt;BR /&gt; CLEAR: IT_cellcolor.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; READ TABLE IT_T001W INTO I_T001W&lt;BR /&gt; WITH KEY WERKS = I_MARAFINAL-WERKS.&lt;BR /&gt; I_MARAFINAL-NAME1 = I_T001W-NAME1 .&lt;BR /&gt; READ TABLE IT_T023T INTO I_T023T&lt;BR /&gt; WITH KEY MATKL = I_MARAFINAL-MATKL .&lt;BR /&gt; I_MARAFINAL-WGBEZ = I_T023T-WGBEZ .&lt;BR /&gt;&lt;BR /&gt;IDX = SY-TABIX.&lt;BR /&gt;&lt;BR /&gt;MODIFY IT_MARAFINAL[] FROM I_MARAFINAL INDEX IDX TRANSPORTING cellcolor.&lt;BR /&gt;&lt;BR /&gt; ENDLOOP.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ENDIF.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ENDFORM.&lt;BR /&gt;&lt;BR /&gt;FORM DISPLAY_ALV.&lt;BR /&gt; CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;BR /&gt; EXPORTING&lt;BR /&gt; I_CALLBACK_PROGRAM = SY-REPID&lt;BR /&gt; is_layout = IT_layout&lt;BR /&gt; IT_FIELDCAT = IT_FCAT[]&lt;BR /&gt; TABLES&lt;BR /&gt; T_OUTTAB = IT_MARAFINAL.&lt;BR /&gt;ENDFORM.&lt;BR /&gt;&lt;BR /&gt;FORM VALIDATE_FCAT.&lt;BR /&gt;&lt;BR /&gt; CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; I_PROGRAM_NAME = SY-REPID&lt;BR /&gt;* I_INTERNAL_TABNAME = 'IT_MARAFINAL'&lt;BR /&gt; I_structure_name = 'ZSTR_MARAFINAL'&lt;BR /&gt; I_INCLNAME = SY-REPID&lt;BR /&gt;&lt;BR /&gt; CHANGING&lt;BR /&gt; CT_FIELDCAT = IT_FCAT.&lt;BR /&gt;ENDFORM.&lt;BR /&gt;&lt;BR /&gt;FORM VALIDATE_LAYOUT .&lt;BR /&gt; CLEAR IT_layout.&lt;BR /&gt; IT_layout-colwidth_optimize = 'X'. " Optimization of Col width&lt;BR /&gt; IT_layout-coltab_fieldname = 'CELLCOLOR'.&lt;BR /&gt; ENDFORM.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2020 18:36:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293661#M1989643</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-22T18:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293662#M1989644</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;afsane_salehi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Before getting onto solution part, kindly post your code using CODE option for better readability and formatting. &lt;/P&gt;&lt;P&gt;You have constructed Field Catalog only for MATNR and MAKTX, for fields to be displayed in your output all the fields as part of the table must have relevant entry in field catalog table.&lt;/P&gt;&lt;P&gt;Regards! &lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2020 21:33:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293662#M1989644</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-11-22T21:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293663#M1989645</link>
      <description>&lt;P&gt;hi thank you &lt;/P&gt;&lt;P&gt;With this part, am I not finalizing the information of the other two tables?&lt;/P&gt;&lt;P&gt;READ TABLE IT_T001W INTO I_T001W&lt;BR /&gt;WITH KEY WERKS = I_MARAFINAL-WERKS.&lt;BR /&gt;I_MARAFINAL-NAME1 = I_T001W-NAME1 .&lt;BR /&gt;READ TABLE IT_T023T INTO I_T023T&lt;BR /&gt;WITH KEY MATKL = I_MARAFINAL-MATKL .&lt;BR /&gt;I_MARAFINAL-WGBEZ = I_T023T-WGBEZ .&lt;BR /&gt;&lt;BR /&gt;IDX = SY-TABIX.&lt;BR /&gt;&lt;BR /&gt;MODIFY IT_MARAFINAL[] FROM I_MARAFINAL INDEX IDX TRANSPORTING cellcolor. &lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 05:30:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293663#M1989645</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-23T05:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293664#M1989646</link>
      <description>&lt;P&gt;Please use the CODE button so that your code keeps indented, keywords are highlighted and it remains legible. Sorry, I won't do the effort of reading something not legible and so do many other volunteers.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 06:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293664#M1989646</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-11-23T06:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293665#M1989647</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;afsane_salehi&lt;/SPAN&gt; Please use the CODE button please, thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 06:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293665#M1989647</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-11-23T06:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293666#M1989648</link>
      <description>&lt;P&gt;DEAR &lt;SPAN class="mention-scrubbed"&gt;satishkumarbalasubramanian&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am a beginner and I have no idea about the word code .&lt;/P&gt;&lt;P&gt;can you explain with details and Can you tell me where my problem is? &lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 06:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293666#M1989648</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-23T06:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293667#M1989649</link>
      <description>&lt;P&gt;When you typed your question, the little editor has a number of buttons. One of them has the word "code" written on it. When you want to post code, use this button as it preserves formatting and makes it far easier for people to read your code. Of course, make sure that your code is pretty printed before posting it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
      READ TABLE IT_T023T INTO I_T023T WITH KEY 
           MATKL = I_MARAFINAL-MATKL.&lt;BR /&gt;      I_MARAFINAL-WGBEZ = I_T023T-WGBEZ.
      IDX = SY-TABIX.
      MODIFY IT_MARAFINAL[] FROM I_MARAFINAL INDEX IDX TRANSPORTING cellcolor.
    ENDLOOP.
  ENDIF.
ENDFORM.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is far easier to read and understand than&lt;/P&gt;&lt;P&gt;READ TABLE IT_T023T INTO I_T023T&lt;BR /&gt;WITH KEY MATKL = I_MARAFINAL-MATKL .&lt;BR /&gt;I_MARAFINAL-WGBEZ = I_T023T-WGBEZ .&lt;BR /&gt;IDX = SY-TABIX.&lt;BR /&gt;MODIFY IT_MARAFINAL[] FROM I_MARAFINAL INDEX IDX TRANSPORTING cellcolor.&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;ENDIF.&lt;BR /&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;Wouldn't you agree?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 09:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293667#M1989649</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-23T09:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293668#M1989650</link>
      <description>&lt;P&gt;Seems to me that problem is that variable IDX takes the wrong SY-TABIX. When you read table I_T023T then SY-TABIX receives the index of that table and not from it_marafinal.&lt;/P&gt;&lt;P&gt;Put IDX = SY-TABIX at the beginning of the LOOP.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
idx = sy-tabix. " &amp;lt;-- This line should be after 'loop at ...'
                " &amp;lt;-- The IDX takes value of SY-TABIX from table it_t023t'. 

modify it_marafinal[] from i_marafinal index idx transporting cellcolor.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Nov 2020 17:04:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293668#M1989650</guid>
      <dc:creator>nmirandaghn</dc:creator>
      <dc:date>2020-11-23T17:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293669#M1989651</link>
      <description>&lt;P&gt;Replace&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT IT_MARAFINAL[] INTO I_MARAFINAL .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT IT_MARAFINAL[] ASSIGNING &amp;lt;MARAFINAL&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and forget about MODIFY statement (and index)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 11:01:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293669#M1989651</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-11-24T11:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: EMPTY RESULT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293670#M1989652</link>
      <description>&lt;P&gt;And forget about the []. There's no ambiguity since there is a) no header line and b) it's a LOOP AT statement.&lt;BR /&gt;&lt;BR /&gt;I use this nowadays:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA mara_final_record TYPE REF TO ty_mara_final_record.
LOOP AT it_marafinal REFERENCE INTO mara_final_record.&lt;BR /&gt;  mara_final_record-&amp;gt;some_field = new_value.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Nov 2020 12:35:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-result/m-p/12293670#M1989652</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-24T12:35:15Z</dc:date>
    </item>
  </channel>
</rss>

