<?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: select statement - Where Condition not possible in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616955#M1279654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select will not work if you are trying to search based on the name field as in the table  CFX_COL it has data type String which basically is not content but a reference to a storage area and internally it is stored in a different format not searchable. Even , if you try to find the number of entries in the table you can not put any value in this field as it will not be available for input as it doesn't contain any value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRING: Character string with variable length This data type can only be used in types (data elements, structures, table types) and domains. In the Dictionary a length can be specified for this type (at least 256 characters). It may be used in database tables, however, only with restrictions. For a description of them refer to the documentation of the ABAP statement 'STRING' . In ABAP, this type is implemented as a reference to a storage area of variable size. As default for the output length 132 characters are proposed. You cannot attach search helps to components of this type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_40b/helpdata/en/cf/21f2e5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_40b/helpdata/en/cf/21f2e5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Apoorva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 May 2009 17:30:51 GMT</pubDate>
    <dc:creator>apoorva_singh</dc:creator>
    <dc:date>2009-05-12T17:30:51Z</dc:date>
    <item>
      <title>select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616950#M1279649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to extract data from sap standard table CFX_COL.I want extract based on a field which is of type string.I can see that in the table but when I code below I am getting error.Any other alterantives?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT x.

TABLES:proj.


DATA: it_proj TYPE STANDARD TABLE OF proj.
DATA:wa_proj TYPE  proj.



DATA: it_cfol TYPE STANDARD TABLE OF CFX_COL.
DATA:wa_cfol TYPE  CFX_COL.

data:v_name type STRING.


PARAMETERS: p_pspid LIKE proj-pspid.


SELECT * FROM proj INTO CORRESPONDING FIELDS OF TABLE it_proj
WHERE pspid = p_pspid.


READ TABLE it_proj INTO wa_proj INDEX 1.

concatenate wa_proj-pspid '-' wa_proj-post1 into v_name.

select * from CFX_COL into CORRESPONDING FIELDS OF TABLE it_cfol
where name in v_name.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error:The Field "NAME"  is a long string , so it cannot be used in WHERE, ON or HAVING conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 17:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616950#M1279649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T17:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616951#M1279650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you please tell me if the table name is correct or are you using different version of SAP?? I can't see this table in ECC 5.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR Jaideep,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 17:25:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616951#M1279650</guid>
      <dc:creator>jaideepsharma</dc:creator>
      <dc:date>2009-05-12T17:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616952#M1279651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use a range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;RANGES: R_NAME FOR CFX_COL-NAME.

CLEAR R_NAME.

R_NAME-SIGN = 'I'.
R_NAME-OPTION = 'EQ'.

concatenate wa_proj-pspid '-' wa_proj-post1 into R_NAME-LOW.

APPEND R_NAME.

select * from CFX_COL into CORRESPONDING FIELDS OF TABLE it_cfol
where name in R_NAME.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 17:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616952#M1279651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T17:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616953#M1279652</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;Check this code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT x.
 
TABLES:proj.
 
 
DATA: it_proj TYPE STANDARD TABLE OF proj.
DATA:wa_proj TYPE  proj.
 
 
 
DATA: it_cfol TYPE STANDARD TABLE OF CFX_COL.
DATA:wa_cfol TYPE  CFX_COL.
 
* data:v_name type STRING.
RANGE : R_NAME FOR CFX_COL-NAME.
 
 
PARAMETERS: p_pspid LIKE proj-pspid.
 
 
SELECT * FROM proj INTO CORRESPONDING FIELDS OF TABLE it_proj
WHERE pspid = p_pspid.
 
 
READ TABLE it_proj INTO wa_proj INDEX 1.

R_NAME-SIGN = 'I'.
R_NAME-OPTION = 'EQ'.
concatenate wa_proj-pspid '-' wa_proj-post1 into R_NAME-LOW.
APPEND R_NAME. CLEAR R_NAME.
 
select * from CFX_COL into CORRESPONDING FIELDS OF TABLE it_cfol
where name in r_name.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 17:30:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616953#M1279652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T17:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616954#M1279653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when ever you use variables in where condition the fields should be of same type and lenght..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so try to declare the v_name also same type of CFX_COL-Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or move the v_name to CFX_COL-Name type field and check it will owrk..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 17:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616954#M1279653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T17:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616955#M1279654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select will not work if you are trying to search based on the name field as in the table  CFX_COL it has data type String which basically is not content but a reference to a storage area and internally it is stored in a different format not searchable. Even , if you try to find the number of entries in the table you can not put any value in this field as it will not be available for input as it doesn't contain any value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRING: Character string with variable length This data type can only be used in types (data elements, structures, table types) and domains. In the Dictionary a length can be specified for this type (at least 256 characters). It may be used in database tables, however, only with restrictions. For a description of them refer to the documentation of the ABAP statement 'STRING' . In ABAP, this type is implemented as a reference to a storage area of variable size. As default for the output length 132 characters are proposed. You cannot attach search helps to components of this type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_40b/helpdata/en/cf/21f2e5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_40b/helpdata/en/cf/21f2e5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Apoorva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 17:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616955#M1279654</guid>
      <dc:creator>apoorva_singh</dc:creator>
      <dc:date>2009-05-12T17:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: select statement - Where Condition not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616956#M1279655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to  follow a different approach reason being I realised  from Apoorva singh that where statement will not work at all.Thank you!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plus I have few entries in my tables CFX_COL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT x.

TABLES:proj.


DATA: it_proj TYPE STANDARD TABLE OF proj.
DATA:wa_proj TYPE  proj.



DATA: it_cfol TYPE STANDARD TABLE OF CFX_COL.
DATA:wa_cfol TYPE  CFX_COL.

data:v_name type STRING.

data: v_name1 type string.

data: v_colid type cfx_col-col_id.


PARAMETERS: p_pspid LIKE proj-pspid.


SELECT * FROM proj INTO CORRESPONDING FIELDS OF TABLE it_proj
WHERE pspid = p_pspid.


READ TABLE it_proj INTO wa_proj INDEX 1.

concatenate wa_proj-pspid '-' wa_proj-post1 into v_name separated by space.

select * from CFX_COL into CORRESPONDING FIELDS OF TABLE it_cfol.

read table it_cfol into wa_cfol with key name = v_name.

move wa_cfol-name to  v_name1.
move wa_cfol-COL_ID to v_colid.

write: /10 v_name1 , 70 v_colid.

*where name in v_name.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 18:10:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-where-condition-not-possible/m-p/5616956#M1279655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T18:10:08Z</dc:date>
    </item>
  </channel>
</rss>

