<?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: field lenght difference in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315880#M1225471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suprith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;If you are using the Forall entries..the field type should be equal other wise it will give the error..&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so take one more filed name tdnam_ebeln at the end of the internal table &lt;STRONG&gt;it_ekpo&lt;/STRONG&gt;  of type &lt;STRONG&gt;TDNAME&lt;/STRONG&gt; at the end of that internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at  it_ekpo into wa_ekpo

wa_ekpo-tdnam_ebeln  = wa_ekpo-ebeln.

modify it_ekpo  from wa_ekpo index sy-tabix tranporting tdnam_ebeln.

endloop.

select TDOBJECT TDNAME TDID TDSPRAS
from stxh into corresponding fields of table it_stxh
for all entries in it_ekpo
where TDNAME = it_ekpo-tdnam_ebeln and         " here compare with the modified field
spras = 'en'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prasanth on Mar 12, 2009 2:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2009 09:00:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-12T09:00:00Z</dc:date>
    <item>
      <title>field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315876#M1225467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all , &lt;/P&gt;&lt;P&gt;         i'm using the below query in which ebeln lenght is 10 and tdnam field lenght is 70.&lt;/P&gt;&lt;P&gt;so its giving error so how to fetch values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select TDOBJECT TDNAME TDID TDSPRAS&lt;/P&gt;&lt;P&gt;          from stxh into corresponding fields of table it_stxh&lt;/P&gt;&lt;P&gt;          for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;          where TDNAME = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;                spras = 'en'.&lt;/P&gt;&lt;P&gt;if i don't use for all entries also still its not fetching values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suprith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 08:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315876#M1225467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T08:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315877#M1225468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;take one more internal table and that table should be same as your it_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only change in that table should be the VBELN FIELD should be of same type and length which is there in STXH table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then copy all data of IT_EKPO into new created internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then fire select Query you will get the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 08:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315877#M1225468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T08:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315878#M1225469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For SELECT statement with FOR ALL ENTRIES IN ITAB  type and length of field &lt;/P&gt;&lt;P&gt;in WHERE clause should be same.&lt;/P&gt;&lt;P&gt;Create anothe internal table with field TDNAME and move all the data from field it_ekpo-ebeln  into target field of new itab and write the SELECT query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 08:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315878#M1225469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T08:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315879#M1225470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try the below code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) add one more field (ebeln2) in it_ekpo of type tdname.&lt;/P&gt;&lt;P&gt;2) Pass all the data from it_ekpo-ebeln to it_ekpo-ebeln2. &lt;/P&gt;&lt;P&gt;3)  Use&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; select TDOBJECT TDNAME TDID TDSPRAS
from stxh into corresponding fields of table it_stxh
for all entries in it_ekpo
where TDNAME = it_ekpo-ebeln*2* and
spras = 'en'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since i dont have sap access, could not able to check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 08:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315879#M1225470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T08:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315880#M1225471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suprith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;If you are using the Forall entries..the field type should be equal other wise it will give the error..&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so take one more filed name tdnam_ebeln at the end of the internal table &lt;STRONG&gt;it_ekpo&lt;/STRONG&gt;  of type &lt;STRONG&gt;TDNAME&lt;/STRONG&gt; at the end of that internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at  it_ekpo into wa_ekpo

wa_ekpo-tdnam_ebeln  = wa_ekpo-ebeln.

modify it_ekpo  from wa_ekpo index sy-tabix tranporting tdnam_ebeln.

endloop.

select TDOBJECT TDNAME TDID TDSPRAS
from stxh into corresponding fields of table it_stxh
for all entries in it_ekpo
where TDNAME = it_ekpo-tdnam_ebeln and         " here compare with the modified field
spras = 'en'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prasanth on Mar 12, 2009 2:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 09:00:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315880#M1225471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T09:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315881#M1225472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have no option but to make the field ebeln as CHAR70.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can make the field EBELN of IT_EKPO as CHAR70 &amp;amp; try the select from EKPO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the select fails try like this: Select data from EKPO into table IT_EKPO &amp;amp; then loop on IT_EKPO move the all corresponding EBELN to a new table IT_EKPO_CONV which has a field of char70.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the table IT_EKPO_CONV to select from STXH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 09:00:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315881#M1225472</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-03-12T09:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315882#M1225473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You''ve given Fieldname SPRAS in the where_clause, but STXH hasn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use it as TDSPRAS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where TDNAME = it_ekpo-ebeln and
TDSPRAS = 'en'.    " see here&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks|&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 09:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315882#M1225473</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-03-12T09:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315883#M1225474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suprith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create an internal table just like it_ekpo, say it_new_ekpo. The onlu difference will be ebeln field in it_new_ekpo will be of type stxh-TDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before the select for all entries. Do as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_ekpo into wa_ekpo.

Move-corresponding wa_ekpo into wa_new_ekpo.

wa_new_ekpo-ebeln = wa_new-ebeln.

append wa_new_ekpo into it_new_ekpo.

endloop.

select TDOBJECT TDNAME TDID TDSPRAS
from stxh into corresponding fields of table it_stxh
for all entries in it_new_ekpo
where TDNAME = it_new_ekpo-ebeln and
spras = 'en'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Murthy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 09:09:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315883#M1225474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T09:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: field lenght difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315884#M1225475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead use FM READ_TEXT to ready any standard text from STXH table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Saravanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 04:32:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-lenght-difference/m-p/5315884#M1225475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T04:32:10Z</dc:date>
    </item>
  </channel>
</rss>

