<?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: concatenate in loop..!!! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207380#M1982435</link>
    <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;manoj16393&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;you should do what people advise to you.&lt;/P&gt;&lt;P&gt;You need to replace&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    IF W_BSEG-shkzs = 'H'.
      CONCATENATE '-'  and 'WRBTR' INTO lv_var SEPARATED BY space.
    ENDIF.
    IF W_BSEG-shkzs = 'S'.
      CONCATENATE '+'  and 'WRBTR' INTO lv_var SEPARATED BY space.
    ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;by&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE W_BSEG-shkzs.
  WHEN 'H'.
    gwa_final-wrbtr = w_bseg-wrbtr * -1.
  WHEN 'S'.
    gwa_final-wrbtr = w_bseg-wrbtr.
ENDCASE.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as  &lt;SPAN class="mention-scrubbed"&gt;michael.piesche&lt;/SPAN&gt; already told. If you replace like this, the value will be correct.&lt;/P&gt;&lt;P&gt;In one of your previous Questions I corrected one Code of you, where you use BSEG and BKPF tables, but you are still not using keyfields (BUKRS, BELNR, GJAHR) of the tables BSEG and BKPF. For SKAT table it's also important to use the keyfields (SPRAS, KTOPL, SAKNR). If you don't use the keyfields your output will be always wrong.&lt;/P&gt;&lt;P&gt;Greetings&lt;BR /&gt;Stephan&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2020 15:24:56 GMT</pubDate>
    <dc:creator>stephkoester</dc:creator>
    <dc:date>2020-06-08T15:24:56Z</dc:date>
    <item>
      <title>concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207373#M1982428</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;hi i wanto to display amount in + - value in in amount ..!! how to do.







LOOP AT l_bseg INTO DATA(w_bseg).

    IF W_BSEG-shkzs = 'H'.
      CONCATENATE '-'  and 'WRBTR' INTO lv_var SEPARATED BY space.
    ENDIF.
    IF W_BSEG-shkzs = 'S'.
      CONCATENATE '+'  and 'WRBTR' INTO lv_var SEPARATED BY space.
    ENDIF.


    gwa_final-belnr = w_bseg-belnr.
*      gwa_final-gjahr = w_bseg-gjahr.
    gwa_final-augcp = w_bseg-augcp.
    gwa_final-shkzg = w_bseg-shkzg.

    gwa_final-gsber = w_bseg-gsber.
    gwa_final-wrbtr = w_bseg-wrbtr.
    gwa_final-pswsl = w_bseg-pswsl.
    gwa_final-dzuonr = w_bseg-zuonr.
    gwa_final-sgtxt = w_bseg-sgtxt.
    gwa_final-hkont = w_bseg-hkont.
    gwa_final-lifnr = w_bseg-lifnr.
    gwa_final-prctr = w_bseg-prctr.
    gwa_final-bupla = w_bseg-bupla.
    gwa_final-budat = w_bseg-h_budat.
    gwa_final-bldat = w_bseg-h_bldat.

    READ TABLE l_bkpf INTO DATA(w_bkpf) WITH KEY belnr = w_bseg-belnr BINARY SEARCH.

    IF sy-subrc EQ 0.
      gwa_final-cpudt = w_bkpf-cpudt.
      gwa_final-xblnr = w_bkpf-xblnr.
      gwa_final-bktxt = w_bkpf-bktxt.

    ENDIF.

    LOOP AT l_skat INTO DATA(w_skat) WHERE saknr = w_bseg-hkont.
* READ TABLE l_skat INTO DATA(w_skat) WITH KEY saknr = w_bseg-hkont BINARY SEARCH.

      IF sy-subrc EQ 0.
        gwa_final-saknr = w_skat-saknr.
        gwa_final-txt50 = w_skat-txt50.
      ENDIF.
    ENDLOOP.


    READ TABLE l_lfa1 INTO DATA(w_lfa1) WITH KEY lifnr = w_bseg-lifnr .

    IF sy-subrc EQ 0.
      gwa_final-name1 = w_lfa1-name1.
    ENDIF.

    APPEND gwa_final TO gt_final.
    CLEAR gwa_final.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2020 10:38:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207373#M1982428</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-06-08T10:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207374#M1982429</link>
      <description>&lt;P&gt;You are probably looking for a solution like the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE W_BSEG-shkzs.
  WHEN 'H'.
    gwa_final-wrbtr = w_bseg-wrbtr * -1.
  WHEN 'S'.
    gwa_final-wrbtr = w_bseg-wrbtr.
ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Currently, with the concatenation statement, you are only concatenating the literals '-' and 'WRBTR' into the variable lv_var. Also, concatenation should be used on character variables, and is not possible with number values.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONCATENATE '-' and 'WRBTR' INTO lv_var SEPARATED BY space&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2020 11:14:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207374#M1982429</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-06-08T11:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207375#M1982430</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Not able to get your requirement?&lt;/P&gt;&lt;P&gt;Why you want to concatinate?&lt;/P&gt;&lt;P&gt;Why dont you multiply with -1 if Credit.&lt;/P&gt;&lt;P&gt;Please eloborate your requirement&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 11:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207375#M1982430</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-06-08T11:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207376#M1982431</link>
      <description>&lt;P&gt;hi sir,&lt;/P&gt;&lt;P&gt;can i use this in main loop ???&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 11:17:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207376#M1982431</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-06-08T11:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207377#M1982432</link>
      <description>&lt;P&gt;HI I WANT TO DISPLAY BSEG FIELD WRBTR IN + OR - VALUR IN ALV OUTPUT ..!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 11:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207377#M1982432</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-06-08T11:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207378#M1982433</link>
      <description>&lt;P&gt;Sir, but still not working..! I did as u told...!!!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 11:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207378#M1982433</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-06-08T11:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207379#M1982434</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/833996/manoj16393.html"&gt;Manoj Kumar&lt;/A&gt;, please give more information about your error and what is not working. Is there a ST22 dump or do you have a working application that displays faulty information? Show relevant coding and screenshots to support your problems.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 12:37:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207379#M1982434</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-06-08T12:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207380#M1982435</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;manoj16393&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;you should do what people advise to you.&lt;/P&gt;&lt;P&gt;You need to replace&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    IF W_BSEG-shkzs = 'H'.
      CONCATENATE '-'  and 'WRBTR' INTO lv_var SEPARATED BY space.
    ENDIF.
    IF W_BSEG-shkzs = 'S'.
      CONCATENATE '+'  and 'WRBTR' INTO lv_var SEPARATED BY space.
    ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;by&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE W_BSEG-shkzs.
  WHEN 'H'.
    gwa_final-wrbtr = w_bseg-wrbtr * -1.
  WHEN 'S'.
    gwa_final-wrbtr = w_bseg-wrbtr.
ENDCASE.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as  &lt;SPAN class="mention-scrubbed"&gt;michael.piesche&lt;/SPAN&gt; already told. If you replace like this, the value will be correct.&lt;/P&gt;&lt;P&gt;In one of your previous Questions I corrected one Code of you, where you use BSEG and BKPF tables, but you are still not using keyfields (BUKRS, BELNR, GJAHR) of the tables BSEG and BKPF. For SKAT table it's also important to use the keyfields (SPRAS, KTOPL, SAKNR). If you don't use the keyfields your output will be always wrong.&lt;/P&gt;&lt;P&gt;Greetings&lt;BR /&gt;Stephan&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 15:24:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207380#M1982435</guid>
      <dc:creator>stephkoester</dc:creator>
      <dc:date>2020-06-08T15:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate in loop..!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207381#M1982436</link>
      <description>&lt;P&gt;Thank you &lt;A href="https://answers.sap.com/users/229581/michael.piesche.html"&gt;Michael Piesche&lt;/A&gt; and  &lt;A href="https://answers.sap.com/users/427051/stephkoester.html"&gt;Stephan Köster&lt;/A&gt;.. i am getting values&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 06:47:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-in-loop/m-p/12207381#M1982436</guid>
      <dc:creator>former_member622718</dc:creator>
      <dc:date>2020-06-09T06:47:34Z</dc:date>
    </item>
  </channel>
</rss>

