<?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: Find First Occurrence ']' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627297#M2013076</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please try this code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: s_sscc1 TYPE String,
      lv_var  TYPE I.
 
s_sscc1 = 'AAAA[BBBBB][CCC]'.
 
FIND '[' IN s_sscc1 MATCH OFFSET V_OFF MATCH LENGTH lv_var.
IF SY-SUBRC = 0.
  write v_off.
  write lv_var.
  WRITE s_sscc1+0(v_off).
Endif.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 07:36:45 GMT</pubDate>
    <dc:creator>venkateswaran_k</dc:creator>
    <dc:date>2022-06-23T07:36:45Z</dc:date>
    <item>
      <title>Find First Occurrence ']'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627293#M2013072</link>
      <description>&lt;P&gt;Hello Experts!&lt;BR /&gt;&lt;BR /&gt;Kinda new to SAP. Please help me how to find the first occurrence. The goal here is to separate two values when it detects ']' then display the first value. For example with a data 123456]0879. Only the 123456 should be displayed. I was supposed to use SPLIT but it won't work if SPLIT sscc1 INTO s_sscc1 since it requires 2 or more fields to be specified.&lt;BR /&gt;&lt;BR /&gt;Current code(still not sure about this one):&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: s_sscc1 TYPE string.
&lt;BR /&gt;IF sscc1 CA ']'.&lt;BR /&gt;*find first occurrence code*&lt;BR /&gt;ENDIF.&lt;BR /&gt;sscc1 = s_sscc1.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2022 21:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627293#M2013072</guid>
      <dc:creator>former_member805345</dc:creator>
      <dc:date>2022-06-22T21:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find First Occurrence ']'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627294#M2013073</link>
      <description>&lt;P&gt;Please try with below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;STRONG&gt;SPLIT&lt;/STRONG&gt; sscc1 AT ']' INTO: str1 str2. &lt;B&gt;WRITE&lt;/B&gt; :/ str1. &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2022 04:41:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627294#M2013073</guid>
      <dc:creator>Richa-Katiyar</dc:creator>
      <dc:date>2022-06-23T04:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find First Occurrence ']'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627295#M2013074</link>
      <description>&lt;P&gt;Hi Richa,&lt;BR /&gt;&lt;BR /&gt;That was my code before but I was told not to use SPLIT since str2 is not necessary. They want me to use FIND first occurrence. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 05:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627295#M2013074</guid>
      <dc:creator>former_member805345</dc:creator>
      <dc:date>2022-06-23T05:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find First Occurrence ']'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627296#M2013075</link>
      <description>&lt;P&gt;ABAP function:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;substring_before&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627296#M2013075</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-06-23T07:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Find First Occurrence ']'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627297#M2013076</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please try this code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: s_sscc1 TYPE String,
      lv_var  TYPE I.
 
s_sscc1 = 'AAAA[BBBBB][CCC]'.
 
FIND '[' IN s_sscc1 MATCH OFFSET V_OFF MATCH LENGTH lv_var.
IF SY-SUBRC = 0.
  write v_off.
  write lv_var.
  WRITE s_sscc1+0(v_off).
Endif.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:36:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-first-occurrence/m-p/12627297#M2013076</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2022-06-23T07:36:45Z</dc:date>
    </item>
  </channel>
</rss>

