<?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: writing alias query with casting in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540213#M1265310</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 have modified the previous code a bit to join that by &lt;STRONG&gt;CONCATENATE&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;Check the changes -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : t_itab LIKE TABLE OF  mseg,
       fs_itab TYPE mseg.
DATA : w_string TYPE string.
SELECT mblnr sgtxt FROM mseg
               INTO CORRESPONDING FIELDS
                               OF TABLE t_itab.

LOOP AT t_itab INTO fs_itab.
  CONCATENATE fs_itab-mblnr fs_itab-sgtxt INTO w_string.
  WRITE : / w_string.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2009 13:52:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-27T13:52:17Z</dc:date>
    <item>
      <title>writing alias query with casting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540210#M1265307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;i want to excute a query which have a condition that needs some casting. the table is MSEG the users are entering the reffrencing article document in the item text field. now all i need is to excute a query which have the mseg aliased and the joining condition should be mblnr with sgtxt&lt;/P&gt;&lt;P&gt;i imagine it should be something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from recmseg,supmseg where supmseg.mblnr=cast(recmseg.sgtxt as blnr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;recmseg is alias mseg for the recieving site&lt;/P&gt;&lt;P&gt;supmseg is alias Mseg for suplying site &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so please can you tell me where i can write it and how to excute it and correct the syntax also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 13:14:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540210#M1265307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T13:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: writing alias query with casting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540211#M1265308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ebrahime ,&lt;/P&gt;&lt;P&gt;Please try this code ---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : t_itab LIKE TABLE OF  mseg.
SELECT mblnr sgtxt FROM mseg
               INTO CORRESPONDING FIELDS
                               OF TABLE t_itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 13:38:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540211#M1265308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T13:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: writing alias query with casting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540212#M1265309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you for your immediate reply. can you tell me where i can excute this query also i am not finding the joining condition in the query i want to join sgtxt with mblnr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 13:47:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540212#M1265309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T13:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: writing alias query with casting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540213#M1265310</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 have modified the previous code a bit to join that by &lt;STRONG&gt;CONCATENATE&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;Check the changes -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : t_itab LIKE TABLE OF  mseg,
       fs_itab TYPE mseg.
DATA : w_string TYPE string.
SELECT mblnr sgtxt FROM mseg
               INTO CORRESPONDING FIELDS
                               OF TABLE t_itab.

LOOP AT t_itab INTO fs_itab.
  CONCATENATE fs_itab-mblnr fs_itab-sgtxt INTO w_string.
  WRITE : / w_string.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 13:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540213#M1265310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: writing alias query with casting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540214#M1265311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;let me explain more i want to write a join condition statement the condition is mblnr=sgtxt thats all not to concatenate the 2 fields. in other words to make copy of the table mseg 2 times and compare sgtxt in the first copy with mblnr in the second copy and if a match happen select that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 11:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540214#M1265311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-28T11:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: writing alias query with casting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540215#M1265312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i found it&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ZMM_TRANSFER.
DATA : 
       fs_itab TYPE mseg,rs_itab LIKE TABLE OF mseg.

   
   
   select MSEG2~mblnr MSEG1~sgtxt 
     INTO CORRESPONDING FIELDS
                               OF TABLE rs_itab
     from MSEG as MSeg1
    inner JOIN
      MSEG as mseg2
                  on
       mseg2~MBLNR = MSEG1~sgtxt.
                                                                                LOOP AT rs_itab into fs_itab.
  
  WRITE : / fs_itab-sgtxt,fs_itab-mblnr.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 11:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-alias-query-with-casting/m-p/5540215#M1265312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-28T11:57:23Z</dc:date>
    </item>
  </channel>
</rss>

