<?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: abap error !! help out in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175909#M1979458</link>
    <description>&lt;P&gt;tq sir. i will &lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 08:32:50 GMT</pubDate>
    <dc:creator>former_member622718</dc:creator>
    <dc:date>2020-05-15T08:32:50Z</dc:date>
    <item>
      <title>abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175900#M1979449</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
  &lt;P&gt;please help me..&lt;/P&gt;
  &lt;P&gt;i am getting &lt;/P&gt;
  &lt;P&gt;If the addition "FOR ALL ENTRIES IN itab" is used, the fields "WERKS" and "ITMARC-WERKS" must have the same type and the same length. in&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;REPORT zmanoj.
TABLES : mara,marc,t001w.
TYPE-POOLS: slis.
TYPES : BEGIN OF ty_mara,
          matnr TYPE matnr,
          mtart TYPE mtart,
        END OF ty_mara.
TYPES : BEGIN OF ty_marc,
          matnr TYPE matnr,
          werks TYPE werks,
        END OF ty_marc.
TYPES : BEGIN OF ty_t001w,
          werks TYPE werks,
          name1 TYPE name1,
        END OF ty_t001w.
TYPES : BEGIN OF ty_final,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          werks TYPE marc-werks,
          name1 TYPE t001w-name1,
        END OF ty_final.
DATA : it TYPE TABLE OF ty_final,
       wa TYPE ty_final.
DATA : itmara TYPE TABLE OF ty_mara,
       wamara TYPE ty_mara.
DATA : itmarc TYPE TABLE OF ty_marc,
       wamarc TYPE ty_marc.
DATA : itt001w TYPE TABLE OF ty_t001w,
       wat001w TYPE ty_t001w.
DATA repid TYPE sy-repid.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat TYPE slis_fieldcat_alv,
      layout      TYPE slis_layout_alv.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b1.

START-OF-SELECTION.

  SELECT matnr
         mtart
    FROM mara INTO TABLE itmara
    WHERE matnr IN s_matnr.

  IF itmara IS  NOT INITIAL.
    SELECT matnr
           werks
      FROM marc INTO TABLE itmarc
      FOR ALL ENTRIES IN itmara
      WHERE matnr = itmara-matnr.
  ENDIF.

&amp;lt;--------- here i am getting error-------&amp;gt;
  IF itmarc IS NOT INITIAL.
    SELECT name1
           werks
      FROM t001w INTO TABLE itt001w
      FOR ALL ENTRIES IN itmarc
   WHERE werks = itmarc-werks. ------ in this link !!!
  ENDIF.


  LOOP AT itmarc INTO wamarc.
    wa-matnr = wamarc-matnr.
    wa-werks = wamarc-werks.
    READ TABLE itmara INTO wamara WITH KEY matnr = wamarc-matnr.
    wa-mtart = wamara-mtart.
    READ TABLE itt001w INTO wat001w   WITH KEY werks = wamarc-werks.
    wa-name1 = wat001w-name1.
    APPEND wa TO it.
    CLEAR : wa, wamara, wamarc, wat001w.
  ENDLOOP.


  wa_fieldcat-fieldname = 'MATNR'.
  wa_fieldcat-ref_tabname = 'MARA'.
  wa_fieldcat-seltext_m = 'Accounting Document Number'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.

  wa_fieldcat-fieldname = 'MTART'.
  wa_fieldcat-ref_tabname = 'MARA'.
  wa_fieldcat-seltext_m = 'Accounting'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.

  wa_fieldcat-fieldname = 'WERKS'.
  wa_fieldcat-ref_tabname = 'MARC'.
  wa_fieldcat-seltext_m = 'Accouncument Number'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.

  wa_fieldcat-fieldname = 'NAME1'.
  wa_fieldcat-ref_tabname = 'T001W'.
  wa_fieldcat-seltext_m = 'Accou'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.


call FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*     I_BYPASSING_BUFFER                = ' '
*     I_BUFFER_ACTIVE                   = ' '
i_callback_program                = repid
*     I_CALLBACK_PF_STATUS_SET          = ' '
*     I_CALLBACK_USER_COMMAND           = ' '
*     I_CALLBACK_TOP_OF_PAGE            = ' '
*     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*     I_CALLBACK_HTML_END_OF_LIST       = ' '
*     I_STRUCTURE_NAME                  =
*     I_BACKGROUND_ID                   = ' '
i_grid_title                      = 'ACCOUNTING DOCUMENT DETAILS'
*     I_GRID_SETTINGS                   =
*     IS_LAYOUT                         =
it_fieldcat                       = it_fieldcat
*     IT_EXCLUDING                      =
*     IT_SPECIAL_GROUPS                 =
*     IT_SORT                           =
*     IT_FILTER                         =
*     IS_SEL_HIDE                       =
*     I_DEFAULT                         = 'X'
*     I_SAVE                            = ' '
*     IS_VARIANT                        =
*     IT_EVENTS                         =
*     IT_EVENT_EXIT                     =
*     IS_PRINT                          =
*     IS_REPREP_ID                      =
*     I_SCREEN_START_COLUMN             = 0
*     I_SCREEN_START_LINE               = 0
*     I_SCREEN_END_COLUMN               = 0
*     I_SCREEN_END_LINE                 = 0
*     I_HTML_HEIGHT_TOP                 = 0
*     I_HTML_HEIGHT_END                 = 0
*     IT_ALV_GRAPHICS                   =
*     IT_HYPERLINK                      =
*     IT_ADD_FIELDCAT                   =
*     IT_EXCEPT_QINFO                   =
*     IR_SALV_FULLSCREEN_ADAPTER        =
*   IMPORTING
*     E_EXIT_CAUSED_BY_CALLER           =
*     ES_EXIT_CAUSED_BY_USER            =
    tables
      t_outtab                          = it.
*   EXCEPTIONS
*     PROGRAM_ERROR                     = 1
*     OTHERS                            = 2&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 May 2020 06:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175900#M1979449</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-05-15T06:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175901#M1979450</link>
      <description>&lt;P&gt; Hi  &lt;SPAN class="mention-scrubbed"&gt;manoj16393&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;You have errors in your type definitions. Plant has a type of WERKS_D, not WERKS. You need to change it in TY_MARC and TY_T001W types. Then it should work.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Mateusz&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 06:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175901#M1979450</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-05-15T06:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175902#M1979451</link>
      <description>&lt;P&gt;Hi Manoj, &lt;/P&gt;&lt;P&gt;check types declaration, for all entries need exact domain element matches, instead for this you can try with inner join than All entries. &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 06:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175902#M1979451</guid>
      <dc:creator>Abinathsiva</dc:creator>
      <dc:date>2020-05-15T06:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175903#M1979452</link>
      <description>&lt;P&gt;Please, try and phrase your title with more meaningful content&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 06:40:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175903#M1979452</guid>
      <dc:creator>iklovski</dc:creator>
      <dc:date>2020-05-15T06:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175904#M1979453</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;manoj16393&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Replace&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES : BEGIN OF ty_marc,
          matnr TYPE matnr,
          werks TYPE werks,
        END OF ty_marc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES : BEGIN OF ty_marc,
          matnr TYPE matnr,
          werks TYPE werks_d,
        END OF ty_marc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also compare the definitions of WERKS and WERKS_D in SE11 and you'll see why - WERKS is a structure, where as WERKS_D is a data element.&lt;/P&gt;&lt;P&gt;I'd also suggest replacing other occurrences of TYPE WERKS with TYPE WERKS_D unless you really want to use structure WERKS in your declarations.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 07:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175904#M1979453</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2020-05-15T07:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175905#M1979454</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;manoj16393&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;All your data type declaration for the plant field (WERKS) is pointing out to Data Type WERKS which is wrong, the Data Type must refer to WERKS_D. You can see below the screen shots on the difference. WERKS is a structure and WERKS_D is a data element&lt;/P&gt;&lt;P&gt;WERKS is a Structure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1808779-scn.png" /&gt;&lt;/P&gt;&lt;P&gt;WERKS_D is the Data Element&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1808780-scn.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 07:50:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175905#M1979454</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-05-15T07:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175906#M1979455</link>
      <description>&lt;P&gt;Dear Manoj&lt;/P&gt;&lt;P&gt;Please change your code in the following section&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES : BEGIN OF ty_marc,
          matnr TYPE matnr,
          werks TYPE t001w-werks,    " change it from werks to t001w-werks
        END OF ty_marc.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Because, the type werks - itself a structure - hence you got this error.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:05:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175906#M1979455</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-05-15T08:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175907#M1979456</link>
      <description>&lt;P&gt;tq it worked&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175907#M1979456</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-05-15T08:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175908#M1979457</link>
      <description>&lt;P&gt;tq it worked&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175908#M1979457</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-05-15T08:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175909#M1979458</link>
      <description>&lt;P&gt;tq sir. i will &lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:32:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175909#M1979458</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-05-15T08:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175910#M1979459</link>
      <description>&lt;P&gt;tq sir, it worked for werks_d&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:33:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175910#M1979459</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-05-15T08:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175911#M1979460</link>
      <description>&lt;P&gt;hi sir,&lt;/P&gt;&lt;P&gt;thank you it worked&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:34:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175911#M1979460</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-05-15T08:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: abap error !! help out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175912#M1979461</link>
      <description>&lt;P&gt;Dear Manoj&lt;/P&gt;&lt;P&gt;If this answer has solved your problem, accept the answer and close the thread.
This will help other who search for the same solutions.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 08:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-error-help-out/m-p/12175912#M1979461</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-05-15T08:51:32Z</dc:date>
    </item>
  </channel>
</rss>

