<?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: ABAP 7.40 Syntax in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191033#M1980758</link>
    <description>&lt;P&gt;Hi Former Member&lt;/P&gt;&lt;P&gt;Then just exclude the BAPIRET2 fields from overwriting...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lt = VALUE #( FOR ls1 IN lt1 ( VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls1 
                                                    EXCEPT TYPE
                                                           ID
                                                           NUMBER
                                                           MESSAGE
                                                           LOG_NO
                                                           LOG_MSG_NO
                                                           MESSAGE_V1
                                                           MESSAGE_V2
                                                           MESSAGE_V3
                                                           MESSAGE_V4
                                                           PARAMETER
                                                           ROW
                                                           FIELD
                                                           SYSTEM ) type = 'E' ) ) ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 25 Apr 2020 05:57:35 GMT</pubDate>
    <dc:creator>Domi</dc:creator>
    <dc:date>2020-04-25T05:57:35Z</dc:date>
    <item>
      <title>ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191017#M1980742</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;
  &lt;P&gt;As in below there are two similar statements behaving differently.&lt;/P&gt;
  &lt;P&gt;Requesting to point out the mistake i’m making.&lt;/P&gt;
  &lt;P&gt;DATA: ls_ret TYPE bapiret2,&lt;/P&gt;
  &lt;P&gt;ls TYPE atpmsg, &lt;/P&gt;
  &lt;P&gt; lt TYPE tbl_atpmsg, &lt;/P&gt;
  &lt;P&gt; lt1 TYPE tbl_atpmsg. &lt;/P&gt;
  &lt;P&gt;ls_ret-message = 'test'. &lt;/P&gt;
  &lt;P&gt;APPEND INITIAL LINE TO lt1. &lt;/P&gt;
  &lt;P&gt;"*Statement1 - ****NOT WORKING****&lt;/P&gt;
  &lt;P&gt; lt = VALUE #( FOR ls1 IN lt1 ( VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls1 ) type = 'E' ) ) ). &lt;/P&gt;
  &lt;P&gt;"*Statement2 - ****WORKING**** ls = VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls ) type = lv_sflag ).&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 20:31:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191017#M1980742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-04-15T20:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191018#M1980743</link>
      <description>&lt;P&gt;Could you describe the symptom instead of just saying "not working" please?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 07:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191018#M1980743</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-16T07:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191019#M1980744</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;
&lt;/P&gt;&lt;P&gt; I kinda figured out what he was trying to say (hopefully that was his issue).In lt table, this value &amp;lt;ls_ret-message = 'test'&amp;gt; is not populated.but in ls, the value "test" is populated.I tried it in a differnet way like below and found the below odd behavior (couldn't figure out why &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; )&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" Used Let and can comparable to the for loop?
ls = VALUE #( LET a = ls IN BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls ) type = 'E' ).
cl_demo_output=&amp;gt;display( ls ).  " This will not have "test" defaulted from ls_ret

clear ls.
" Same like op scenario
ls = VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls ) type = 'E' ).
cl_demo_output=&amp;gt;display( ls ). " This will have "test" defaulted from ls_ret&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can the initialization  of ls to a, impact the corresponding?&lt;/P&gt;&lt;P&gt;Hope you can shed some light.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 08:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191019#M1980744</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2020-04-16T08:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191020#M1980745</link>
      <description>&lt;P&gt;The first statement is trying to fill a table based on lt1... is there any other code to fill lt1 besides the APPEND INITIAL LINE TO lt1? - I guess that after that lt1 has only an empty line, so in the statement ls1 is empty..&lt;/P&gt;&lt;P&gt;In statement2, is filling the work area, so no problem with the line there all fields are filled.&lt;/P&gt;&lt;P&gt;But would be ussefull if you tell wat are you trying to acomplish and what do you expect from both statements.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;    Adolfo&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 14:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191020#M1980745</guid>
      <dc:creator>alopezv74</dc:creator>
      <dc:date>2020-04-16T14:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191021#M1980746</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* the target fields are overwritten by empty ls1 fields and type is set to 'E'
lt = VALUE #( FOR ls1 IN lt1 ( VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls1 ) type = 'E' ) ) ).

* Same behaviour for new structure (no table)
data(error_info) = VALUE atpmsg( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls ) type = 'E' ).

* here ls (as the target data object) is already filled because of BASE before the 
* inner CORRESPONDING is executed...
ls = VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls ) type = 'E' ).


*********************************************************
* you can use EXCEPT * to get your expected result
data(error_info) = VALUE atpmsg( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls EXCEPT * ) type = 'E' ).

lt = VALUE #( FOR ls1 IN lt1 ( VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls1 EXCEPT * ) type = 'E' ) ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;regards Domi&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 06:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191021#M1980746</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2020-04-18T06:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191022#M1980747</link>
      <description>&lt;P&gt; @ &lt;SPAN class="mention-scrubbed"&gt;maheshkumar.palavalli&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Due to the LET a different memory handling is used (necessary?) and LS is not filled by the BASE =&amp;gt; see answer below&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Domi&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 06:42:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191022#M1980747</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2020-04-18T06:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191023#M1980748</link>
      <description>&lt;P&gt;I simplified the OP code to be minimal so that to better analyze what's going on.&lt;/P&gt;&lt;P&gt;If I understand well, the OP question is: why ls value contains "test"?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_atpmsg,
         message TYPE string,
       END OF ty_atpmsg.
DATA: ls      TYPE ty_atpmsg,
      ls1     TYPE ty_atpmsg,
      ls_base TYPE ty_atpmsg.

ls_base-message = 'test'.

ls1 = CORRESPONDING #( BASE ( ls_base ) ls ).
ASSERT ls1 = VALUE ty_atpmsg( message = '' ). " CASE 1 : '' IS EXPECTED

ls = CORRESPONDING #( BASE ( ls_base ) ls ).
ASSERT ls = VALUE ty_atpmsg( message = 'test' ). " CASE 2 : 'test' IS NOT EXPECTED
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I understand: for each case, the construction occurs in two steps:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;BASE ( ls_base ) moves ls_base to the target data object, respectively ls1 and ls for cases 1 and 2.&lt;/LI&gt;&lt;LI&gt;Then ls (which has been changed to 'test' in the first step of case 2) is transferred to the target data object.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So, the result looks weird at first sight but now I understand the ABAP logic.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 07:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191023#M1980748</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-18T07:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191024#M1980749</link>
      <description>&lt;P&gt;Thanks for the explanation. For information, to better understand/explain the behavior, I simplified the minimal code to reproduce (see my comment below OP question), provided that ls and ls_ret have the same structures:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ls = CORRESPONDING #( BASE ( ls_ret ) ls ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Apr 2020 08:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191024#M1980749</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-18T08:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191025#M1980750</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/8617/maheshkumar.palavalli.html"&gt;Mahesh Kumar Palavalli&lt;/A&gt; Your case (LET) would deserve a distinct question!&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 08:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191025#M1980750</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-18T08:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191026#M1980751</link>
      <description>&lt;P&gt;@Sandra Rossi, @Mahesh Kumar,  @Adolfo Lopez&lt;/P&gt;&lt;P&gt;Thanks for your replies..&lt;/P&gt;&lt;P&gt;I’m sorry that i was not so clear with the question at first place.&lt;/P&gt;&lt;P&gt;But, Mahesh’s understanding is absolutely correct.&lt;/P&gt;&lt;P&gt;In statement 2, ‘test’ is populated in result but in statement 1, ‘test’ is not populated.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 08:00:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191026#M1980751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-04-20T08:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191027#M1980752</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;dominik.bigl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your comment.&lt;/P&gt;&lt;P&gt;‘ATPMSG’ structure have ‘BAPIRET2’ structure included with other fields.&lt;/P&gt;&lt;P&gt;I want the data in the other fields persisted and fields of BAPIRET2 structure be overwritten making type as ‘E’.&lt;/P&gt;&lt;P&gt;While using EXCEPT *, existing data is getting cleared.&lt;/P&gt;&lt;P&gt;PS: append initial line is not actually my case but will have some data populated in fields (other than of structure BAPIRET2)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 08:00:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191027#M1980752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-04-20T08:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191028#M1980753</link>
      <description>&lt;P&gt;Former Member If you do a comment under a question/answer and you want to target someone else than the question/answer' author, the only solution is to copy/paste their hyperlinked name so that the person receives a warning (NB: @ doesn't work)&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 08:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191028#M1980753</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-20T08:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191029#M1980754</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;dominik.bigl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your comment.&lt;/P&gt;&lt;P&gt;"ATPMSG" has a structure "BAPIRET2" along with some other fields.&lt;/P&gt;&lt;P&gt;On using EXCEPT *, it is not persisting the values (other than BAPIRET2 fields) that are already there.&lt;/P&gt;&lt;P&gt;PS: Append initial line in the question is just to give an idea that there is some data in lt1&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ajay &lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 09:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191029#M1980754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-04-20T09:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191030#M1980755</link>
      <description>&lt;P&gt;It's Domi, not Dorni &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 10:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191030#M1980755</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-20T10:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191031#M1980756</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Apologies..&lt;/P&gt;&lt;P&gt;I’m very new to this site.. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 07:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191031#M1980756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-04-22T07:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191032#M1980757</link>
      <description>&lt;P&gt;No problem. That works, thanks &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 07:58:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191032#M1980757</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-22T07:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.40 Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191033#M1980758</link>
      <description>&lt;P&gt;Hi Former Member&lt;/P&gt;&lt;P&gt;Then just exclude the BAPIRET2 fields from overwriting...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lt = VALUE #( FOR ls1 IN lt1 ( VALUE #( BASE CORRESPONDING #( BASE ( CORRESPONDING #( ls_ret ) ) ls1 
                                                    EXCEPT TYPE
                                                           ID
                                                           NUMBER
                                                           MESSAGE
                                                           LOG_NO
                                                           LOG_MSG_NO
                                                           MESSAGE_V1
                                                           MESSAGE_V2
                                                           MESSAGE_V3
                                                           MESSAGE_V4
                                                           PARAMETER
                                                           ROW
                                                           FIELD
                                                           SYSTEM ) type = 'E' ) ) ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 Apr 2020 05:57:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-40-syntax/m-p/12191033#M1980758</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2020-04-25T05:57:35Z</dc:date>
    </item>
  </channel>
</rss>

