<?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 read cant get right answer in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966823#M700082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts:&lt;/P&gt;&lt;P&gt;      my code:&lt;/P&gt;&lt;P&gt;           data: gs_iihttpnvp TYPE IHTTPNVP,&lt;/P&gt;&lt;P&gt;                   gt_tihttpnvp TYPE TIHTTPNVP,&lt;/P&gt;&lt;P&gt;                   sname type string.&lt;/P&gt;&lt;P&gt;            sname = 'sname1'.&lt;/P&gt;&lt;P&gt;            read table gt_tihttpnvp into gs_iihttpnvp with key name = 'sname1'.&lt;/P&gt;&lt;P&gt;            read table gt_tihttpnvp into gs_iihttpnvp with key name = sname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first read can get the right value and the second can't. I don't know why,someone knows please help me, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2007 02:38:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-25T02:38:56Z</dc:date>
    <item>
      <title>read cant get right answer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966823#M700082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts:&lt;/P&gt;&lt;P&gt;      my code:&lt;/P&gt;&lt;P&gt;           data: gs_iihttpnvp TYPE IHTTPNVP,&lt;/P&gt;&lt;P&gt;                   gt_tihttpnvp TYPE TIHTTPNVP,&lt;/P&gt;&lt;P&gt;                   sname type string.&lt;/P&gt;&lt;P&gt;            sname = 'sname1'.&lt;/P&gt;&lt;P&gt;            read table gt_tihttpnvp into gs_iihttpnvp with key name = 'sname1'.&lt;/P&gt;&lt;P&gt;            read table gt_tihttpnvp into gs_iihttpnvp with key name = sname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first read can get the right value and the second can't. I don't know why,someone knows please help me, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 02:38:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966823#M700082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T02:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: read cant get right answer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966824#M700083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to SDN Allen&lt;/P&gt;&lt;P&gt;IHTTPNVP should be having a field called NAME which is of type of SNAME as declared.&lt;/P&gt;&lt;P&gt;In your 1st READ since you are checking with some value it returns SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;In your 2nd READ you are trying yo match it with some variable of type STRING.&lt;/P&gt;&lt;P&gt;This might be the reason. So declare the SNAME of type IHTTPNVP-NAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves.&lt;/P&gt;&lt;P&gt;Happy Coding &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 02:44:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966824#M700083</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-10-25T02:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: read cant get right answer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966825#M700084</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;If you see field type for TIHTTPNVP-NAME, it is a string whose length varies. It has unlimited length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you compare the same with string, it matches exact characters so it is working. But when you compare with the variables, characters to compare are not matching so it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it had been of TYPE CHAR length 10 and also SNAME would have been type char and length 10 then second read also would have worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 02:45:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966825#M700084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T02:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: read cant get right answer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966826#M700085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
data: gs_iihttpnvp TYPE IHTTPNVP,
gt_tihttpnvp TYPE standard table of TIHTTPNVP,
sname type string.

clear gs_iithttpnvp.
gs_iihttpnvp-sname = 'sname1'.
append gs_iihttpnvp to gt_tihttpnvp.

clear gs_iihttpnvp.
read table gt_tihttpnvp into gs_iihttpnvp with key sname = 'sname1'.
write :/ gs_iihttpnvp-sname.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 03:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-cant-get-right-answer/m-p/2966826#M700085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T03:33:53Z</dc:date>
    </item>
  </channel>
</rss>

