<?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: Transformations in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580847#M262094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got a short dump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You attempted to change the internal table "???", but no valid cursor exists for the table.&lt;/P&gt;&lt;P&gt;1. The relavent ABAP/4 statement does not include the addition "....INDEX....", although the statement is not inside a "LOOP...ENDLOOP" loop processing this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The relavent ABAP/4 statement was called from within a "LOOP...ENDLOOP" loop after a delete "???"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the code as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;    /BIC/COLUMNA(000010) TYPE C,&lt;/P&gt;&lt;P&gt;    /BIC/COLUMNB(000060) TYPE C,&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shift itab-/BIC/COLUMNA right deleting trailing space.&lt;/P&gt;&lt;P&gt;Shift itab-/BIC/COLUMNA right deleting trailing '/'.&lt;/P&gt;&lt;P&gt;Shift itab-/BIC/COLUMNA left deleting leading space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search itab-/BIC/COLUMNB for '/'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  shift itab-/BIC/COLUMNB left by sy-fdpos places.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Modify itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know where I made a mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;SAPBW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2006 22:37:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-04T22:37:28Z</dc:date>
    <item>
      <title>Transformations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580843#M262090</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;I am loading a csv file from application server.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I have 15 columns.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Column A&amp;lt;/b&amp;gt;: I get values which may contain a "/" at the end. The character length is not fixed. But the object defined length is 6. &amp;lt;u&amp;gt;I need to remove "/".&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Column B&amp;lt;/b&amp;gt;: I get values which contain "/" in between. The number of characters before the "/" or after the "/" is not fixed. But the object defined length is 60. &amp;lt;u&amp;gt;I need to remove all the characters before "/" including "/".&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can you please help me with the ABAP code for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;SAPBW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 20:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580843#M262090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T20:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Transformations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580844#M262091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume that you are loading these values from the csv into an internal table in your program with specific fields, such as....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of itab occurs 0,
      columna(6) type c,
      columnb(60) type c,
      columnc(10) type c,
      ....
      end of itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when filling the itab, you simply need to translate the slashes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For column A, you only want to get rid of the one on the end.  This code will get rid of the '/' on the end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Shift itab-columna right deleting trailing space.
Shift itab-columna right deleting trailing '/'.
Shift itab-columna left deleting leading space.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For column B, we need to get rid of all, in this case, we can use the TRANSLATE keyword.  Here the literal after the USING part tells the system to get rid of the '/' and replace it with SPACE which is the second character in literal string below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;translate itab-columnb using '/ '.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 20:46:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580844#M262091</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-04T20:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Transformations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580845#M262092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to define all the columns in Data:?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in Column B I need to delete all charecters preceding "/" and also "/" itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, will there be any change if I am loading from client server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;SAPBW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 20:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580845#M262092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T20:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Transformations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580846#M262093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that it is a good idea to put the data into specific fields as it will be easier to work with.  I must have misunderstood about column B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find the first / using the search statement, sy-fdpos will have the value of the offset, then you can use the shift statement to shift to the left by x places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;search itab-columnb for '/'.
if sy-subrc = 0.
  shift itab-columnb left by sy-fdpos places.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 21:45:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580846#M262093</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-04T21:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transformations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580847#M262094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got a short dump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You attempted to change the internal table "???", but no valid cursor exists for the table.&lt;/P&gt;&lt;P&gt;1. The relavent ABAP/4 statement does not include the addition "....INDEX....", although the statement is not inside a "LOOP...ENDLOOP" loop processing this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The relavent ABAP/4 statement was called from within a "LOOP...ENDLOOP" loop after a delete "???"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the code as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;    /BIC/COLUMNA(000010) TYPE C,&lt;/P&gt;&lt;P&gt;    /BIC/COLUMNB(000060) TYPE C,&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;	.&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shift itab-/BIC/COLUMNA right deleting trailing space.&lt;/P&gt;&lt;P&gt;Shift itab-/BIC/COLUMNA right deleting trailing '/'.&lt;/P&gt;&lt;P&gt;Shift itab-/BIC/COLUMNA left deleting leading space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search itab-/BIC/COLUMNB for '/'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  shift itab-/BIC/COLUMNB left by sy-fdpos places.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Modify itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know where I made a mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;SAPBW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 22:37:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580847#M262094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T22:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Transformations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580848#M262095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if your itab is within a LOOP..Otherwise try to give INDEX for your modify statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 22:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transformations/m-p/1580848#M262095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T22:43:10Z</dc:date>
    </item>
  </channel>
</rss>

