<?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: wrong result in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248448#M1985873</link>
    <description>&lt;P&gt;What result do you get?&lt;/P&gt;&lt;P&gt;What do you expect?&lt;/P&gt;&lt;P&gt;Please explain in details.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 04:51:51 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-11-18T04:51:51Z</dc:date>
    <item>
      <title>wrong result</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248445#M1985870</link>
      <description>&lt;P&gt;Hi Expert &lt;/P&gt;
  &lt;P&gt;I merge the tables mar Marc and mark into a internal table&lt;/P&gt;
  &lt;P&gt;and Now I want to do for all entries for this internal table and t001w or t023t But it doesn't give me the Expected&lt;/P&gt;
  &lt;P&gt;results&lt;/P&gt;
  &lt;P&gt;Im Am Beginner Please Explain With Details .&lt;/P&gt;
  &lt;P&gt;TYPE-POOLS SLIS.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;DATA : BEGIN OF I_MARA ,&lt;BR /&gt; MATNR LIKE MARA-MATNR,&lt;BR /&gt; MATKL LIKE MARA-MATKL,&lt;BR /&gt; MAKTX LIKE MAKT-MAKTX,&lt;BR /&gt; WERKS LIKE MARC-WERKS,&lt;BR /&gt; SPRAS LIKE MAKT-SPRAS,&lt;BR /&gt; END OF I_MARA .&lt;BR /&gt;DATA : IT_MARA LIKE STANDARD TABLE OF I_MARA .&lt;BR /&gt;DATA : BEGIN OF I_T023T ,&lt;BR /&gt; MATKL LIKE T023T-MATKL,&lt;BR /&gt; WGBEZ LIKE T023T-WGBEZ ,&lt;BR /&gt; SPRAS LIKE T023T-SPRAS,&lt;BR /&gt; END OF I_T023T.&lt;BR /&gt;DATA : IT_T023T LIKE STANDARD TABLE OF I_T023T .&lt;BR /&gt;&lt;BR /&gt;DATA : BEGIN OF I_T001W ,&lt;BR /&gt; WERKS LIKE MARC-WERKS,&lt;BR /&gt; NAME1 LIKE T001W-NAME1,&lt;BR /&gt; SPRAS LIKE T001W-SPRAS,&lt;BR /&gt; END OF I_T001W.&lt;BR /&gt;DATA : IT_T001W LIKE STANDARD TABLE OF I_T001W .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DATA: BEGIN OF IT_MARAFINAL OCCURS 0,&lt;BR /&gt; MATNR LIKE MARA-MATNR,&lt;BR /&gt; MAKTX LIKE MAKT-MAKTX,&lt;BR /&gt; WERKS LIKE MARC-WERKS,&lt;BR /&gt; NAME1 LIKE T001W-NAME1,&lt;BR /&gt; MATKL LIKE MARA-MATKL,&lt;BR /&gt; WGBEZ LIKE T023T-WGBEZ,&lt;BR /&gt; END OF IT_MARAFINAL.&lt;BR /&gt;*DATA : IT_MARAFINAL LIKE STANDARD TABLE OF I_MARAFINAL .&lt;BR /&gt;&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;SELECT-OPTIONS : S_MATNR FOR I_MARA-MATNR.&lt;BR /&gt;SELECT-OPTIONS : S_WERKS FOR I_MARA-WERKS.&lt;BR /&gt;SELECT-OPTIONS : S_MATKL FOR I_MARA-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;&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; CLEAR IT_MARAFINAL.&lt;BR /&gt;SELECT MARA~MATNR MARA~MATKL&lt;BR /&gt; MAKT~MAKTX MARC~WERKS&lt;BR /&gt; MAKT~SPRAS&lt;BR /&gt;&lt;BR /&gt; INTO TABLE IT_MARA&lt;BR /&gt; FROM MARA&lt;BR /&gt; INNER JOIN MARC ON MARA~MATNR = MARC~MATNR&lt;BR /&gt; INNER JOIN MAKT ON MARA~MATNR = MAKT~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;&lt;BR /&gt; IF IT_MARA IS NOT INITIAL .&lt;BR /&gt;&lt;BR /&gt; SELECT T001W~WERKS T001W~NAME1 T001W~SPRAS&lt;BR /&gt; INTO TABLE IT_T001W&lt;BR /&gt; FROM T001W&lt;BR /&gt; FOR ALL ENTRIES IN IT_MARA&lt;BR /&gt; WHERE WERKS = IT_MARA-WERKS AND SPRAS = IT_MARA-SPRAS .&lt;BR /&gt;&lt;BR /&gt; SELECT T023T~MATKL T023T~WGBEZ&lt;BR /&gt; T023T~SPRAS&lt;BR /&gt; INTO TABLE IT_T023T&lt;BR /&gt; FROM T023T&lt;BR /&gt; FOR ALL ENTRIES IN IT_MARA&lt;BR /&gt; WHERE MATKL = IT_MARA-MATKL AND SPRAS = IT_MARA-SPRAS .&lt;BR /&gt;&lt;BR /&gt; ENDIF.&lt;BR /&gt; SORT IT_MARA BY MATNR SPRAS .&lt;BR /&gt; LOOP AT IT_T023T INTO I_T023T .&lt;BR /&gt; LOOP AT IT_T001W INTO I_T001W .&lt;BR /&gt;&lt;BR /&gt; READ TABLE IT_MARA INTO I_MARA WITH KEY MATKL = I_T023T-MATKL&lt;BR /&gt;* SPRAS = I_T023T-SPRAS&lt;BR /&gt; SPRAS = I_T001W-SPRAS&lt;BR /&gt; WERKS = I_T001W-WERKS&lt;BR /&gt; BINARY SEARCH.&lt;BR /&gt;&lt;BR /&gt; IF sy-subrc = 0.&lt;BR /&gt;&lt;BR /&gt; IT_MARAFINAL-MATNR = I_MARA-MATNR.&lt;BR /&gt; IT_MARAFINAL-MAKTX = I_MARA-MAKTX.&lt;BR /&gt; IT_MARAFINAL-WERKS = I_MARA-WERKS.&lt;BR /&gt; IT_MARAFINAL-NAME1 = I_T001W-NAME1.&lt;BR /&gt; IT_MARAFINAL-MATKL = I_MARA-MATKL.&lt;BR /&gt; IT_MARAFINAL-WGBEZ = I_T023T-WGBEZ.&lt;BR /&gt; APPEND IT_MARAFINAL ."TO IT_MARAFINAL.&lt;BR /&gt;&lt;BR /&gt; ENDIF.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ENDLOOP.&lt;BR /&gt; ENDLOOP.&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; 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;&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_INCLNAME = SY-REPID&lt;BR /&gt;* I_BYPASSING_BUFFER = 'X'&lt;BR /&gt;&lt;BR /&gt; CHANGING&lt;BR /&gt; CT_FIELDCAT = IT_FCAT[].&lt;/P&gt;
  &lt;P&gt;ENDFORM.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248445#M1985870</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-17T18:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: wrong result</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248446#M1985871</link>
      <description>&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions. Since you're
new in asking questions here, I recommend that you familiarize yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;
(if you haven't already), as it provides tips for preparing questions that draw
responses from our members. For example, you can outline what steps you took to
find answers (and why they weren't helpful), share screenshots of what you've
seen/done, make sure you've applied the appropriate tags, and use a more
descriptive subject line. The more details you provide, the more likely it is
that members will be able to assist you. You should also make sure you're using
all the appropriate tags, so the right experts can find your question.&lt;/P&gt;&lt;P&gt;Should
you wish, you can revise your question now by selecting Actions, then Edit.&lt;/P&gt;&lt;P&gt;Finally,
if you're hoping to connect with readers, please consider adding a picture to
your profile. 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;Best
regards&lt;/P&gt;&lt;P&gt;Jennifer&lt;/P&gt;&lt;P&gt;SAP
Community moderator&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248446#M1985871</guid>
      <dc:creator>former_member34</dc:creator>
      <dc:date>2020-11-17T18:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: wrong result</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248447#M1985872</link>
      <description>&lt;P&gt;Again, please the CODE button when you post some code. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 04:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248447#M1985872</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-11-18T04:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: wrong result</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248448#M1985873</link>
      <description>&lt;P&gt;What result do you get?&lt;/P&gt;&lt;P&gt;What do you expect?&lt;/P&gt;&lt;P&gt;Please explain in details.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 04:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248448#M1985873</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-11-18T04:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: wrong result</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248449#M1985874</link>
      <description>&lt;P&gt;You will spend more time doing a FOR ALL ENTRIES on these two tables, than make a direct &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * INTO TABLE  @data(main_plants) FROM t001w ORDER BY werks.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Nov 2020 06:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248449#M1985874</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-11-18T06:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: wrong result</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248450#M1985875</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When I do not enter any conditions(Select-option is null) Displays all records&lt;/P&gt;&lt;P&gt;, but now only 10 records &lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-result/m-p/12248450#M1985875</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-18T14:37:01Z</dc:date>
    </item>
  </channel>
</rss>

