<?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: length and conversion problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476041#M1418105</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;try to use Ramchander logic,&lt;/P&gt;&lt;P&gt;Create a temporary internal table and append the data.The use for all entries using the temp internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:table of ty_temp,&lt;/P&gt;&lt;P&gt;inob type cuobj,&lt;/P&gt;&lt;P&gt;end of ty_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:lt_temp type tabl of ty_temp,&lt;/P&gt;&lt;P&gt;wa_temp type ty_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_ausp.&lt;/P&gt;&lt;P&gt;wa_temp-inob = lt_ausp-objek.&lt;/P&gt;&lt;P&gt;append wa_temp to lt_temp,&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from inob into correspondig fields of table lt_inob &lt;/P&gt;&lt;P&gt;for all entries in lt_temp&lt;/P&gt;&lt;P&gt;where cuobj = lt_temp-inob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: dharma raj on Dec 30, 2009 5:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Dec 2009 11:45:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-30T11:45:49Z</dc:date>
    <item>
      <title>length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476035#M1418099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirment where by i need to get the material number &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so when i use the select statement such as like this it issues me syntax error while checking what could i do to avoid this error message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from cabn into CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;                  where atnam in so_h_sub.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  select&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;from ausp into CORRESPONDING FIELDS OF TABLE lt_ausp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                     FOR ALL ENTRIES IN lt_cabn&lt;/P&gt;&lt;P&gt;                     where      atinn = lt_cabn-atinn&lt;/P&gt;&lt;P&gt;                     and       atwrt in so_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from inob into CORRESPONDING FIELDS OF TABLE lt_inob&lt;/P&gt;&lt;P&gt;                     FOR ALL ENTRIES IN lt_ausp&lt;/P&gt;&lt;P&gt;                     where cuobj eq lt_ausp-objek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;ERROR----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;   here it gives me syntax problem saying that FOR ALL ENTIRES IN ITAB the fields CUOBJ and LT_AUSP-OBJEK should have the same LENGTH and TYPE.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;so how can i avoid this problem?  please i need your valuble response where am struck here.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    select * from mara into  CORRESPONDING FIELDS OF TABLE lt_mara&lt;/P&gt;&lt;P&gt;                       FOR ALL ENTRIES IN lt_inob&lt;/P&gt;&lt;P&gt;                       where matnr  = lt_inob-objek.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;pasala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:17:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476035#M1418099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476036#M1418100</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;please check the data type cuobj and in internal table having same dataytpe , length ( lt_ausp-objek)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:26:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476036#M1418100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476037#M1418101</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;While using For ALL Entries the Internal Table Field length and Databse from which you are retriving the data field lenght must be the same, in that case only U can get the data properly. In order to restrict this instead of decalaring the internal table with reference to the table , decalare the internal table with required field as a structure , in that structure refer that particular field (CUOBJ as AUSP-OBJNUM)  and retrive the data by using FOR ALL ENTRIES as usual.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476037#M1418101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476038#M1418102</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;PRE&gt;&lt;CODE&gt;Create a temp lt_inob with an extra field of type matnr.
suppose you it_inob contain only one field objek

data : begin of  temp_inob occurs 0,
     objek type inob-objek,
    matnr type mantr,
end of temp_inob.

loop at it_inob.
temp_inob-objek = it_inob-objek.
temp_inob-matnr = it_inob-objek.
append temp_inob.
endloop.

now you can use this temp_inob in select query in place of original it_inob.
" the result is same only one extra Loop.

here also you can use
delete adjacent duplicates from temp_inob comparing matnr.

select * from mara into CORRESPONDING FIELDS OF TABLE lt_mara
FOR ALL ENTRIES IN temp_inob
where matnr = temp_inob-matnr " now your matnr in Temp is same length of mara-matnr and also contains the value of OBJEK.


" This will serve your purpose without doubt.


I normally follow this method in order to overcome this.
This is to the best of my knowledge. may be some other better process might be there.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:38:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476038#M1418102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476039#M1418103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CUOBJ and LT_AUSP-OBJEK should be of same data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please press F1 on for all entries to know more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close the thread if your issue is resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:38:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476039#M1418103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476040#M1418104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dharma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ausp- objek - char len - 50 -  Key of object to be classified&lt;/P&gt;&lt;P&gt;inob - cuobj - char len - 18  - Configuration (internal object number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i use record by record it does not give this problem but when i use like for all entries in command it gives me this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i get the records l&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from inob into correspondig fields of table  lt_inob &lt;/P&gt;&lt;P&gt;                             for all entries in lt_ausp &lt;/P&gt;&lt;P&gt;                             where cuobj = lt_ausp-objek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want those records that are eqvual to cuobj = ausp-objek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i get it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476040#M1418104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476041#M1418105</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;try to use Ramchander logic,&lt;/P&gt;&lt;P&gt;Create a temporary internal table and append the data.The use for all entries using the temp internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:table of ty_temp,&lt;/P&gt;&lt;P&gt;inob type cuobj,&lt;/P&gt;&lt;P&gt;end of ty_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:lt_temp type tabl of ty_temp,&lt;/P&gt;&lt;P&gt;wa_temp type ty_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_ausp.&lt;/P&gt;&lt;P&gt;wa_temp-inob = lt_ausp-objek.&lt;/P&gt;&lt;P&gt;append wa_temp to lt_temp,&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from inob into correspondig fields of table lt_inob &lt;/P&gt;&lt;P&gt;for all entries in lt_temp&lt;/P&gt;&lt;P&gt;where cuobj = lt_temp-inob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: dharma raj on Dec 30, 2009 5:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476041#M1418105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476042#M1418106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi tulasi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please little more clearer pls? i really appreiciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476042#M1418106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: length and conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476043#M1418107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Baskar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ausp- objek - char len - 50 - Key of object to be classified&lt;/P&gt;&lt;P&gt;inob - cuobj - char len - 18 - Configuration (internal object number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare a structure for INOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of inob,&lt;/P&gt;&lt;P&gt;cuobj like ausp-objek,&lt;/P&gt;&lt;P&gt;klart   like inob-klart,&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;end of inob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 11:52:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-and-conversion-problem/m-p/6476043#M1418107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T11:52:38Z</dc:date>
    </item>
  </channel>
</rss>

