<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Abapinho</title><link>https://abapinho.com/en/posts/</link><description>Recent content in Posts on Abapinho</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>&amp;copy;2009-2026 Nuno Godinho</copyright><lastBuildDate>Mon, 22 Jun 2026 09:00:00 +0100</lastBuildDate><atom:link href="https://abapinho.com/en/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Who triggered the exception?</title><link>https://abapinho.com/en/2026/06/quem-lancou-a-excepcao/</link><pubDate>Mon, 22 Jun 2026 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2026/06/quem-lancou-a-excepcao/</guid><description>&lt;p>Exceptions can be passed back, method by method, bubbling up, and caught by a method that has nothing to do with the one that raised it. And how will you find it?&lt;/p></description></item><item><title>Attributes that are global variables in disguise</title><link>https://abapinho.com/en/2026/06/atributos-variaveis-globais/</link><pubDate>Mon, 08 Jun 2026 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2026/06/atributos-variaveis-globais/</guid><description>&lt;p>There’s nothing worse than seeing code that abuses variables. They’re so delicate, and yet they’re treated so badly. Poor things. And to those who have to read them. The worst way to treat a variable is to make it global. It’s hard to believe, but in 2025 this crime continues to plague our systems. Well, here’s a way to show them some love.&lt;/p></description></item><item><title>I hate magic numbers</title><link>https://abapinho.com/en/2026/04/odeio-numeros-magicos/</link><pubDate>Mon, 27 Apr 2026 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2026/04/odeio-numeros-magicos/</guid><description>&lt;p>Those who work in SAP think it&amp;rsquo;s normal for everything to be represented by obscure codes that mean nothing. But it doesn&amp;rsquo;t have to be this way. Stop it! Create human-readable codes please.&lt;/p></description></item><item><title>VALUE #( ) and nothing else</title><link>https://abapinho.com/en/2026/04/value-cardinal-mais-nada/</link><pubDate>Mon, 20 Apr 2026 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2026/04/value-cardinal-mais-nada/</guid><description>&lt;p>I once wanted to test a class whose constructor took several parameters, each requiring an instance of a different interface. These instances weren&amp;rsquo;t easy to create and weren&amp;rsquo;t relevant to the test. After some experimenting, I found a way to work around the problem.&lt;/p></description></item><item><title>Test boolean methods implicitly</title><link>https://abapinho.com/en/2026/04/if-metodo-booleano-implicito/</link><pubDate>Mon, 13 Apr 2026 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2026/04/if-metodo-booleano-implicito/</guid><description>&lt;p>A quick reminder. I thought this was obvious but I keep seeing IF statements that explicitly test the result of a boolean method against ABAP_TRUE or using INITIAL. There&amp;rsquo;s no need! ABAP is clever in this regard.&lt;/p></description></item><item><title>Thank you, Martin Jonen</title><link>https://abapinho.com/en/2026/03/martin-jonen/</link><pubDate>Mon, 23 Mar 2026 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2026/03/martin-jonen/</guid><description>&lt;p>It&amp;rsquo;s great to find peers who are equally interested in improving and evolving, not just as a programmer but also as a human being. I recently found one.&lt;/p></description></item><item><title>Execute code after a COMMIT</title><link>https://abapinho.com/en/2026/02/evento-transaction-finished/</link><pubDate>Mon, 16 Feb 2026 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2026/02/evento-transaction-finished/</guid><description>&lt;p>Remember how with &lt;code>CALL FUNCTION IN UPDATE TASK&lt;/code> you could delay some actions until the moment of a &lt;code>COMMIT&lt;/code>?&lt;/p></description></item><item><title>Tech Radar</title><link>https://abapinho.com/en/2026/01/tech-radar/</link><pubDate>Mon, 19 Jan 2026 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2026/01/tech-radar/</guid><description>&lt;p>I found this amazing chart of SAP technologies.&lt;/p></description></item><item><title>FILTER</title><link>https://abapinho.com/en/2025/11/filter/</link><pubDate>Mon, 03 Nov 2025 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2025/11/filter/</guid><description>&lt;p>The FILTER function is new and still relatively unknown. I will give you an example of how it can be used.&lt;/p></description></item><item><title>Set a baseline for your ATC</title><link>https://abapinho.com/en/2025/10/atc-baseline/</link><pubDate>Mon, 20 Oct 2025 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2025/10/atc-baseline/</guid><description>&lt;p>Did you know that you can set a starting point for ATC and, thanks to that, be able to run ATC in legacy code?&lt;/p></description></item><item><title>Kintsugi</title><link>https://abapinho.com/en/2025/10/kintsugi/</link><pubDate>Mon, 13 Oct 2025 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2025/10/kintsugi/</guid><description>&lt;p>When a porcelain object breaks in Japan, sometimes instead of throwing it away, they mend it. But they don&amp;rsquo;t mend it just any old way; they mend it with gold. This technique is called Kintsugi.&lt;/p></description></item><item><title>Why always MODIFY?</title><link>https://abapinho.com/en/2025/10/porque-modify/</link><pubDate>Mon, 06 Oct 2025 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2025/10/porque-modify/</guid><description>&lt;p>It is a common practice in ABAP to use MODIFY instead of INSERT and UPDATE. Do you do it too? Tell me why. Is it laziness? Is it fear? Is it just a matter of &amp;ldquo;whatever&amp;rdquo;? Or is it more like &amp;ldquo;screw it&amp;rdquo;?&lt;/p></description></item><item><title>On broken windows</title><link>https://abapinho.com/en/2025/06/sobre-janelas-partidsa/</link><pubDate>Mon, 09 Jun 2025 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2025/06/sobre-janelas-partidsa/</guid><description>&lt;p>The broken window theory says that if a window in a building is broken and not repaired quickly, people will be tempted to throw stones and break the other windows.&lt;/p></description></item><item><title>Everything Everywhere All At Once</title><link>https://abapinho.com/en/2025/06/eclipse-adt-split-editor/</link><pubDate>Mon, 02 Jun 2025 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2025/06/eclipse-adt-split-editor/</guid><description>&lt;p>Sometimes it&amp;rsquo;s useful to look at two areas of the code at the same time. If the areas are in different classes, just open them both. But what if they&amp;rsquo;re in the same class? For example, if you want to make a method inspired by or related to another.&lt;/p></description></item><item><title>Case insensitive SELECTs</title><link>https://abapinho.com/en/2025/05/select-case-insensitive/</link><pubDate>Mon, 26 May 2025 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2025/05/select-case-insensitive/</guid><description>&lt;p>In SAP it&amp;rsquo;s normal to have tables in the database with a &lt;code>NAME&lt;/code> field and another &lt;code>NAME_SEARCH&lt;/code> which is filled in with exactly the same thing as &lt;code>NAME&lt;/code> but in upper case.&lt;/p>
&lt;p>Then, when you want to do case-insensitive searches you use &lt;code>NAME_SEARCH&lt;/code>. You don&amp;rsquo;t need to do this anymore.&lt;/p></description></item><item><title>It's normal to not get it right the first time</title><link>https://abapinho.com/en/2025/04/nao-se-acerta-a-primeira/</link><pubDate>Mon, 07 Apr 2025 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2025/04/nao-se-acerta-a-primeira/</guid><description>&lt;p>In the ABAP world, the rule is to do it once and never touch it again. Once done, forever frozen. What nonsense.&lt;/p></description></item><item><title>Where? Who? What? How?</title><link>https://abapinho.com/en/2025/03/onde-quem-oque-como/</link><pubDate>Mon, 17 Mar 2025 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2025/03/onde-quem-oque-como/</guid><description>&lt;p>You&amp;rsquo;ve been asked to create a new feature. You&amp;rsquo;re ready to build it. But hold your horses. Before you start, I suggest you find answers to a few questions. Finding a good answer to each of them is fundamental to ensuring that what you build is solid and elegant.&lt;/p></description></item><item><title>Reconstants</title><link>https://abapinho.com/en/2025/02/reconstantes/</link><pubDate>Mon, 17 Feb 2025 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2025/02/reconstantes/</guid><description>&lt;p>In my current project constants are all over the place, with confusing or wrong names. It&amp;rsquo;s a mess. I&amp;rsquo;ve found a way to reorganize and rearrange the constants so that the new code can use pretty constants without messing up the old code, which can continue to use the confusing ones.&lt;/p></description></item><item><title>We finally have FINAL</title><link>https://abapinho.com/en/2025/02/final/</link><pubDate>Mon, 03 Feb 2025 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2025/02/final/</guid><description>&lt;p>There&amp;rsquo;s nothing worse than seeing people abusing variables. They&amp;rsquo;re so delicate and yet so badly treated, poor things. Here&amp;rsquo;s a way to show them some love.&lt;/p></description></item><item><title>How do you like your blank lines?</title><link>https://abapinho.com/en/2024/12/linhas-em-branco/</link><pubDate>Mon, 30 Dec 2024 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2024/12/linhas-em-branco/</guid><description>&lt;p>Everyone uses blank lines to better organize their code. But where to use them and how many? Let&amp;rsquo;s talk about that.&lt;/p></description></item><item><title>Eclipse converts database data into VALUEs</title><link>https://abapinho.com/en/2024/11/eclipse-adt-abap-value/</link><pubDate>Mon, 18 Nov 2024 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2024/11/eclipse-adt-abap-value/</guid><description>&lt;p>Sometimes you need to take data from the database and replicate it declaratively in ABAP using the VALUE command. For example, to build ABAP Unit tests.&lt;/p></description></item><item><title>In Eclipse ADT you can open an object in another client</title><link>https://abapinho.com/en/2024/10/eclipse-adt-open-in-project/</link><pubDate>Mon, 07 Oct 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/10/eclipse-adt-open-in-project/</guid><description>&lt;p>Historically, it has always been impossible to jump from one SAP system to another without losing context. Now it&amp;rsquo;s possible.&lt;/p></description></item><item><title>Eclipse ADT Data browser is much better than SE16N</title><link>https://abapinho.com/en/2024/09/eclipse-adt-data-browser/</link><pubDate>Mon, 30 Sep 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/09/eclipse-adt-data-browser/</guid><description>&lt;p>The tools that SAP provides for viewing the contents of database tables have always been very sketchy.&lt;/p></description></item><item><title>eclipse-adt-extract-method</title><link>https://abapinho.com/en/2024/06/eclipse-adt-extract-method/</link><pubDate>Sun, 30 Jun 2024 14:34:34 +0100</pubDate><guid>https://abapinho.com/en/2024/06/eclipse-adt-extract-method/</guid><description>&lt;p>When you have a very large method, you should subdivide it into several smaller ones.&lt;/p></description></item><item><title>In Eclipse ADT you can always undo</title><link>https://abapinho.com/en/2024/06/eclipse-adt-undo/</link><pubDate>Mon, 17 Jun 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/06/eclipse-adt-undo/</guid><description>&lt;p>They say: Don&amp;rsquo;t go back to where you were once happy. But the truth is that in many cases, if you could go back, you would.&lt;/p></description></item><item><title>Eclipse ADT has lots and lots of keyboard shortcuts</title><link>https://abapinho.com/en/2024/06/eclipse-adt-keyboard-shortcuts/</link><pubDate>Mon, 10 Jun 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/06/eclipse-adt-keyboard-shortcuts/</guid><description>&lt;p>I like keyboard shortcuts. If I could do my job without taking my hands off my keyboard I&amp;rsquo;d be an even happier programmer.&lt;/p></description></item><item><title>In Eclipse ADT you can share links to your code</title><link>https://abapinho.com/en/2024/05/eclipse-adt-share-link/</link><pubDate>Mon, 20 May 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/05/eclipse-adt-share-link/</guid><description>&lt;p>Until recently, ABAP has never been one for big collaborations.&lt;/p></description></item><item><title>Rename a lot of things automatically in Eclipse ADT</title><link>https://abapinho.com/en/2024/05/eclipse-adt-rename/</link><pubDate>Mon, 06 May 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/05/eclipse-adt-rename/</guid><description>&lt;p>Those who still programme monolithically probably don&amp;rsquo;t feel the need for this. But anyone who uses multiple classes with multiple methods knows that it&amp;rsquo;s normal (and even desirable) to change your mind about the name of these things. Ideas aren&amp;rsquo;t born ready-made in our heads. Ideally, code is mouldable and can be shaped until we find the desired form.&lt;/p></description></item><item><title>Eclipse ADT puts ABAP Doc to good use</title><link>https://abapinho.com/en/2024/04/eclipse-adt-abap-doc/</link><pubDate>Mon, 29 Apr 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/04/eclipse-adt-abap-doc/</guid><description>&lt;p>ABAP Doc is an excellent way of integrating documentation into the code.&lt;/p></description></item><item><title>The magical F2 in Eclipse ADT</title><link>https://abapinho.com/en/2024/04/eclipse-adt-f2/</link><pubDate>Mon, 22 Apr 2024 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2024/04/eclipse-adt-f2/</guid><description>&lt;p>Eclipse ADT calls it &lt;em>Code element information&lt;/em>.&lt;/p></description></item><item><title>In Eclipse ADT you continue where you left off</title><link>https://abapinho.com/en/2024/04/eclipse-adt-continuas-onde-paraste/</link><pubDate>Thu, 04 Apr 2024 21:40:41 +0100</pubDate><guid>https://abapinho.com/en/2024/04/eclipse-adt-continuas-onde-paraste/</guid><description>&lt;p>Did you know that in Eclipse ADT you can work even without a connection to the server?&lt;/p></description></item><item><title>No constant context changes in Eclipse ADT</title><link>https://abapinho.com/en/2024/04/eclipse-adt-mudanca-de-contexto/</link><pubDate>Mon, 01 Apr 2024 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2024/04/eclipse-adt-mudanca-de-contexto/</guid><description>&lt;p>Every time you switch contexts, you lose the thread slightly. It&amp;rsquo;s human nature. So the less you do, the better.&lt;/p></description></item><item><title>In Eclipse the compiler is not lazy</title><link>https://abapinho.com/en/2024/03/eclipse-adt-compilacao-constante/</link><pubDate>Mon, 25 Mar 2024 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2024/03/eclipse-adt-compilacao-constante/</guid><description>&lt;p>Still using SAPGUI instead of Eclipse ADT? Get ready to be made fun of.&lt;/p></description></item><item><title>Languages shape thought</title><link>https://abapinho.com/en/2024/02/linguagem-molda-pensamento/</link><pubDate>Mon, 05 Feb 2024 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2024/02/linguagem-molda-pensamento/</guid><description>&lt;p>I read somewhere that Eastern mathematicians tend to solve a different kind of mathematical problem than Western mathematicians do.&lt;/p></description></item><item><title>To all those whole criticize 7.4 syntax</title><link>https://abapinho.com/en/2024/01/nova-sintaxe-complicada/</link><pubDate>Mon, 15 Jan 2024 09:01:01 +0000</pubDate><guid>https://abapinho.com/en/2024/01/nova-sintaxe-complicada/</guid><description>&lt;p>This post is addressed to the collective character that represents all the people who have told me that they like some things in the new 7.4 functional syntax but think that you shouldn&amp;rsquo;t overdo it and should avoid using &lt;code>REDUCE&lt;/code> and all the other unnecessarily weird things because the code gets more obscure, it&amp;rsquo;s slower and they don&amp;rsquo;t see any advantages.&lt;/p>
&lt;p>Are you serious?&lt;/p></description></item><item><title>Use BASE to not ruin what you already have</title><link>https://abapinho.com/en/2023/11/base/</link><pubDate>Mon, 06 Nov 2023 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2023/11/base/</guid><description>&lt;p>We used to use the &lt;code>APPEND&lt;/code> and &lt;code>INSERT&lt;/code> commands to add rows to internal tables. Now that ABAP has grown, we can use &lt;code>VALUE&lt;/code>, &lt;code>REDUCE&lt;/code>, &lt;code>CORRESPONDING&lt;/code>, etc. But what if the internal table already has rows and we don&amp;rsquo;t want to lose them?&lt;/p></description></item><item><title>INNER JOIN instead of FOR ALL ENTRIES</title><link>https://abapinho.com/en/2023/10/inner-join-itbl/</link><pubDate>Mon, 30 Oct 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/10/inner-join-itbl/</guid><description>&lt;p>A while ago &lt;a href="https://abapinho.com/en/2023/08/select-itbl/">I showed you&lt;/a> that you could SELECT from an internal table. And then I asked myself: if that is possible, shouldn&amp;rsquo;t INNER JOIN be possible too?&lt;/p></description></item><item><title>YAGNI</title><link>https://abapinho.com/en/2023/10/yagni/</link><pubDate>Mon, 16 Oct 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/10/yagni/</guid><description>&lt;p>&lt;em>You Ain&amp;rsquo;t Gonna Need It&lt;/em> means &lt;em>Do what you want, but don&amp;rsquo;t say I didn&amp;rsquo;t warn you&lt;/em>. Just kidding. Not really.&lt;/p></description></item><item><title>Copy from SAPGui to the clipboard</title><link>https://abapinho.com/en/2023/09/copy-to-clipboard/</link><pubDate>Mon, 25 Sep 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/09/copy-to-clipboard/</guid><description>&lt;p>Did you know that your ABAP programme can copy content to your operating system&amp;rsquo;s clipboard?&lt;/p></description></item><item><title>SELECTing from an internal table</title><link>https://abapinho.com/en/2023/08/select-itbl/</link><pubDate>Mon, 28 Aug 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/08/select-itbl/</guid><description>&lt;p>Now you can SELECT from an internal table.&lt;/p></description></item><item><title>SELECT SINGLE vs SELECT UP TO 1 ROWS</title><link>https://abapinho.com/en/2023/06/select-single-vs-select-up-to-1-rows/</link><pubDate>Mon, 12 Jun 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/06/select-single-vs-select-up-to-1-rows/</guid><description>&lt;p>Man, this is one of those endless discussions that will never get anywhere. Ditto trying to decide if you deserve to go on living if you put pineapple on your pizza or Philadelphia cheese on your sushi.&lt;/p></description></item><item><title>Call SM30 or SM34 from a function module</title><link>https://abapinho.com/en/2023/06/funcoes-para-sm30/</link><pubDate>Mon, 05 Jun 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/06/funcoes-para-sm30/</guid><description>&lt;p>If you want to call the SM30 from a program you can use &lt;code>CALL TRANSACTION&lt;/code> but there is a simpler way.&lt;/p></description></item><item><title>Use a dictionary instead of IF or CASE</title><link>https://abapinho.com/en/2023/05/diccionario-vs-if-ou-case/</link><pubDate>Mon, 29 May 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/05/diccionario-vs-if-ou-case/</guid><description>&lt;p>The fewer IFs and CASEs the better, right? Every branch of an IF or a CASE is an exception. And we like rules better than exceptions. Here&amp;rsquo;s one more technique to achieve that.&lt;/p></description></item><item><title>Fix prefixes</title><link>https://abapinho.com/en/2023/05/prefixos-fixos/</link><pubDate>Mon, 01 May 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/05/prefixos-fixos/</guid><description>&lt;p>It&amp;rsquo;s very easy to mess up with object names in SAP. I recently found a way to minimize that problem: set rules to fix per-package prefixes for certain object types.&lt;/p></description></item><item><title>I package everything that moves</title><link>https://abapinho.com/en/2023/04/empacota-tudo/</link><pubDate>Mon, 03 Apr 2023 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2023/04/empacota-tudo/</guid><description>&lt;p>I obsessively package everything that moves.&lt;/p></description></item><item><title>exclamation-point</title><link>https://abapinho.com/en/2023/03/exclamation-point/</link><pubDate>Fri, 24 Mar 2023 19:09:52 +0000</pubDate><guid>https://abapinho.com/en/2023/03/exclamation-point/</guid><description/></item><item><title>Undo with abapGit</title><link>https://abapinho.com/en/2023/03/abapgit-undo/</link><pubDate>Mon, 06 Mar 2023 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2023/03/abapgit-undo/</guid><description>&lt;p>Did you know that you can finally make radical changes to a development without fear
because there is a simple way to undo all those changes?&lt;/p></description></item><item><title>The 3 exception parents</title><link>https://abapinho.com/en/2023/02/exception-parents/</link><pubDate>Mon, 20 Feb 2023 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2023/02/exception-parents/</guid><description>&lt;p>OO exceptions always need a parent. They always have to inherit from somebody. And ABAP gives them 3 alternatives.&lt;/p></description></item><item><title>Message collector</title><link>https://abapinho.com/en/2023/01/message-collector/</link><pubDate>Mon, 16 Jan 2023 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2023/01/message-collector/</guid><description>&lt;p>SAP messages are all managed centrally through the &lt;code>SE91&lt;/code> transaction, but can appear to a program in a variety of formats.&lt;/p></description></item><item><title>SELECT single record using an incomplete key</title><link>https://abapinho.com/en/2022/11/up-to-1-rows/</link><pubDate>Mon, 28 Nov 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/11/up-to-1-rows/</guid><description>&lt;p>I was always told that, when selecting a single record, I should use &lt;code>UP TO 1 ROWS&lt;/code> whenever the key was not fully provided. My elementary school teacher told me that I should always aks why: why? Nobody ever told me why.&lt;/p></description></item><item><title>Use &amp; in SAPSript texts</title><link>https://abapinho.com/en/2022/11/sapscript-ampersand/</link><pubDate>Mon, 14 Nov 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/11/sapscript-ampersand/</guid><description>&lt;p>Let&amp;rsquo;s say you want to show an url in a SAPScript layout. You place the url in a SAPSCript text and assume everything will work fine. Because most times everything does work fine. It&amp;rsquo;s just that sometimes&amp;hellip;&lt;/p></description></item><item><title>Clean data declarations</title><link>https://abapinho.com/en/2022/11/clean-data-declarations/</link><pubDate>Mon, 07 Nov 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/11/clean-data-declarations/</guid><description>&lt;p>While writing code, you should always keep present how easy it will be to maintain. This is particularly important in data declarations. And so easy to do right.&lt;/p></description></item><item><title>Let go of SE24</title><link>https://abapinho.com/en/2022/10/desmamar-a-se24/</link><pubDate>Mon, 03 Oct 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/10/desmamar-a-se24/</guid><description>&lt;p>In SE24 the class code is partially hidden from the programmer behind a GUI. This is apparently convenient but ultimately limitative.&lt;/p></description></item><item><title>I finally got rid of prefixes</title><link>https://abapinho.com/en/2022/09/prefixes/</link><pubDate>Mon, 12 Sep 2022 09:09:00 +0100</pubDate><guid>https://abapinho.com/en/2022/09/prefixes/</guid><description>&lt;p>It took me a long time but I finally got rid of the damn prefixes.&lt;/p></description></item><item><title>Don't MESH with ABAP</title><link>https://abapinho.com/en/2022/08/mesh/</link><pubDate>Mon, 29 Aug 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/08/mesh/</guid><description>&lt;p>ABAP 7.4 brought a lot of lauded novelties. Of all of them, the one less talked about is &lt;code>MESH&lt;/code>. Let&amp;rsquo;s analyse it and see how unfair that has been.&lt;/p></description></item><item><title>Use Python to rewrite ABAP code</title><link>https://abapinho.com/en/2022/08/python-rewrite/</link><pubDate>Mon, 01 Aug 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/08/python-rewrite/</guid><description>&lt;p>When you need to make mass changes to ABAP code, the SAPGui IDE isn&amp;rsquo;t of much help. Eclipse ADT is better, especially if you just want to rename stuff. But there are lots of changes which you won&amp;rsquo;t be able to automate there. Namely, changes that most be done hundreds of times and which cannot be done with a simple &lt;em>find and replace&lt;/em>. In these cases you probably end up changing everything manually. But it doesn&amp;rsquo;t have to be that way.&lt;/p></description></item><item><title>SELECT FOR UPDATE</title><link>https://abapinho.com/en/2022/05/select-for-update/</link><pubDate>Mon, 23 May 2022 09:09:09 +0100</pubDate><guid>https://abapinho.com/en/2022/05/select-for-update/</guid><description>&lt;p>When you&amp;rsquo;re going to modify existing records of a database table it is common to first &lt;code>SELECT&lt;/code> them to see how they are and only then &lt;code>UPDATE&lt;/code> them with what they will be.&lt;/p></description></item><item><title>Table with all development keys</title><link>https://abapinho.com/en/2022/05/chaves-de-desenvolvimento/</link><pubDate>Mon, 16 May 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/05/chaves-de-desenvolvimento/</guid><description>&lt;p>When I get to a new project the system administrator generates a development key for each development system assigned to our SAP username. Usually it&amp;rsquo;s sent to me by e-mail. Usually I lose track of it.&lt;/p></description></item><item><title>Easily modify internal table record</title><link>https://abapinho.com/en/2022/05/modifica-tabela-interna/</link><pubDate>Mon, 09 May 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/05/modifica-tabela-interna/</guid><description>&lt;p>The new way to get data from internal tables is also the new way to put data into internal tables.&lt;/p></description></item><item><title>IF branches should be small</title><link>https://abapinho.com/en/2022/05/ifs-curtos/</link><pubDate>Mon, 02 May 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/05/ifs-curtos/</guid><description>&lt;p>Picture yourself as a monkey hanging from a tree branch. You want to jump to another branch but it&amp;rsquo;s so far away that you cannot see it. If you jump you&amp;rsquo;ll probably fall to the ground. That&amp;rsquo;s bad.&lt;/p></description></item><item><title>We manually implemented 1000 SAP notes</title><link>https://abapinho.com/en/2022/04/1000-notas/</link><pubDate>Mon, 18 Apr 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/04/1000-notas/</guid><description>&lt;p>In the last years of the previous century, an SAP project manager stubbornly opposed to upgrading the SAP system. Instead, he decided that all the SAP notes belonging to that upgrade were to be manually implemented. All 1000 of them.&lt;/p></description></item><item><title>Podcast Sem especificação</title><link>https://abapinho.com/en/2022/04/podcast-s4cn/</link><pubDate>Thu, 14 Apr 2022 17:26:46 +0100</pubDate><guid>https://abapinho.com/en/2022/04/podcast-s4cn/</guid><description>&lt;p>This Tuesday I was invited by Renan Correa to participate in his podcast &amp;ldquo;Sem especificação&amp;rdquo;.&lt;/p></description></item><item><title>Trotting debugger</title><link>https://abapinho.com/en/2022/04/debug-step/</link><pubDate>Mon, 11 Apr 2022 09:00:00 +0100</pubDate><guid>https://abapinho.com/en/2022/04/debug-step/</guid><description>&lt;p>There are many excuses not to use the new functional syntax of ABAP 7.4. One is complaining that it&amp;rsquo;s impossible to debug.&lt;/p>
&lt;p>But it is not.&lt;/p></description></item><item><title>Escape from hackers</title><link>https://abapinho.com/en/2022/03/escape/</link><pubDate>Mon, 28 Mar 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/03/escape/</guid><description>&lt;p>Data entered by the user is one of the main vulnerabilities of a programme.&lt;/p></description></item><item><title>Can your users hack your SQL?</title><link>https://abapinho.com/en/2022/03/sql-injection/</link><pubDate>Mon, 21 Mar 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/03/sql-injection/</guid><description>&lt;p>Are you sure your SQL is bulletproof?&lt;/p></description></item><item><title>Do just one task per LOOP</title><link>https://abapinho.com/en/2022/03/split-loop/</link><pubDate>Mon, 14 Mar 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/03/split-loop/</guid><description>&lt;p>When ABAP programmers run into a LOOP they like to use it to get as many things done as possible. Even if that LOOP ends up having hundreds or thousands of lines.&lt;/p></description></item><item><title>Avoid obsolete ABAP</title><link>https://abapinho.com/en/2022/03/obsoletos/</link><pubDate>Mon, 07 Mar 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/03/obsoletos/</guid><description>&lt;p>ABAP evolves (even though it stood mostly still for too many years). And as it evolves, it leaves behind some commands and syntax constructions which are replaced by better ones.&lt;/p>
&lt;p>Besides learning what&amp;rsquo;s new it is also important to learn what becomes obsolete.&lt;/p></description></item><item><title>A program is an animal</title><link>https://abapinho.com/en/2022/02/animal/</link><pubDate>Mon, 28 Feb 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/02/animal/</guid><description>&lt;p>When a program is bad because it has duplicate code, it usually becomes shorter once we rewrite it to make it better. But, if its problem is not being properly structured into several classes and methods, if we rewrite it according to the best practices, it will probably end up longer.&lt;/p></description></item><item><title>Try poligamy</title><link>https://abapinho.com/en/2022/02/poligamia/</link><pubDate>Mon, 21 Feb 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/02/poligamia/</guid><description>&lt;p>Most ABAP programmers are like swans. They marry ABAP forever and are eternally faithful.&lt;/p></description></item><item><title>Keep code blocks short</title><link>https://abapinho.com/en/2022/02/blocos-curtos/</link><pubDate>Mon, 07 Feb 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/02/blocos-curtos/</guid><description>&lt;p>Unfortunately that is not what happens in most of the Z code I have seen in my life as an ABAP programmer. Both IFs and LOOPs tend to grow bigger than anyone can deal with. I recently ran into a LOOP with over 1500 lines.&lt;/p></description></item><item><title>ABAP inside SQL statements</title><link>https://abapinho.com/en/2022/01/host-expressions/</link><pubDate>Mon, 31 Jan 2022 09:01:01 +0000</pubDate><guid>https://abapinho.com/en/2022/01/host-expressions/</guid><description>&lt;p>Did you know that, if you SAP is recent enough, you can use complex ABAP expressions in the middle of SQL commands?&lt;/p></description></item><item><title>Farewell Wordpress, hello Jamstack</title><link>https://abapinho.com/en/2022/01/jamstack/</link><pubDate>Fri, 21 Jan 2022 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2022/01/jamstack/</guid><description>&lt;p>After over 10 year using &lt;a href="https://wordpress.org/">Wordpress&lt;/a>, the world evolved and Abapinho decided it&amp;rsquo;s time to evolve with it.&lt;/p></description></item><item><title>if you love your neighbour, avoid CLEAR</title><link>https://abapinho.com/en/2021/12/evita-o-clear/</link><pubDate>Mon, 13 Dec 2021 09:00:59 +0000</pubDate><guid>https://abapinho.com/en/2021/12/evita-o-clear/</guid><description>&lt;p>Please stop. Too many regressions happen because someone forgets to CLEAR or to not CLEAR a variable.&lt;/p></description></item><item><title>Don't be so negative</title><link>https://abapinho.com/en/2021/11/nao-sejas-do-contra/</link><pubDate>Tue, 30 Nov 2021 09:00:14 +0000</pubDate><guid>https://abapinho.com/en/2021/11/nao-sejas-do-contra/</guid><description>&lt;p>Legibility is very important in all written text. Except, maybe, in &lt;a href="https://cdn.culturagenial.com/imagens/aranha.jpg">concrete poetry&lt;/a>.&lt;/p>
&lt;p>As a follow up to the &lt;a href="https://abapinho.com/en/2021/11/as-condicoes-if-devem-ser-simples-de-entender/">previous post&lt;/a>, here are a couple of rules to help you deal with the negative in boolean expressions.&lt;/p></description></item><item><title>IF conditions should be simple to read</title><link>https://abapinho.com/en/2021/11/as-condicoes-if-devem-ser-simples-de-entender/</link><pubDate>Mon, 01 Nov 2021 09:00:45 +0000</pubDate><guid>https://abapinho.com/en/2021/11/as-condicoes-if-devem-ser-simples-de-entender/</guid><description>&lt;p>Because&amp;hellip;why should they be complex to read? It would only make it harder to maintain in the future.&lt;/p>
&lt;p>Just because an IF condition is complex doesn&amp;rsquo;t mean it has to be complicated.&lt;/p></description></item><item><title>SELECT with CASE</title><link>https://abapinho.com/en/2021/10/select-com-case/</link><pubDate>Mon, 25 Oct 2021 13:20:22 +0000</pubDate><guid>https://abapinho.com/en/2021/10/select-com-case/</guid><description>&lt;p>ABAP SQL is becoming more and more interesting and powerful. My latest discovery is the ability to use CASE in SELECT.&lt;/p></description></item><item><title>I already miss you Sérgio!</title><link>https://abapinho.com/en/2021/08/ja-tenho-saudades-tuas-sergio/</link><pubDate>Mon, 02 Aug 2021 09:00:55 +0000</pubDate><guid>https://abapinho.com/en/2021/08/ja-tenho-saudades-tuas-sergio/</guid><description>My dear friend Sérgio Fraga passed away.
Abapinho also belongs to him. Forever.
Thank you my friend for everything you were.</description></item><item><title>The RANGEs double negatives</title><link>https://abapinho.com/en/2021/07/as-duplas-negativas-dos-ranges/</link><pubDate>Mon, 26 Jul 2021 09:00:15 +0000</pubDate><guid>https://abapinho.com/en/2021/07/as-duplas-negativas-dos-ranges/</guid><description>&lt;p>RANGEs have interesting properties.&lt;/p></description></item><item><title>SELECT WHERE field IN (*, x)</title><link>https://abapinho.com/en/2021/07/select-where-field-in-a-b/</link><pubDate>Mon, 19 Jul 2021 09:00:53 +0000</pubDate><guid>https://abapinho.com/en/2021/07/select-where-field-in-a-b/</guid><description>&lt;p>Ok let&amp;rsquo;s go slowly on this one.&lt;/p>
&lt;p>Picture a scenario in which you have a customizing table with several levels of detail which may or may not be defined:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>BUKRS (empresa)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>WERKS (plant)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>LGORT (depósito)&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>When one of the fields is empty, we treat it as a wildcard, meaning all values are valid.&lt;/p></description></item><item><title>Insert without raising exception in internal table with unique key</title><link>https://abapinho.com/en/2021/07/insert-into-table/</link><pubDate>Mon, 05 Jul 2021 09:00:51 +0000</pubDate><guid>https://abapinho.com/en/2021/07/insert-into-table/</guid><description>&lt;p>How many times in your ABAP consultant life did you have to deal with dumps happening as a consequence of a program trying to insert duplicate lines into an internal table defined with a UNIQUE KEY?&lt;/p>
&lt;p>Enough.&lt;/p></description></item><item><title>Manually populate a LISTBOX</title><link>https://abapinho.com/en/2021/06/popula-manulamente-listbox/</link><pubDate>Mon, 14 Jun 2021 12:47:10 +0000</pubDate><guid>https://abapinho.com/en/2021/06/popula-manulamente-listbox/</guid><description>&lt;p>In 2012 I &lt;a href="https://abapinho.com/en/2012/10/ninguemligaaolistbox/">wondered why LISTBOX is so rarely used&lt;/a>. I taught how to use it with standard data elements, which automatically populate it. Today I&amp;rsquo;ll teach you how you can populate it yourself.&lt;/p></description></item><item><title>SELECTION-SCREEN FUNCTION KEY N</title><link>https://abapinho.com/en/2021/06/selection-screen-function-key-n/</link><pubDate>Mon, 07 Jun 2021 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2021/06/selection-screen-function-key-n/</guid><description>&lt;p>There&amp;rsquo;s so many things you can do on the selection screen. Here&amp;rsquo;s another one: five buttons in the toolbar.&lt;/p></description></item><item><title>Send emails to a distribution list</title><link>https://abapinho.com/en/2021/05/lista-de-distribuicao/</link><pubDate>Mon, 31 May 2021 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2021/05/lista-de-distribuicao/</guid><description>&lt;p>When you need to send an email to multiple email addresses, the usual approach is to store that list of email addresses in a custom table and then add each one as recipient to the BCS request.&lt;/p>
&lt;p>But I recently learned a much nicer way to achieve the same result.&lt;/p></description></item><item><title>Change selection screen texts without hard coding them</title><link>https://abapinho.com/en/2021/05/manipula-textos-de-seleccao/</link><pubDate>Mon, 24 May 2021 09:00:11 +0000</pubDate><guid>https://abapinho.com/en/2021/05/manipula-textos-de-seleccao/</guid><description>&lt;p>Even though many ABAP programmers tend to forget this, the less texts you hard code in your program the simpler it will be to translate it.&lt;/p>
&lt;p>Here&amp;rsquo;s a simple but rather obscure way to manipulate selection screen texts while still being able to translate then. This way you can, for example, prefix them with icons.&lt;/p></description></item><item><title>Call RFC functions AS SEPARATE UNIT</title><link>https://abapinho.com/en/2021/05/as-separate-unit/</link><pubDate>Mon, 17 May 2021 09:00:43 +0000</pubDate><guid>https://abapinho.com/en/2021/05/as-separate-unit/</guid><description>Imagine that you are calling an RFC function module several times in a row. Maybe you think that each call is completely independent from the others. It is not. The remote function group remains in memory and so does its global data. That global data will be reused on every call.
This is probably irrelevant in most cases. But there will be scenarios in which, for some reason, the function module being called is storing data in global variables which will negatively affect the outcome of the subsequent calls.</description></item><item><title>Local dummy functions named after remote RFC functions</title><link>https://abapinho.com/en/2021/05/funcoes-manequins/</link><pubDate>Mon, 10 May 2021 09:00:54 +0000</pubDate><guid>https://abapinho.com/en/2021/05/funcoes-manequins/</guid><description>I recently started working in a new customer and noticed something they do here which I really liked. Whenever they need to call a remote function module by RFC in another SAP system, they create a local function module with the same name and leave it empty, except for a comment explaining that it is a dummy function for that remote function call.
Thanks to this simple trick, one can use the where-used tool to find out where it is being called.</description></item><item><title>Goodbye Evernote, hello Osidian</title><link>https://abapinho.com/en/2020/12/obsidian/</link><pubDate>Thu, 17 Dec 2020 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2020/12/obsidian/</guid><description>&lt;p>After 10 years using Evernote, this year I finally started looking for better alternatives. At first Evernote was great. But it never evolved and the world moved on. So many new concepts have appeared: &lt;a href="https://joelhooks.com/digital-garden">jardins digitais&lt;/a>, &lt;a href="https://www.youtube.com/watch?v=n7xrHPpTWJ0">backlinks&lt;/a>, &lt;a href="https://en.wikipedia.org/wiki/Zettelkasten">Zettelkasten&lt;/a>, &lt;a href="https://notes.andymatuschak.org/Evergreen_notes">Evergreen notes&lt;/a>, &lt;a href="https://www.youtube.com/watch?v=WUq8Pun28FI">MOCs&lt;/a>, etc. And Evernote is still the same, forcing you to be a &lt;a href="https://www.linkingyourthinking.com">note taker instead of a note maker&lt;/a>.&lt;/p></description></item><item><title>Reset SAP note implementation</title><link>https://abapinho.com/en/2020/08/desfazer-implementacao-de-nota-sap/</link><pubDate>Thu, 13 Aug 2020 09:00:32 +0000</pubDate><guid>https://abapinho.com/en/2020/08/desfazer-implementacao-de-nota-sap/</guid><description>&lt;p>I remember when SAP notes had to be inserted by hand. Copy paste and pray that no mistake was made. Wild.&lt;/p>
&lt;p>I actually remember a project which, for some strange obscure reason, instead of upgrading, decided to implement hundreds and hundreds of notes by hand. They printed them all and made a huge pile of paper and about 10 ABAP consultants spent the whole weekend trying to process the whole pile. We did it. But I have no idea what were the consequences and how many bugs were introduced. Many for sure.&lt;/p></description></item><item><title>Farewell Evernote, hello Notion</title><link>https://abapinho.com/en/2020/07/notion/</link><pubDate>Wed, 15 Jul 2020 11:20:11 +0000</pubDate><guid>https://abapinho.com/en/2020/07/notion/</guid><description>&lt;p>&lt;a href="https://abapinho.com/en/2010/04/evernote/">One of the first posts in Abapinho was about Evernote&lt;/a>. Well, it was actually about the importance of taking notes. But it suggested Evernote was the best tool for the job.&lt;/p>
&lt;p>It feels like yesterday but this was 10 years ago. 10 years using Evernote to take notes. Unfortunately whoever makes Evernote probably stopped taking notes many years ago because, since then, Evernote hardly evolved. Actually, it got worse, especially in its iOS version. After 10 years, they weren&amp;rsquo;t even able to (try to?) make a decent table editor. They&amp;rsquo;re either lazy or dumb.&lt;/p></description></item><item><title>Table lookup without having to deal with CX_SY_ITAB_LINE_NOT_FOUND</title><link>https://abapinho.com/en/2020/06/lookup-em-tabela-sem-ter-de-lidar-com-a-excepcao-cx_sy_itab_line_not_found/</link><pubDate>Mon, 15 Jun 2020 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2020/06/lookup-em-tabela-sem-ter-de-lidar-com-a-excepcao-cx_sy_itab_line_not_found/</guid><description>&lt;p>Before the modernization of ABAP in 7.40, a table lookup required an auxiliary variable and at least 4 lines of code.&lt;/p></description></item><item><title>Convert amount to numeric external format</title><link>https://abapinho.com/en/2020/06/converter-montante-para-formato-externo-numerico/</link><pubDate>Tue, 02 Jun 2020 09:09:10 +0000</pubDate><guid>https://abapinho.com/en/2020/06/converter-montante-para-formato-externo-numerico/</guid><description>&lt;p>As is well known, SAP stores amounts internally in variables with 2 decimal places. When we want to convert it to its external format, we use WRITE with the CURRENCY option. But WRITE writes to an alphanumeric variable. What if we need to write it to a numeric variable?&lt;/p></description></item><item><title>Quick Cut and Paste</title><link>https://abapinho.com/en/2020/05/cortar-e-inserir-rapidamente/</link><pubDate>Tue, 26 May 2020 09:00:36 +0000</pubDate><guid>https://abapinho.com/en/2020/05/cortar-e-inserir-rapidamente/</guid><description>&lt;p>I learned yet another small obscure SAPGui functionality. How to speed up copy and paste.&lt;/p></description></item><item><title>Clean ABAP</title><link>https://abapinho.com/en/2020/05/clean-abap/</link><pubDate>Wed, 13 May 2020 12:54:21 +0000</pubDate><guid>https://abapinho.com/en/2020/05/clean-abap/</guid><description>&lt;p>For many years, when confronted with ABAP OO, most ABAPers I talked to, acknowledged that OO is great for most languages but never saw any real advantage in adopting it for ABAP. So they carry on using FORMs, INCLUDEs and CALL FUNCTIONs. The standard SAP code sets the example by trying to make something work while breaking every possible programming best practice.&lt;/p></description></item><item><title>NOT</title><link>https://abapinho.com/en/2020/04/nao/</link><pubDate>Tue, 28 Apr 2020 12:08:03 +0000</pubDate><guid>https://abapinho.com/en/2020/04/nao/</guid><description>&lt;p>No,
ABAP
&lt;a href="https://blogs.sap.com/2014/09/29/abap-news-for-740-sp08-logical-expressions/#comment-82607">will never have&lt;/a>
the NOT operator.&lt;/p></description></item><item><title>MOVE-CORRESPONDING between two tables with automatic look up</title><link>https://abapinho.com/en/2020/03/move-corresponding-entre-duas-tabelas-respeitando-a-chave/</link><pubDate>Mon, 23 Mar 2020 09:00:04 +0000</pubDate><guid>https://abapinho.com/en/2020/03/move-corresponding-entre-duas-tabelas-respeitando-a-chave/</guid><description>&lt;p>Abapinho hasn&amp;rsquo;t been talking a lot about 7.40 because most of the new possibilities have already been widely discussed in other sites and we don&amp;rsquo;t want to reinvent the wheel.&lt;/p>
&lt;p>But, here and there, I find small useful jewels which seem to still be under the radar. This is one of them.&lt;/p></description></item><item><title>Get unique values of an internal table field</title><link>https://abapinho.com/en/2020/03/obtem-valores-unicos-de-campo-de-tabela-interna/</link><pubDate>Mon, 16 Mar 2020 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2020/03/obtem-valores-unicos-de-campo-de-tabela-interna/</guid><description>&lt;p>In SQL you can get a list of unique values of a field using DISTINCT. When the data is already in an internal table, before ABAP 7.40 you had to use a LOOP and a COLLECT.&lt;/p>
&lt;p>But now that we live in more modern times, there is a simpler and more elegant way to achieve the same with a single command.&lt;/p></description></item><item><title>How to render CL_GUI_ALV_GRID in background</title><link>https://abapinho.com/en/2020/03/como-correr-uma-cl_gui_alv_grid-em-background/</link><pubDate>Mon, 09 Mar 2020 09:00:48 +0000</pubDate><guid>https://abapinho.com/en/2020/03/como-correr-uma-cl_gui_alv_grid-em-background/</guid><description>&lt;p>Someone decided to run an editable ALV (based on CL_GUI_ALV_GRID) in background. It dumped. The solution is simple but not that obvious.&lt;/p></description></item><item><title>Use CL_GUI_ALV_GRID without having to create a screen</title><link>https://abapinho.com/en/2020/03/usa-cl_gui_alv_grid-sem-ter-de-criar-um-ecra/</link><pubDate>Mon, 02 Mar 2020 09:00:14 +0000</pubDate><guid>https://abapinho.com/en/2020/03/usa-cl_gui_alv_grid-sem-ter-de-criar-um-ecra/</guid><description>&lt;p>Nowadays I rarely use CL_GUI_ALV_GRID because SALV is so much better. But when I am asked to make an editable ALV I still use it. Until very recently, I thought that, in order to use it, I needed a screen with a container. And because I&amp;rsquo;m using ABAP OO, I&amp;rsquo;d need a function group to host it and a function module to call it. Painful.&lt;/p></description></item><item><title>How to resize an ALV grid to fill the whole window</title><link>https://abapinho.com/en/2020/02/como-fazer-uma-alv-grid-ocupar-a-janela-inteira/</link><pubDate>Mon, 10 Feb 2020 13:22:15 +0000</pubDate><guid>https://abapinho.com/en/2020/02/como-fazer-uma-alv-grid-ocupar-a-janela-inteira/</guid><description>&lt;p>Sometimes the simplest things take the longest time to do. For instance, we recently needed an ALV grid to automatically resize to fill the whole window. But how? But how? But how?&lt;/p></description></item><item><title>All SAP demo code under the same roof</title><link>https://abapinho.com/en/2020/01/demos-da-sap-todos-juntos/</link><pubDate>Thu, 23 Jan 2020 09:00:03 +0000</pubDate><guid>https://abapinho.com/en/2020/01/demos-da-sap-todos-juntos/</guid><description>&lt;p>When I was a little boy, back in the 80&amp;rsquo;s, I had to type &lt;code>LOAD &amp;quot;&amp;quot;&lt;/code> and then wait for several minutes staring at stripes in a TV and listening to strange noises before a ZX Spectrum game was ready to be played. Many years later, when I already had a PC, I found an emulator which had a menu with hundreds of ZX Spectrum games. I just had to pick one from the list and start playing immediately.&lt;/p></description></item><item><title>I started using " instead of * for comments</title><link>https://abapinho.com/en/2020/01/passei-a-comentar-com-aspas/</link><pubDate>Wed, 15 Jan 2020 09:00:18 +0000</pubDate><guid>https://abapinho.com/en/2020/01/passei-a-comentar-com-aspas/</guid><description>&lt;p>I have always used * to comment my code. I only used &amp;quot; for pseudo-comments or to leave small comment at the end of a line.&lt;/p>
&lt;p>But I recently learned that using &amp;quot; makes much more sense.&lt;/p></description></item><item><title>abapBlame - My new open source project</title><link>https://abapinho.com/en/2019/12/abapblame/</link><pubDate>Mon, 16 Dec 2019 10:53:08 +0000</pubDate><guid>https://abapinho.com/en/2019/12/abapblame/</guid><description>&lt;p>ABAP&amp;rsquo;s versioning system is terribly bad. Besides all its faults, it doesn&amp;rsquo;t provide an easy way to determine who did what and when. &lt;a href="https://git-scm.com/">Git&lt;/a>, which is a decent versioning tool, let&amp;rsquo;s you do this through its &lt;a href="https://www.git-scm.com/docs/git-blame">git-blame&lt;/a> command.&lt;/p>
&lt;p>Due to this, many ABAP programmers got used to sign the code with their name and date every time they add, delete or modify lines in a
program. And the more that program is modified, the more difficult it becomes to read it and understand what&amp;rsquo;s there.&lt;/p></description></item><item><title>The simplest route to go from SELECT to RANGE</title><link>https://abapinho.com/en/2019/11/o-caminho-mais-curto-para-ir-de-select-a-range/</link><pubDate>Wed, 13 Nov 2019 10:21:31 +0000</pubDate><guid>https://abapinho.com/en/2019/11/o-caminho-mais-curto-para-ir-de-select-a-range/</guid><description>&lt;p>Today we&amp;rsquo;ll try to optimize the code to convert a SELECT into a RANGE&lt;/p></description></item><item><title>It's now so simple to convert a MESSAGE into an EXCEPTION</title><link>https://abapinho.com/en/2019/11/converter-message-em-exception/</link><pubDate>Mon, 04 Nov 2019 10:30:44 +0000</pubDate><guid>https://abapinho.com/en/2019/11/converter-message-em-exception/</guid><description>&lt;p>Some years agor I &lt;a href="https://abapinho.com/en/2015/06/converter-excepcao-em-classe-de-excepcao/">showed how to convert a normal MESSAGE into a typified exception&lt;/a>. Meanwhile ABAP evolved a lot and now, since version 7.40, that complex solution is no longer needed.&lt;/p></description></item><item><title>Tree of Z packages - A modest proposal</title><link>https://abapinho.com/en/2019/10/arvore-de-pacotes-z/</link><pubDate>Wed, 23 Oct 2019 09:00:46 +0000</pubDate><guid>https://abapinho.com/en/2019/10/arvore-de-pacotes-z/</guid><description>&lt;p>If you regularly read Abapinho you probably know by now that I can&amp;rsquo;t live without &lt;a href="https://abapinho.com/en/2016/11/pacotes-locais/">ABAP Package Concept&lt;/a>. Nowadays the first thing I do when starting a new development is creating an encapsulated package to hold all its objects (in the most complex scenarios, I create it as a main package and then create multiple child sub-packages).&lt;/p>
&lt;p>I lay here a modest proposal (unlike &lt;a href="https://en.wikipedia.org/wiki/A_Modest_Proposal">the original one&lt;/a>, mine is not sarcastic) to help organize thing a bit at system level.&lt;/p></description></item><item><title>Show internal table content on an ALV</title><link>https://abapinho.com/en/2019/09/alv-tabela-interna/</link><pubDate>Mon, 30 Sep 2019 09:00:54 +0000</pubDate><guid>https://abapinho.com/en/2019/09/alv-tabela-interna/</guid><description>&lt;p>I don&amp;rsquo;t know for how long has this been available but I just now found out about it. In the debugger it is, after all, super easy to see the content of an internal table in an ALV.&lt;/p></description></item><item><title>Magical shortcuts to menus</title><link>https://abapinho.com/en/2019/09/atalhos-magicos-para-menus/</link><pubDate>Tue, 10 Sep 2019 09:00:02 +0000</pubDate><guid>https://abapinho.com/en/2019/09/atalhos-magicos-para-menus/</guid><description>&lt;p>If you, who are reading this, believe that everything written in Abapinho is literally true, what I&amp;rsquo;m about to tell you will be a disappointment: when I said magical I didn&amp;rsquo;t mean that it was supernatural. It is just a nicer way of saying it is surprising and unexpected. I took this liberty just as you&amp;rsquo;d say &amp;ldquo;I could kill for a glass of water&amp;rdquo; knowing that you would never do it. Having made this clear, let&amp;rsquo;s continue.&lt;/p></description></item><item><title>Shortcut to save list local file</title><link>https://abapinho.com/en/2019/09/atalho-para-gravar-lista-em-ficheiro-local/</link><pubDate>Wed, 04 Sep 2019 09:00:54 +0000</pubDate><guid>https://abapinho.com/en/2019/09/atalho-para-gravar-lista-em-ficheiro-local/</guid><description>&lt;p>SAP is full of hidden corners rarely visited. Abapinho is happy to shed some light on them.&lt;/p>
&lt;p>The command %pc is equivalent to the menu option System/List/Save/Local file:&lt;/p></description></item><item><title>IF without IS INITIAL in boolean methods</title><link>https://abapinho.com/en/2019/08/if-sem-is-initial-em-metodos-booleanos/</link><pubDate>Tue, 27 Aug 2019 09:00:07 +0000</pubDate><guid>https://abapinho.com/en/2019/08/if-sem-is-initial-em-metodos-booleanos/</guid><description>&lt;p>My current client&amp;rsquo;s system is finally being upgraded to 7.50 and, after all these years stuck with the old ABAP, I am now finally able to enjoy the wonders introduced in 7.40.&lt;/p>
&lt;p>There are dozens of these wonders and I don&amp;rsquo;t intend to start making a post on all of them as there is already so much quality information on most of them. Besides, Abapinho always tries to write about something new or, at least, not very known.&lt;/p>
&lt;p>But this simple functionality, although not that extraordinary, pleases me: you no longer need to add IS INITIAL in an IF command when the condition is a method returning a boolean.&lt;/p></description></item><item><title>SAAB activation variants</title><link>https://abapinho.com/en/2019/07/saab-variantes/</link><pubDate>Thu, 25 Jul 2019 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2019/07/saab-variantes/</guid><description>&lt;p>Some time ago we spoke about SAAB and its advantages as a tool to analyse, debug and find problems in our code. In that article we didn&amp;rsquo;t explore an important aspect of it: Activation variants.&lt;/p></description></item><item><title>Implicit enhancements in data structures</title><link>https://abapinho.com/en/2019/05/enhancements-implicitos-em-estruturas-de-dados/</link><pubDate>Mon, 13 May 2019 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2019/05/enhancements-implicitos-em-estruturas-de-dados/</guid><description>&lt;p>We have all used implicit enhancements to add code to the beginning or end of a standard function, form or method. But you may not know that it can also be used to add fields to data structures, whether they&amp;rsquo;re declared as TYPES or directly as DATA.&lt;/p></description></item><item><title>Save XML data in an ST (Simple Transformation)</title><link>https://abapinho.com/en/2019/04/guarda-dados-xml-numa-st-simple-transformation/</link><pubDate>Mon, 01 Apr 2019 09:00:59 +0000</pubDate><guid>https://abapinho.com/en/2019/04/guarda-dados-xml-numa-st-simple-transformation/</guid><description>&lt;p>Some days ago I was using an ST (Simple Transformation) and thought that, even though its job is to convert an input into an output, it is can be used to store XML data.&lt;/p>
&lt;p>Let&amp;rsquo;s asy we have the following XML:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">&amp;lt;cocktails&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#000">cocktail&lt;/span> &lt;span style="color:#00f">id&lt;/span>=&amp;amp;&lt;span style="color:#000">quot&lt;/span>;&lt;span style="color:#00f">gt&lt;/span>&amp;amp;&lt;span style="color:#000">quot&lt;/span>; &lt;span style="color:#000">nome&lt;/span>=&amp;amp;&lt;span style="color:#000">quot&lt;/span>;&lt;span style="color:#000">Gin&lt;/span> &lt;span style="color:#000">Tonic&lt;/span>&amp;amp;&lt;span style="color:#000">quot&lt;/span>;/&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#000">cocktail&lt;/span> &lt;span style="color:#00f">id&lt;/span>=&amp;amp;&lt;span style="color:#000">quot&lt;/span>;&lt;span style="color:#000">ws&lt;/span>&amp;amp;&lt;span style="color:#000">quot&lt;/span>; &lt;span style="color:#000">nome&lt;/span>=&amp;amp;&lt;span style="color:#000">quot&lt;/span>;&lt;span style="color:#000">Whiskey&lt;/span> &lt;span style="color:#000">Sour&lt;/span>&amp;amp;&lt;span style="color:#000">quot&lt;/span>;/&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#000">cocktail&lt;/span> &lt;span style="color:#00f">id&lt;/span>=&amp;amp;&lt;span style="color:#000">quot&lt;/span>;&lt;span style="color:#000">cl&lt;/span>&amp;amp;&lt;span style="color:#000">quot&lt;/span>; &lt;span style="color:#000">nome&lt;/span>=&amp;amp;&lt;span style="color:#000">quot&lt;/span>;&lt;span style="color:#000">Campari&lt;/span> &lt;span style="color:#000">Laranja&lt;/span>&amp;amp;&lt;span style="color:#000">quot&lt;/span>;/&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">&amp;lt;/cocktails&amp;gt;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>When code smells</title><link>https://abapinho.com/en/2019/02/quando-o-codigo-cheira-mal/</link><pubDate>Mon, 25 Feb 2019 09:00:12 +0000</pubDate><guid>https://abapinho.com/en/2019/02/quando-o-codigo-cheira-mal/</guid><description>&lt;p>It happens very often that, while programming, I smell something strange. It&amp;rsquo;s usually hard to identify it right away. It usually starts like a faint fragrance. But, as I become more aware of it, eventually it starts stinking and I understand where it comes from. Even then it is not immediately clear why that particular thing smells bad.&lt;/p></description></item><item><title>You don't encapsulate for it to be reused</title><link>https://abapinho.com/en/2019/02/nao-e-para-reutilizar-que-se-encapsula/</link><pubDate>Mon, 18 Feb 2019 09:00:18 +0000</pubDate><guid>https://abapinho.com/en/2019/02/nao-e-para-reutilizar-que-se-encapsula/</guid><description>&lt;p>Since 1998, I hear some ABAPer colleagues saying that it&amp;rsquo;s not worth encapsulating a particular piece of code in a function or method because it will never be reused again. And then they go to SE38 and create yet another report full of includes.&lt;/p>
&lt;p>The idea that you should encapsulate your code for it to be reused by you or by others is one of the biggest misunderstandings of the history of our planet.&lt;/p></description></item><item><title>Refactoring: Extract method</title><link>https://abapinho.com/en/2019/01/refactorizacao-extrair-metodo/</link><pubDate>Wed, 02 Jan 2019 09:00:23 +0000</pubDate><guid>https://abapinho.com/en/2019/01/refactorizacao-extrair-metodo/</guid><description>&lt;p>In SAP&amp;rsquo;s world, ABAP code will forever stay wherever you leave it.&lt;/p>
&lt;p>On one given day, Manuel did something badly because he was on a rush or didn&amp;rsquo;t know any better. One year later António is asked to make a small change to it. António spots Manuel&amp;rsquo;s mess but he doesn&amp;rsquo;t improve it because, for some reasons, in SAP, changing something which is working, even if it&amp;rsquo;s badly implemented, is a tabu. Instead, António will add his code to the existing one and forget about it.&lt;/p>
&lt;p>This attitude, when adopted by everyone, contributes to an inevitable erosion of the system&amp;rsquo;s code which, some years later, becomes unmanageable. And still, that&amp;rsquo;s the rule.&lt;/p>
&lt;p>The way I see it, this is wrong and goes against the customer&amp;rsquo;s best interests. Actually, even if the customer doesn&amp;rsquo;t want me to modify old code because it&amp;rsquo;s working&amp;hellip; I still do it. Who is he to tell me how to program?&lt;/p></description></item><item><title>A comment on comments</title><link>https://abapinho.com/en/2018/11/comentario-sobre-comentarios/</link><pubDate>Mon, 26 Nov 2018 09:00:19 +0000</pubDate><guid>https://abapinho.com/en/2018/11/comentario-sobre-comentarios/</guid><description>&lt;p>We learn in school that all code should have comments. Then, in real life, we find that not everyone was paying attention to what was said in school. As a consequence, most code is obscure and without proper comments.&lt;/p>
&lt;p>I was always careful to comment every relevant step of my code, specially the parts which are obscure or not self-explanatory.&lt;/p>
&lt;p>But since I recently read &lt;a href="https://en.wikipedia.org/wiki/Robert_C._Martin">Uncle Bob&lt;/a>&amp;rsquo;s &lt;em>&lt;a href="https://www.goodreads.com/book/show/3735293-clean-code">Clean Code&lt;/a>&lt;/em> , my opinion on this changed. Today I believe that the less comments the better. And yet, I don&amp;rsquo;t see this as contradictory to what I used to think.&lt;/p></description></item><item><title>The multiple clocks of your SAP system</title><link>https://abapinho.com/en/2018/10/os-varios-relogios-do-teu-sistema-sap/</link><pubDate>Mon, 22 Oct 2018 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2018/10/os-varios-relogios-do-teu-sistema-sap/</guid><description>&lt;p>Even though you look at an SAP system as a whole, it is composed by several distinct and interconnected parts. There is a small standard program which checks if each part&amp;rsquo;s clock is correct and synchronised.&lt;/p>
&lt;p>It probably won&amp;rsquo;t be of much use for your daily work. Still, it&amp;rsquo;s an interesting curiosity.&lt;/p></description></item><item><title>ABAP, the lobotomizer</title><link>https://abapinho.com/en/2018/10/abap-o-lobotomizador/</link><pubDate>Mon, 15 Oct 2018 09:27:05 +0000</pubDate><guid>https://abapinho.com/en/2018/10/abap-o-lobotomizador/</guid><description>&lt;p>João studies Computer Science at his College where he learns Java, polymorphism, encapsulation and a lot of other programming techniques and best practices. When he graduates, he decides to join a company to work in SAP. At the introduction training which his new company offers, the first thing he learns is how to make a program in ABAP. Here&amp;rsquo;s how they teach it:&lt;/p>
&lt;p>_&amp;ldquo;Go to transaction SE38, create program ZJOAO and then create includes ZJOAO_TOP, ZJOAO_FRM and ZJOAO_SEL. You declare all variables in _TOP, the selection screen you put in _SEL and all the FORMS must go into &lt;em>FRM. Then write START-OF-SELECTION and under that put all the SELECTs and finally write END-OF-SELECTION and there you show the results in an ALV. It&amp;rsquo;s that simple. Welcome to ABAP.&amp;rdquo;&lt;/em>&lt;/p></description></item><item><title>Inject ABAP commands into a productive system</title><link>https://abapinho.com/en/2018/10/injectar-comandos-abap-num-sistema-produtivo/</link><pubDate>Mon, 08 Oct 2018 09:00:50 +0000</pubDate><guid>https://abapinho.com/en/2018/10/injectar-comandos-abap-num-sistema-produtivo/</guid><description>The view below shows how simple it is to create the conditions to inject ABAP commands into programs in a productive system.
I considered whether to publish this. But, as it already happened in the past, I believe it is better for this to be known because it is very important for system administrators to be aware of this so they can protect their systems against this threat.
Thank you Ricardo Monteiro for the tip.</description></item><item><title>Transport a local table with its maintenance screens</title><link>https://abapinho.com/en/2018/10/transporta-ecras-de-manutencao-de-tabela/</link><pubDate>Mon, 01 Oct 2018 12:47:47 +0000</pubDate><guid>https://abapinho.com/en/2018/10/transporta-ecras-de-manutencao-de-tabela/</guid><description>&lt;p>Some time ago you created a table and its maintenance screens as local objects.&lt;/p>
&lt;p>When, later, you regret it and decide to transport the table, how will you be able to also transport the maintenance screens?&lt;/p>
&lt;p>Transporting the maintenance screens function group together with the table is not enough.&lt;/p></description></item><item><title>Test a sequence of function modules in SE37</title><link>https://abapinho.com/en/2018/07/testa-uma-sequencia-de-funcoes-na-se37/</link><pubDate>Mon, 09 Jul 2018 09:00:17 +0000</pubDate><guid>https://abapinho.com/en/2018/07/testa-uma-sequencia-de-funcoes-na-se37/</guid><description>&lt;p>I was sure I had already posted about this before but I can&amp;rsquo;t find it so here it goes (again?).&lt;/p>
&lt;p>Some function modules save global data which must then be used by another function module belonging to the same function group. So, if you need to test them, they must run in sequence inside the same transaction.&lt;/p>
&lt;p>Everybody knows you can use SE37 to test a function module. What few people know is that you can also use SE37 to test a sequence of function modules inside the same transaction. Those who don&amp;rsquo;t know this end up creating a small program to call those functions in sequence and that&amp;rsquo;s also ok. But here&amp;rsquo;s how you can avoid that.&lt;/p></description></item><item><title>Test function module with data loaded from a file</title><link>https://abapinho.com/en/2018/06/testa-funcao-com-ficheiro/</link><pubDate>Mon, 04 Jun 2018 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2018/06/testa-funcao-com-ficheiro/</guid><description>&lt;p>Transaction SE37 lets you test function modules. Sometimes these function modules use tables. And sometimes you need to load these tables with a lot of data records. But the only way to do it is manually. Or maybe not&amp;hellip;&lt;/p>
&lt;p>Here&amp;rsquo;s a trick to do it using a file.&lt;/p></description></item><item><title>Have extra control over your selection screen</title><link>https://abapinho.com/en/2018/03/controla-ecra-seleccao/</link><pubDate>Mon, 12 Mar 2018 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2018/03/controla-ecra-seleccao/</guid><description>&lt;p>The PARAMETERS and SELECT-OPTIONS already have some configuration options. But sometimes you need more control, more customising. Interestingly, although it&amp;rsquo;s not simple nor obvious, it can be done through a standard function module.&lt;/p></description></item><item><title>Debug on a user without debug permissions</title><link>https://abapinho.com/en/2018/03/debug-sem-permissoes/</link><pubDate>Mon, 05 Mar 2018 09:00:48 +0000</pubDate><guid>https://abapinho.com/en/2018/03/debug-sem-permissoes/</guid><description>&lt;p>In a well protected system, normal users don&amp;rsquo;t have debug permissions. Very often, this makes it harder for ABAP programmers to help solve the users&amp;rsquo; problems, not being able to debug directly in their session.&lt;/p>
&lt;p>But there is a legit, albeit obscure, work-around for this problem.&lt;/p></description></item><item><title>Edit standard programs without a key</title><link>https://abapinho.com/en/2018/02/editar-objectos-standard/</link><pubDate>Mon, 12 Feb 2018 09:00:22 +0000</pubDate><guid>https://abapinho.com/en/2018/02/editar-objectos-standard/</guid><description>&lt;p>Here we are again facing a dilemma: hide something because it is dangerous and someone can do bad things using this information or teach it because it would be condescending to presume the readers are not responsible enough to know it. Dictatorships usually go for the first: burning books, censorship, etc. Abapinho like to believe that its readers are responsible people and deserve the right to know.&lt;/p>
&lt;p>Thus, here it is. No, it&amp;rsquo;s not a user manual on how to enrich uranium nor a formula for homemade nitroglycerin. But it&amp;rsquo;s something similar: a trick that allows you to change standard objects without the need for a key.&lt;/p></description></item><item><title>Edit transport requests even if they don't let you</title><link>https://abapinho.com/en/2018/01/altera-ordens-de-transporte/</link><pubDate>Mon, 22 Jan 2018 09:00:15 +0000</pubDate><guid>https://abapinho.com/en/2018/01/altera-ordens-de-transporte/</guid><description>&lt;p>As we all know, system adminstrators are very bad, cold blooded and cruel people. To prove it you just need to read the &lt;a href="http://bofharchive.com/">Bastard Operator from Hell&lt;/a>.&lt;/p>
&lt;p>We, ABAP programmers, are hopeless victims in the hands of these evil creatures.&lt;/p>
&lt;p>But not always do we have to be smashed under their hairy fingers.&lt;/p></description></item><item><title>Show values in SE16N without conversion exit</title><link>https://abapinho.com/en/2017/12/mostra-valores-nao-convertidos-na-se16n/</link><pubDate>Mon, 11 Dec 2017 09:00:35 +0000</pubDate><guid>https://abapinho.com/en/2017/12/mostra-valores-nao-convertidos-na-se16n/</guid><description>&lt;p>By default SE16N always shows the values in the external format, applying the conversion exit to all of them. Until recently, I used to go the ancient SE17 whenever I needed to see them in their internal format. But Rui Nunes told me how to do it in SE16N.&lt;/p></description></item><item><title>Serialization - Clone Dolly in ABAP</title><link>https://abapinho.com/en/2017/10/serializacao-abap/</link><pubDate>Mon, 30 Oct 2017 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2017/10/serializacao-abap/</guid><description>&lt;p>This article was written by José Vília:&lt;/p>
&lt;p>The Dolly sheep was alive in ABAP and I didn&amp;rsquo;t know about it.&lt;/p>
&lt;p>Having created a class instance, I&amp;rsquo;d like to share it with another totally independent program to use it as if the instance had been created there.&lt;/p>
&lt;p>It&amp;rsquo;s an ABAP Dolly sheep factory we&amp;rsquo;re talking about here, people. Serialization in the ABAP world.&lt;/p></description></item><item><title>Abracadabra reveals secret parameter</title><link>https://abapinho.com/en/2017/10/parametro-secreto/</link><pubDate>Mon, 23 Oct 2017 09:00:29 +0000</pubDate><guid>https://abapinho.com/en/2017/10/parametro-secreto/</guid><description>Here&amp;rsquo;s a not very orthodox wat to deal with a report&amp;rsquo;s selection screen.
Sometimes you may need to have a special parameter which you prefer to hide from normal users but still need access to. Example: a flag to activate a debug/trace mode. I&amp;rsquo;ll show you how you can do this by just typing the magic word, ABRACADABRA.
It goes like this:
DATA: unhide_parameters TYPE flag. PARAMETERS: p_debug AS CHECKBOX. AT SELECTION-SCREEN.</description></item><item><title>ALV Grid built in error protocol</title><link>https://abapinho.com/en/2017/09/alv-grid-built-in-error-protocol/</link><pubDate>Mon, 11 Sep 2017 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2017/09/alv-grid-built-in-error-protocol/</guid><description>&lt;p>We&amp;rsquo;re all lazy. It&amp;rsquo;s just human. Programmers are human. We&amp;rsquo;re often lazy when it comes to the way we program something. And usually being lazy when making a program will result in someone else having more work when maintaining it.&lt;/p>
&lt;p>Let he who is free of laziness throw the first rock.&lt;/p>
&lt;p>I won&amp;rsquo;t!&lt;/p></description></item><item><title>PlantUML - Finally UML became simple to use</title><link>https://abapinho.com/en/2017/09/plantuml-finalmente-o-uml-da-para-usar/</link><pubDate>Tue, 05 Sep 2017 09:00:59 +0000</pubDate><guid>https://abapinho.com/en/2017/09/plantuml-finalmente-o-uml-da-para-usar/</guid><description>&lt;p>&lt;strong>Foreword&lt;/strong>&lt;/p>
&lt;p>When I say that I like to use UML class diagrams to document my code, people think I&amp;rsquo;m crazy.&lt;/p>
&lt;p>&lt;strong>Introduction&lt;/strong>&lt;/p>
&lt;p>The UML has gained a bad reputation because people think that, first you make the classes diagram in UML and only then write the program. But that was in 1996, when you the good practices said the first thing to do was the whole technical spec, even if no one really did it.&lt;/p>
&lt;p>Nowadays, fortunately, we are no longer ashamed to say that the very act of programming is already in itself a way of drawing.&lt;/p></description></item><item><title>Classe para garantir segurança em programação dinâmica</title><link>https://abapinho.com/en/2017/07/classe-garantir-seguranca-programacao-dinamica/</link><pubDate>Wed, 26 Jul 2017 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2017/07/classe-garantir-seguranca-programacao-dinamica/</guid><description>&lt;p>I recently found a program which was generating an SQL statement by concatenating several variables with fixed SQL parts. But, either by not paying attention or simple ignorance, the person who did it, thought it would make sense to associate a text-symbol to each of these variables with. Something like this:&lt;/p></description></item><item><title>SALV consistency report</title><link>https://abapinho.com/en/2017/07/relatorio-consistencia-salv/</link><pubDate>Tue, 18 Jul 2017 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2017/07/relatorio-consistencia-salv/</guid><description>&lt;p>Sometimes a SALV has inconsistencies which can go unnoticed. For example, if its structure has an amount field which doesn&amp;rsquo;t have an associated currency field:&lt;/p></description></item><item><title>Go into a transaction skipping its selection screen</title><link>https://abapinho.com/en/2017/07/transaccao-sem-ecra-de-seleccao/</link><pubDate>Wed, 12 Jul 2017 09:00:53 +0000</pubDate><guid>https://abapinho.com/en/2017/07/transaccao-sem-ecra-de-seleccao/</guid><description>Once again SAPGui surprises me with yet another obscure shortcut I didn&amp;rsquo;t know about.
Let&amp;rsquo;s use the customer display transaction XD03 as an example:
Go into the transaction&amp;rsquo;s selection screen with /NXD03
Fill in the customer number an press ENTER to display its details
Do whatever it is you want to do there and get out of it
Suddenly&amp;hellip; you remember that you needed to do something else there
Instead of /NXD03 type /*XD03</description></item><item><title>Copy a Code Inspector variant to another system</title><link>https://abapinho.com/en/2017/05/copiar-variante-do-code-inspector/</link><pubDate>Mon, 08 May 2017 09:00:09 +0000</pubDate><guid>https://abapinho.com/en/2017/05/copiar-variante-do-code-inspector/</guid><description>In my current customer, I have three development systems. There used to be only one. And that&amp;rsquo;s where I customized and fine tuned the Code Inspector_ variant I use to run Abap Test Cockpit.
When the other two appeared, before manually copying the variant into them, I decided to investigate a little bit. Much to my surprise, I found in GitHun project upDOWNci which does exactly what I needed: export and import Code Inspector Now, copying the variant was a piece of cake.</description></item><item><title>Physical vs logical folders</title><link>https://abapinho.com/en/2017/03/pasta-fisica-vs-pasta-logica/</link><pubDate>Mon, 20 Mar 2017 09:00:30 +0000</pubDate><guid>https://abapinho.com/en/2017/03/pasta-fisica-vs-pasta-logica/</guid><description>&lt;p>If in your report called APP1 you need to save a file in a server folder (ex.: /export/app1/) and you don&amp;rsquo;t want it to be a selection screen parameter, how do you do it?&lt;/p></description></item><item><title>Automatically close the doors you open</title><link>https://abapinho.com/en/2017/03/close-doors-automatically/</link><pubDate>Mon, 13 Mar 2017 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2017/03/close-doors-automatically/</guid><description>You&amp;rsquo;re in the editor. You type ( or [ or { or &amp;rsquo; and SAP is dumb and doesn&amp;rsquo;t close it right away like a proper IDE would.
Well,
Click on the lower right corner icon which gives you access to the SAPGui options where you configure code templates.
In the formatting option, activate Enable Auto Brackets and voilá, SAP will now automatically close any doors you open.
I don&amp;rsquo;t see why this isn&amp;rsquo;t set by default.</description></item><item><title>ABAP used to like inverting dates</title><link>https://abapinho.com/en/2017/02/dantes-abap-gostava-inverter-datas/</link><pubDate>Mon, 27 Feb 2017 09:00:40 +0000</pubDate><guid>https://abapinho.com/en/2017/02/dantes-abap-gostava-inverter-datas/</guid><description>&lt;p>Every day I learn something new in ABAP. Sometimes I&amp;rsquo;d rather not learn them. Like this one.&lt;/p>
&lt;p>Table T056P has a date field. While SELECTing this table using the date as criteria I couldn&amp;rsquo;t get any result even though the code seemed correct. Using SE16N I found that the date range was also not working as expected: it would only should results if the final date was put in the LOW field and the initial date in the HIGH. Bizarre.&lt;/p></description></item><item><title>The transaction who wanted to call another and couldn't</title><link>https://abapinho.com/en/2017/02/a-transaccao-que-queria-chamar-outra-e-nao-podia/</link><pubDate>Mon, 06 Feb 2017 09:00:24 +0000</pubDate><guid>https://abapinho.com/en/2017/02/a-transaccao-que-queria-chamar-outra-e-nao-podia/</guid><description>&lt;p>John created transaction ZFB01 and associated it with program ZFB01 which, after doing some stuff, does a CALL TRANSACTION on FB01. Then came his friend Mike and ran transaction ZFB01.&lt;/p>
&lt;p>He managed to start running it because he had permissions to do it. But half way through he got an error because he doesn&amp;rsquo;t have permissions to run transaction FB01.&lt;/p>
&lt;p>Both John and Mike knew that the system administrators would never ever give Mike permission to run FB01.&lt;/p></description></item><item><title>ASSERT vs Exception</title><link>https://abapinho.com/en/2017/01/excepcao-vs-assert/</link><pubDate>Mon, 23 Jan 2017 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2017/01/excepcao-vs-assert/</guid><description>&lt;p>If you read Abapinho you already know how much I like exception classes. But this is not the only ABAP mechanism for dealing with errors.&lt;/p>
&lt;p>There is another one, called ASSERT, which should be used more often.&lt;/p></description></item><item><title>Get the deepest text of chained exceptions</title><link>https://abapinho.com/en/2017/01/texto-mais-profundo-de-cadeia-de-excepcoes/</link><pubDate>Mon, 16 Jan 2017 10:34:04 +0000</pubDate><guid>https://abapinho.com/en/2017/01/texto-mais-profundo-de-cadeia-de-excepcoes/</guid><description>&lt;p>If you&amp;rsquo;re not already using ABAP Objects you&amp;rsquo;re &lt;a href="https://abapinho.com/en/2012/10/mariquinhas-pe-de-salsa/">chicken&lt;/a>.&lt;/p>
&lt;p>If you use them, I do hope you&amp;rsquo;re following the &lt;a href="https://abapinho.com/en/2015/01/usaras-classes-de-excepcao/">best practice&lt;/a> of using class exceptions.&lt;/p>
&lt;p>And if you&amp;rsquo;re using class exceptions you better understand the best way of using them, particularly the &lt;a href="https://abapinho.com/en/2015/02/cadeias-de-excepcoes/">advantages of chaining them&lt;/a>.&lt;/p>
&lt;p>This said, here&amp;rsquo;s what brings us here today. In the post about &lt;a href="https://abapinho.com/en/2015/02/cadeias-de-excepcoes/">chained exceptions&lt;/a> I showed a way to get the text of the deepest exception in the chain by using a WHILE loop:&lt;/p></description></item><item><title>How to not screw up when returning a REF TO DATA</title><link>https://abapinho.com/en/2017/01/devolver-ref-to-data/</link><pubDate>Mon, 02 Jan 2017 09:00:26 +0000</pubDate><guid>https://abapinho.com/en/2017/01/devolver-ref-to-data/</guid><description>&lt;p>I&amp;rsquo;ve been using more and more references in ABAP.&lt;/p>
&lt;p>I used to use REF TO only for classes but I&amp;rsquo;ve been finding more and more advantages in using them for other data types. But, just like in C++, care must be used when dealing with data references. Things can easily go very wrong.&lt;/p>
&lt;p>In this article, I&amp;rsquo;ll try to show you how to use and how not to use REF TO DATA. Let&amp;rsquo;s start by an example of how not to do it.&lt;/p></description></item><item><title>The curious case of the partially protected structure</title><link>https://abapinho.com/en/2016/12/o-estranho-caso-da-estrutura-parcialmente-protegida/</link><pubDate>Mon, 26 Dec 2016 09:00:10 +0000</pubDate><guid>https://abapinho.com/en/2016/12/o-estranho-caso-da-estrutura-parcialmente-protegida/</guid><description>&lt;p>The other day I was trying (and failing) to modify a line of a SORTED TABLE.&lt;/p></description></item><item><title>Weird things happen when you pass SY-TABIX as a parameter</title><link>https://abapinho.com/en/2016/12/sy-tabix-por-parametro/</link><pubDate>Mon, 19 Dec 2016 09:00:47 +0000</pubDate><guid>https://abapinho.com/en/2016/12/sy-tabix-por-parametro/</guid><description>The other day a very strange thing happened to me. I was sending SY-TABIX as a parameter into a method. Before the call it contained 1 but, once inside, the parameter&amp;rsquo;s value was 0. Weird.
o_thingalizer-&amp;gt;very_strange_thing(sy-tabix). I was hearing &amp;ldquo;Why?! Why?!&amp;rdquo; repeatedly inside my head.
But suddenly I understood it!
When you send some field of the SYST as a by parameter you have to pass it by value and not by reference.</description></item><item><title>Convert class exception to BAPIRET2</title><link>https://abapinho.com/en/2016/12/converte-classe-excepcao-numa-bapiret2/</link><pubDate>Mon, 12 Dec 2016 09:00:06 +0000</pubDate><guid>https://abapinho.com/en/2016/12/converte-classe-excepcao-numa-bapiret2/</guid><description>&lt;p>Some time ago I wrote an article explaining a way to automatically &lt;a href="https://abapinho.com/en/2015/06/converter-excepcao-em-classe-de-excepcao/">convert classic exceptions to exception classes&lt;/a>. Today I use this technique in almost all the exception classes that I create (and I&amp;rsquo;ve even improved it, but I&amp;rsquo;ll leave that for another post).&lt;/p>
&lt;p>This tip explains the exact opposite.&lt;/p></description></item><item><title>Ignore indentions when comparing version</title><link>https://abapinho.com/en/2016/12/comparar-versoes-ignorando-as-indentacoes/</link><pubDate>Mon, 05 Dec 2016 09:00:31 +0000</pubDate><guid>https://abapinho.com/en/2016/12/comparar-versoes-ignorando-as-indentacoes/</guid><description>Sometimes, when comparing versions, several differences show up even when we did not make changes to the code. These differences may simply be a consequence of a Pretty Printer that altered code indentations. This makes comparing the versions confusing.
But ABAP Workbench lets you configure the diff tool to ignore indentations and even comments.
Just press F5 while there or go to the &amp;ldquo;Display Format&amp;gt; Settings&amp;rdquo; menu and adapt it to your needs:</description></item><item><title>Use a Standadrd GUI status without copying it</title><link>https://abapinho.com/en/2016/11/gui-status-standard/</link><pubDate>Mon, 28 Nov 2016 09:00:02 +0000</pubDate><guid>https://abapinho.com/en/2016/11/gui-status-standard/</guid><description>&lt;p>When you want to use CL_GUI_ALV_GRID in a CONTAINER you must copy a standard Status GUI from another program. For example, the GUI Status &amp;ldquo;STANDARD&amp;rdquo; of the function group SALV. And then, in the screen&amp;rsquo;s PAI you do:&lt;/p>
&lt;p>SET PF-STATUS &amp;lsquo;STANDARD&amp;rsquo;.&lt;/p>
&lt;p>And thus the little standard buttons show up on your screen.&lt;/p></description></item><item><title>ABAP popular saying</title><link>https://abapinho.com/en/2016/11/abap-popular-saying/</link><pubDate>Tue, 22 Nov 2016 14:09:20 +0000</pubDate><guid>https://abapinho.com/en/2016/11/abap-popular-saying/</guid><description>Don&amp;rsquo;t put off until tomorrow what you can do SY-DATUM.</description></item><item><title>Create templates in SE80 by dragging stuff into the code</title><link>https://abapinho.com/en/2016/11/modelos-na-se80-arrastando-para-o-codigo/</link><pubDate>Mon, 14 Nov 2016 09:00:26 +0000</pubDate><guid>https://abapinho.com/en/2016/11/modelos-na-se80-arrastando-para-o-codigo/</guid><description>&lt;p>While coding, it&amp;rsquo;s always good to have ways to speed up what we&amp;rsquo;re doing. A good one is automatic generation of templates for function and method calls.&lt;/p>
&lt;p>I know 3 ways to achieve this.&lt;/p></description></item><item><title>Local $PACKAGES</title><link>https://abapinho.com/en/2016/11/pacotes-locais/</link><pubDate>Mon, 07 Nov 2016 09:00:37 +0000</pubDate><guid>https://abapinho.com/en/2016/11/pacotes-locais/</guid><description>&lt;p>Any object created in SAP must belong to a package.&lt;/p>
&lt;p>Until recently, whenever I needed to create a program for a quick test I&amp;rsquo;d put it in the $TMP package. This way I was sure that it would never be transported to another system.&lt;/p>
&lt;p>But sometimes I have the need to create stuff in the development system which, even though it should never be transported, should stay there forever. For example, development tools like ZSAPLINK and abapGit. But if we put everything under package $TMP it will soon be a big mess.&lt;/p></description></item><item><title>DDIC structure key</title><link>https://abapinho.com/en/2016/11/definir-a-chave-de-uma-estrutura-do-ddic/</link><pubDate>Wed, 02 Nov 2016 09:00:39 +0000</pubDate><guid>https://abapinho.com/en/2016/11/definir-a-chave-de-uma-estrutura-do-ddic/</guid><description>&lt;p>Today when I want to create a SALV I always create a DDIC structure with the data elements already set to show the texts I need. This avoids the need for code to manipulate the field catalog.&lt;/p></description></item><item><title>Find everything at once</title><link>https://abapinho.com/en/2016/10/find-everything-at-once/</link><pubDate>Mon, 24 Oct 2016 09:00:11 +0000</pubDate><guid>https://abapinho.com/en/2016/10/find-everything-at-once/</guid><description>&lt;p>The ABAP editor is full of functionalities yet to be discovered.&lt;/p>
&lt;p>When I do CTRL-F to search for text, the option I usually choose is &amp;ldquo;Find next&amp;rdquo;.&lt;/p></description></item><item><title>APPEND STRUCTURES do more stuff than I thought</title><link>https://abapinho.com/en/2016/10/append-structures-do-more-stuff-than-i-thought/</link><pubDate>Mon, 17 Oct 2016 09:00:06 +0000</pubDate><guid>https://abapinho.com/en/2016/10/append-structures-do-more-stuff-than-i-thought/</guid><description>&lt;p>During all my ABAPian life I was convinced that APPEND STRUCTURES had one single purpose: to add new extra fields to an existing standard table.&lt;/p>
&lt;p>But I recently learned that they let you do two more things after all:&lt;/p></description></item><item><title>INSERT wa INTO itbl REFERENCE INTO ref. Bug?</title><link>https://abapinho.com/en/2016/10/reference-into-ref-bug/</link><pubDate>Mon, 03 Oct 2016 09:00:43 +0000</pubDate><guid>https://abapinho.com/en/2016/10/reference-into-ref-bug/</guid><description>&lt;p>Every day I use more reference variables in ABAP. First I used REF TO just for classes but, as I become more familiarized with its advantages, I start using them more and more for data structures, instead of field-symbols.&lt;/p>
&lt;p>But I recently found na unfortunate behavior of the following command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">INSERT&lt;/span> &lt;span style="color:#000">wa&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">itbl&lt;/span> &lt;span style="color:#00f">REFERENCE INTO&lt;/span> &lt;span style="color:#000">ref&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Let me give you some context before I complain about it.&lt;/p></description></item><item><title>We should be accountable for the crap we make</title><link>https://abapinho.com/en/2016/09/deviamos-ser-responsabilizados/</link><pubDate>Mon, 19 Sep 2016 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2016/09/deviamos-ser-responsabilizados/</guid><description>&lt;p>If, when building a bridge, a civil engineer makes a mistake in one of the calculations, the bridge falls. But the bridge won&amp;rsquo;t fall alone. Most probably that engineer will also fall with it. He is accountable for what he did because he must sign his projects.&lt;/p>
&lt;p>ABAP programmers don&amp;rsquo;t have that kind of problems.&lt;/p></description></item><item><title>Search form methods, attributes, types, events, etc</title><link>https://abapinho.com/en/2016/08/pesquisa-metodos-atributos-tipos-eventos-etc/</link><pubDate>Wed, 24 Aug 2016 09:00:51 +0000</pubDate><guid>https://abapinho.com/en/2016/08/pesquisa-metodos-atributos-tipos-eventos-etc/</guid><description>You remember having written a method some years ago which you need now. You know it had the word MALMEQUER somewhere in its name. But what now? How will you find it?
You could use transaction SE24 to look at every class you worked on since then. But that would probably keep you busy for ages. Don&amp;rsquo;t do that.
Try using transaction SE84 instead:</description></item><item><title>Yet another way to see a method's parameters</title><link>https://abapinho.com/en/2016/08/ver-parametros-metodo/</link><pubDate>Mon, 01 Aug 2016 09:00:26 +0000</pubDate><guid>https://abapinho.com/en/2016/08/ver-parametros-metodo/</guid><description>&lt;p>Let&amp;rsquo;s say you want to call a method for which you don&amp;rsquo;t know the parameters. What do you do?&lt;/p>
&lt;p>You used to have to use the &amp;ldquo;pattern&amp;rdquo; button. Or open the class in a new window to look at the method&amp;rsquo;s parameters. But then the ABAP Editor evolved and we got &lt;a href="https://abapinho.com/en/2014/09/modelo-automatico-so-com-ctrl-space/">auto-complete&lt;/a> which made everything much more easy.&lt;/p>
&lt;p>But there is yet another way.&lt;/p></description></item><item><title>ABAP Code PushDown in HANA</title><link>https://abapinho.com/en/2016/07/abap-code-pushdown-on-sqlscript/</link><pubDate>Mon, 25 Jul 2016 09:00:10 +0000</pubDate><guid>https://abapinho.com/en/2016/07/abap-code-pushdown-on-sqlscript/</guid><description>&lt;p>[Guest post by Artur Moreira]&lt;/p>
&lt;p>From ABAP version 7.4, SAP introduced the code pushdown concept, which means using more database for calculations (data aggregation, sums and previous calculations).&lt;/p></description></item><item><title>Incremental search</title><link>https://abapinho.com/en/2016/07/pesquisa-incremental/</link><pubDate>Mon, 18 Jul 2016 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2016/07/pesquisa-incremental/</guid><description>&lt;p>When I want to search for a word in an ABAP program I usually press CTRL-F to use the normal search feature of the ABAP editor. I enter the word I want to find and then press &amp;ldquo;NEXT&amp;rdquo; to look for it.&lt;/p>
&lt;p>But there is another way. And it&amp;rsquo;s not better nor worse. Just different: the incremental search.&lt;/p></description></item><item><title>Pass internal tables by value is good</title><link>https://abapinho.com/en/2016/07/passar-tabelas-internas-valor-bom/</link><pubDate>Mon, 11 Jul 2016 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2016/07/passar-tabelas-internas-valor-bom/</guid><description>&lt;p>When a method returns a value as a RETURNING parameter this is always done by value and not by reference. Several of my methods return internal tables, some of them quite large. It always worried me the idea that, since it’s being passed by value, ABAP would be returning a copy of the internal table, impacting both performance and the program’s used memory.&lt;/p>
&lt;p>Fortunately, I recently learned that this is not​ a problem.&lt;/p></description></item><item><title>INSERT dbtab ACCEPTING DUPLICATE KEYS</title><link>https://abapinho.com/en/2016/07/insert-dbtab-accepting-duplicate-keys/</link><pubDate>Thu, 07 Jul 2016 09:00:10 +0000</pubDate><guid>https://abapinho.com/en/2016/07/insert-dbtab-accepting-duplicate-keys/</guid><description>When you try to insert a record with a key which already exists in the table the program dumps. This, in some cases, is not desirable because, even if you don&amp;rsquo;t care, it forces you to check if the keys already exist before trying to insert then.
But ABAP has a solution for these situations:
INSERT dbtab FROM TABLE itab [ACCEPTING DUPLICATE KEYS]. Don&amp;rsquo;t worry because this will not violate the first law of thermodynamics: the duplicate records are not inserted.</description></item><item><title>Export and import the ABAP Workbench settings</title><link>https://abapinho.com/en/2016/06/export-and-import-the-abap-workbench-settings/</link><pubDate>Mon, 13 Jun 2016 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2016/06/export-and-import-the-abap-workbench-settings/</guid><description>&lt;p>Sometimes a thing is right under your nose and your still don&amp;rsquo;t see it.&lt;/p>
&lt;p>At my current client I daily work with a lot of different systems. When I make a change in a setting of one system, either because I&amp;rsquo;m lazy or because I forget, I end up not applying it to all the others.&lt;/p>
&lt;p>But there is a simple way to copy all the ABAP Workbench settings at once from one system to the other.&lt;/p></description></item><item><title>Use the Split Screen Editor in the version comparison</title><link>https://abapinho.com/en/2016/06/usa-editor-tela-dividida-na-comparacao-versoes/</link><pubDate>Mon, 06 Jun 2016 09:00:57 +0000</pubDate><guid>https://abapinho.com/en/2016/06/usa-editor-tela-dividida-na-comparacao-versoes/</guid><description>By default, the ABAP version comparison tool is horrible. It displays both versions in a single column and, even though the differences are highlighted, it&amp;rsquo;s awfully confusing.
But it doesn&amp;rsquo;t have to be this way.
Press the &amp;ldquo;settings&amp;rdquo; button at the top and you&amp;rsquo;ll find that there are 3 different display modes (besides some other nice options): one-column, two-columns and, surprise, the Split Screen Editor. This is probably the option you&amp;rsquo;ll want to choose since it&amp;rsquo;s the most powerful.</description></item><item><title>Spot the differences with SE39</title><link>https://abapinho.com/en/2016/05/descobre-as-diferencas-se39/</link><pubDate>Mon, 30 May 2016 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2016/05/descobre-as-diferencas-se39/</guid><description>&lt;p>Earlier today I was doing a QC review to a new program named ZSDFAKSPE with almost 1000 lines and no comment whatsoever. An obvious clone of a standard program called SDFAKSPE.&lt;/p>
&lt;p>So I decided to use the Spli-screen editor, found in transaction SE39. Having entered both programs I could then compare them side-by-side.&lt;/p></description></item><item><title>Source-code based class development</title><link>https://abapinho.com/en/2016/05/programar-classes-baseado-texto-fonte/</link><pubDate>Mon, 23 May 2016 11:08:44 +0000</pubDate><guid>https://abapinho.com/en/2016/05/programar-classes-baseado-texto-fonte/</guid><description>Being used to develop in Java and C++, the way transaction SE24 forces you to navigate between each of its parts and the fact that every method has its own include was very confusing to me when I first started using it. Why does SAP always have to make things so complicated? I eventually got used to it.
At some point in time SE24 introduced the option source-code based which shows the class and all its methods in a single text.</description></item><item><title>Jump to your last change</title><link>https://abapinho.com/en/2016/05/jump-to-your-last-change/</link><pubDate>Wed, 18 May 2016 15:03:12 +0000</pubDate><guid>https://abapinho.com/en/2016/05/jump-to-your-last-change/</guid><description>&lt;p>Imagine that you&amp;rsquo;re editing one of those ancient programs with thousands of lines (yes because today you know that it&amp;rsquo;s wrong not to modularize (it&amp;rsquo;s a sin really) your methods (yes because today you always use methods) don&amp;rsquo;t have more than 200 lines).&lt;/p></description></item><item><title>I call you and you call me</title><link>https://abapinho.com/en/2016/05/i-call-you-and-you-call-me/</link><pubDate>Mon, 09 May 2016 18:36:30 +0000</pubDate><guid>https://abapinho.com/en/2016/05/i-call-you-and-you-call-me/</guid><description>&lt;p>You you call a function via RFC you need to provide the RFC DESTINATION for the remote system:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#f00">‘&lt;/span>&lt;span style="color:#000">ZSNEEZED&lt;/span>&lt;span style="color:#f00">’&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">DESTINATION&lt;/span> &lt;span style="color:#f00">’&lt;/span>&lt;span style="color:#000">sistema_longe_daqui&lt;/span>&lt;span style="color:#f00">’&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>What if, for some reason, the function running in the remote system needs to call a function in the original system? How would you do it?&lt;/p></description></item><item><title>Undo in debugger layout</title><link>https://abapinho.com/en/2016/05/debugger-layout-undo/</link><pubDate>Mon, 02 May 2016 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2016/05/debugger-layout-undo/</guid><description>&lt;p>Although a substantial part of an ABAP programmer time is spent debugging code, most programmers I know don&amp;rsquo;t invest much in getting to know the ABAP debugger. Maybe because they spent too many years working with its previous version which was truly archaic and worthless. But the new one can do much more than you usually ask of it. And Abapinho intends to teach you how.&lt;/p>
&lt;p>Today I&amp;rsquo;ll teach you just a simple key.&lt;/p></description></item><item><title>Debugging with baby steps</title><link>https://abapinho.com/en/2016/04/debugging-with-baby-steps/</link><pubDate>Mon, 25 Apr 2016 09:00:50 +0000</pubDate><guid>https://abapinho.com/en/2016/04/debugging-with-baby-steps/</guid><description>&lt;p>When you debug you use F5 key to move to the next statement (or go inside a sub-routine). But imagine an IF with multiple conditions:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">A&lt;/span> = &lt;span style="color:#3af">1&lt;/span> &lt;span style="color:#00f">AND&lt;/span> &lt;span style="color:#000">B&lt;/span> = &lt;span style="color:#3af">2&lt;/span> &lt;span style="color:#00f">AND&lt;/span> &lt;span style="color:#000">C&lt;/span> = &lt;span style="color:#3af">3&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WRITE&lt;/span> &lt;span style="color:#5a2">&amp;#39;I like the word glauc&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDIF&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>When you debug through that IF using F5 and one of the expressions is false you&amp;rsquo;ll step out of the IF without knowing which of the three was false.&lt;/p>
&lt;p>But the new debugger has a new very neat functionality which can help you to better understand what happened there.&lt;/p></description></item><item><title>SAP helps you translate to any language</title><link>https://abapinho.com/en/2016/04/sap-ajuda-te-traduzir-lingua/</link><pubDate>Mon, 18 Apr 2016 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2016/04/sap-ajuda-te-traduzir-lingua/</guid><description>Every once in a while I find yet another hidden SAP virtue. I just found out that there is a transaction which, for a given word in a given language, will help you translate it to another language by showing you which other translations already exist for that same word.
How cool is that? Ok, it&amp;rsquo;s not Google Translate, but it&amp;rsquo;s a nice help.
Oh, I almost forgot. The transaction is called STERM.</description></item><item><title>Native SQL</title><link>https://abapinho.com/en/2016/03/native-sql/</link><pubDate>Mon, 28 Mar 2016 09:00:01 +0000</pubDate><guid>https://abapinho.com/en/2016/03/native-sql/</guid><description>&lt;p>Sometimes ABAP SQL doesn&amp;rsquo;t allow you to do something you&amp;rsquo;d be able to do using the database&amp;rsquo;s native SQL. It can still be done.&lt;/p></description></item><item><title>GROUP BY in LOOPs on internal tables</title><link>https://abapinho.com/en/2016/03/group-by-loops-tabelas-internas/</link><pubDate>Mon, 21 Mar 2016 09:00:57 +0000</pubDate><guid>https://abapinho.com/en/2016/03/group-by-loops-tabelas-internas/</guid><description>&lt;p>We&amp;rsquo;ve all sorted internal tables to use AT NEW on a LOOP.
But starting from 7.40, we can use GROUP BY on LOOPs.&lt;/p>
&lt;p>The ability to group by values based on expressions or even methods is great.&lt;/p>
&lt;p>The grouping is done on the first LOOP and can be processed afterwards. Try running the code below and I bet you&amp;rsquo;ll be as impressed as I was.&lt;/p></description></item><item><title>Fix bug in SAP standard using an implicit enhancement</title><link>https://abapinho.com/en/2016/03/corrigir-erro-em-codigo-standard-com-enhancement-implicito/</link><pubDate>Mon, 14 Mar 2016 09:00:57 +0000</pubDate><guid>https://abapinho.com/en/2016/03/corrigir-erro-em-codigo-standard-com-enhancement-implicito/</guid><description>You just found a bug in a standard FORM (or FM or METHDO):
FORM EQUAL_VALUE CHANGING W_DATE TYPE SYDATUM. W_DATE = SY-DATUM - 1. ENDFORM. You report the error to SAP but you know it will take them several days, weeks or months to publish a correction. And you need it corrected right now.
You decide to act.
So you use the implicit enhancement at the start of the FORM to replace the standard code with your own (just until the correction arrives, of course):</description></item><item><title>Can you really do it right the first time?</title><link>https://abapinho.com/en/2016/03/saabs-assertar-primeira/</link><pubDate>Mon, 07 Mar 2016 09:00:13 +0000</pubDate><guid>https://abapinho.com/en/2016/03/saabs-assertar-primeira/</guid><description>&lt;p>Checkpoints is a very powerful ABAP framework which almost nobody uses. Why? Probably for the same reason hardly anyone listens to &lt;a href="https://pt.wikipedia.org/wiki/Sun_Ra">Sun Ra&lt;/a> and knows that &lt;a href="https://pt.wikipedia.org/wiki/Frank_Zappa">Frank Zappa&lt;/a> has 102 albums. Because, even though really good, it’s obscure and not commercial. Checkpoints are, indeed, really good and not commercial. But they should be more like Mozart and the Beach Boys which are both good and commercial.&lt;/p></description></item><item><title>STA Ticket System improve SAP incident handling times</title><link>https://abapinho.com/en/2016/02/sta-ticket-system/</link><pubDate>Mon, 29 Feb 2016 09:00:53 +0000</pubDate><guid>https://abapinho.com/en/2016/02/sta-ticket-system/</guid><description>&lt;p>Today we have a guest, Tamás Holics. He owns STA Consulting, a Hungarian company which has created 2 very interesting SAP products. In this article Tamás presents the STA Ticket System.&lt;/p>
&lt;h2 id="the-problem">The problem&lt;/h2>
&lt;p>A lot of time is wasted in SAP software testing and maintenance processes due to incomplete or incorrect error reports from users and testers. Support people (analysts, developers) usually have to ask for more information about the error. This takes a lot of valuable working time from both the reporters of the error and support people. Solving the problem is often blocked until every information is available.&lt;/p></description></item><item><title>The rot is noble after all</title><link>https://abapinho.com/en/2016/02/the-rot-is-noble-after-all/</link><pubDate>Mon, 22 Feb 2016 09:00:45 +0000</pubDate><guid>https://abapinho.com/en/2016/02/the-rot-is-noble-after-all/</guid><description>&lt;p>For many years I&amp;rsquo;ve been complaining about how backward ABAP development ecosystem is and how long it takes to evolve. Every time he heard me saying it a good friend of mine would wisely advise me to never bite the hand that feeds you.&lt;/p>
&lt;p>But how can a man not speak out?&lt;/p></description></item><item><title>Software design patterns in ABAP</title><link>https://abapinho.com/en/2016/02/padroes-de-projecto-de-software/</link><pubDate>Mon, 15 Feb 2016 09:00:26 +0000</pubDate><guid>https://abapinho.com/en/2016/02/padroes-de-projecto-de-software/</guid><description>We are constantly learning. But once in a while we learn something which is a leap forward forcing us to look in a new way to everything we do.
The last time this had happened was when I started using OO in ABAP. OO was not new to me as I had already used it extensively in Java, C#, C++, etc. But to finally be able to apply these precious concepts on my daily job was a relief and a big improvement in the quality, flexibility and speed of my work.</description></item><item><title>Disable value history for a single field</title><link>https://abapinho.com/en/2016/02/inibe-o-historico-de-valores-para-um-so-campo/</link><pubDate>Mon, 08 Feb 2016 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2016/02/inibe-o-historico-de-valores-para-um-so-campo/</guid><description>&lt;p>SapGUI usually keeps a history of the last values entered on each field. This is usually a good thing. But you may very well not want it to happen (in case you&amp;rsquo;re entering pornographic values in a specific field for example). You could always turn it off globally in the SapGUI settings.&lt;/p>
&lt;p>But what if you just want to disable it in one particular field? Abapinho tells you how to do it.&lt;/p></description></item><item><title>Add parameters to standard methods and functions</title><link>https://abapinho.com/en/2016/02/acrescenta-parametros-a-metodos-e-funcoes-standard/</link><pubDate>Mon, 01 Feb 2016 09:00:50 +0000</pubDate><guid>https://abapinho.com/en/2016/02/acrescenta-parametros-a-metodos-e-funcoes-standard/</guid><description>&lt;p>We are all aware of SAP implicit enhancements which allow you to add code to the top or bottom of any block of standard code (methods, functions, etc). We&amp;rsquo;ve all used it to make a change to a BAPI or other standard piece of code.&lt;/p>
&lt;p>But only recently did I find that you can also use these implicit enhancements to add parameters to standard methods and functions.&lt;/p></description></item><item><title>ZTOAD - Editor de SQL</title><link>https://abapinho.com/en/2016/02/ztoad-editor-de-sql/</link><pubDate>Mon, 01 Feb 2016 09:00:10 +0000</pubDate><guid>https://abapinho.com/en/2016/02/ztoad-editor-de-sql/</guid><description>Toad is a very famous SQL tool which allows you to build and execute SQL queries in an easy and interactive way. And now, thanks to Mr. Sébastien HERMANN, SAP has a simplified version of this wonderful tool.
I&amp;rsquo;ll let him explain.
Thank you Sérgio Fraga for spotting this.
Greetings from Abapinho.</description></item><item><title>Internal table secondary indexes</title><link>https://abapinho.com/en/2016/01/indices-secundarios-em-tabelas-internas/</link><pubDate>Mon, 25 Jan 2016 09:00:47 +0000</pubDate><guid>https://abapinho.com/en/2016/01/indices-secundarios-em-tabelas-internas/</guid><description>&lt;p>This is how internal tables used to be declared:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">itbl&lt;/span> &lt;span style="color:#00f">TYPE TABLE OF&lt;/span> &lt;span style="color:#000">bkpf&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Program the program programming</title><link>https://abapinho.com/en/2016/01/programa-a-programacao-dos-programas/</link><pubDate>Mon, 18 Jan 2016 09:00:47 +0000</pubDate><guid>https://abapinho.com/en/2016/01/programa-a-programacao-dos-programas/</guid><description>&lt;p>One of the few things that separates us humans from all the other animals is our ability to think about thoughts.&lt;/p>
&lt;p>A sparrow may think &lt;em>I&amp;rsquo;m scared, I&amp;rsquo;ll say chirp chirp chirp&lt;/em> and, as a direct consequence, whoever stands close to it will hear &lt;em>chirp chirp chirp&lt;/em>.&lt;/p></description></item><item><title>Use the "where used" tool in a program</title><link>https://abapinho.com/en/2016/01/utilizar-a-lista-de-utilizacoes-programaticamente/</link><pubDate>Mon, 11 Jan 2016 09:00:11 +0000</pubDate><guid>https://abapinho.com/en/2016/01/utilizar-a-lista-de-utilizacoes-programaticamente/</guid><description>&lt;p>The &amp;ldquo;where used&amp;rdquo; tool is very dear to any ABAP developer. Through it one can find out where a given object is used. Doesn&amp;rsquo;t look like much but we all know how important this is.&lt;/p></description></item><item><title>Class CL_GUI_FRONTEND_SERVICES</title><link>https://abapinho.com/en/2016/01/a-classe-cl_gui_frontend_services/</link><pubDate>Mon, 04 Jan 2016 09:00:43 +0000</pubDate><guid>https://abapinho.com/en/2016/01/a-classe-cl_gui_frontend_services/</guid><description>&lt;p>Class CL_GUI_FRONTEND_SERVICES is commonly used to upload and download files from and to the user&amp;rsquo;s local computer. But it can do many more good things. For example:&lt;/p></description></item><item><title>SAP can take selfies!</title><link>https://abapinho.com/en/2015/12/o-sap-sabe-tirar-selfies/</link><pubDate>Mon, 28 Dec 2015 09:00:35 +0000</pubDate><guid>https://abapinho.com/en/2015/12/o-sap-sabe-tirar-selfies/</guid><description>&lt;p>I just found out that SAP can take selfies. I still don&amp;rsquo;t see why one would need it. But that&amp;rsquo;s understandable because I never really understood the need for selfies anyway.&lt;/p>
&lt;p>Here&amp;rsquo;s how SAP can take a selfie:&lt;/p></description></item><item><title>Do you know the ASCII code for CR_LF and its buddies?</title><link>https://abapinho.com/en/2015/12/nunca-te-lembras-do-codigo-ascii-do-cr_lf-e-seus-amigos/</link><pubDate>Mon, 21 Dec 2015 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2015/12/nunca-te-lembras-do-codigo-ascii-do-cr_lf-e-seus-amigos/</guid><description>&lt;p>I don&amp;rsquo;t.&lt;/p>
&lt;p>And I don&amp;rsquo;t want to. Why waste memory on stuff like that?&lt;/p>
&lt;p>And I don&amp;rsquo;t need to because ABAP has a class just for that.&lt;/p></description></item><item><title>SELECT from a set of known values</title><link>https://abapinho.com/en/2015/12/select-de-um-conjunto-de-valores-conhecidos/</link><pubDate>Mon, 14 Dec 2015 09:00:36 +0000</pubDate><guid>https://abapinho.com/en/2015/12/select-de-um-conjunto-de-valores-conhecidos/</guid><description>&lt;p>Someone asks you to select records based on a criteria for which you&amp;rsquo;ll have a small set of known values which you&amp;rsquo;re told will never change. Did you know you can do it directly in the SELECT?&lt;/p></description></item><item><title>You can save variants in SE16N</title><link>https://abapinho.com/en/2015/12/podes-gravar-variantes-na-se16n/</link><pubDate>Mon, 07 Dec 2015 09:00:18 +0000</pubDate><guid>https://abapinho.com/en/2015/12/podes-gravar-variantes-na-se16n/</guid><description>And that&amp;rsquo;s it really. That&amp;rsquo;s the whole tip right there at the title. This has always been right under your nose but you probably never thought about it: you can save variants in SE16N. And they can even be user-specific. So useful and so little known.
Thank you Sérgio Fraga for the tip. Thank you Cloudtail for the photo.
Greetings from Abapinho.</description></item><item><title>Limitar execução em background ou foreground</title><link>https://abapinho.com/en/2015/11/limitar-execucao-em-background-ou-foreground/</link><pubDate>Mon, 30 Nov 2015 09:00:36 +0000</pubDate><guid>https://abapinho.com/en/2015/11/limitar-execucao-em-background-ou-foreground/</guid><description>&lt;p>You&amp;rsquo;ve developed a report which you know will take over 12 hours to run. So you don&amp;rsquo;t want anyone to try to run it in foreground. I&amp;rsquo;ll show you a way to make sure it doesn&amp;rsquo;t happen.&lt;/p></description></item><item><title>How to sabotage standard texts</title><link>https://abapinho.com/en/2015/11/como-sabotar-textos-standard/</link><pubDate>Mon, 23 Nov 2015 09:00:43 +0000</pubDate><guid>https://abapinho.com/en/2015/11/como-sabotar-textos-standard/</guid><description>&lt;p>Some times I don&amp;rsquo;t like the names SAP gave to things. So I change them.&lt;/p>
&lt;p>For example, one day I was very angry and thought all customers were parasites.&lt;/p>
&lt;p>So I did the following:&lt;/p></description></item><item><title>Formating variables when concatenating strings using &lt;i>pipes&lt;/i></title><link>https://abapinho.com/en/2015/11/formata-as-variaveis-ao-concatenar-strings-com-pipes/</link><pubDate>Mon, 16 Nov 2015 09:00:22 +0000</pubDate><guid>https://abapinho.com/en/2015/11/formata-as-variaveis-ao-concatenar-strings-com-pipes/</guid><description>&lt;p>Pipes are the new trend when it comes to manipulating strings:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">str&lt;/span> = |&lt;span style="color:#5a2">Hi &lt;/span>{ &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">uname&lt;/span> }&lt;span style="color:#5a2">, &lt;/span>| &amp;amp;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |&lt;span style="color:#5a2">today&amp;#39;s date is &lt;/span>{ &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">datum&lt;/span> }&lt;span style="color:#5a2">.&lt;/span>|.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Besides looking cool, it&amp;rsquo;s way more practical than using the dreaded CONCATENATE.&lt;/p>
&lt;p>But I only recently found out that you can directly apply formatting to the variables:&lt;/p></description></item><item><title>Is the GUI available?</title><link>https://abapinho.com/en/2015/11/o-gui-esta-disponivel/</link><pubDate>Mon, 09 Nov 2015 09:00:41 +0000</pubDate><guid>https://abapinho.com/en/2015/11/o-gui-esta-disponivel/</guid><description>&lt;p>To check if a program is running in background usually one takes a peek at SY-BATCH. SY-BINPT can also be used to check if the background program is a BDC session. You usually check one of these.&lt;/p>
&lt;p>There is a similar but not exactly equal question, though. How do you ask if the GUI is available? Most times both questions will have the same answer. But not always.&lt;/p>
&lt;p>It&amp;rsquo;s like saying the Sun can be seen during the day while the Moon can be seen during the night. If the sky is cloudy you won&amp;rsquo;t be seeing them.&lt;/p></description></item><item><title>How to avoid timeout when running a program</title><link>https://abapinho.com/en/2015/11/como-evitar-timeout-ao-correr-um-programa/</link><pubDate>Mon, 02 Nov 2015 09:00:52 +0000</pubDate><guid>https://abapinho.com/en/2015/11/como-evitar-timeout-ao-correr-um-programa/</guid><description>&lt;p>Usually SAP systems have a predefined time limit for running a program interactively. If the program takes longer to run than that you&amp;rsquo;ll get a runtime execution error. A dump.&lt;/p></description></item><item><title>In ABAP's name, I baptize you</title><link>https://abapinho.com/en/2015/10/eu-te-baptizo-em-nome-do-abap/</link><pubDate>Mon, 26 Oct 2015 09:00:05 +0000</pubDate><guid>https://abapinho.com/en/2015/10/eu-te-baptizo-em-nome-do-abap/</guid><description>&lt;p>When we learn ABAP, we are taught a series of rules on how to name variables. Not everyone uses the same rules but, still, some strict rules are shared between many people:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Local variables must start with L: L_BUKRS;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Global variables must start with G: G_MODE;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Internal tables must have T_: LT_MARA;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Structures must have S_: LS_MARA;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Object references must have R_: R_CUSTOMER;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>input&lt;/em> parameters must start with I, &lt;em>output&lt;/em> with O, &lt;em>changing&lt;/em> with C and &lt;em>returning&lt;/em> with R.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>And the most stupid of all, &lt;em>field-symbols&lt;/em> must start with FS_: &amp;lt;FS_MARA&amp;gt;.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>In the early XXI century those rules made some sense (except for the &lt;em>field-symbols&lt;/em> on, which was, and still is, as stupid as writing &amp;lsquo;pencil&amp;rsquo; in all our pencils). Today they don&amp;rsquo;t make much sense anymore. Let me explain.&lt;/p></description></item><item><title>Abapinho Dev Tools: Translator</title><link>https://abapinho.com/en/2015/10/abapinho-dev-tools-translator/</link><pubDate>Thu, 22 Oct 2015 14:54:11 +0000</pubDate><guid>https://abapinho.com/en/2015/10/abapinho-dev-tools-translator/</guid><description>Nuno Morais has developed another very useful tool to help simplify mass translations of most SAP objects.
The toold is not for automatic translation between two languages. Instead, it has the following features:
Export an Excel file with texts
Import an Excel file with texts
Copy texts from one language into one or more languages
Create a transport order with the changed texts
Find object dependencies which lack translations
Provides a nicer browsing interface to help on manual translation</description></item><item><title>Abapinho Dev Tools: Dependencies</title><link>https://abapinho.com/en/2015/10/abapinho-dev-tools-dependencies/</link><pubDate>Thu, 22 Oct 2015 14:37:19 +0000</pubDate><guid>https://abapinho.com/en/2015/10/abapinho-dev-tools-dependencies/</guid><description>Nuno Morais developed a very useful tool which can compare objects between systems and works much better than transaction SREPO.
Abapinho will be its official repository.
Code in GitHub.
Soon, an instruction manual. Until then, go on and try it. If you like it or have any suggestion please leave a comment here.
Thank you Nuno for having developed this and for sharing it with the world in Abapinho.
Greetings from Abapinho.</description></item><item><title>Shortcuts for making small and big letters</title><link>https://abapinho.com/en/2015/10/letras-grandes-e-letras-pequeninas/</link><pubDate>Mon, 19 Oct 2015 09:00:05 +0000</pubDate><guid>https://abapinho.com/en/2015/10/letras-grandes-e-letras-pequeninas/</guid><description>You may not even know how to program but if you&amp;rsquo;re able to type fast and know enough keyboard shortcuts everyone will think you&amp;rsquo;re an expert.
In the ABAP editor write the following word: subdermatoglyphic
Now try the following shortcuts:
CTRL+U: SUBDERMATOGLYPHIC BIG LETTERS! UPPER CASE! CTRL+L: subdermatoglyphic small letters! lower case! CTRL+J: Subdermatoglyphic The First Letter Of Each Word In Upper case! CTRL+K: sUBDERMATOGLYPHIC tHe BiG aRe NoW sMaLl AnD tHe SmAlL ArE nOw BiG!</description></item><item><title>SE16H - Aggregate data without using Excel</title><link>https://abapinho.com/en/2015/10/se16h-agrega-dados-sem-precisares-do-excel/</link><pubDate>Mon, 12 Oct 2015 09:00:57 +0000</pubDate><guid>https://abapinho.com/en/2015/10/se16h-agrega-dados-sem-precisares-do-excel/</guid><description>&lt;p>A long time ago transaction SE17 was used to look at database tables content.
They quickly felt ashamed and decided to improve it, creating SE16.
When ALV was invented, SE16N was released (although until today many people still use SE16, go figure!).&lt;/p>
&lt;p>Today I present you SE16H.&lt;/p></description></item><item><title>CONCATENATE LINES OF itbl</title><link>https://abapinho.com/en/2015/10/concatenate-lines-of-itbl/</link><pubDate>Mon, 05 Oct 2015 09:00:50 +0000</pubDate><guid>https://abapinho.com/en/2015/10/concatenate-lines-of-itbl/</guid><description>&lt;p>If you want to serialize a set of strings stored in an internal table there are two ways to do it. One is dull, the other one is full of style.&lt;/p></description></item><item><title>Modify one field in all lines of an internal table</title><link>https://abapinho.com/en/2015/08/modificar-uma-campo-em-todas-as-linhas-de-uma-tabela-interna/</link><pubDate>Mon, 31 Aug 2015 09:00:25 +0000</pubDate><guid>https://abapinho.com/en/2015/08/modificar-uma-campo-em-todas-as-linhas-de-uma-tabela-interna/</guid><description>&lt;p>What I’m about to show you is not exactly new. It &lt;a href="https://abapinho.com/en/2011/07/range-instantaneo/">has even been used&lt;/a> in Abapinho before. But since there is still a lot of people out there using LOOP to change a single field of an internal table, I thought it would be worth talking about it.&lt;/p></description></item><item><title>Bye bye READ TABLE</title><link>https://abapinho.com/en/2015/08/o-read-table-vai-desaparecer/</link><pubDate>Mon, 24 Aug 2015 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2015/08/o-read-table-vai-desaparecer/</guid><description>Pré 7.4:
DATA l_idade type i. READ TABLE lt_folk INTO ls_folk WITH KEY name = l_name. l_age = ls_folk-age. Pós 7.4:
data(l_age) = lt_folk[ name = l_name ]-age ) Thanks Sérgio Fraga for the tip.
Greeetings from Abapinho.</description></item><item><title>So much new stuff in 7.4, I don't know where to begin</title><link>https://abapinho.com/en/2015/08/tanta-coisa-nova-no-7-4-que-nao-sei-por-onde-comecar/</link><pubDate>Wed, 19 Aug 2015 09:00:19 +0000</pubDate><guid>https://abapinho.com/en/2015/08/tanta-coisa-nova-no-7-4-que-nao-sei-por-onde-comecar/</guid><description>Abapinho will slowly start posting tips specific to AS ABAP 7.4. Slowly because there are still only a few people with access to this version. But there are so many new things to tell that I feel tempted to start posting all of them.
ABAP was a flabby middle aged guy with a beer belly. It underwent major plastic surgery and now looks like a lean 20 year old kid who can party until 9am, drink 7 gin tonics and then, before going to bed, do 100 burpees just to sleep better.</description></item><item><title>Breakpoint in message from inside the debugger</title><link>https://abapinho.com/en/2015/08/breakpoint-em-mensagem-a-partir-do-depurador/</link><pubDate>Mon, 10 Aug 2015 09:00:09 +0000</pubDate><guid>https://abapinho.com/en/2015/08/breakpoint-em-mensagem-a-partir-do-depurador/</guid><description>&lt;p>You&amp;rsquo;re in the middle of a debug and want it to stop at a specific message.&lt;/p>
&lt;p>What to do?&lt;/p></description></item><item><title>Multiple OR selections in SE16N</title><link>https://abapinho.com/en/2015/08/multiplas-seleccoes-or-na-se16n/</link><pubDate>Mon, 03 Aug 2015 09:00:15 +0000</pubDate><guid>https://abapinho.com/en/2015/08/multiplas-seleccoes-or-na-se16n/</guid><description>&lt;p>If you are one of those persons who still uses SE16, this article is not for you. If you keep reading, you might find yet another reason to finally start using SE16N (as if all others were not enough already).&lt;/p>
&lt;p>Imagine that you want to select all materials whose name contains &amp;ldquo;PREGO&amp;rdquo; and whose type is &amp;ldquo;FERRAGENS&amp;rdquo;, and all materials whose name contains &amp;ldquo;GUARDANAPO&amp;rdquo; and whose type is &amp;ldquo;COMIDA&amp;rdquo;. In other words, &amp;ldquo;PREGO_NO_PAO&amp;rdquo; or &amp;ldquo;GUARDANAPO_PAPEL&amp;rdquo; won&amp;rsquo;t be part of the result set. What you want is this:&lt;/p>
&lt;p>(MATNR = “PREGO%” AND MTART = “FERR” ) OR (MATNR = “GUARDANAPO%” AND MAKT = “COMI” )&lt;/p>
&lt;p>As you know, using SE16N in a regular way (which doesn&amp;rsquo;t use what I&amp;rsquo;m about to show you) you would need to execute it twice and manually compare data, because the selection screen does not allow you to make multiple OR selections.&lt;/p>
&lt;p>Or does it?&lt;/p></description></item><item><title>DELETE vs CLEAR vs REFRESH vs FREE</title><link>https://abapinho.com/en/2015/07/delete-vs-clear-vs-refresh-vs-free/</link><pubDate>Mon, 27 Jul 2015 09:00:01 +0000</pubDate><guid>https://abapinho.com/en/2015/07/delete-vs-clear-vs-refresh-vs-free/</guid><description>&lt;p>DELETE
CLEAR
REFRESH
FREE&lt;/p>
&lt;p>These are different ways of deleting all data from an internal table. They look the same. But they aren&amp;rsquo;t.&lt;/p></description></item><item><title>CASE inside a SELECT (available soon)</title><link>https://abapinho.com/en/2015/07/case-dentro-de-select-brevemente-em-todos-os-saps/</link><pubDate>Mon, 20 Jul 2015 09:00:42 +0000</pubDate><guid>https://abapinho.com/en/2015/07/case-dentro-de-select-brevemente-em-todos-os-saps/</guid><description>Get ready because you&amp;rsquo;ll soon be running into a lot of surprises. ABAP is learning new tricks. Look at this one:
CONSTANTS: lc_menina TYPE STRING VALUE ‘GIRL&amp;#39;, lc_menino TYPE STRING VALUE ‘BOY’, lc_senhor TYPE STRING VALUE ’GENTLEMAN’, lc_senhora TYPE STRING VALUE ‘LADY’. SELECT nome, CASE WHEN sexo_id = ‘M&amp;#39; AND idade &amp;lt; 18 THEN @lc_menino WHEN sexo_id = ‘F’ AND idade &amp;lt; 18 THEN @lc_menina WHEN sexo_id = ‘M&amp;#39; AND idade &amp;gt;=18 THEN @lc_senhor WHEN sexo_id = ‘F’ AND idade &amp;gt;=18 THEN @lc_senhora END AS titulo FROM zpessoa WHERE pessoa_id = @pessoa_id INTO CORRESPONDING FIELDS OF @lt_pessoas.</description></item><item><title>Search for notes directly in Google Chrome</title><link>https://abapinho.com/en/2015/07/procura-notas-directamente-no-google-chrome/</link><pubDate>Mon, 13 Jul 2015 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2015/07/procura-notas-directamente-no-google-chrome/</guid><description>Google Chrome has an app for searching SAP notes. It&amp;rsquo;s called SAP Notes finder.
You can install it here.
Thank you Fernanda Mirabile and Talita Polanczyk for the tip.
Greetings from Abapinho.</description></item><item><title>Consider converting WRITE reports into ALVs</title><link>https://abapinho.com/en/2015/07/tenta-converter-writes-para-alvs/</link><pubDate>Mon, 06 Jul 2015 09:00:46 +0000</pubDate><guid>https://abapinho.com/en/2015/07/tenta-converter-writes-para-alvs/</guid><description>Reports still writing directly to the screen are very hard to maintain whenever changes to the layout are required. On such occasions, review the code and, if the effort involved is not too big, consider converting it to ALV. Always involve the functional people in this decision.</description></item><item><title>[:pt]Curso online grátis de depuração[:]</title><link>https://abapinho.com/en/2015/06/curso-online-gratis-de-depuracao/</link><pubDate>Thu, 25 Jun 2015 09:00:04 +0000</pubDate><guid>https://abapinho.com/en/2015/06/curso-online-gratis-de-depuracao/</guid><description>[:pt]O Pedro Lima (responsável pelo OnSAP) fez um curso online grátis a ensinar os rudimentos da depuração em ABAP. Espreitem pois está bem feito e porque estas iniciativas merecem todo o nosso apoio. Tenho a certeza de que o Pedro fará mais cursos se vir que há público interessado.
Aqui
Nota: o curso é em inglês.
O Abapinho saúda-vos [:]</description></item><item><title>No more english translations</title><link>https://abapinho.com/en/2015/06/acabou-se-o-ingles/</link><pubDate>Wed, 24 Jun 2015 18:07:21 +0000</pubDate><guid>https://abapinho.com/en/2015/06/acabou-se-o-ingles/</guid><description>Sadly, Abapinho will not be able to continue posting the English translation of the Portuguese posts. I am sorry to all the readers who don&amp;rsquo;t speak Portuguese.
Abapinho&amp;rsquo;s main goal has always been to publish ABAP content written in Portuguese. But the possibility of also publishing them in English was a great asset because it allowed us to reach a much wider audience. We were able to do it for several years because the translations were sponsored.</description></item><item><title>[:pt]CALL FUNCTION com DESTINATION ‘NONE' cria nova LUW[:]</title><link>https://abapinho.com/en/2015/06/call-function-com-destination-none-cria-nova-luw/</link><pubDate>Mon, 22 Jun 2015 09:00:57 +0000</pubDate><guid>https://abapinho.com/en/2015/06/call-function-com-destination-none-cria-nova-luw/</guid><description>[:pt]Sabias que quando invocas uma função com a opção DESTINATION ‘NONE’ estás a iniciar uma nova LUW?
Isto pode parecer apenas uma curiosidade, mas há um caso em que pode fazer toda a diferença: sabes aqueles módulos de função que ao serem chamados uma segunda vez têm um comportamento diferente da primeira vez? Isto acontece porque eles hão-de ter alterado alguma variável global ao grupo de funções. Ora se iniciares uma nova LUW quando chamares a função, o seu grupo de funções é automaticamente inicializado e assim garantes que o comportamento da função é o esperado.</description></item><item><title>[:pt]Debug de um job[:]</title><link>https://abapinho.com/en/2015/06/debug-de-um-job/</link><pubDate>Mon, 15 Jun 2015 09:00:40 +0000</pubDate><guid>https://abapinho.com/en/2015/06/debug-de-um-job/</guid><description>&lt;p>[:pt]Para fazeres &lt;em>debug&lt;/em> a um programa que faça parte de um &lt;em>job&lt;/em> faz o seguinte:&lt;/p></description></item><item><title>Converting an exception into an exception</title><link>https://abapinho.com/en/2015/06/converter-excepcao-em-classe-de-excepcao/</link><pubDate>Mon, 01 Jun 2015 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2015/06/converter-excepcao-em-classe-de-excepcao/</guid><description>&lt;p>If you’re still not using exception classes, then you’re making a mistake. Cause they are very healthy for your code. They’re not only good nutrients for the system, they also make it lean and less vulnerable to diseases.&lt;/p>
&lt;p>There are cases where you still need to deal with the old exceptions. For example, when a function module is invoked.&lt;/p>
&lt;p>In this article I am presenting a suggestion that seems a little complex, but it works very well if you need to integrate the old exceptions with exception class in a simple way. And though it is sophisticated, you only need to do it once. Once it&amp;rsquo;s done, it&amp;rsquo;s easy to use.&lt;/p></description></item><item><title>[:pt]Novo livro "UI5 para desenvolvedores SAP/ABAP"[:]</title><link>https://abapinho.com/en/2015/05/livro-ui5-para-desenvolvedores-sapabap/</link><pubDate>Wed, 27 May 2015 12:00:32 +0000</pubDate><guid>https://abapinho.com/en/2015/05/livro-ui5-para-desenvolvedores-sapabap/</guid><description>[:pt]O Flávio Pagoti, do blog ABAP101 publicou um livro em português sobre SAPUI5/OPENUI5.
Aqui está o artigo do ABAP101 a anunciar o livro. Lá encontras um link para o comprar. Custa $9,99.
A minha principal motivação quando decidi criar o Abapinho foi exactamente combater a gritante falta de conteúdos técnicos de qualidade escritos em português. Hoje as coisas estão um pouco melhores, em particular no mundo do ABAP onde há vários blogs de óptima qualidade.</description></item><item><title>Teach ABAP to juggle</title><link>https://abapinho.com/en/2015/05/processamento-paralelo/</link><pubDate>Mon, 18 May 2015 09:00:13 +0000</pubDate><guid>https://abapinho.com/en/2015/05/processamento-paralelo/</guid><description>&lt;p>What can be done when a night is not enough to complete the daily processes?&lt;/p></description></item><item><title>Thou shalt modularize, modularize, modularize</title><link>https://abapinho.com/en/2015/05/encapsularas-encapsularas-encapsularas/</link><pubDate>Mon, 11 May 2015 11:40:10 +0000</pubDate><guid>https://abapinho.com/en/2015/05/encapsularas-encapsularas-encapsularas/</guid><description>Historically ABAP programs tend to grow very loooong. All programming best practices teach us there is not a single advantage in this approach. If any routine, be it a program, a method, a function or anything else, becomes longer than 200-300 lines, question it and seriously consider refactoring it into several sub-routines. This has the added advantage of potentially increasing code reuse. But the greatest advantage is encapsulation, isolating variables in their local context, instead of having all of them together, resulting in safer and more readable code.</description></item><item><title>Thou shalt reuse, thou shalt not rewrite</title><link>https://abapinho.com/en/2015/05/reutilizaras-nao-reescreveras/</link><pubDate>Mon, 04 May 2015 09:00:28 +0000</pubDate><guid>https://abapinho.com/en/2015/05/reutilizaras-nao-reescreveras/</guid><description>If the same piece of code is repeated at least once, question yourself why and try to avoid it by creating a reusable routine. If there is more than one SELECT for the same table in a program, make sure you can’t merge them into a single one. Sometimes a smart use of RANGEs to unify parameters can avoid the need for multiple SELECTs. If the same code is used in 2 different programs, don’t repeat the code.</description></item><item><title>Thou shalt avoid global variables</title><link>https://abapinho.com/en/2015/04/evitaras-variaveis-globais/</link><pubDate>Mon, 13 Apr 2015 09:00:36 +0000</pubDate><guid>https://abapinho.com/en/2015/04/evitaras-variaveis-globais/</guid><description>The more global variables a program has, the most obscure it becomes. Please avoid them. This is a basic rule of good programming and should always be followed. Even if several variables have to be passed by parameter, it takes slightly more effort but yields a much more readable and safer code. Exceptions can be made for simple reports which run around a single internal table, which can be declared globally without compromising clarity.</description></item><item><title>How to ask if the line exists without seeming fashioned</title><link>https://abapinho.com/en/2015/04/como-perguntar-se-a-linha-existe-sem-parecer-antiquado/</link><pubDate>Mon, 06 Apr 2015 14:08:12 +0000</pubDate><guid>https://abapinho.com/en/2015/04/como-perguntar-se-a-linha-existe-sem-parecer-antiquado/</guid><description>&lt;p>Long ago, you used the expression &amp;ldquo;groovy, man&amp;rdquo;. Later came &amp;ldquo;great, man&amp;rdquo;. Then there was &amp;ldquo;cool&amp;rdquo;. Today you say &amp;ldquo;awesome&amp;rdquo;. It&amp;rsquo;s important not to get confused and not make a fool of yourself.&lt;/p>
&lt;p>And how do you ask an internal table if a line exists exists?&lt;/p></description></item><item><title>Stop the functions module's error messages</title><link>https://abapinho.com/en/2015/03/calem-se-as-mensagens-das-funcoes/</link><pubDate>Mon, 30 Mar 2015 09:00:30 +0000</pubDate><guid>https://abapinho.com/en/2015/03/calem-se-as-mensagens-das-funcoes/</guid><description>&lt;p>There are standard functions that trigger messages where they shouldn’t. And they shouldn’t because we want to use these functions in non-interactive programs and then, instead of returning the error, an error message is triggered and ruins the whole process.&lt;/p>
&lt;p>However, being aware of this problem, SAP has provided a quite elegant (but not well documented) way of solving this problem.&lt;/p></description></item><item><title>Text search in a WebDynpro</title><link>https://abapinho.com/en/2015/03/procurar-texto-numa-webdynpro/</link><pubDate>Mon, 23 Mar 2015 09:00:31 +0000</pubDate><guid>https://abapinho.com/en/2015/03/procurar-texto-numa-webdynpro/</guid><description>&lt;p>SAP doesn&amp;rsquo;t know how to do things right the first time. The WebDynpros are a good example of this. It doesn’t even let you do a text search. It&amp;rsquo;s sad.&lt;/p>
&lt;p>Fortunately Sérgio Fraga has found a way, though it’s rather laboured:&lt;/p></description></item><item><title>It's my birthday!</title><link>https://abapinho.com/en/2015/03/e-o-meu-aniversario/</link><pubDate>Thu, 19 Mar 2015 22:24:50 +0000</pubDate><guid>https://abapinho.com/en/2015/03/e-o-meu-aniversario/</guid><description>I&amp;rsquo;m 6 years old!
(Thank you Caleb Prichard for the photo)</description></item><item><title>Thou shalt always use a predefined structure with ALV</title><link>https://abapinho.com/en/2015/03/usaras-sempre-uma-estrutura-pre-definida-nas-alvs/</link><pubDate>Mon, 16 Mar 2015 09:00:30 +0000</pubDate><guid>https://abapinho.com/en/2015/03/usaras-sempre-uma-estrutura-pre-definida-nas-alvs/</guid><description>It is common to find an ALV data structure explicitly defined in the code. If this is done, the field catalog has to be manually constructed. If a predefined structure (from DDIC or declared as a TYPE) is used instead, the field catalog can be automatically built. This approach is always better and results in less code, even if the field catalog needs to be adjusted here and there. https://abapinho.com/en/2011/12/automatizar-catalogo-alv/</description></item><item><title>Thou shalt use TRANSPORTING NO FIELDS</title><link>https://abapinho.com/en/2015/03/usaras-transporting-no-fields/</link><pubDate>Mon, 09 Mar 2015 09:00:02 +0000</pubDate><guid>https://abapinho.com/en/2015/03/usaras-transporting-no-fields/</guid><description>Many times we do READ TABLE itbl or LOOP AT itbl just to do a CHECK SY-SUBRC = 0. In these cases, the actual data read is not needed. For these cases always use TRANSPORTING NO FIELDS. This way is faster and avoids having to declare a target structure.</description></item><item><title>Debugging an infinite loop already in execution</title><link>https://abapinho.com/en/2015/03/fazer-debug-a-um-ciclo-infinito-ja-em-execucao/</link><pubDate>Mon, 02 Mar 2015 09:00:22 +0000</pubDate><guid>https://abapinho.com/en/2015/03/fazer-debug-a-um-ciclo-infinito-ja-em-execucao/</guid><description>&lt;p>Imagine you have a program executing an infinite cycle or, at least, a cycle with 70x7 iterations. It is neverending, and you want to know what’s going on there.&lt;/p>
&lt;p>In the past you had to go to SM50, select the process and choose from the menu &amp;ldquo;Administration | Program | Debug&amp;rdquo;.&lt;/p>
&lt;p>But now there is a much easier way.&lt;/p></description></item><item><title>How many includes is a class made of?</title><link>https://abapinho.com/en/2015/02/de-quantos-includes-e-feita-uma-classe/</link><pubDate>Mon, 23 Feb 2015 09:00:55 +0000</pubDate><guid>https://abapinho.com/en/2015/02/de-quantos-includes-e-feita-uma-classe/</guid><description>&lt;p>No matter how many times things go around in ABAP, everything ends up in SE38. Even the methods of the ABAP classes are saved in includes.&lt;/p>
&lt;p>Sometimes, when there is a dump, it says the problem is, for example, here: CL_MESSAGE_HELPER=============CM001.&lt;/p></description></item><item><title>Unreleasing a released transport order</title><link>https://abapinho.com/en/2015/02/tornar-a-prender-uma-ordem-de-transporte-liberada/</link><pubDate>Mon, 16 Feb 2015 09:00:51 +0000</pubDate><guid>https://abapinho.com/en/2015/02/tornar-a-prender-uma-ordem-de-transporte-liberada/</guid><description>&lt;p>You’ve released a transport order because you thought everything was ready. However, one more minor modification was still missing. So now you will have to create a new order and transport both of them. What a drag.&lt;/p>
&lt;p>Don’t worry.&lt;/p></description></item><item><title>Presenting the EGSAP_TECH app</title><link>https://abapinho.com/en/2015/02/apresentando-a-app-egsap_tech/</link><pubDate>Tue, 10 Feb 2015 10:55:53 +0000</pubDate><guid>https://abapinho.com/en/2015/02/apresentando-a-app-egsap_tech/</guid><description>&lt;p>Do you know about the EGSAP_TECH app? It&amp;rsquo;s a SAP knowledge bank.&lt;/p>
&lt;p>Here is a description in the words of its own creators:&lt;/p></description></item><item><title>SELECT-OPTIONS default behavior</title><link>https://abapinho.com/en/2015/02/pre-definir-select-options/</link><pubDate>Mon, 09 Feb 2015 09:00:23 +0000</pubDate><guid>https://abapinho.com/en/2015/02/pre-definir-select-options/</guid><description>&lt;p>Abapinho received a letter.&lt;/p>
&lt;p>Mr. Abapinho,&lt;/p>
&lt;p>Everybody knows how to set default values in select options using the DEFAULT keyword. What some people may not know is that one can also set the default option, sign and even if allows for intervals or just fixed values.&lt;/p></description></item><item><title>Chained exceptions</title><link>https://abapinho.com/en/2015/02/cadeias-de-excepcoes/</link><pubDate>Mon, 02 Feb 2015 09:00:48 +0000</pubDate><guid>https://abapinho.com/en/2015/02/cadeias-de-excepcoes/</guid><description>Today I will teach you how to chain exceptions. It’s a very practical solution to a complicated, not so obvious problem.
Let’s start by describing the problem.
Imagine you are in the application BANANA. The application is quite complex. It has three modules: BANANA1, BANANA2 and BANANA3. Each one has its exception class ZCX_BANANA1, ZCX_BANANA2 and ZCX_BANANA3. Since the application is in fact well designed, all the exception classes inherit from the same ZCX_BANANA.</description></item><item><title>Ignore function module exceptions</title><link>https://abapinho.com/en/2015/01/ignorar-excepcoes-de-um-modulo-de-funcao/</link><pubDate>Mon, 26 Jan 2015 09:00:25 +0000</pubDate><guid>https://abapinho.com/en/2015/01/ignorar-excepcoes-de-um-modulo-de-funcao/</guid><description>&lt;p>When calling a function module which returns exceptions you normally give them sequential numbers like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;GO_BUT_PLEASE_COME_BACK&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">ali&lt;/span> = &lt;span style="color:#5a2">&amp;#39;To the moon&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">NOT_FOUND&lt;/span> = &lt;span style="color:#3af">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">GOT_LOST&lt;/span> = &lt;span style="color:#3af">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">OTHERS&lt;/span> = &lt;span style="color:#3af">3&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>But Code Inspector may be configured to report a warning if afterwards you are not careful to add an IF or a CASE to look at SY-SUBRC,&lt;/p></description></item><item><title>Thou shalt use exception classes</title><link>https://abapinho.com/en/2015/01/usaras-classes-de-excepcao/</link><pubDate>Thu, 22 Jan 2015 09:00:28 +0000</pubDate><guid>https://abapinho.com/en/2015/01/usaras-classes-de-excepcao/</guid><description>In classes, consider using exceptions classes over the old ones. These have great advantages and, once understood, are simple and allow for simpler code.
https://zevolving.com/2011/12/class-based-exception/</description></item><item><title>Thou shalt use readily translatable explicit literals in programs</title><link>https://abapinho.com/en/2015/01/usaras-literais-prontos-a-traduzir-nos-programas/</link><pubDate>Tue, 13 Jan 2015 10:13:48 +0000</pubDate><guid>https://abapinho.com/en/2015/01/usaras-literais-prontos-a-traduzir-nos-programas/</guid><description>In reports, instead of WRITE TEXT-001, use WRITE ‘bla bla bla’(001). This way a default text will always be there and besides the readability of the program is improved. https://abapinho.com/en/2011/11/programas-poliglotas/</description></item><item><title>Thou shalt use SALV instead of the old ALV functions</title><link>https://abapinho.com/en/2015/01/usaras-a-salv-em-vez-das-antigas-funcoes-de-alv/</link><pubDate>Thu, 08 Jan 2015 09:00:37 +0000</pubDate><guid>https://abapinho.com/en/2015/01/usaras-a-salv-em-vez-das-antigas-funcoes-de-alv/</guid><description>SALV classes are more versatile and more recent than the old function modules. So, for new ALVs always use SALV. The only exception is editable ALVs which SALV classes are still very incapable of doing. https://scn.sap.com/docs/DOC-10365 https://scn.sap.com/docs/DOC-10366</description></item><item><title>Let's concatenate</title><link>https://abapinho.com/en/2015/01/concatenemos/</link><pubDate>Mon, 05 Jan 2015 09:00:35 +0000</pubDate><guid>https://abapinho.com/en/2015/01/concatenemos/</guid><description>&lt;p>We start with two variables:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">DATA&lt;/span> &lt;span style="color:#000">word1&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">string&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">DATA&lt;/span> &lt;span style="color:#000">word2&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">string&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">phrase&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">string&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">word1&lt;/span> = &lt;span style="color:#f00">‘&lt;/span>&lt;span style="color:#000">this&lt;/span>&lt;span style="color:#f00">’&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">word2&lt;/span> = &lt;span style="color:#f00">‘&lt;/span>&lt;span style="color:#000">that&lt;/span>&lt;span style="color:#f00">’&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>And we want to concatenate them adding the word &amp;ldquo;plus&amp;rdquo; between them and, of course, separate them by space.&lt;/p></description></item><item><title>Communication by event between programmes</title><link>https://abapinho.com/en/2014/12/comunicacao-por-evento-entre-programas/</link><pubDate>Mon, 22 Dec 2014 09:00:11 +0000</pubDate><guid>https://abapinho.com/en/2014/12/comunicacao-por-evento-entre-programas/</guid><description>&lt;p>In Greek mythology, the gods’ most commonly used means of communication with mortals was rape. They would rape for no reason whatsoever.&lt;/p>
&lt;p>The closest thing we have to rape in ABAP is the command “SUBMIT”, which is also the most common way of communicating between two programmes.&lt;/p></description></item><item><title>Write in multiple lines at the same time</title><link>https://abapinho.com/en/2014/12/escrever-em-muitas-linhas-ao-mesmo-tempo/</link><pubDate>Mon, 15 Dec 2014 09:00:42 +0000</pubDate><guid>https://abapinho.com/en/2014/12/escrever-em-muitas-linhas-ao-mesmo-tempo/</guid><description>&lt;p>The ABAP editor has many curious functionalities.
You can even write in multiple lines at the same time.&lt;/p></description></item><item><title>Where is the boolean?</title><link>https://abapinho.com/en/2014/12/onde-esta-o-booleano/</link><pubDate>Wed, 10 Dec 2014 18:12:58 +0000</pubDate><guid>https://abapinho.com/en/2014/12/onde-esta-o-booleano/</guid><description>&lt;p>It&amp;rsquo;s not.&lt;/p>
&lt;p>But they - the people who make and remake the ABAP itself - are trying to mend this unfortunate situation.&lt;/p>
&lt;p>Look at this new functionality:&lt;/p></description></item><item><title>LOOP AT tbl ASSIGNING &amp;lt;line&amp;gt; CASTING</title><link>https://abapinho.com/en/2014/12/loop-at-tbl-into-linha-casting/</link><pubDate>Mon, 01 Dec 2014 09:50:19 +0000</pubDate><guid>https://abapinho.com/en/2014/12/loop-at-tbl-into-linha-casting/</guid><description>&lt;p>Did you know that you can do a LOOP on an internal table of one type into a structure of a different type?&lt;/p></description></item><item><title>INNER JOIN vs FOR ALL ENTRIES vs artificial RANGES</title><link>https://abapinho.com/en/2014/11/inner-join-vs-for-all-entries-vs-ranges-artificiais/</link><pubDate>Tue, 25 Nov 2014 09:00:13 +0000</pubDate><guid>https://abapinho.com/en/2014/11/inner-join-vs-for-all-entries-vs-ranges-artificiais/</guid><description>Since data operations are much more optimized in the database server than in ABAP, it is always better to use the first as much as possible. FOR ALL ENTRIES should only be used when INNER JOIN doesn’t give us what we need or is not possible (like with BSEG for example). Artificial ranges are also a possible alternative to FOR ALL ENTRIES but be careful not to reach the SQL parser limit.</description></item><item><title>Thou shalt not use CHECKs directly in user-exits</title><link>https://abapinho.com/en/2014/11/nao-usaras-checks-directamente-em-user-exits/</link><pubDate>Mon, 10 Nov 2014 09:00:51 +0000</pubDate><guid>https://abapinho.com/en/2014/11/nao-usaras-checks-directamente-em-user-exits/</guid><description>User-exits (and enhancements) are usually crowded with CHECKs. The tragic consequence is that, if the check fails, nothing else after it will run. Not even the standard code. Always try to correct these. Encapsulating the code inside a routine (ideally a method) is enough to render it harmless.</description></item><item><title>Block indent</title><link>https://abapinho.com/en/2014/11/indentar-em-bloco/</link><pubDate>Mon, 03 Nov 2014 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2014/11/indentar-em-bloco/</guid><description>&lt;p>To indent a block of lines do the following:&lt;/p></description></item><item><title>Thou shalt use LIKE LINE OF itbl</title><link>https://abapinho.com/en/2014/10/usaras-like-line-of-itbl/</link><pubDate>Mon, 20 Oct 2014 10:25:10 +0000</pubDate><guid>https://abapinho.com/en/2014/10/usaras-like-line-of-itbl/</guid><description>When declaring structures which will receive data from an internal table, instead of declaring its type directly, use LIKE LINE OF. This way not only it becomes clear that they are related but also, if you happen to change the type of the internal table, you won’t have to worry about updating the structure’s type.</description></item><item><title>Clearing the buffers of an SAP session</title><link>https://abapinho.com/en/2014/10/limpar-os-buffers-de-uma-sessao-sap/</link><pubDate>Mon, 13 Oct 2014 09:00:25 +0000</pubDate><guid>https://abapinho.com/en/2014/10/limpar-os-buffers-de-uma-sessao-sap/</guid><description>&lt;p>I keep learning new transaction commands. Today I learned some which solve a problem which, although rarely, has happened to me in the past.&lt;/p>
&lt;p>Did this happen to you? You make a change to a text of a data element you’re using in a table to be edited through SM30. But when you go and edit that table in SM30 the old text is still there. You activate objects, close windows, open windows, no matter what you do, the new text is not shown.&lt;/p></description></item><item><title>Thou shalt not COMMIT in user-exits</title><link>https://abapinho.com/en/2014/09/nao-faras-commit-em-user-exits/</link><pubDate>Mon, 29 Sep 2014 09:00:25 +0000</pubDate><guid>https://abapinho.com/en/2014/09/nao-faras-commit-em-user-exits/</guid><description>Never do COMMITs inside user-exits. Also, make sure any external routine you call from there doesn&amp;rsquo;t do any COMMIT either.</description></item><item><title>Automatic model just using CTRL-SPACE</title><link>https://abapinho.com/en/2014/09/modelo-automatico-so-com-ctrl-space/</link><pubDate>Mon, 22 Sep 2014 09:00:04 +0000</pubDate><guid>https://abapinho.com/en/2014/09/modelo-automatico-so-com-ctrl-space/</guid><description>&lt;p>Of course you already know the &amp;ldquo;Model&amp;rdquo; button in the ABAP editor that allows you to automatically add models for function modules, calls for methods and others.&lt;/p>
&lt;p>The new editor has now grown a bit (it’s now only 10 years behind Eclipse instead of 20) and it allows you to automatically complete some commands through the CTRL-SPACE shortcut.&lt;/p></description></item><item><title>Thou shalt consider using SM34 clusters</title><link>https://abapinho.com/en/2014/09/consideraras-usar-clusters-sm34/</link><pubDate>Thu, 11 Sep 2014 09:00:14 +0000</pubDate><guid>https://abapinho.com/en/2014/09/consideraras-usar-clusters-sm34/</guid><description>If a development requires more than one customising table consider grouping their maintenance views under a cluster. This way it will be more intuitive to maintain them. This makes even more sense if one depends on the other since in the cluster definition these relations can be explicitly defined.
Example: Como encavalitar tabelas (portuguese)</description></item><item><title>Thou shalt not SELECT *</title><link>https://abapinho.com/en/2014/09/nao-facas-select-asterisco/</link><pubDate>Thu, 04 Sep 2014 11:25:03 +0000</pubDate><guid>https://abapinho.com/en/2014/09/nao-facas-select-asterisco/</guid><description>Always try to select only the fields you’ll need. Selecting others is a waste of resources. Exception made for the use of FM *_SINGLE_READ because, even though these do select all fields, since they cache the data, they are still faster when used multiple times for the same key. If you just want to check if a record exists, select just one field, if possible the one you’re using as criteria to avoid declaring an extra variable.</description></item><item><title>Thou shalt use a constants table</title><link>https://abapinho.com/en/2014/08/usa-uma-tabela-de-constantes/</link><pubDate>Thu, 28 Aug 2014 09:00:45 +0000</pubDate><guid>https://abapinho.com/en/2014/08/usa-uma-tabela-de-constantes/</guid><description>Whenever you feel a constant value can change and you can’t add it as a user parameter, store it in ZCONSTS. This table should never be used directly. Instead, a class like ZCL_CONSTS should be created to properly access it, like shown in this article: (portuguese only)
Resist the temptation of using T900 or similar tables for this purpose. It&amp;rsquo;s true that a lot of people do it. But it&amp;rsquo;s ugly, durty and besides these tables don&amp;rsquo;t even have an adequate key because they were not designed with this in mind.</description></item><item><title>Unlocking objects in a transport request</title><link>https://abapinho.com/en/2014/08/desbloquear-objectos-numa-ordem-de-transporte/</link><pubDate>Mon, 25 Aug 2014 09:00:26 +0000</pubDate><guid>https://abapinho.com/en/2014/08/desbloquear-objectos-numa-ordem-de-transporte/</guid><description>&lt;p>When you touch an object and add it to a transport request, it becomes locked there by default. In a transport request you can also lock objects which are not yet locked in another order. But, once locked, how to unlock them?&lt;/p></description></item><item><title>Thou shalt build up and adopt toolkits with common tools</title><link>https://abapinho.com/en/2014/08/cria-e-adopta-bibliotecas-de-ferramentas-comuns/</link><pubDate>Thu, 21 Aug 2014 09:00:04 +0000</pubDate><guid>https://abapinho.com/en/2014/08/cria-e-adopta-bibliotecas-de-ferramentas-comuns/</guid><description>Code which is used very often should be made available centrally, if possible under a single package (ex: ZTOOLS) so that it’s easily identified.
There is a lot of code already available on the Internet to accomplish several common functions (ex: ABAP2XLSX). Adopt it;
For your most common tasks, develop your own tools which you can reuse and add them to the central library;
Advertise the existence of that library among your colleagues to avoid that they waste time come up with duplicate code wasting;</description></item><item><title>Put it between parentheses</title><link>https://abapinho.com/en/2014/08/mete-o-entre-parentesis/</link><pubDate>Mon, 18 Aug 2014 09:00:09 +0000</pubDate><guid>https://abapinho.com/en/2014/08/mete-o-entre-parentesis/</guid><description>Sweet little trick: when in SE38 you need to surround a word or expression with () or [] or ‘’, just select it and press ( or [ or &amp;rsquo; and it immediately becomes (it) or [it] or &amp;lsquo;it&amp;rsquo;.
Thank you Sérgio Fraga for the tip.</description></item><item><title>Thou shalt not REPLACE ‘.’ with ‘,’ just like that</title><link>https://abapinho.com/en/2014/08/nao-substituiras-simplesmente-por/</link><pubDate>Fri, 08 Aug 2014 09:00:08 +0000</pubDate><guid>https://abapinho.com/en/2014/08/nao-substituiras-simplesmente-por/</guid><description>If you need to adapt the content of a file with amounts, always take into consideration the user settings (USR01-DSCFM). If you need to convert a string to a number use FM MOVE_CHAR_TO_NUM. If you need to convert a number to a string use WRITE curr TO str [CURRENCY waers].</description></item><item><title>Thou shalt use command TABLES only when unavoidable</title><link>https://abapinho.com/en/2014/07/usaras-o-comando-tables-so-quando-inevitavel/</link><pubDate>Thu, 31 Jul 2014 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2014/07/usaras-o-comando-tables-so-quando-inevitavel/</guid><description>Using SELECT-OPTIONS is one of the very few reasons for using TABLES. For all other cases, explicitly declare a local variable for the equivalent structure. TABLES basically creates obscure global variables which increase ambiguity in the code. And global variables should be avoided anyway.</description></item><item><title>Thou shalt use FIELD-SYMBOLs instead of working areas</title><link>https://abapinho.com/en/2014/07/usaras-field-symbols-em-vez-de-variaveis-de-estrutura/</link><pubDate>Thu, 24 Jul 2014 09:00:50 +0000</pubDate><guid>https://abapinho.com/en/2014/07/usaras-field-symbols-em-vez-de-variaveis-de-estrutura/</guid><description>READ TABLE itbl ASSIGNING is always faster than READ TABLE itbl INTO wa. Besides, when making changes to internal tables, not only it doesn’t require the explicit MODIFY but it also does away with the auxiliary TABIX variable. The only situation in which a working area is better is when adding new lines to an internal table. Some people contend that working areas should still be used when no changes are to be made to the data.</description></item><item><title>Packages 2.0</title><link>https://abapinho.com/en/2014/07/pacotes-2-0/</link><pubDate>Mon, 21 Jul 2014 09:00:12 +0000</pubDate><guid>https://abapinho.com/en/2014/07/pacotes-2-0/</guid><description>&lt;p>SAP R/3 repository is a wonderful thing. A vast warehouse of data elements, structures, tables and much more, readily available to one and all. As developers, it is extremely convenient to quickly pick these elements and pull them into our programs as necessity conveys, while our string of thought remains virtually uninterrupted.
Well, not all is sunshine and roses. If you are not careful with the mushrooms you pick you might get a poisoned one.&lt;/p></description></item><item><title>Thou shalt group related parts together</title><link>https://abapinho.com/en/2014/07/agruparas-partes-que-estejam-relacionadas/</link><pubDate>Thu, 17 Jul 2014 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2014/07/agruparas-partes-que-estejam-relacionadas/</guid><description>Sometimes you find an IMPORT in the code but you have no idea where the corresponding EXPORT is. When communication is needed between programs, it should be done using a pair of methods belonging to the same class. This way, when we run into one, we’ll always know where the other one is. Anyway, try to use EXPORT/IMPORT only when unavoidable. If possible, use static class variables instead.</description></item><item><title>Contemplating the package</title><link>https://abapinho.com/en/2014/07/contemplar-o-pacote/</link><pubDate>Mon, 14 Jul 2014 08:00:25 +0000</pubDate><guid>https://abapinho.com/en/2014/07/contemplar-o-pacote/</guid><description>&lt;p>You are looking at a class in SE24, a table in SE11 or a program in SE80. Now you want to see the package of this object and its content. Until recently, I would do this: first I would look in the object&amp;rsquo;s characteristics to see its package, then open a new session, go to SE80 and write the package there.&lt;/p>
&lt;p>Now I&amp;rsquo;ve learned a much easier way.&lt;/p></description></item><item><title>Thou shalt avoid dynamic messages</title><link>https://abapinho.com/en/2014/07/evitaras-mensagens-dinamicas/</link><pubDate>Thu, 10 Jul 2014 08:30:17 +0000</pubDate><guid>https://abapinho.com/en/2014/07/evitaras-mensagens-dinamicas/</guid><description>When you need to send a dynamic message by parameter, make sure you still use the MESSAGE command, so that the “where-used” doesn’t loose track of it. When you do MESSAGE E001 INTO V_DUMMY, the message details become available in the system variables: SY-MSGNO, SY-MSGTY, etc. Also, message texts should never be hardcoded, they should always be defined in SE91. https://abapinho.com/en/2009/09/evitar-mensagens-dinamicas/ (portuguese)</description></item><item><title>Find out who transported a request</title><link>https://abapinho.com/en/2014/07/descobre-quem-transportou-uma-ordem/</link><pubDate>Mon, 07 Jul 2014 08:30:15 +0000</pubDate><guid>https://abapinho.com/en/2014/07/descobre-quem-transportou-uma-ordem/</guid><description>&lt;p>The other day, a series of things crashed in our test machine. All of a sudden, no one could work on it. We found a series of transport requests improperly transported to STMS. The user who appears to be associated with each of these requests is its owner. But is it the owner’s fault? Didn’t someone else do the transport?&lt;/p>
&lt;p>How can we find out?&lt;/p></description></item><item><title>SE16N's technical view</title><link>https://abapinho.com/en/2014/06/vista-tecnica-se16n/</link><pubDate>Mon, 30 Jun 2014 09:00:43 +0000</pubDate><guid>https://abapinho.com/en/2014/06/vista-tecnica-se16n/</guid><description>Hi. How&amp;rsquo;ve you been? How&amp;rsquo;s life? All cool? This tip is so simple that if we don&amp;rsquo;t talk for a while it will all end too quickly. The sun is shinning. It rained in the morning but now it stopped.
Moving on.
Every time I see someone still using SE16 I wonder why, since SE16N is so much better and already exists for so long. But this is not the tip.</description></item><item><title>Thou shalt not use direct code in user-exits</title><link>https://abapinho.com/en/2014/06/nao-implementaras-codigo-em-user-exits-badis-enhancements-etc/</link><pubDate>Thu, 26 Jun 2014 09:00:47 +0000</pubDate><guid>https://abapinho.com/en/2014/06/nao-implementaras-codigo-em-user-exits-badis-enhancements-etc/</guid><description>All code to be put in user-exits (BADIs, enhancements, SMOD, etc.) should be encapsulated.
It’s common for an user-exit to include multiple independent parts. Each of these parts should be encapsulated in its own method. Even if it is only one line;
This should apply to both new implementations and changes to existing code;
A change to existing code should always be seen as an opportunity to organize existing code into methods, since it will have to be tested again anyway;</description></item><item><title>Deleting packages that do not want to be deleted</title><link>https://abapinho.com/en/2014/06/apagar-pacotes-que-nao-querem-ser-apagados/</link><pubDate>Mon, 23 Jun 2014 08:30:48 +0000</pubDate><guid>https://abapinho.com/en/2014/06/apagar-pacotes-que-nao-querem-ser-apagados/</guid><description>&lt;p>When you try to delete a package where you have created objects that have meanwhile been deleted, and the package looks empty in SE80, when you try to delete it, it won’t work because it says the package still contains objects.&lt;/p>
&lt;p>For some silly reason, SE80 does not show every type of object associated with packages. In addition, when an object is deleted, its entry is often times not deleted correctly. SAP is full of shortcomings. But it’s what we have, and it’s what brings us the bacon, so let’s not say too many bad things about it.&lt;/p>
&lt;p>Abapinho has the solution for you.&lt;/p></description></item><item><title>Thou shalt not implement in classical processing blocks</title><link>https://abapinho.com/en/2014/06/nao-implementaras-blocos-de-processamento-classico/</link><pubDate>Thu, 19 Jun 2014 09:00:32 +0000</pubDate><guid>https://abapinho.com/en/2014/06/nao-implementaras-blocos-de-processamento-classico/</guid><description>Official ABAP Programming Guidelines (page 34): [When a classical processing block is required], you should immediately delegate the execution to a suitable method (see Rule 6.37, No Implementations in Function Modules and Subroutines, and Rule 6.44, No Implementations in Dialog Modules and Event Blocks).</description></item><item><title>0 is Private, 1 is Protected, 2 is Public</title><link>https://abapinho.com/en/2014/06/0-e-private-1-e-protected-2-e-public/</link><pubDate>Mon, 16 Jun 2014 08:30:50 +0000</pubDate><guid>https://abapinho.com/en/2014/06/0-e-private-1-e-protected-2-e-public/</guid><description>&lt;p>Simple tip to speed up entering data in (some) fields.&lt;/p></description></item><item><title>Thou shalt use ABAP OO whenever possible</title><link>https://abapinho.com/en/2014/06/usa-abap-oo-sempre-que-possivel/</link><pubDate>Tue, 10 Jun 2014 13:14:29 +0000</pubDate><guid>https://abapinho.com/en/2014/06/usa-abap-oo-sempre-que-possivel/</guid><description>All new developments should be implemented using ABAP Objects unless still impossible (RFC, IN UPDATE TASK, screens, etc). Existing developments, when rewritten, should also be converted to OO, if it proves to be realistic. Official ABAP Programming Guidelines (page 32) rule 3.1: Use ABAP Objects whenever possible for new and further developments. Classical processing blocks may be newly created in exceptional cases only.
pdf/why-abap-objects.pdf
https://scn.sap.com/people/thomas.jung/blog/2007/12/19/update-your-abap-development-skills-to-sap-netweaver-70
https://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+Objects</description></item><item><title>Read the texts of a program</title><link>https://abapinho.com/en/2014/06/le-os-textos-de-um-programa/</link><pubDate>Mon, 09 Jun 2014 08:30:00 +0000</pubDate><guid>https://abapinho.com/en/2014/06/le-os-textos-de-um-programa/</guid><description>An easy way of programmatically accessing the texts of any program:
DATA: t_textos TYPE TABLE OF textpool. READ TEXTPOOL sy-repid INTO t_textos LANGUAGE sy-langu STATE &amp;#39;A’. Now, you have all of the texts available in the internal table T_TEXTOS.
As if this were not enough, you can also change the texts programmatically with the following commands:
INSERT TEXTPOOL sy-repid FROM t_textos LANGUAGE sy-langu. DELETE TEXTPOOL PROGRAM LANGUAGE &amp;#39;E’. According to SAP, these last two commands are for internal use only.</description></item><item><title>SELECT within SELECT</title><link>https://abapinho.com/en/2014/05/select-dentro-de-select/</link><pubDate>Mon, 26 May 2014 09:00:03 +0000</pubDate><guid>https://abapinho.com/en/2014/05/select-dentro-de-select/</guid><description>&lt;p>ABAP programmers don&amp;rsquo;t explore the possibilities of SQL, probably for historical reasons. There are many who instead of using INNER JOINs still think it&amp;rsquo;s faster to do several SELECTs for internal tables and then process the data in ABAP. But the truth is that even if there are exceptions, the rule is: the lower the number of accesses to the database, the better the performance. And it makes sense because, after all, they were written explicitly for this; relational databases are much more adept at processing relational data than an ABAP program.&lt;/p>
&lt;p>There are of course things that, due to their complexity, cannot be done with a simple INNER JOIN. Nevertheless, some of these things can be done in a single SELECT.&lt;/p></description></item><item><title>Get information on a remote system by RFC</title><link>https://abapinho.com/en/2014/05/obter-informacao-sobre-um-sistema-remoto-por-rfc/</link><pubDate>Mon, 19 May 2014 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2014/05/obter-informacao-sobre-um-sistema-remoto-por-rfc/</guid><description>Here&amp;rsquo;s a cool mini-function to obtain some details of a remote system accessible by RFC:
RFC_SYSTEM_INFO
I cannot give any example here because it would reveal very important secret information about my client which would certainly be used by the baddies to perform industrial espionage. But it is easy to test in SE37.
Thanks to kingofthebigmacs for the photo.
Greetings from Abapinho.</description></item><item><title>Request Based Debugging</title><link>https://abapinho.com/en/2014/05/request-based-debugging/</link><pubDate>Mon, 12 May 2014 09:00:10 +0000</pubDate><guid>https://abapinho.com/en/2014/05/request-based-debugging/</guid><description>&lt;p>If you look up the UNAME system variable in &lt;em>debug&lt;/em> within a RFC call you may think it kind of odd to find a username that is not your own. What happens is that the system adopts a specific username for remote calls and a new session is started. A new session implies a new execution context and, hence, all our strategically placed &lt;em>breakpoints&lt;/em> will no longer be recognised.&lt;/p>
&lt;p>This problem can hinder a simple &lt;em>debug&lt;/em> forcing us to run through the code looking for THAT remote call to THAT particular system.&lt;/p>
&lt;p>SAP has a solution.&lt;/p></description></item><item><title>Class with loads of methods to deal with dates</title><link>https://abapinho.com/en/2014/05/classe-com-montes-de-metodos-para-lidar-com-datas/</link><pubDate>Mon, 05 May 2014 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2014/05/classe-com-montes-de-metodos-para-lidar-com-datas/</guid><description>&lt;p>There are countless standard functions to make calculations with dates. There are too many of them, they are redundant and, in many cases, they are obscure or impossible to understand. I&amp;rsquo;ve been meaning to insert an article here with a list of the most useful ones. But now it&amp;rsquo;s no longer necessary.&lt;/p></description></item><item><title>How to debug a job</title><link>https://abapinho.com/en/2014/04/faz-debug-a-um-job/</link><pubDate>Mon, 21 Apr 2014 09:00:23 +0000</pubDate><guid>https://abapinho.com/en/2014/04/faz-debug-a-um-job/</guid><description>Here&amp;rsquo;s a simple way to start debugging a job:
Go to transaction SM37;
Click on the job you want to debug;
type JDBG in the command line (without /) and press ENTER;
and&amp;hellip; bang! you&amp;rsquo;re now debugging the job.
Thank you Ricardo Monteiro for the tip. And thank you Ingolf for the photo.
Greetings from Abapinho</description></item><item><title>Shortcut for time travelling</title><link>https://abapinho.com/en/2014/04/atalho-para-viajar-no-tempo/</link><pubDate>Mon, 07 Apr 2014 09:00:35 +0000</pubDate><guid>https://abapinho.com/en/2014/04/atalho-para-viajar-no-tempo/</guid><description>Some months ago I showed how to transform the debugger into a time machine.
Today&amp;rsquo;s tip is simple but useful: there is a keyboard shortcut which makes it even simple to travel in time:
shift + F12
Just place the cursor in the line you want to travel to and then&amp;hellip; shift+F12.
Thank you Maxsuel Maia for the tip.
Greetings from Abapinho.</description></item><item><title>Use a password manager in your life</title><link>https://abapinho.com/en/2014/03/gestor-de-passwords/</link><pubDate>Mon, 24 Mar 2014 09:00:52 +0000</pubDate><guid>https://abapinho.com/en/2014/03/gestor-de-passwords/</guid><description>&lt;p>And there you go, if you read the title you know the hint.&lt;/p>
&lt;p>Now, here are some hints about the hint:&lt;/p></description></item><item><title>I'm 5 years old!</title><link>https://abapinho.com/en/2014/03/tenho-5-anos/</link><pubDate>Wed, 19 Mar 2014 16:47:07 +0000</pubDate><guid>https://abapinho.com/en/2014/03/tenho-5-anos/</guid><description>Hello, my name is Abapinho and I&amp;rsquo;m 5 years old. I&amp;rsquo;m still growing up.
Thank you to everyone who visited me during my short life and a special thank you to all those who participated with tips, ideas and posts.
Greetings from me, Abapinho.</description></item><item><title>Abapinho's best practices</title><link>https://abapinho.com/en/2014/03/boas-practicas-do-abapinho/</link><pubDate>Mon, 17 Mar 2014 09:00:54 +0000</pubDate><guid>https://abapinho.com/en/2014/03/boas-practicas-do-abapinho/</guid><description>Recently, I have compiled a set of personal best practices. I decided to share them here by creating a new category (which will soon appear on the menu to the left) into which they will be grouped. The original idea was to make a PDF file but, since they are constantly being reviewed and expanded, this was largely impractical. As such, they will be published one by one.
The goal is for these practices to be visible in their entirety as a user-friendly, accessible reference.</description></item><item><title>The ABAP detective</title><link>https://abapinho.com/en/2014/03/o-detective-do-abap/</link><pubDate>Mon, 10 Mar 2014 09:00:42 +0000</pubDate><guid>https://abapinho.com/en/2014/03/o-detective-do-abap/</guid><description>&lt;p>When a development is completed in SAP, the time to send it to other systems where it can be duly tested and then executed by users has finally arrived.
Before that occurs, however, it has to be checked for lapses, errors and other problems that could lead to our programmes behaving in an unpredictable manner.
There is a very useful tool that allows some of these errors and gaps to be filtered out. It is called ABAP Code Inspector.&lt;/p></description></item><item><title>Close the frozen window</title><link>https://abapinho.com/en/2014/03/fecha-a-janela-encalhada/</link><pubDate>Mon, 03 Mar 2014 17:30:56 +0000</pubDate><guid>https://abapinho.com/en/2014/03/fecha-a-janela-encalhada/</guid><description>&lt;p>How many times have you been left with a “hanging” window when you end a debug?&lt;/p></description></item><item><title>Exemplary example of SALV</title><link>https://abapinho.com/en/2014/02/exemplar-exemplo-de-salv/</link><pubDate>Mon, 10 Feb 2014 09:00:25 +0000</pubDate><guid>https://abapinho.com/en/2014/02/exemplar-exemplo-de-salv/</guid><description>&lt;p>Unless you want to do data editing, the only dignified way to use ALVs these days is through SALV classes. They are more modern and more elegant, and those who use them can achieve a social status until now only available to owners of a &lt;a href="https://www.youtube.com/watch?v=JtN35OUIu0g">license plate&lt;/a>.&lt;/p></description></item><item><title>Hold on… but not yet</title><link>https://abapinho.com/en/2014/02/para-la-mas-nao-ja/</link><pubDate>Mon, 03 Feb 2014 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2014/02/para-la-mas-nao-ja/</guid><description>&lt;p>You are doing a LOOP AT in a 1000-line table, and you know that you want line 853. Until recently, you had two options: either hit F8 852 times, running the risk of hitting it 853 times and having to start all over again, or create a &lt;em>watchpoint&lt;/em> with the condition SY-TABIX = 852 or something close, and pray that it worked.&lt;/p>
&lt;p>Now you have a third option.&lt;/p></description></item><item><title>APPEND LINES OF class->method() TO itbl</title><link>https://abapinho.com/en/2014/01/append-lines-of-classe-metodo-to-itbl/</link><pubDate>Mon, 27 Jan 2014 22:33:25 +0000</pubDate><guid>https://abapinho.com/en/2014/01/append-lines-of-classe-metodo-to-itbl/</guid><description>&lt;p>ABAP is getting smarter all the time. Back in my day, no one did anything with it. And now, slowly, more than a fifth of a century late, it’s trying to imitate C and Java, and becoming more flexible.&lt;/p>
&lt;p>I was going to do something like this:&lt;/p></description></item><item><title>Automatic keyboard</title><link>https://abapinho.com/en/2014/01/teclado-automatico/</link><pubDate>Mon, 20 Jan 2014 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2014/01/teclado-automatico/</guid><description>&lt;p>Every programmer knows about the intimate relationship between batch-inputs and paperweights, staplers and similar heavy objects. These precious little helpers can keep us from spending up to eight hours hitting the “ENTER” key with one finger.&lt;/p>
&lt;p>Although these objects have a certain charm, the law of gravity - the same one that makes them useful - sometimes makes them fall over and stop pushing this key.&lt;/p></description></item><item><title>Adding values to a standard domain</title><link>https://abapinho.com/en/2014/01/adicionar-valor-a-dominio-standard/</link><pubDate>Mon, 13 Jan 2014 09:00:58 +0000</pubDate><guid>https://abapinho.com/en/2014/01/adicionar-valor-a-dominio-standard/</guid><description>&lt;p>If you think it’s impossible to add values to a standard SAP domain without requesting an activation key, you’re wrong.&lt;/p></description></item><item><title>ABAP sucks</title><link>https://abapinho.com/en/2014/01/o-abap-suga/</link><pubDate>Mon, 06 Jan 2014 09:00:46 +0000</pubDate><guid>https://abapinho.com/en/2014/01/o-abap-suga/</guid><description>Go to the ABAP Editor (SE38) and check out line 323 of standard program RCIFCUST.
If you&amp;rsquo;re lazy, here it is:
SAP programmers are wild.
Thanks Brian Wolfe for the photo.
Greetings from Abapinho</description></item><item><title>Always use message classes in exception classes.</title><link>https://abapinho.com/en/2013/12/classes-de-mensagens-nas-classe-de-excepcao/</link><pubDate>Mon, 16 Dec 2013 09:00:49 +0000</pubDate><guid>https://abapinho.com/en/2013/12/classes-de-mensagens-nas-classe-de-excepcao/</guid><description>&lt;p>Exception classes let you state multiple texts describing the different possible errors that they can represent.&lt;/p>
&lt;p>However, there exists an option to associate it with a message class (SE91). This allows texts to be defined as classic SE91 messages instead of being defined directly in the exception class. And it has advantages.&lt;/p></description></item><item><title>Mathematics problem</title><link>https://abapinho.com/en/2013/12/matematica-problematica/</link><pubDate>Mon, 09 Dec 2013 09:00:23 +0000</pubDate><guid>https://abapinho.com/en/2013/12/matematica-problematica/</guid><description>&lt;p>Do you know the difference between a mystery and an enigma puzzle? An enigma puzzle is known to have a solution, but with a mystery you don’t know if there is solution.&lt;/p>
&lt;p>Do you agree with this?
5 * 3 / 10 = ( 5 * 3 ) / 10 = 5 * ( 3 / 10 ) = 1.5&lt;/p>
&lt;p>If you don’t, you should agree because it is a mathematical fact.&lt;/p>
&lt;p>Now let&amp;rsquo;s do some experiments.&lt;/p></description></item><item><title>The ABAP editor has a good memory</title><link>https://abapinho.com/en/2013/12/o-editor-de-abap-tem-boa-memoria/</link><pubDate>Mon, 02 Dec 2013 09:00:55 +0000</pubDate><guid>https://abapinho.com/en/2013/12/o-editor-de-abap-tem-boa-memoria/</guid><description>&lt;p>Select a word in the ABAP editor and choose CTRL-C. Then select another word and choose CTRL-C again. Then another word and so on. You have copied words several times to the &lt;em>clipboard&lt;/em>. Experience and common sense tells us that if you choose CTRL-V you can only paste the last word you copied to the clipboard.
But that is not quite right. You may not be aware of it, but the ABAP editor has a good memory.&lt;/p></description></item><item><title>Compare a table across two systems</title><link>https://abapinho.com/en/2013/11/compara-uma-tabela-entre-dois-sistemas/</link><pubDate>Mon, 25 Nov 2013 09:00:45 +0000</pubDate><guid>https://abapinho.com/en/2013/11/compara-uma-tabela-entre-dois-sistemas/</guid><description>The SCMP transaction compares the content of a table across two systems. It is very useful, especially for parameterization tables.
It is very easy to use. It allows for the pre-selection of the registers and fields to compare. It also allows you to only display the differences, which is convenient for tables with lots of data. I don’t think any more explaining is required. Ite et videte.
This tip recently appeared in the ex SAPtricks blog and I think it is so useful that I have reposted it here, in case you haven’t already seen it.</description></item><item><title>SELECT... ...ORDER BY PRIMARY KEY</title><link>https://abapinho.com/en/2013/11/select-order-by-primary-key/</link><pubDate>Mon, 18 Nov 2013 09:00:43 +0000</pubDate><guid>https://abapinho.com/en/2013/11/select-order-by-primary-key/</guid><description>Although I have been using ABAP since 1998, I learn new features or options every week, and sometimes even new commands. It’s hard to believe.
Today, I’ll share a little SQL option that I recently discovered.
SELECT * FROM T001 INTO TABLE T_T001 ORDER BY PRIMARY KEY. I have known SELECT, FROM, INTO, TABLE and even ORDER BY for a long time. I just didn’t know of PRIMARY KEY.
It orders the internal table by its key.</description></item><item><title>Function to create cartoons</title><link>https://abapinho.com/en/2013/11/funcao-para-gerar-bonecada/</link><pubDate>Mon, 11 Nov 2013 09:00:47 +0000</pubDate><guid>https://abapinho.com/en/2013/11/funcao-para-gerar-bonecada/</guid><description>&lt;p>Cartoons always look good in a report. In a SAPGui that is boredom in blue, the more colours and cartoons there are the better it is. Luís Rocha showed me a very convenient function to fill up a report with icons.&lt;/p></description></item><item><title>SELECT comparing 2 fields of the same table</title><link>https://abapinho.com/en/2013/11/select-propria-tabela/</link><pubDate>Mon, 04 Nov 2013 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2013/11/select-propria-tabela/</guid><description>&lt;p>This tip is simple and quick, but I bet 200.482 Portuguese escudos that few know it.&lt;/p></description></item><item><title>Syntax error when returning tables of a method</title><link>https://abapinho.com/en/2013/10/erro-ao-retornar-tabela-num-metodo/</link><pubDate>Mon, 21 Oct 2013 09:00:37 +0000</pubDate><guid>https://abapinho.com/en/2013/10/erro-ao-retornar-tabela-num-metodo/</guid><description>&lt;p>When you create a return parameter in a method of a class that is a TABLE TYPE based on a type declared in the class proper, an error sometimes pops up that says:&lt;/p>
&lt;p>&amp;ldquo;Type of RETURNING parameters must be fully specified.&amp;rdquo;&lt;/p></description></item><item><title>Steal data from a SALV</title><link>https://abapinho.com/en/2013/10/roubar-salv/</link><pubDate>Mon, 14 Oct 2013 10:04:02 +0000</pubDate><guid>https://abapinho.com/en/2013/10/roubar-salv/</guid><description>&lt;p>A friend of a friend of a friend said that a friend of his knew a friend who explained to him in a shady club bar in the docks area of Lisbon how to steal data from a SALV.&lt;/p></description></item><item><title>/HS Command</title><link>https://abapinho.com/en/2013/07/comando-hs/</link><pubDate>Mon, 22 Jul 2013 09:00:36 +0000</pubDate><guid>https://abapinho.com/en/2013/07/comando-hs/</guid><description>&lt;p>Most functionals, and even the hardcore functionals, knows that in order to start debugging an ABAP program, we use the /H command. But few programmers, even the hardcode programmers, will know the purpose of the /HS command.&lt;/p></description></item><item><title>Have you used regular expressions before?</title><link>https://abapinho.com/en/2013/07/regex/</link><pubDate>Mon, 15 Jul 2013 09:00:55 +0000</pubDate><guid>https://abapinho.com/en/2013/07/regex/</guid><description>Regularly expressions have been around for ages. But they’re not very well known and even less used. They are a sort of descriptive language that allows for making research and very sophisticated replacements in alpha-numeric chains.
A simple example: to validate an email address. If you have to do this through an algorithm you’ll have to work hard. However, with regular expressions, only two or three code lines and the regular expression &amp;quot;\b[A-Z0-9.</description></item><item><title>Dynamically call classes and methods</title><link>https://abapinho.com/en/2013/07/chamada-dinamicamente-classes-e-metodos/</link><pubDate>Mon, 08 Jul 2013 09:00:12 +0000</pubDate><guid>https://abapinho.com/en/2013/07/chamada-dinamicamente-classes-e-metodos/</guid><description>&lt;p>Now, learn how to dynamically invoke a method.&lt;/p>
&lt;p>Let’s go for it.&lt;/p></description></item><item><title>Read code from the web and execute it</title><link>https://abapinho.com/en/2013/07/ler-codigo-da-net-e-executa-lo/</link><pubDate>Mon, 01 Jul 2013 09:00:42 +0000</pubDate><guid>https://abapinho.com/en/2013/07/ler-codigo-da-net-e-executa-lo/</guid><description>&lt;p>This is a 2-in-1 article. That is to say, you’ll learn two subjects at once.&lt;/p>
&lt;p>But get ready, what you’ll learn is dynamite, and, in the wrong hands, it can implode your universe.&lt;/p>
&lt;p>First, you&amp;rsquo;ll learn how to read content on the web. And right after that, assuming that this content is ABAP code, you’ll learn how to execute it in the blink of an eye.&lt;/p></description></item><item><title>Don't mix Z functions with maintenance views!</title><link>https://abapinho.com/en/2013/06/funcoes-z-com-vistas-de-manutencao-nao/</link><pubDate>Mon, 24 Jun 2013 09:00:02 +0000</pubDate><guid>https://abapinho.com/en/2013/06/funcoes-z-com-vistas-de-manutencao-nao/</guid><description>&lt;p>Today’s hint is not a hint - it’s an advice.&lt;/p>
&lt;p>After creating a table, you create its maintenance views. The maintenance views dwell within a group of functions. This group of functions is requested from you at the time of their creation. Since, after all, that’s no more than a set of generated code, and most of it is, nonetheless, standard includes. Loads.&lt;/p>
&lt;p>I give you the problem: there are those who create their own Z functions and put them in groups of functions with maintenance views. It&amp;rsquo;s true. Some do this.&lt;/p></description></item><item><title>I like LIKE</title><link>https://abapinho.com/en/2013/06/gosto-do-like/</link><pubDate>Mon, 17 Jun 2013 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2013/06/gosto-do-like/</guid><description>&lt;p>In the ‘bad old days’ when the ABAP was even more old-fashioned than today, variable statements were all made through LIKE and were referenced to table fields:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">V_KUNNR&lt;/span> &lt;span style="color:#00f">LIKE &lt;/span>&lt;span style="color:#000">KNA1&lt;/span>-&lt;span style="color:#000">KUNNR&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>With many fields avoid INTO CORRESPONDING FIELDS</title><link>https://abapinho.com/en/2013/06/into-corresponding-fields/</link><pubDate>Mon, 10 Jun 2013 09:00:27 +0000</pubDate><guid>https://abapinho.com/en/2013/06/into-corresponding-fields/</guid><description>&lt;p>I have already advised here that, in tables with many fields, it’s always recommended to avoid using SELECT *, you must always select, explicitly, only the necessary fields.&lt;/p>
&lt;p>But I didn’t warn you that there’s yet another optimisation worth making: avoid INTO CORRESPONDING FIELDS OF TABLE.&lt;/p></description></item><item><title>Free SAP course on HANA</title><link>https://abapinho.com/en/2013/06/curso-hana/</link><pubDate>Mon, 03 Jun 2013 17:40:13 +0000</pubDate><guid>https://abapinho.com/en/2013/06/curso-hana/</guid><description>SAP started last week a free course on HANA. Run!</description></item><item><title>QUICKINFO: tip on how to give tips.</title><link>https://abapinho.com/en/2013/06/quickinfo/</link><pubDate>Mon, 03 Jun 2013 09:00:46 +0000</pubDate><guid>https://abapinho.com/en/2013/06/quickinfo/</guid><description>In my opinion, this tip has arrived a few years too late, as it is now rare to use the WRITE command to directly write things to the screen. Therefore, we can say it&amp;rsquo;s a retro tip. A vintage tip. But let&amp;rsquo;s assume we are still in the twentieth century grappling with ABAP’s most Baroque command, WRITE.
Then, imagine yourself sitting in front of SAP, listening to Pearl Jam, wearing black headphones and writing WRITEs of a series of values on the screen, which you would like the user to have more information on.</description></item><item><title>Is that RFC system alive?</title><link>https://abapinho.com/en/2013/05/aquele-sistema-rfc-esta-vivo/</link><pubDate>Mon, 27 May 2013 09:00:03 +0000</pubDate><guid>https://abapinho.com/en/2013/05/aquele-sistema-rfc-esta-vivo/</guid><description>You want to call an RFC function in another system but, because you’re not a carrion eater, you only want to do it if it’s alive.
Hence, you need a way of checking whether that particular destination RFC system is alive.
How do you do that?
Charles Santana does it like this:
DATE: rfcdest TYPE rfcdest, ping_status TYPE /sdf/e2e_traffic_light_numeric. CALL FUNCTION &amp;#39;/SDF/RFC_CHECK&amp;#39; EXPORTING iv_destination = rfcdest iv_ping = &amp;#39;X&amp;#39; * iv_logon = &amp;#39;X&amp;#39; * iv_latency = &amp;#39;X&amp;#39; IMPORTING ev_ping_status = ping_status.</description></item><item><title>Does the function exist?</title><link>https://abapinho.com/en/2013/05/a-funcao-existe/</link><pubDate>Mon, 20 May 2013 09:00:07 +0000</pubDate><guid>https://abapinho.com/en/2013/05/a-funcao-existe/</guid><description>&lt;p>You call a function.
Imagine it doesn’t answer.
It may be that it’s staying silent.
Or it’s shy.
Or dumb.
Or, of all the misfortunes, it doesn’t exist.&lt;/p>
&lt;p>To make sure and put your mind to rest you then do:&lt;/p></description></item><item><title>Writing money without any decimal worries</title><link>https://abapinho.com/en/2013/05/escrever-dinheiro-sem-preocupacoes-decimais/</link><pubDate>Mon, 13 May 2013 09:00:50 +0000</pubDate><guid>https://abapinho.com/en/2013/05/escrever-dinheiro-sem-preocupacoes-decimais/</guid><description>&lt;p>Some people read the TCURX to find out the number of decimal places of a CURRENCY when they need to write a money field to an alphanumeric variable.&lt;/p>
&lt;p>Are you one of those people? Don’t be.&lt;/p></description></item><item><title>R3TR vs LIMU</title><link>https://abapinho.com/en/2013/05/r3tr-vs-limu/</link><pubDate>Mon, 06 May 2013 23:00:21 +0000</pubDate><guid>https://abapinho.com/en/2013/05/r3tr-vs-limu/</guid><description>&lt;p>You’ve screwed up the productive system. You made a change to a method of a class (or to a function, whatever). Someone else makes another change to another method of the same class (or to another function of the same group of functions, whatever) and saves it to a different transport. When you transport your changes to the productive system, you discover that the class (or function, whatever) now has a syntax error because the changes had interdependencies. You also discover that now, until you get this problem resolved, all your functional co-workers hate you.&lt;/p></description></item><item><title>Finally, expressions can be concatenated</title><link>https://abapinho.com/en/2013/04/expressoes-encadeadas/</link><pubDate>Mon, 15 Apr 2013 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2013/04/expressoes-encadeadas/</guid><description>&lt;p>Finally, the &lt;em>SAP NetWeaver 7.0 Enhancement Package 2&lt;/em> makes ABAP start to seem like a normal programming language.&lt;/p>
&lt;p>It even allows expressions to be concatenated, no less!&lt;/p></description></item><item><title>Decimal to alphanumeric without depending on the user</title><link>https://abapinho.com/en/2013/04/decimais-para-alfa-numericos-sem-depender-do-utilizador/</link><pubDate>Mon, 08 Apr 2013 09:00:46 +0000</pubDate><guid>https://abapinho.com/en/2013/04/decimais-para-alfa-numericos-sem-depender-do-utilizador/</guid><description>&lt;p>When reading a file with numeric values to an internal table or vice versa, the success of the conversion depends on whether the user has defined the dot or comma as the decimal separator. It is customary to then go and read the user setting and then adjust the values from the file with a dot or a comma as required.&lt;/p>
&lt;p>But this is unfortunate and rather inelegant. There should be a way of not making this depend on the user.&lt;/p>
&lt;p>And there is.&lt;/p></description></item><item><title>SORTED instead of STANDARD in the cache tables</title><link>https://abapinho.com/en/2013/04/sorted-em-vez-de-standard/</link><pubDate>Mon, 01 Apr 2013 16:11:22 +0000</pubDate><guid>https://abapinho.com/en/2013/04/sorted-em-vez-de-standard/</guid><description>Some time ago I wrote a post here showing the advantages of using internal tables with defined indexes instead of simple STANDARD tables.
Confession: that habit is so ingrained that since then, almost all the internal tables I have created have continued to be STANDARD TABLE.
It’s very common to create internal tables to cache data that I know I&amp;rsquo;ll often use inside LOOPS to avoid having to SELECT SINGLES inside them.</description></item><item><title>Share constants among several classes</title><link>https://abapinho.com/en/2013/03/partilhar-constantes-entre-varias-classes/</link><pubDate>Mon, 25 Mar 2013 09:00:35 +0000</pubDate><guid>https://abapinho.com/en/2013/03/partilhar-constantes-entre-varias-classes/</guid><description>&lt;p>Imagine you have a herd of related classes sharing between them a whole bunch of constants. Saying the same thing a different way, would you like all the classes of the herd to have easy access to the bunch of constants?&lt;/p>
&lt;p>(If you’re confused, then let me tell you that the “herd” thing was just to baffle you)&lt;/p>
&lt;p>Carrying on&amp;hellip;..&lt;/p></description></item><item><title>SAP for rent</title><link>https://abapinho.com/en/2013/03/sap-de-aluguer/</link><pubDate>Mon, 18 Mar 2013 09:00:21 +0000</pubDate><guid>https://abapinho.com/en/2013/03/sap-de-aluguer/</guid><description>&lt;p>If you really need to access an SAP and nobody lets you, and you don’t have a computer where you can install it or you don’t have enough know-how or patience to do it, you can always rent.&lt;/p></description></item><item><title>Colour hallucination</title><link>https://abapinho.com/en/2013/03/alucinacao-as-cores/</link><pubDate>Mon, 11 Mar 2013 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2013/03/alucinacao-as-cores/</guid><description>&lt;p>This is not really an article. It’s hardly a tip. It’s closer to getting something off my chest in all the colours of the rainbow.&lt;/p></description></item><item><title>Create RANGEs in DDIC without getting all wound up</title><link>https://abapinho.com/en/2013/03/ranges-no-ddic/</link><pubDate>Mon, 04 Mar 2013 18:26:40 +0000</pubDate><guid>https://abapinho.com/en/2013/03/ranges-no-ddic/</guid><description>&lt;p>I am using RANGEs more and more. I use them at breakfast, lunch, and dinner and outside meal times. It’s like soy sauce. A few spoonfuls and everything is instantly tastier.&lt;/p></description></item><item><title>Lock data in Z-tables without a locking object</title><link>https://abapinho.com/en/2013/01/bloquear-dados-em-tabelas-z-sem-objecto-de-bloqueio/</link><pubDate>Mon, 28 Jan 2013 09:00:54 +0000</pubDate><guid>https://abapinho.com/en/2013/01/bloquear-dados-em-tabelas-z-sem-objecto-de-bloqueio/</guid><description>&lt;p>If I needed to create locking entries in a ZCOISO table I had created, up to two days ago I would have gone to SE11 to create a locking object for the ZCOISO table so that I could then use the function module generated by the locking object to lock the data.&lt;/p>
&lt;p>But not anymore.&lt;/p></description></item><item><title>SAP system name in the window title</title><link>https://abapinho.com/en/2013/01/titulo-da-janela/</link><pubDate>Mon, 21 Jan 2013 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2013/01/titulo-da-janela/</guid><description>&lt;p>The client where I&amp;rsquo;m working at the moment owns more SAP systems than the number of volcanoes in Chile. And, of course, it&amp;rsquo;s inevitable to have multiple sessions open for several of those systems. With the windows minimized it&amp;rsquo;s impossible to know the matching between systems and sessions. I mean, it was impossible, because today that&amp;rsquo;s already possible:&lt;/p></description></item><item><title>Good mouse</title><link>https://abapinho.com/en/2012/12/bom-rato/</link><pubDate>Mon, 17 Dec 2012 09:00:45 +0000</pubDate><guid>https://abapinho.com/en/2012/12/bom-rato/</guid><description>Most of my friends, when they buy a new computer, worry a lot about CPU speed, disk speed and memory speed and whatnot speed. And then they go and buy a €6 mouse and a €7 keyboard. Ironic. While the CPU, the disk and the memory and all that other stuff often end up being wasted, the mouse and the keyboard are used to the max the entire time the computer is in use.</description></item><item><title>Execute commands in the user’s computer</title><link>https://abapinho.com/en/2012/12/comandos-no-computador-do-utilizador/</link><pubDate>Mon, 10 Dec 2012 09:00:41 +0000</pubDate><guid>https://abapinho.com/en/2012/12/comandos-no-computador-do-utilizador/</guid><description>It’s been a while since Abapinho played with fire. Today he will.
Because today he’ll show you how to execute DOS commands on the user’s local machine. After you finish reading this article, you’ll be ready to format the hard disks of all your users. Dealing with danger helps make us aware of the power we have and the responsibility that comes with it. Dear reader, listen to your conscience.</description></item><item><title>SAPlink</title><link>https://abapinho.com/en/2012/12/saplink/</link><pubDate>Mon, 03 Dec 2012 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2012/12/saplink/</guid><description>&lt;p>SAPlink is a Z program that is installed in the development environment and which enables a wide variety of object types to be imported and exported from the Workbench.&lt;/p>
&lt;p>Take a look here at some examples of how SAPlink can be used:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>To transfer a table from one SAP system to another&lt;/p>
&lt;/li>
&lt;li>
&lt;p>To share a class on the internet&lt;/p>
&lt;/li>
&lt;li>
&lt;p>To make a local security backup of a set of programs before making a dangerous change&lt;/p>
&lt;/li>
&lt;li>
&lt;p>To keep a development in our personal repository (in &lt;a href="https://abapinho.com/en/2010/04/evernote/">Evernote&lt;/a>, of course) in case you need it later in another project&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Etc.&lt;/p>
&lt;/li>
&lt;/ul></description></item><item><title>Benefits of LIKE LINE OF</title><link>https://abapinho.com/en/2012/11/vantagens-do-like-line-of/</link><pubDate>Mon, 26 Nov 2012 09:00:40 +0000</pubDate><guid>https://abapinho.com/en/2012/11/vantagens-do-like-line-of/</guid><description>&lt;p>Let&amp;rsquo;s start by assuming that you have some dignity and so you don&amp;rsquo;t use internal tables with HEADER LINE anymore ;)&lt;/p>
&lt;p>Given this, let&amp;rsquo;s suppose you declare an internal table:&lt;/p></description></item><item><title>Maintaining table maintenance authorisation groups</title><link>https://abapinho.com/en/2012/11/se54/</link><pubDate>Mon, 19 Nov 2012 09:00:24 +0000</pubDate><guid>https://abapinho.com/en/2012/11/se54/</guid><description>&lt;p>There are some projects in which the authorisations group associated with table maintenance is always &amp;amp;NC;&amp;amp;, that is, Not Classified. It signals that everything there is friendly and nobody is hurting anyone else. But there are other projects where authorisation groups are taken seriously. But this is not synonymous with saying that they are organised. Serious or not, usually it all ends in a big mess, with nobody knowing who is authorised to do what.&lt;/p>
&lt;p>This tip may help.&lt;/p></description></item><item><title>INSERT and APPEND with ASSIGNING FIELD-SYMBOL</title><link>https://abapinho.com/en/2012/11/insert-initial-line-into-table/</link><pubDate>Mon, 05 Nov 2012 09:00:11 +0000</pubDate><guid>https://abapinho.com/en/2012/11/insert-initial-line-into-table/</guid><description>&lt;p>The harsh truth, at all costs, is that structures are out of date. Nowadays FIELD-SYMBOLS are in.&lt;/p>
&lt;p>When you make a LOOP to an internal table of course that you also &lt;a href="https://abapinho.com/en/2011/07/assigning-vs-into/">use ASSIGNING FIELD-SYMBOL instead of INTO Structure&lt;/a>,correct?&lt;/p>
&lt;p>But what was screwing everything over was APPEND and INSERT. I did not know how to use a structure to add records&lt;/p></description></item><item><title>No one cares for LISTBOX</title><link>https://abapinho.com/en/2012/10/ninguemligaaolistbox/</link><pubDate>Mon, 29 Oct 2012 09:00:07 +0000</pubDate><guid>https://abapinho.com/en/2012/10/ninguemligaaolistbox/</guid><description>&lt;p>For some strange reason, LISTBOX is rarely used in report selection screens. Even though it&amp;rsquo;s widely used throughout the web. Who knows why.&lt;/p>
&lt;p>Dear reader, I suggest you pay attention to its advantages:&lt;/p></description></item><item><title>&lt;!--:pt-->Entrevista a Mauricio Roberto Cruz do ABAPZombie&lt;!--:--></title><link>https://abapinho.com/en/2012/10/entrevista-mauricio-roberto-cruz/</link><pubDate>Mon, 22 Oct 2012 09:00:51 +0000</pubDate><guid>https://abapinho.com/en/2012/10/entrevista-mauricio-roberto-cruz/</guid><description>&lt;p>Depois de o site irmão ABAPZombie (grande site brasileiro sobre ABAP) me ter &lt;a href="https://www.abapzombie.com/mundo-sap/2012/02/23/entrevista-zumbistica-nuno-godinho-do-abapinho-com/">entrevistado&lt;/a> há uns meses atrás, aqui fica finalmente a minha vingança Zômbica. Entrevistar o Mauricio foi muito simples porque as perguntas que me fizeram são tão boas que resolvi virá-las contra o feiticeiro (Mauricio, espero que não leves a mal ter-tas usurpado!). As suas óptimas respostas ajudarão certamente os leitores portugueses a terem uma ideia de como funciona o mercado ABAP lá no Brasil:&lt;/p></description></item><item><title>SAParrot</title><link>https://abapinho.com/en/2012/10/sapagaio/</link><pubDate>Mon, 15 Oct 2012 09:00:47 +0000</pubDate><guid>https://abapinho.com/en/2012/10/sapagaio/</guid><description>Go to SE38 and create a program with the code below. Then turn the computer sound on and press F8.
INCLUDE ole2incl. DATA : ole TYPE ole2_object, voz TYPE ole2_object, texto TYPE string. CREATE OBJECT voz &amp;#39;SAPI.SpVoice&amp;#39;. texto = &amp;#39;Olá eu sou o SAP e falo português com sotaque estrangeiro&amp;#39;. CALL METHOD OF voz &amp;#39;Speak&amp;#39; = ole EXPORTING #1 = texto. Note: the parrot not in the photo, just the macaw with which he was talking :)</description></item><item><title>Are you serious or just joking?</title><link>https://abapinho.com/en/2012/10/a-serio-ou-a-brincar/</link><pubDate>Mon, 08 Oct 2012 09:00:16 +0000</pubDate><guid>https://abapinho.com/en/2012/10/a-serio-ou-a-brincar/</guid><description>&lt;p>Some things can only happen in production.
While with some others it&amp;rsquo;s quite the opposite.&lt;/p></description></item><item><title>If you still don't use ABAP Objects you're chicken</title><link>https://abapinho.com/en/2012/10/mariquinhas-pe-de-salsa/</link><pubDate>Mon, 01 Oct 2012 09:00:20 +0000</pubDate><guid>https://abapinho.com/en/2012/10/mariquinhas-pe-de-salsa/</guid><description>SAP has a book called Official ABAP Programming Guidelines which describes rules and best practices on how to program in ABAP. In there you can read:
Page 42: Rule 3.1: Use ABAP Objects whenever possible for new and further developments. Classic processing blocks may be newly created in exceptional cases only.
Page 45: Within such a [classic] processing block, however, you should immediately delegate the execution to a suitable method (see Rule 6.</description></item><item><title>Beautiful table relationships diagrams</title><link>https://abapinho.com/en/2012/09/diagrama-relacoes-tabelas/</link><pubDate>Mon, 24 Sep 2012 09:00:39 +0000</pubDate><guid>https://abapinho.com/en/2012/09/diagrama-relacoes-tabelas/</guid><description>Nice relation diagrams for standard tables. Rui Dias revealed me a site where you can check the relation between any standard table with each other.
For instance for T012. And if you try KNA1 it gets even better.
Do you like it? I do.
Thanks Rui Dias.
Greetings from Abapinho.</description></item><item><title>Hey dad, look...no hands</title><link>https://abapinho.com/en/2012/09/olha-pai-agora-sem-maos/</link><pubDate>Mon, 17 Sep 2012 09:00:48 +0000</pubDate><guid>https://abapinho.com/en/2012/09/olha-pai-agora-sem-maos/</guid><description>&lt;p>In today&amp;rsquo;s article I will show you (and explain!) how you can make a selection screen refresh itself on a regular basis without user intervention.&lt;/p>
&lt;p>Are you ready?&lt;/p></description></item><item><title>Keyboard shortcut to transaction field</title><link>https://abapinho.com/en/2012/09/atalho-campo-transaccao/</link><pubDate>Mon, 10 Sep 2012 09:00:09 +0000</pubDate><guid>https://abapinho.com/en/2012/09/atalho-campo-transaccao/</guid><description>And there you are madly typing with SAP when suddenly you need to go to the transaction field and write /OS37 or whatever. But you are writing with so much passion that the thought of leaving the keyboard for a moment to use your mouse seems catastrophic. Instead, you just press 3 keyboard keys: CTRL-SHIFT-7.
Thank you Renato Sousa for the tip.
Greetings from Abapinho.</description></item><item><title>Create sessions with the keyboard</title><link>https://abapinho.com/en/2012/09/cria-sessoes-com-o-teclado/</link><pubDate>Mon, 03 Sep 2012 09:00:02 +0000</pubDate><guid>https://abapinho.com/en/2012/09/cria-sessoes-com-o-teclado/</guid><description>You need to start a new session but your mouse was stolen. No problem. Press CTRL and then the + key and you will see a new session coming in.
Thank you Renato Sousa for the tip.
And thank you freeimageslive / gratuit for the photo.
Greetings from Abapinho.</description></item><item><title>Digital narcissism</title><link>https://abapinho.com/en/2012/08/narcisismo-digital/</link><pubDate>Mon, 27 Aug 2012 09:00:38 +0000</pubDate><guid>https://abapinho.com/en/2012/08/narcisismo-digital/</guid><description>&lt;p>&lt;em>Reflection&lt;/em> is the ability of a program to see itself. ABAP has a series of reflective capabilities, such as RTTS or the ability to dynamically generate code. There are also a few other so-and-so functions that do this and that. Today I present one of them to you:&lt;/p>
&lt;p>GET_GLOBAL_SYMBOLS&lt;/p></description></item><item><title>Good program to find user-exits</title><link>https://abapinho.com/en/2012/08/encontrar-user-exits/</link><pubDate>Mon, 20 Aug 2012 09:00:00 +0000</pubDate><guid>https://abapinho.com/en/2012/08/encontrar-user-exits/</guid><description>Every now and then we’ll be looking for user-exits and BADIs, BTEs and the like. SAP doesn’t help. But programs appear here and there, almost always called Z_USEREXIT, which help with this unappreciated search. Recently I learned of another one. I share it here because it is the best I have ever seen:
https://wiki.sdn.sap.com/wiki/display/Snippets/Find+User-exits,+BADIs,+BTEs,+Etc+by+TCode+or+Program
Thanks to Bruno Esperança for the tip. And thank you rverscha for the photo.
Greetings from Abapinho.</description></item><item><title>Class for converting STRINGs</title><link>https://abapinho.com/en/2012/08/classe-para-converter-strings/</link><pubDate>Mon, 13 Aug 2012 09:00:56 +0000</pubDate><guid>https://abapinho.com/en/2012/08/classe-para-converter-strings/</guid><description>&lt;p>You know how you sometimes have a STRING-type variable and you need to send it to a function that needs it in SOLIX-type? It often happens to me. Well, I have found this great class that converts strings into a wide range of formats:&lt;/p>
&lt;p>CL_BCS_CONVERT&lt;/p></description></item><item><title>Jump The Wall</title><link>https://abapinho.com/en/2012/08/salta-a-parede/</link><pubDate>Mon, 06 Aug 2012 09:00:31 +0000</pubDate><guid>https://abapinho.com/en/2012/08/salta-a-parede/</guid><description>&lt;p>Turn down the music.
Close the door.
Look around.
Is anyone looking at you?
Are you being watched?
Are there any security cameras?
If not, we can go on.&lt;/p></description></item><item><title>Preventing competition in an ABAP program</title><link>https://abapinho.com/en/2012/07/evitando-a-concorrencia-num-programa-abap/</link><pubDate>Mon, 30 Jul 2012 09:00:27 +0000</pubDate><guid>https://abapinho.com/en/2012/07/evitando-a-concorrencia-num-programa-abap/</guid><description>&lt;p>They say that competition in trade is good. Good for consumers, that is. It lowers prices and so on. But inside computers it creates problems for those using them.&lt;/p>
&lt;p>Usually, competition is contained in ABAP at the data level, blocking ( &lt;em>euqueue&lt;/em> ) certain tables based on their key. But sometimes, something more violent may be required to ensure that a program may not run more than once at the same time. The ESINDX lock object can be used to do this.&lt;/p></description></item><item><title>Diving into Chaos with the CL_ABAP_RANDOM* classes</title><link>https://abapinho.com/en/2012/07/numeros-aleatorios/</link><pubDate>Mon, 23 Jul 2012 09:00:07 +0000</pubDate><guid>https://abapinho.com/en/2012/07/numeros-aleatorios/</guid><description>&lt;p>ABAP programs are all too well behaved, too predictable.&lt;/p>
&lt;p>As demiurges, we have a moral obligation to give them a little free will, give them a scent of chaos, show them the trees of life and of knowledge, and in a passage through &lt;em>kenosis&lt;/em> , give them free reign to take a bite from the apple. Only in this way will we feel complete and fulfilled, only by this means will we be able to rest on the seventh day.&lt;/p>
&lt;p>There is nothing better to achieve this than random numbers.&lt;/p></description></item><item><title>Complex parameters in remote functions</title><link>https://abapinho.com/en/2012/07/parametros-complexos-por-rfc/</link><pubDate>Mon, 16 Jul 2012 09:00:01 +0000</pubDate><guid>https://abapinho.com/en/2012/07/parametros-complexos-por-rfc/</guid><description>&lt;p>Remote function calls (by RFC) do not support parameters with complex structures (deep structures). In other words, if any of the parameters has a structure in which one of the fields is another structure or an internal table then, hard luck, it won’t work.&lt;/p>
&lt;p>Do you give up? No, you don’t. Abapinho provides the solution: serialization.&lt;/p></description></item><item><title>F1 in the selection screen fields</title><link>https://abapinho.com/en/2012/07/f1-ecra-seleccao/</link><pubDate>Mon, 09 Jul 2012 09:00:07 +0000</pubDate><guid>https://abapinho.com/en/2012/07/f1-ecra-seleccao/</guid><description>&lt;p>You have just produced a wonderful report headed by a selection screen crammed full of very interesting fields. But usually those running the report will not know, if it has some complexity, what each of the fields does. There are, of course, the technical and functional specifications for this. But are there? And even if there are, wouldn’t it be easier if you could press F1 on top of each field and find out there and then what it’s for?&lt;/p>
&lt;p>I&amp;rsquo;ll show you two possible ways to give individualized information about the fields of a selection screen.&lt;/p></description></item><item><title>Finally ABAP knows Excel</title><link>https://abapinho.com/en/2012/07/abap2xlsx/</link><pubDate>Mon, 02 Jul 2012 09:00:22 +0000</pubDate><guid>https://abapinho.com/en/2012/07/abap2xlsx/</guid><description>&lt;p>There are various ways of creating an Excel spreadsheet in ABAP. Some are more masochistic than others and some are certainly more lousy than others.&lt;/p></description></item><item><title>Happily jumping from line to line</title><link>https://abapinho.com/en/2012/06/saltar-para-linha/</link><pubDate>Mon, 25 Jun 2012 09:00:09 +0000</pubDate><guid>https://abapinho.com/en/2012/06/saltar-para-linha/</guid><description>At the bottom right corner of ABAP editor, right in the status line, you can check in which line and column the cursor is. By double clicking over that information a dialog box is shown and you will be able to introduce a line number to it skip directly. The short key is CTRL-O. It&amp;rsquo;s very helpful.
Thank you Fábio Branquinho for the tip.
And thank you to juandesant for the photo.</description></item><item><title>Menu search</title><link>https://abapinho.com/en/2012/06/pesquisar-em-menus/</link><pubDate>Mon, 18 Jun 2012 09:00:02 +0000</pubDate><guid>https://abapinho.com/en/2012/06/pesquisar-em-menus/</guid><description>Did you know that is possible to search in SAP menus? Probably yes. Well, I didn&amp;rsquo;t. I&amp;rsquo;ve spent years looking through menu S000 searching for the most random stuff imaginable. I&amp;rsquo;m sure that if I had done menu search I would have found most of them in seconds. Sometimes you just don´t think of the obvious.
Thank you Sérgio Fraga for the tip.
Greetings from Abapinho.</description></item><item><title>Dot and comma or comma and dot?</title><link>https://abapinho.com/en/2012/06/ponto-e-virgula-ou-virgula-e-ponto/</link><pubDate>Mon, 11 Jun 2012 09:00:34 +0000</pubDate><guid>https://abapinho.com/en/2012/06/ponto-e-virgula-ou-virgula-e-ponto/</guid><description>Some numbers have dots, some numbers have commas and some numbers have dots and commas. The problem is that there are also numbers that have commas and dots. The thing is, there are commas that are dots and dots that are commas, depending on where you are from, in other words, depending on user’s configurations. When importing a file with decimal numbers, these numbers’ alpha-numeric fields must be converted into numeric fields.</description></item><item><title>More RANGEs, less SELECTs</title><link>https://abapinho.com/en/2012/06/mais-ranges-menos-selects/</link><pubDate>Mon, 04 Jun 2012 09:00:33 +0000</pubDate><guid>https://abapinho.com/en/2012/06/mais-ranges-menos-selects/</guid><description>&lt;p>The dictionary has the following entry for &amp;ldquo;style&amp;rdquo;: &amp;ldquo;set of formal aspects and expressive resources that characterise a text.&amp;rdquo;&lt;/p>
&lt;p>It is preferable to read a text with style than one without. If ABAP were a language, a program in ABAP would be a text. When it comes to style, there are programs that seem to have been written by the feet, while there are others that one would swear the quill that wrote them was guided by the pure hand of an eighteenth century lady plagued by the troubles of love. Fortunately, I think it’s not possible to write programs in ABAP as tacky as the last sentence.&lt;/p>
&lt;p>The &amp;ldquo;style&amp;rdquo; label is used here in Abapinho to identify articles that talk about just that: style. These articles try to find ways to improve the style of ABAP programs. This is one of Abapinho’s favourite labels, as you can see &lt;a href="https://abapinho.com/tags/estilo/">here&lt;/a>. And what you are reading is another of those articles.&lt;/p>
&lt;p>Moving on.&lt;/p></description></item><item><title>Follow your fingers</title><link>https://abapinho.com/en/2012/05/vai-pelos-teus-dedos/</link><pubDate>Mon, 28 May 2012 10:00:44 +0000</pubDate><guid>https://abapinho.com/en/2012/05/vai-pelos-teus-dedos/</guid><description>&lt;p>I have a number of friends working as managers, lawyers, marketers, programmers, etc., at very dynamic and competitive companies who are allegedly very busy and are always up to their eyeballs in work. They dedicated several years of their lives to their degrees in order to specialise in a particular field and some of them have put in the extra effort to get a postgraduate diploma in order to be better qualified and therefore able to do more both better and faster. However, the vast majority of them use two fingers when typing at a computer. Over a number of years they have acquired many skills that supposedly make them ultra efficient and yet they still type with two fingers.&lt;/p></description></item><item><title>&lt;!--:pt-->Curso ABAP em São Paulo - 10% de desconto!&lt;!--:--></title><link>https://abapinho.com/en/2012/05/curso-abap-ztreinamento/</link><pubDate>Wed, 23 May 2012 13:47:39 +0000</pubDate><guid>https://abapinho.com/en/2012/05/curso-abap-ztreinamento/</guid><description>(actualizado em 16 de Junho)
Queres aprender ABAP e moras em São Paulo? Se sim, aqui está a tua oportunidade. ZTREINAMENTO vai realizar um curso de 8 6 semanas que custará R$1.200,00 R$750,00 e é adequado a pessoas sem qualquer conhecimento de ABAP.
Serão abordados os seguintes temas:
Entendendo alguns conceitos de ABAP
Comandos básicos
Data Dictionary
Trabalhando com funções
Trabalhando com module pool
Sapscript
ABAP Orientado a Objetos
(passou de 8 para 6 semanas mas a carga horária aumentou de 32h para 48h)</description></item><item><title>Slash O</title><link>https://abapinho.com/en/2012/05/barra-o/</link><pubDate>Mon, 21 May 2012 10:00:00 +0000</pubDate><guid>https://abapinho.com/en/2012/05/barra-o/</guid><description>Throughout all my &amp;ldquo;SAP life&amp;rdquo; I’ve used the command /olalala to initiate the lalala transaction in a new GUI window. Until now I had never tried just writing /o. I did today. The result was interesting.
Meaning, it’s the same as going to SM04 and then choosing our user. But much easier.
Greetings from Abapinho</description></item><item><title>Gregarious constants</title><link>https://abapinho.com/en/2012/05/constantesgregarias/</link><pubDate>Mon, 14 May 2012 10:00:28 +0000</pubDate><guid>https://abapinho.com/en/2012/05/constantesgregarias/</guid><description>&lt;p>If you are one of those who insert the values directly in code instead of using constants, then read no more and go and stand over there in the corner on punishment for 1 hour to learn not to be lazy. If you&amp;rsquo;ve come back from punishment or you usually use constants, then please continue reading.&lt;/p></description></item><item><title>Your password has expired. Change it 5 times.</title><link>https://abapinho.com/en/2012/05/a-sua-password-expirou/</link><pubDate>Mon, 07 May 2012 10:00:08 +0000</pubDate><guid>https://abapinho.com/en/2012/05/a-sua-password-expirou/</guid><description>It is not uncommon for us to be emotionally attached to our passwords. Therefore, it is always rather painful to receive those despicable threatening notices that say &amp;ldquo;your password is going to expire”. Soon followed by the blow we receive to our heart on the appearance of the inevitable vile invective that &amp;ldquo;your password has expired.&amp;rdquo; At such times, the hurt is so great that all the muses leave us, we have imagination cramp and remain stuck there, staring and drained, emptied of any idea to help us choose our next password.</description></item><item><title>Insert variables in standard texts</title><link>https://abapinho.com/en/2012/04/mete-variaveis-dentro-de-textos-standard/</link><pubDate>Mon, 30 Apr 2012 10:00:06 +0000</pubDate><guid>https://abapinho.com/en/2012/04/mete-variaveis-dentro-de-textos-standard/</guid><description>&lt;p>Everyone uses standard texts. But did you know that standard texts can have dynamic fields in the middle? SAP calls them &amp;ldquo;text symbols&amp;rdquo;. The way to do it is identical to that of the old forms of the harmful SE71, in other words wrapping them in the &amp;amp; symbol. Thus: &amp;amp;KNA1-NAME1;&amp;amp;. It’s really handy. I’ll show you how it’s done.&lt;/p></description></item><item><title>Client or Customer?</title><link>https://abapinho.com/en/2012/04/cliente-ou-fregues/</link><pubDate>Mon, 23 Apr 2012 10:00:05 +0000</pubDate><guid>https://abapinho.com/en/2012/04/cliente-ou-fregues/</guid><description>Wherever you use the data element KUNNR, its descriptions is “Client”. And what if we wanted to change this field description from &amp;ldquo;Client&amp;rdquo; to &amp;ldquo;Customer&amp;rdquo;? “Customer&amp;quot; is so much nicer! Or let&amp;rsquo;s suppose that the company you work for is trafficking in drugs and tells you that they want &amp;ldquo;Dealer&amp;rdquo; rather than “Supplier” to appear in the LIFNR field. Obviously we can label it as we wish on screens and Z reports but what about standard transactions?</description></item><item><title>Adding buttons to the selection screen</title><link>https://abapinho.com/en/2012/04/botoes-no-ecra-de-seleccao/</link><pubDate>Mon, 16 Apr 2012 10:00:45 +0000</pubDate><guid>https://abapinho.com/en/2012/04/botoes-no-ecra-de-seleccao/</guid><description>&lt;p>Normally, when buttons must be generated for users to click, Screen Painter is used to create a screen which is then invoked by the report using CALL SCREEN. But, unless the screen being designed is already quite complex it is pointless creating a screen which will have no further use. Screens have always annoyed me.&lt;/p>
&lt;p>I will demonstrate an example of using buttons on a completely normal selection screen resorting to a button called PUSHBUTTON and a very clever trick called ONLI.&lt;/p></description></item><item><title>Fill up the selection screen with cartoons</title><link>https://abapinho.com/en/2012/04/bonecada-no-ecra-seleccao/</link><pubDate>Mon, 09 Apr 2012 10:00:58 +0000</pubDate><guid>https://abapinho.com/en/2012/04/bonecada-no-ecra-seleccao/</guid><description>&lt;p>Was SAP born miserable or are SAP-users simply unable to cheer it up?&lt;/p>
&lt;p>The truth is that SAP GUI is no rainbow and neither does looking at it bring happiness. Even so, it puts at our disposal a bunch of cartoons that we may use to make it just a little more uplifting.&lt;/p>
&lt;p>And take a look at just how easy it is.&lt;/p></description></item><item><title>Oh time turn back</title><link>https://abapinho.com/en/2012/04/o-tempo-volta-para-tras/</link><pubDate>Mon, 02 Apr 2012 10:00:08 +0000</pubDate><guid>https://abapinho.com/en/2012/04/o-tempo-volta-para-tras/</guid><description>&lt;p>“Oh time turn back
Give me everything I have lost
Take pity and give me the life
The life I have already lived
Oh time turn backward
Kill off my futile hopes
Look how even the sun itself
Returns every morning” – António Mourão&lt;/p>
&lt;p>Hey &lt;a href="https://www.youtube.com/watch?v=LOtAfLvhSZo">Tony&lt;/a>, right away. I will show you how you can turn back time.&lt;/p></description></item><item><title>Search object attributes in an internal table</title><link>https://abapinho.com/en/2012/03/atributos-de-objectos-em-tabelas-internas/</link><pubDate>Mon, 26 Mar 2012 10:00:17 +0000</pubDate><guid>https://abapinho.com/en/2012/03/atributos-de-objectos-em-tabelas-internas/</guid><description>&lt;p>There are increasingly more objects in ABAP, gradually less fear of them and, lo and behold, more and more people are writing and using them. It is normal and desirable, if objects begin to appear everywhere, to start to stuff them into internal tables. I also stored a load of objects in tables a while back, unfortunately I did not know at that time what I am going to teach you here. It could have come in handy.&lt;/p>
&lt;p>So, what exactly am I going to teach you here?&lt;/p></description></item><item><title>Implementing private methods in BADIs</title><link>https://abapinho.com/en/2012/03/metodos-privados-em-badis/</link><pubDate>Mon, 19 Mar 2012 10:00:09 +0000</pubDate><guid>https://abapinho.com/en/2012/03/metodos-privados-em-badis/</guid><description>&lt;p>A little while ago I had an idea as eccentric as it was amazing that today I have decided to share here, namely, how to create private methods in BADI classes.&lt;/p>
&lt;p>Let me explain.&lt;/p></description></item><item><title>How to sabotage tables</title><link>https://abapinho.com/en/2012/03/como-sabotar-tabelas/</link><pubDate>Mon, 12 Mar 2012 13:30:24 +0000</pubDate><guid>https://abapinho.com/en/2012/03/como-sabotar-tabelas/</guid><description>Another article to help those who are into sneaky subversion Spies, take note on how to edit a table that cannot be (and probably shouldn’t be) edited. I’ll show you three techniques. The first stopped being useful a few years ago, the second is about to become obsolete and the third, well, we’ll just have to see for how long it will work.
1. SE16 /H OK_CODE EDIT The first technique dates back to the twentieth century and uses the old transaction SE16.</description></item><item><title>F1 + F9 = Technical Information</title><link>https://abapinho.com/en/2012/03/f1-f9-informacoes-tecnicas/</link><pubDate>Mon, 05 Mar 2012 16:18:59 +0000</pubDate><guid>https://abapinho.com/en/2012/03/f1-f9-informacoes-tecnicas/</guid><description>In a functional screen I often feel the need to see technical information about a particular field. I place the cursor on the field I want, then I click on F1 and a dialog screen will appear with help for that field. Then I click on the button that says &amp;ldquo;technical information&amp;rdquo;.But there is a quick way to do the same thing using only the keyboard.
There are two possible ways for F1 to display the help for one specific field:</description></item><item><title>When an internal table is not structured</title><link>https://abapinho.com/en/2012/02/tabela-interna-nao-estruturada/</link><pubDate>Mon, 27 Feb 2012 10:00:06 +0000</pubDate><guid>https://abapinho.com/en/2012/02/tabela-interna-nao-estruturada/</guid><description>When you want to select some lines in an internal table you normally do something like this:
DATA: BEGIN OF itbl, campo1 TYPE c, campo2 TYPE c, END OF itbl. READ TABLE itbl WITH KEY campo1 = &amp;#39;X&amp;#39; campo2 = &amp;#39;Y&amp;#39;. LOOP AT itbl WHERE campo1 = &amp;#39;X&amp;#39; and campo2 = &amp;#39;Y&amp;#39;. COISO. ENDLOOP. But what if the table is not structured and you want to search on the line as a whole?</description></item><item><title>Create test variants within functions from the debugger</title><link>https://abapinho.com/en/2012/02/variantes-de-teste-em-debug/</link><pubDate>Mon, 20 Feb 2012 10:00:42 +0000</pubDate><guid>https://abapinho.com/en/2012/02/variantes-de-teste-em-debug/</guid><description>&lt;p>Imagine that you are debugging a transaction, you enter into a function and find something interesting. So interesting that you have to debug it several times. The conventional way is to start the debug of the transaction again from the beginning. How tedious.&lt;/p>
&lt;p>But there is a more direct route. When you are debugging a function you can create test data for this function directly from the debugger, using the values with which the function had been called at that time. For instance:&lt;/p></description></item><item><title>Sending a report or spool job by email</title><link>https://abapinho.com/en/2012/02/relatorio-por-email/</link><pubDate>Mon, 13 Feb 2012 10:00:35 +0000</pubDate><guid>https://abapinho.com/en/2012/02/relatorio-por-email/</guid><description>&lt;p>This post inaugurates a new category in Abapinho: Code. Posts in this category will present useful programs that are ready to execute.&lt;/p>
&lt;p>This one is used for sending the result of any report or spool order by e-mail. This program makes use of the new BCS (Business Communication Services) through the CL_BCS class instead of the tired and old SO_DOCUMENT_SEND_API1, may its soul rest in peace.&lt;/p>
&lt;p>The content can be sent in the body of the email, as a TXT attachment or as an HTML attachment, with the latter being sent nice and neat with all the colours. Enjoy it. Blindly copy it and use it or dissect it and learn how to use CL_BCS. On the way, you can still learn, if you feel like it, how to use local classes and exception classes.&lt;/p>
&lt;p>A local class is simpler to show here in Abapinho but if you want you can transform it into a global class through SE24 as Abapinho already &lt;a href="https://abapinho.com/en/2011/10/importar-classes-locais/">explained some time ago&lt;/a> so that you can use it anywhere.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-ABAP" data-lang="ABAP">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp;---------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; Report ZZZ_NFG_SEND_REPORT_BY_EMAIL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp;---------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; Author: Nuno Godinho&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; Date: 03 January 2012&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; Description: Sends an abap list (generated by a submitted program or&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; read from an existing spool) by email. The list can be&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; sent either in the email body, as a text attachment or&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp; as an HTML attachment.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&amp;amp;---------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">REPORT&lt;/span> &lt;span style="color:#000">zzz_nfg_send_list_by_mail&lt;/span> &lt;span style="color:#00f">MESSAGE-ID&lt;/span> &lt;span style="color:#000">so&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">***************************************************************************&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Exception classes&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CLASS&lt;/span> &lt;span style="color:#000">zcx_zs_no_receivers&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DEFINITION&lt;/span> &lt;span style="color:#000">FINAL&lt;/span> &lt;span style="color:#00f">INHERITING FROM&lt;/span> &lt;span style="color:#000">cx_static_check&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDCLASS&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CLASS&lt;/span> &lt;span style="color:#000">zcx_zs_spool_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DEFINITION&lt;/span> &lt;span style="color:#000">FINAL&lt;/span> &lt;span style="color:#00f">INHERITING FROM&lt;/span> &lt;span style="color:#000">cx_static_check&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDCLASS&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CLASS&lt;/span> &lt;span style="color:#000">zcx_zs_invalid_parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DEFINITION&lt;/span> &lt;span style="color:#000">FINAL&lt;/span> &lt;span style="color:#00f">INHERITING FROM&lt;/span> &lt;span style="color:#000">cx_static_check&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDCLASS&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CLASS&lt;/span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DEFINITION&lt;/span> &lt;span style="color:#000">FINAL&lt;/span> &lt;span style="color:#00f">INHERITING FROM&lt;/span> &lt;span style="color:#000">cx_static_check&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDCLASS&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*----------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* CLASS cl_send_list_by_mail DEFINITION&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*----------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*----------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CLASS&lt;/span> &lt;span style="color:#000">cl_send_list_by_mail&lt;/span> &lt;span style="color:#00f">DEFINITION&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">PUBLIC SECTION&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TYPES&lt;/span>: &lt;span style="color:#000">ty_send_mode&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">char4&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">ty_source&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">char6&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONSTANTS&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">k_send_mode_text&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span> &lt;span style="color:#00f">VALUE&lt;/span> &lt;span style="color:#5a2">&amp;#39;TEXT&amp;#39;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">k_send_mode_text_attach&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span> &lt;span style="color:#00f">VALUE&lt;/span> &lt;span style="color:#5a2">&amp;#39;TXTA&amp;#39;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">k_send_mode_html_attach&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span> &lt;span style="color:#00f">VALUE&lt;/span> &lt;span style="color:#5a2">&amp;#39;HTMA&amp;#39;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">k_send_mode_attachment&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span> &lt;span style="color:#00f">VALUE&lt;/span> &lt;span style="color:#000">space&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">k_source_submit&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_source&lt;/span> &lt;span style="color:#00f">VALUE&lt;/span> &lt;span style="color:#5a2">&amp;#39;SUBMIT&amp;#39;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">k_source_spool&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_source&lt;/span> &lt;span style="color:#00f">VALUE&lt;/span> &lt;span style="color:#5a2">&amp;#39;SPOOL&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHODS&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">constructor&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_send_req_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_recipient&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_smtp_address&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ad_smtpadr&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_send_req_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_address_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">submit_and_send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_smtp_address&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ad_smtpadr&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_no_receivers&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_invalid_parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_spool_error&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">read_spool_and_send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_smtp_address&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ad_smtpadr&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_no_receivers&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_invalid_parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_send_req_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_spool_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">PRIVATE SECTION&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">go_send_request&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cl_bcs&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHODS&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">get_objectlist_and_send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_source&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_source&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_smtp_address&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ad_smtpadr&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_no_receivers&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_invalid_parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_spool_error&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">submit_report_to_memory&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">i_report&lt;/span>) &lt;span style="color:#00f">TYPE program&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">i_variant&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RETURNING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">ot_listobject&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">read_spool_to_memory&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RETURNING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">ot_listobject&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_spool_error&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">get_objectlist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_source&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_source&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">i_report&lt;/span>) &lt;span style="color:#00f">TYPE program&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">i_variant&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RETURNING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">ot_listobject&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_spool_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">create_text_document&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RETURNING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">o_document&lt;/span>) &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cl_document_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_document_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_header_to_body&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CHANGING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">xt_soli&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">soli_tab&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_abaplist_text_attach&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_name&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CHANGING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">x_document&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cl_document_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_document_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_abaplist_html_attach&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_name&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CHANGING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">x_document&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cl_document_bcs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_document_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">it_listobject&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">ty_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">zcx_zs_invalid_parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">cx_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">build_attach_name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_extension&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span> &lt;span style="color:#000">OPTIONAL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RETURNING&lt;/span> &lt;span style="color:#00f">value&lt;/span>(&lt;span style="color:#000">o_name&lt;/span>) &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDCLASS&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;cl_send_list_by_mail DEFINITION
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*----------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* CLASS cl_send_list_by_mail IMPLEMENTATION&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*----------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*----------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">CLASS&lt;/span> &lt;span style="color:#000">cl_send_list_by_mail&lt;/span> &lt;span style="color:#00f">IMPLEMENTATION&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">constructor&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Create the send request&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">go_send_request&lt;/span> = &lt;span style="color:#000">cl_bcs&lt;/span>=&amp;gt;&lt;span style="color:#000">create_persistent&lt;/span>( ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">go_send_request&lt;/span>-&amp;gt;&lt;span style="color:#000">set_send_immediately&lt;/span>( &lt;span style="color:#5a2">&amp;#39;X&amp;#39;&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;constructor
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">add_recipient&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">recipient&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">if_recipient_bcs&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">recipient&lt;/span> = &lt;span style="color:#000">cl_cam_address_bcs&lt;/span>=&amp;gt;&lt;span style="color:#000">create_internet_address&lt;/span>( &lt;span style="color:#000">i_smtp_address&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">go_send_request&lt;/span>-&amp;gt;&lt;span style="color:#000">add_recipient&lt;/span>( &lt;span style="color:#000">recipient&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;add_receiver
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">submit_and_send_mail&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">get_objectlist_and_send_mail&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_source&lt;/span> = &lt;span style="color:#000">k_source_submit&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">i_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">i_subject&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;submit_report_and_sendmail
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">read_spool_and_send_mail&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">get_objectlist_and_send_mail&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_source&lt;/span> = &lt;span style="color:#000">k_source_spool&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">i_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">i_subject&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;read_spool_and_send_mail
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">get_objectlist_and_send_mail&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">t_recipients&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">bcsy_re&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_listobject&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">table_abaplist&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Check parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> ( &lt;span style="color:#000">i_source&lt;/span> = &lt;span style="color:#000">k_source_spool&lt;/span> &lt;span style="color:#00f">AND&lt;/span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">IS INITIAL&lt;/span> ) &lt;span style="color:#00f">OR&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ( &lt;span style="color:#000">i_source&lt;/span> = &lt;span style="color:#000">k_source_submit&lt;/span> &lt;span style="color:#00f">AND&lt;/span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">IS INITIAL&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_invalid_parameters&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Add recipient if supplied&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_smtp_address&lt;/span> &lt;span style="color:#000">IS&lt;/span> &lt;span style="color:#000">SUPPLIED&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_recipient&lt;/span>( &lt;span style="color:#000">i_smtp_address&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* It should only run if there is at least one recipient&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_recipients&lt;/span> = &lt;span style="color:#000">go_send_request&lt;/span>-&amp;gt;&lt;span style="color:#000">recipients&lt;/span>( ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">t_recipients[]&lt;/span> &lt;span style="color:#00f">IS INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_no_receivers&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Get objectlist either from submit or from spool&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_listobject&lt;/span> = &lt;span style="color:#000">get_objectlist&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_source&lt;/span> = &lt;span style="color:#000">i_source&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Send email&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL METHOD&lt;/span> &lt;span style="color:#000">send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> = &lt;span style="color:#000">t_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">i_send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">i_subject&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;get_objectlist_and_send_mail
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">get_objectlist&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Get abap list into memory (either from spool or submit)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_source&lt;/span> = &lt;span style="color:#000">k_source_submit&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">submit_report_to_memory&lt;/span>( &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">read_spool_to_memory&lt;/span>( &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Import the list from memory and store it in table listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">REFRESH&lt;/span> : &lt;span style="color:#000">ot_listobject&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;LIST_FROM_MEMORY&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TABLES&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">listobject&lt;/span> = &lt;span style="color:#000">ot_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">not_found&lt;/span> = &lt;span style="color:#3af">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">OTHERS&lt;/span> = &lt;span style="color:#3af">2&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">subrc&lt;/span> &amp;lt;&amp;gt; &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Free memory&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;LIST_FREE_MEMORY&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TABLES&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">listobject&lt;/span> = &lt;span style="color:#000">ot_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">OTHERS&lt;/span> = &lt;span style="color:#3af">1&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">subrc&lt;/span> &amp;lt;&amp;gt; &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;get_objectlist
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">submit_report_to_memory&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TRANSLATE&lt;/span>: &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#00f">UPPER CASE&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#00f">UPPER CASE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Submit report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">SUBMIT&lt;/span> (&lt;span style="color:#000">i_report&lt;/span>) &lt;span style="color:#00f">USING&lt;/span> &lt;span style="color:#000">SELECTION&lt;/span>-&lt;span style="color:#000">SET&lt;/span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">EXPORTING&lt;/span> &lt;span style="color:#000">LIST&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">MEMORY&lt;/span> &lt;span style="color:#00f">AND RETURN&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;submit_report
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">read_spool_to_memory&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Adapted from FM RSPO_RETURN_ABAP_SPOOLJOB. This FM converts the list to ASCII&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* and I needed it as an ABAPLIST so I just copied the code and adapted it&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">data_is_otf&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">c&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;RSPO_CHECK_JOB_ID_PERMISSION&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">rqident&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">access&lt;/span> = &lt;span style="color:#5a2">&amp;#39;DISP&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">no_such_job&lt;/span> = &lt;span style="color:#3af">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">no_permission&lt;/span> = &lt;span style="color:#3af">2&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">subrc&lt;/span> &amp;lt;&amp;gt; &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_spool_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;RSPO_GET_TYPE_SPOOLJOB&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">rqident&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IMPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">is_otf&lt;/span> = &lt;span style="color:#000">data_is_otf&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">can_not_access&lt;/span> = &lt;span style="color:#3af">1&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">subrc&lt;/span> &amp;lt;&amp;gt; &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_spool_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">data_is_otf&lt;/span> = &lt;span style="color:#5a2">&amp;#39;X&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_spool_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">SUBMIT&lt;/span> &lt;span style="color:#000">rspolist&lt;/span> &lt;span style="color:#00f">EXPORTING&lt;/span> &lt;span style="color:#000">LIST&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">MEMORY&lt;/span> &lt;span style="color:#00f">AND RETURN&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WITH&lt;/span> &lt;span style="color:#000">rqident&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WITH&lt;/span> &lt;span style="color:#000">first&lt;/span> = &lt;span style="color:#3af">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WITH&lt;/span> &lt;span style="color:#000">last&lt;/span> = &lt;span style="color:#3af">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WITH&lt;/span> &lt;span style="color:#000">pages&lt;/span> = &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;read_spool
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">send_mail&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">document&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cl_document_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">sent_to_all&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">os_boolean&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">bcs_exception&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cx_bcs&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">name&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">k_send_mode_text&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">document&lt;/span> = &lt;span style="color:#000">create_text_document&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> = &lt;span style="color:#000">it_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">i_subject&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Create text document without adding listobject to the body (it will be attached)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">document&lt;/span> = &lt;span style="color:#000">create_text_document&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">i_subject&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Add attachment to document&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">k_send_mode_text_attach&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">name&lt;/span> = &lt;span style="color:#000">build_attach_name&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_extension&lt;/span> = &lt;span style="color:#5a2">&amp;#39;TXT&amp;#39;&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_abaplist_text_attach&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> = &lt;span style="color:#000">it_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_name&lt;/span> = &lt;span style="color:#000">name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CHANGING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">x_document&lt;/span> = &lt;span style="color:#000">document&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSEIF&lt;/span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">k_send_mode_html_attach&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">name&lt;/span> = &lt;span style="color:#000">build_attach_name&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_abaplist_html_attach&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">it_listobject&lt;/span> = &lt;span style="color:#000">it_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_name&lt;/span> = &lt;span style="color:#000">name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CHANGING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">x_document&lt;/span> = &lt;span style="color:#000">document&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Add document to send request&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">go_send_request&lt;/span>-&amp;gt;&lt;span style="color:#000">set_document&lt;/span>( &lt;span style="color:#000">document&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Send&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">sent_to_all&lt;/span> = &lt;span style="color:#000">go_send_request&lt;/span>-&amp;gt;&lt;span style="color:#000">send&lt;/span>( &lt;span style="color:#000">i_with_error_screen&lt;/span> = &lt;span style="color:#5a2">&amp;#39;X&amp;#39;&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* IF sent_to_all NE &amp;#39;X&amp;#39;.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* RAISE EXCEPTION TYPE zcx_zs_mail_not_sent.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* ENDIF.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;send_mail
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">create_text_document&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">t_listasci&lt;/span> &lt;span style="color:#00f">TYPE STANDARD TABLE OF&lt;/span> &lt;span style="color:#000">solisti1&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_listobject&lt;/span> &lt;span style="color:#00f">LIKE &lt;/span>&lt;span style="color:#000">it_listobject&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_soli&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">soli_tab&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">LIKE LINE OF&lt;/span> &lt;span style="color:#000">t_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Add header&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">add_header_to_body&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">i_variant&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">i_spool_number&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CHANGING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">xt_soli&lt;/span> = &lt;span style="color:#000">t_soli&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Add abap list&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">it_listobject&lt;/span> &lt;span style="color:#000">IS&lt;/span> &lt;span style="color:#000">SUPPLIED&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CLEAR&lt;/span> &lt;span style="color:#000">w_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">t_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">w_soli&lt;/span> = &lt;span style="color:#5a2">&amp;#39;------------------------------------------------------&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">t_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CLEAR&lt;/span> &lt;span style="color:#000">w_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">t_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_listobject[]&lt;/span> = &lt;span style="color:#000">it_listobject[]&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;LIST_TO_ASCI&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TABLES&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">listasci&lt;/span> = &lt;span style="color:#000">t_listasci&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">listobject&lt;/span> = &lt;span style="color:#000">t_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">empty_list&lt;/span> = &lt;span style="color:#3af">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">list_index_invalid&lt;/span> = &lt;span style="color:#3af">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">OTHERS&lt;/span> = &lt;span style="color:#3af">3&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">subrc&lt;/span> &amp;lt;&amp;gt; &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND LINES OF&lt;/span> &lt;span style="color:#000">t_listasci&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">t_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Create text document&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">o_document&lt;/span> = &lt;span style="color:#000">cl_document_bcs&lt;/span>=&amp;gt;&lt;span style="color:#000">create_document&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_type&lt;/span> = &lt;span style="color:#5a2">&amp;#39;RAW&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_text&lt;/span> = &lt;span style="color:#000">t_soli&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">i_subject&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;create_text_document
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">add_header_to_body&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">LIKE LINE OF&lt;/span> &lt;span style="color:#000">xt_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#5a2">&amp;#39;Report:&amp;#39;&lt;/span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">SEPARATED BY&lt;/span> &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">xt_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#5a2">&amp;#39;Variant:&amp;#39;&lt;/span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">SEPARATED BY&lt;/span> &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">xt_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">MOVE&lt;/span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">w_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#5a2">&amp;#39;Spool number:&amp;#39;&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">SEPARATED BY&lt;/span> &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">xt_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#5a2">&amp;#39;Date:&amp;#39;&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">datum&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">uzeit&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">SEPARATED BY&lt;/span> &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">xt_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#5a2">&amp;#39;User:&amp;#39;&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">uname&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">SEPARATED BY&lt;/span> &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">APPEND&lt;/span> &lt;span style="color:#000">w_soli&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">xt_soli&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;build_header
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">add_abaplist_text_attach&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">t_solix&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">solix_tab&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* It&amp;#39;s always necessary to compress the table. SAPconnect will decompress it&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;TABLE_COMPRESS&amp;#39;&lt;/span> &lt;span style="color:#888;font-style:italic">&amp;#34;#EC *
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span> &lt;span style="color:#00f">TABLES&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">in&lt;/span> = &lt;span style="color:#000">it_listobject&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">out&lt;/span> = &lt;span style="color:#000">t_solix&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXCEPTIONS&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">compress_error&lt;/span> = &lt;span style="color:#3af">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">OTHERS&lt;/span> = &lt;span style="color:#3af">2&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">subrc&lt;/span> &amp;lt;&amp;gt; &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">RAISE&lt;/span> &lt;span style="color:#00f">EXCEPTION&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">zcx_zs_objectlist_error&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">x_document&lt;/span>-&amp;gt;&lt;span style="color:#000">add_attachment&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_attachment_type&lt;/span> = &lt;span style="color:#5a2">&amp;#39;ALI&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_attachment_subject&lt;/span> = &lt;span style="color:#000">i_name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_att_content_hex&lt;/span> = &lt;span style="color:#000">t_solix&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;add_abaplist_text_attach
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">add_abaplist_html_attach&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">t_soli&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">soli_tab&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_listobject&lt;/span> &lt;span style="color:#00f">LIKE &lt;/span>&lt;span style="color:#000">it_listobject&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">t_listobject[]&lt;/span> = &lt;span style="color:#000">it_listobject[]&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL FUNCTION&lt;/span> &lt;span style="color:#5a2">&amp;#39;WWW_HTML_FROM_LISTOBJECT&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TABLES&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">html&lt;/span> = &lt;span style="color:#000">t_soli&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">listobject&lt;/span> = &lt;span style="color:#000">t_listobject&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">x_document&lt;/span>-&amp;gt;&lt;span style="color:#000">add_attachment&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_attachment_type&lt;/span> = &lt;span style="color:#5a2">&amp;#39;HTM&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_attachment_subject&lt;/span> = &lt;span style="color:#000">i_name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_att_content_text&lt;/span> = &lt;span style="color:#000">t_soli&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;add_abaplist_html_attach
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">METHOD&lt;/span> &lt;span style="color:#000">build_attach_name&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_report&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">o_name&lt;/span> = &lt;span style="color:#000">i_report&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#000">o_name&lt;/span> &lt;span style="color:#5a2">&amp;#39;-&amp;#39;&lt;/span> &lt;span style="color:#000">i_variant&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">o_name&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">MOVE&lt;/span> &lt;span style="color:#000">i_spool_number&lt;/span> &lt;span style="color:#00f">TO&lt;/span> &lt;span style="color:#000">o_name&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">SHIFT&lt;/span> &lt;span style="color:#000">o_name&lt;/span> &lt;span style="color:#000">LEFT&lt;/span> &lt;span style="color:#000">DELETING&lt;/span> &lt;span style="color:#000">LEADING&lt;/span> &lt;span style="color:#000">space&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#000">o_name&lt;/span> &lt;span style="color:#5a2">&amp;#39;-&amp;#39;&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">datum&lt;/span> &lt;span style="color:#5a2">&amp;#39;-&amp;#39;&lt;/span> &lt;span style="color:#000">sy&lt;/span>-&lt;span style="color:#000">uzeit&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">o_name&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">i_extension&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CONCATENATE&lt;/span> &lt;span style="color:#000">o_name&lt;/span> &lt;span style="color:#5a2">&amp;#39;.&amp;#39;&lt;/span> &lt;span style="color:#000">i_extension&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">o_name&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDMETHOD&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;build_attach_name
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">ENDCLASS&lt;/span>. &lt;span style="color:#888;font-style:italic">&amp;#34;cl_send_list_by_mail IMPLEMENTATION
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">***************************************************************************&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">TABLES&lt;/span>: &lt;span style="color:#000">adr6&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">*------------------------------------------------------------------*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN BEGIN OF BLOCK&lt;/span> &lt;span style="color:#000">b1&lt;/span> &lt;span style="color:#00f">WITH FRAME&lt;/span> &lt;span style="color:#00f">TITLE&lt;/span> &lt;span style="color:#00f">text&lt;/span>-&lt;span style="color:#3af">001&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">PARAMETERS&lt;/span>: &lt;span style="color:#000">p_subj&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">so_obj_des&lt;/span> &lt;span style="color:#00f">OBLIGATORY&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECT-OPTIONS&lt;/span>: &lt;span style="color:#000">s_rec&lt;/span> &lt;span style="color:#00f">FOR&lt;/span> &lt;span style="color:#000">adr6&lt;/span>-&lt;span style="color:#000">smtp_addr&lt;/span> &lt;span style="color:#00f">NO INTERVALS&lt;/span> &lt;span style="color:#00f">LOWER CASE&lt;/span> &lt;span style="color:#00f">OBLIGATORY&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN END OF BLOCK&lt;/span> &lt;span style="color:#000">b1&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN BEGIN OF BLOCK&lt;/span> &lt;span style="color:#000">b2&lt;/span> &lt;span style="color:#00f">WITH FRAME&lt;/span> &lt;span style="color:#00f">TITLE&lt;/span> &lt;span style="color:#00f">text&lt;/span>-&lt;span style="color:#3af">002&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">PARAMETERS&lt;/span>: &lt;span style="color:#000">p_submit&lt;/span> &lt;span style="color:#00f">RADIOBUTTON GROUP&lt;/span> &lt;span style="color:#000">typ&lt;/span> &lt;span style="color:#000">USER&lt;/span>-&lt;span style="color:#000">COMMAND&lt;/span> &lt;span style="color:#000">typ&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN BEGIN OF BLOCK&lt;/span> &lt;span style="color:#000">b2a&lt;/span> &lt;span style="color:#00f">WITH FRAME&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">PARAMETERS&lt;/span>: &lt;span style="color:#000">p_rep&lt;/span> &lt;span style="color:#00f">TYPE program&lt;/span> &lt;span style="color:#00f">MODIF ID&lt;/span> &lt;span style="color:#000">ty1&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">p_var&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">raldb_vari&lt;/span> &lt;span style="color:#00f">MODIF ID&lt;/span> &lt;span style="color:#000">ty1&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN END OF BLOCK&lt;/span> &lt;span style="color:#000">b2a&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">PARAMETERS&lt;/span>: &lt;span style="color:#000">p_spool&lt;/span> &lt;span style="color:#00f">RADIOBUTTON GROUP&lt;/span> &lt;span style="color:#000">typ&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN BEGIN OF BLOCK&lt;/span> &lt;span style="color:#000">b2b&lt;/span> &lt;span style="color:#00f">WITH FRAME&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">PARAMETERS&lt;/span>: &lt;span style="color:#000">p_rspoid&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">rspoid&lt;/span> &lt;span style="color:#00f">MODIF ID&lt;/span> &lt;span style="color:#000">ty2&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN END OF BLOCK&lt;/span> &lt;span style="color:#000">b2b&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN END OF BLOCK&lt;/span> &lt;span style="color:#000">b2&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN BEGIN OF BLOCK&lt;/span> &lt;span style="color:#000">b3&lt;/span> &lt;span style="color:#00f">WITH FRAME&lt;/span> &lt;span style="color:#00f">TITLE&lt;/span> &lt;span style="color:#00f">text&lt;/span>-&lt;span style="color:#3af">003&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">PARAMETERS&lt;/span>: &lt;span style="color:#000">p_text&lt;/span> &lt;span style="color:#00f">RADIOBUTTON GROUP&lt;/span> &lt;span style="color:#000">opt&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">p_texta&lt;/span> &lt;span style="color:#00f">RADIOBUTTON GROUP&lt;/span> &lt;span style="color:#000">opt&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">p_htmla&lt;/span> &lt;span style="color:#00f">RADIOBUTTON GROUP&lt;/span> &lt;span style="color:#000">opt&lt;/span> &lt;span style="color:#00f">DEFAULT&lt;/span> &lt;span style="color:#5a2">&amp;#39;X&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">SELECTION-SCREEN END OF BLOCK&lt;/span> &lt;span style="color:#000">b3&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">AT SELECTION-SCREEN OUTPUT&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">LOOP AT SCREEN&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">screen&lt;/span>-&lt;span style="color:#000">group1&lt;/span> = &lt;span style="color:#5a2">&amp;#39;TY1&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">p_submit&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">screen&lt;/span>-&lt;span style="color:#000">input&lt;/span> = &lt;span style="color:#3af">1&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">screen&lt;/span>-&lt;span style="color:#000">input&lt;/span> = &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">MODIFY SCREEN&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">screen&lt;/span>-&lt;span style="color:#000">group1&lt;/span> = &lt;span style="color:#5a2">&amp;#39;TY2&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> &lt;span style="color:#000">p_spool&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">screen&lt;/span>-&lt;span style="color:#000">input&lt;/span> = &lt;span style="color:#3af">1&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ELSE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">screen&lt;/span>-&lt;span style="color:#000">input&lt;/span> = &lt;span style="color:#3af">0&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">MODIFY SCREEN&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDLOOP&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00f">START-OF-SELECTION&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">DATA&lt;/span>: &lt;span style="color:#000">go_sender&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cl_send_list_by_mail&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">send_mode&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">cl_send_list_by_mail&lt;/span>=&amp;gt;&lt;span style="color:#000">ty_send_mode&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">exc_ref&lt;/span> &lt;span style="color:#00f">TYPE REF TO&lt;/span> &lt;span style="color:#000">cx_root&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">text&lt;/span> &lt;span style="color:#00f">TYPE &lt;/span>&lt;span style="color:#000">string&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">IF&lt;/span> ( &lt;span style="color:#000">p_submit&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span> &lt;span style="color:#00f">AND&lt;/span> &lt;span style="color:#000">p_rep&lt;/span> &lt;span style="color:#00f">IS INITIAL&lt;/span> ) &lt;span style="color:#00f">OR&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ( &lt;span style="color:#000">p_spool&lt;/span> &lt;span style="color:#00f">IS NOT INITIAL&lt;/span> &lt;span style="color:#00f">AND&lt;/span> &lt;span style="color:#000">p_rspoid&lt;/span> &lt;span style="color:#00f">IS INITIAL&lt;/span> ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">MESSAGE&lt;/span> &lt;span style="color:#000">s622&lt;/span> &lt;span style="color:#000">DISPLAY&lt;/span> &lt;span style="color:#000">LIKE&lt;/span> &lt;span style="color:#5a2">&amp;#39;E&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXIT&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDIF&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CREATE OBJECT&lt;/span> &lt;span style="color:#000">go_sender&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Determine send mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CASE&lt;/span> &lt;span style="color:#5a2">&amp;#39;X&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WHEN&lt;/span> &lt;span style="color:#000">p_texta&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">send_mode&lt;/span> = &lt;span style="color:#000">cl_send_list_by_mail&lt;/span>=&amp;gt;&lt;span style="color:#000">k_send_mode_text_attach&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WHEN&lt;/span> &lt;span style="color:#000">p_htmla&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">send_mode&lt;/span> = &lt;span style="color:#000">cl_send_list_by_mail&lt;/span>=&amp;gt;&lt;span style="color:#000">k_send_mode_html_attach&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WHEN&lt;/span> &lt;span style="color:#00f">OTHERS&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">send_mode&lt;/span> = &lt;span style="color:#000">cl_send_list_by_mail&lt;/span>=&amp;gt;&lt;span style="color:#000">k_send_mode_text&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDCASE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* Add recipients&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">LOOP AT &lt;/span>&lt;span style="color:#000">s_rec&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL METHOD&lt;/span> &lt;span style="color:#000">go_sender&lt;/span>-&amp;gt;&lt;span style="color:#000">add_recipient&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_smtp_address&lt;/span> = &lt;span style="color:#000">s_rec&lt;/span>-&lt;span style="color:#000">low&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDLOOP&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">TRY&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CASE&lt;/span> &lt;span style="color:#5a2">&amp;#39;X&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WHEN&lt;/span> &lt;span style="color:#000">p_submit&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL METHOD&lt;/span> &lt;span style="color:#000">go_sender&lt;/span>-&amp;gt;&lt;span style="color:#000">submit_and_send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_report&lt;/span> = &lt;span style="color:#000">p_rep&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_variant&lt;/span> = &lt;span style="color:#000">p_var&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">p_subj&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WHEN&lt;/span> &lt;span style="color:#000">p_spool&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CALL METHOD&lt;/span> &lt;span style="color:#000">go_sender&lt;/span>-&amp;gt;&lt;span style="color:#000">read_spool_and_send_mail&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">EXPORTING&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_send_mode&lt;/span> = &lt;span style="color:#000">send_mode&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_spool_number&lt;/span> = &lt;span style="color:#000">p_rspoid&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">i_subject&lt;/span> = &lt;span style="color:#000">p_subj&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDCASE&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WRITE&lt;/span>: / &lt;span style="color:#5a2">&amp;#39;Mail message sent&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">CATCH&lt;/span> &lt;span style="color:#000">cx_root&lt;/span> &lt;span style="color:#00f">INTO&lt;/span> &lt;span style="color:#000">exc_ref&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">text&lt;/span> = &lt;span style="color:#000">exc_ref&lt;/span>-&amp;gt;&lt;span style="color:#000">get_text&lt;/span>( ).
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">WRITE&lt;/span>: / &lt;span style="color:#000">text&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">ENDTRY&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic">* It will not work without this commit&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#00f">COMMIT&lt;/span> &lt;span style="color:#000">WORK&lt;/span>.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Texts for selection screen:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>P_SUBJ&lt;/th>
&lt;th>Subject&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;/table>
&lt;p>S_REC| Recipients&lt;/p>
&lt;p>P_SUBMIT| Send report&lt;/p>
&lt;p>P_REP| Report&lt;/p>
&lt;p>P_VAR| Variant&lt;/p>
&lt;p>P_SPOOL| Send spool job&lt;/p>
&lt;p>P_RSPOID| Spool job ID&lt;/p>
&lt;p>P_TEXT| Email body&lt;/p>
&lt;p>P_TEXTA| TXT attachment&lt;/p>
&lt;p>P_HTMLA| HTML attachment&lt;/p>
&lt;p>Greetings from Abapinho.&lt;/p></description></item><item><title>The SAPGui history does not work even when active?</title><link>https://abapinho.com/en/2012/02/sapgui-historico/</link><pubDate>Mon, 06 Feb 2012 10:00:01 +0000</pubDate><guid>https://abapinho.com/en/2012/02/sapgui-historico/</guid><description>&lt;p>Has it ever happened to you that SAPGui does not store a history of values that you input to various fields even though the History option is actived in the settings?&lt;/p></description></item><item><title>SE80 has favourites</title><link>https://abapinho.com/en/2012/01/favoritos-se80/</link><pubDate>Mon, 30 Jan 2012 10:00:39 +0000</pubDate><guid>https://abapinho.com/en/2012/01/favoritos-se80/</guid><description>The SE80 transaction contains everything. It seems like those village grocery stores crammed with junk where you can buy toothpaste, bread, shoes, perfume and rice in bulk. I like these grocery stores. But to go there you need to know where you are going, otherwise you&amp;rsquo;ll walk from pillar to post.
But this is what it&amp;rsquo;s like in these grocery stores but in SE80&amp;hellip;. there are favourites.
Yes indeed there are.</description></item><item><title>If a stranger offers you values, this is Input</title><link>https://abapinho.com/en/2012/01/call-selection-screen/</link><pubDate>Mon, 23 Jan 2012 10:00:08 +0000</pubDate><guid>https://abapinho.com/en/2012/01/call-selection-screen/</guid><description>&lt;p>In a report, the values are normally requested from the user at the first selection screen before the program is run. But what if you want to interactively ask for more values in the middle of running the program?&lt;/p></description></item><item><title>Selection screen with tabs</title><link>https://abapinho.com/en/2012/01/ecra-seleccao-abas/</link><pubDate>Mon, 16 Jan 2012 10:00:23 +0000</pubDate><guid>https://abapinho.com/en/2012/01/ecra-seleccao-abas/</guid><description>&lt;p>The selection screens of ABAP programs have several features that, although complex and easy to use, are generally ignored. Here, I will show you how easy it is to create tabs to better organise the parameters of a program. This time though, and uncommonly, I&amp;rsquo;ll spare you the verbal onslaught. It’s a practical class.&lt;/p></description></item><item><title>Debugging while in modal dialogue boxes</title><link>https://abapinho.com/en/2012/01/debug-em-popups/</link><pubDate>Mon, 09 Jan 2012 10:00:29 +0000</pubDate><guid>https://abapinho.com/en/2012/01/debug-em-popups/</guid><description>&lt;p>There are times when you can’t do /H to launch &lt;em>debugger&lt;/em>. The most common one is when a pop-up window is open. However there is a simple, if Heath-Robinson, way to do it:&lt;/p></description></item><item><title>What does a message say?</title><link>https://abapinho.com/en/2012/01/texto-mensagem/</link><pubDate>Mon, 02 Jan 2012 10:00:15 +0000</pubDate><guid>https://abapinho.com/en/2012/01/texto-mensagem/</guid><description>Do you want to obtain the text from a message when you only know the ID and the number, but you don’t know how? Find out here:
DATA text TYPE string. MESSAGE ID &amp;#39;00&amp;#39; TYPE &amp;#39;E&amp;#39; NUMBER &amp;#39;163&amp;#39; WITH &amp;#39;123&amp;#39; INTO text. That’s all it is. Now inside the text variable, you find the following text:
&amp;ldquo;Client 123 does not exist in the system&amp;rdquo;
Thanks to Peteris B for the photo.</description></item><item><title>Be lazy when you write in ABAPese</title><link>https://abapinho.com/en/2011/12/modelos-de-codigo/</link><pubDate>Mon, 26 Dec 2011 00:11:42 +0000</pubDate><guid>https://abapinho.com/en/2011/12/modelos-de-codigo/</guid><description>&lt;p>To find out which professions attract the laziest people, I googled the following:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Profession&lt;/th>
&lt;th>Results&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;/table>
&lt;p>&amp;ldquo;médico preguiçoso (lazy doctor)&amp;quot;| 2,140,000&lt;/p>
&lt;p>&amp;ldquo;advogado preguiçoso (lazy lawyer)&amp;quot;| 1,430,000&lt;/p>
&lt;p>&amp;ldquo;gestor preguiçoso (lazy business administrator)&amp;quot;| 1,020,000&lt;/p>
&lt;p>&lt;em>&amp;ldquo;engenheiro preguiçoso (lazy engineer)&amp;rdquo;&lt;/em>| &lt;em>647,000&lt;/em>&lt;/p>
&lt;p>&amp;ldquo;político preguiçoso (lazy politician)&amp;quot;| 602,000&lt;/p>
&lt;p>&amp;ldquo;economista preguiçoso (lazy economist)&amp;quot;| 284,000&lt;/p>
&lt;p>&amp;ldquo;pedreiro preguiçoso (lazy builder)&amp;quot;| 91,200&lt;/p>
&lt;p>As this conclusively proves, engineers are not lazy enough as they are beaten by lawyers and doctors. This must change. And this tip will help. But not without making the following difference clear: lazy is not work-shy. I am talking here about noble laziness, the behaviour of those who like doing things but with the least possible effort. Lazy slobs are not included here.&lt;/p>
&lt;p>SAP is something that evolves slowly, and it launched a new editor a few years ago that is full of &lt;a href="https://wiki.sdn.sap.com/wiki/display/ABAP/New+ABAP+Editor">capabilities&lt;/a> many of which, while handy, are barely used. One of them is called ‘Code templates’ which I will now demonstrate:&lt;/p></description></item><item><title>Multiple choice ALV in a modal dialogue box</title><link>https://abapinho.com/en/2011/12/alv-popup/</link><pubDate>Mon, 19 Dec 2011 10:00:31 +0000</pubDate><guid>https://abapinho.com/en/2011/12/alv-popup/</guid><description>&lt;p>Do you know how to present an ALV with a list of records in a dialogue box allowing multiple choice? I didn’t. But I do now. Let me explain how.&lt;/p></description></item><item><title>Automating the ALV field catalogue</title><link>https://abapinho.com/en/2011/12/automatizar-catalogo-alv/</link><pubDate>Mon, 12 Dec 2011 10:00:00 +0000</pubDate><guid>https://abapinho.com/en/2011/12/automatizar-catalogo-alv/</guid><description>&lt;p>Sometimes I ask myself what percentage of the world’s ABAP code is unnecessary. A paradigmatic example of how time can be wasted writing code which is of no use to anyone and only creates problems is the ALV’s all-too-common field description definition sitting directly in ABAP.&lt;/p></description></item><item><title>&lt;!--:pt-->Pasta temporária do SAP Gui&lt;!--:--></title><link>https://abapinho.com/en/2011/12/pasta-temporaria-sap-gui/</link><pubDate>Mon, 05 Dec 2011 10:00:09 +0000</pubDate><guid>https://abapinho.com/en/2011/12/pasta-temporaria-sap-gui/</guid><description>Sometimes a program wants to save a file locally on the user&amp;rsquo;s computer via the SAP Gui. In these cases it is usual that one of the fields of the selection screen is the location of the folder on the local disk.
This is a way of initialising this field with the temporary folder of the SAP Gui:
PARAMETERS: p_path TYPE string. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path. CALL METHOD cl_gui_frontend_services=&amp;gt;directory_browse EXPORTING initial_folder = p_path CHANGING selected_folder = p_path.</description></item><item><title>Partial Analyses in SE30</title><link>https://abapinho.com/en/2011/11/se30-parciais/</link><pubDate>Mon, 28 Nov 2011 11:37:25 +0000</pubDate><guid>https://abapinho.com/en/2011/11/se30-parciais/</guid><description>Obviously you already know the SE30 transaction (run time analysis) and obviously you use it often to analyse standard programs and to discover tables, functions, BADIs and similar contained within them.
But if you are like me, then you have a love-hate relationship with this transaction – on the one hand you love it because it enables you to see the guts of a program without having to debug it, yet on the other hand you hate it because normally the list of guts tends to have thousands of lines and becomes unmanageable.</description></item><item><title>Multilingual programs that know what they are talking about</title><link>https://abapinho.com/en/2011/11/programas-poliglotas/</link><pubDate>Mon, 21 Nov 2011 10:00:20 +0000</pubDate><guid>https://abapinho.com/en/2011/11/programas-poliglotas/</guid><description>SAP is multilingual. But ABAP not always. ABAP does have some ability to learn and speak a few languages, but sometimes the programmers do not let it.
A lot of programmers whack literal texts directly into the program, leaving it forever unable to communicate in multiple languages. I can think of two reasons for shackling a program to just one language:
Laziness, the main reason for doing things badly;
Legibility. In fact the way to make an ABAP program localizable is to pack it full of text references, like TEXT-001, which can get a bit illegible.</description></item><item><title>Fair thee well DESCRIBE TABLE. And good riddance.</title><link>https://abapinho.com/en/2011/11/lines/</link><pubDate>Mon, 07 Nov 2011 10:20:18 +0000</pubDate><guid>https://abapinho.com/en/2011/11/lines/</guid><description>For twelve long years When I wanted to count The lines of an itab I did what everyone does: DESCRIBE TABLE itab LINES linhas.
Until the other day When (my eyes didn’t deceive me) I saw something so new, You wouldn’t believe me: LINES( itab ).
It gives the same outcome And does away with declaring The damn variable.
So instead of:
DATA: linhas TYPE i. DESCRIBE TABLE itabl LINES linhas.</description></item><item><title>The drag queen message</title><link>https://abapinho.com/en/2011/10/mensagem-travesti/</link><pubDate>Mon, 31 Oct 2011 10:00:55 +0000</pubDate><guid>https://abapinho.com/en/2011/10/mensagem-travesti/</guid><description>The AT SELECTION-SCREEN modules of a report can throw error messages and send you back to the selection screen. But once you get past the START-OF-SELECTION, if you get an error message, the program ends. The solution to getting an error and returning to the selection screen, is to disguise the message:
START-OF-SELECTION. IF condicao_desejada. MESSAGE S208(00) with &amp;#39;Erro!&amp;#39; DISPLAY LIKE &amp;#39;E&amp;#39;. EXIT. ENDIF. WRITE &amp;#39;Olá, eu sou o resto do programa&amp;#39;.</description></item><item><title>The round-about routes of VALUE CHECK</title><link>https://abapinho.com/en/2011/10/value-check/</link><pubDate>Mon, 24 Oct 2011 10:00:24 +0000</pubDate><guid>https://abapinho.com/en/2011/10/value-check/</guid><description>Have you ever come up against something in ABAP that seems to be one thing but is in fact another? The documentation says it is this and everything seems to indicate that it is, but after all it isn’t.
You&amp;rsquo;ve probably needed to, when setting a parameter in the report selection screen, check the possibilities of what the user can input to the available values in the data type of that parameter, right?</description></item><item><title>Automatic variants in reports</title><link>https://abapinho.com/en/2011/10/variantes-automaticas/</link><pubDate>Mon, 17 Oct 2011 10:00:57 +0000</pubDate><guid>https://abapinho.com/en/2011/10/variantes-automaticas/</guid><description>When developing a report with a selection screen it is very annoying that every time we test it we have to input the test data to the selection screen. We usually end up creating a variant of the test to save us from this hassle. But, every time we run the report we still have to manually call this variant.
Here is a simple way to automatically call a variant. This code can be inserted into the INITIALIZATION event during the development of the program:</description></item><item><title>Stand up, all victims of oppression</title><link>https://abapinho.com/en/2011/10/importar-classes-locais/</link><pubDate>Tue, 11 Oct 2011 10:55:54 +0000</pubDate><guid>https://abapinho.com/en/2011/10/importar-classes-locais/</guid><description>Classes. They have always existed among people. But there are still few who take them into consideration in ABAP. While being a supporter of classes in society can result in pedantry, the only class struggle in ABAP is that some fight for them to be used more.
There are two types of classes: global and local. The global ones are created in the SE24 transaction. Local classes, which by the way I find myself using more and more, are done declaratively in SE38.</description></item><item><title>Forget it!</title><link>https://abapinho.com/en/2011/10/esquece/</link><pubDate>Fri, 07 Oct 2011 10:00:49 +0000</pubDate><guid>https://abapinho.com/en/2011/10/esquece/</guid><description>O SAP GUI tem boa memória. Vai decorando os valores que lhe vamos metendo nos campos e depois sugere-os quando, mais tarde, voltamos a esses campos. Mas às vezes decora coisas que mais valia esquecer. Como por exemplo quando introduzimos um valor errado e a seguir ele insiste em sugerir-nos esse valor errado.
Há uns tempos descobri que este pequeno drama tem solução. Quando, no campo, aparece a combo box com as várias hipóteses, usa as setas do teclado para te posicionares no valor que queres esquecer e depois carrega na tecla DELETE.</description></item><item><title>SPLIT INTO TABLE</title><link>https://abapinho.com/en/2011/10/split-into-table/</link><pubDate>Mon, 03 Oct 2011 10:00:13 +0000</pubDate><guid>https://abapinho.com/en/2011/10/split-into-table/</guid><description>I’m going to show you a creative way of filling out an internal table with constants that I learned in a standard program. Imagine you want to create an internal table with the following kinds of financial documents:
AB AF CH DG DZ EX F3 F4.
The more conventional way would be this:
DATA: t_blart TYPE STANDARD TABLE OF blart, wa_blart LIKE LINE OF t_blart. wa_blart = &amp;#39;AB&amp;#39;. APPEND wa_blart TO t_blart.</description></item><item><title>Vertical text selection in ABAP editor - really? Really.</title><link>https://abapinho.com/en/2011/09/seleccao-vertical-de-texto/</link><pubDate>Mon, 26 Sep 2011 10:00:06 +0000</pubDate><guid>https://abapinho.com/en/2011/09/seleccao-vertical-de-texto/</guid><description>As everyone knows, you can select vertical or horizontal blocks of text almost anywhere in SAPGUI, typing CTRL-Y and then dragging the mouse to make the selection. Everyone also knows that this does not work in ABAP editor. But perhaps what some people don&amp;rsquo;t know is that there is a way of making this kind of selection in ABAP editor: press and hold ALT. Now you can select blocks of text.</description></item><item><title>Unparameterisable parameters</title><link>https://abapinho.com/en/2011/09/parametros-nao-parametrizaveis/</link><pubDate>Mon, 12 Sep 2011 10:00:52 +0000</pubDate><guid>https://abapinho.com/en/2011/09/parametros-nao-parametrizaveis/</guid><description>Every now and then you get a client who asks a programmer to create a write-protected parameter on the program selection screen. It’s a bit dumb given that the whole idea of parameters is that they are parameterisable.
But there you go, it takes all sorts.
Clients have so much imagination that SAP should create a cinema module, SAP CI, especially so they can screen all the films they carry around in their heads.</description></item><item><title>Hopping merrily from ELSE to ELSE</title><link>https://abapinho.com/en/2011/08/alt-clique-para-saltar/</link><pubDate>Mon, 22 Aug 2011 11:02:30 +0000</pubDate><guid>https://abapinho.com/en/2011/08/alt-clique-para-saltar/</guid><description>You have in front of you one of those giant IF ELSEIF ELSEIF ELSEIF ELSEIF ELSE ENDIF that runs through hundreds of lines of code.
If you double click on the IF or any of the ELSEIF you jump to the ENDIF. If you double click on the ENDIF down below you go to the IF up above. Everybody knows this. It is handy with a small IF ENDIF. However, it’s not much use with the large ones.</description></item><item><title>Jumping within ABAP editor</title><link>https://abapinho.com/en/2011/08/saltos-no-editor-abap/</link><pubDate>Mon, 15 Aug 2011 10:06:39 +0000</pubDate><guid>https://abapinho.com/en/2011/08/saltos-no-editor-abap/</guid><description>Have you ever found yourself programming in one of those ABAP programs that’s as long as the Bible with hundreds and hundreds of lines where you always have to jump from one code area to another?
Until a few days ago, in my ignorance I was using PageUp and PageDown to jump between the two locations and I wasted loads of time looking for the exact place in the code that I was interested in.</description></item><item><title>Upside down CASE</title><link>https://abapinho.com/en/2011/08/case-de-pernas-para-o-ar/</link><pubDate>Mon, 08 Aug 2011 10:00:47 +0000</pubDate><guid>https://abapinho.com/en/2011/08/case-de-pernas-para-o-ar/</guid><description>What is your favourite colour?
SELECTION-SCREEN BEGIN OF BLOCK b1. PARAMETERS: p_azul BUTTONGROUP GROUP COR DEFAULT &amp;#39;X&amp;#39;, p_verde BUTTONGROUP GROUP COR, p_roxo BUTTONGROUP GROUP COR. SELECTION-SCREEN END OF BLOCK b1. If you said ‘blue’ you live and can cross the bridge.
In any case, the following normally happens in ABAP to discover the colour the user chose:
IF p_azul = &amp;#39;X&amp;#39;. lv_cor = &amp;#39;AZUL&amp;#39;. ELSE IF p_verde = &amp;#39;X&amp;#39;. lv_cor = &amp;#39;VERDE&amp;#39;.</description></item><item><title>The *_SINGLE_READ functions</title><link>https://abapinho.com/en/2011/08/funcoes-single-read/</link><pubDate>Mon, 01 Aug 2011 10:43:04 +0000</pubDate><guid>https://abapinho.com/en/2011/08/funcoes-single-read/</guid><description>When you need to derive a single record from a database table, you normally use SELECT SINGLE, which is like this in its most basic form, as everyone knows:
SELECT SINGLE * FROM KNA1 WHERE KUNNR = &amp;#39;1234567890&amp;#39;. Of course, if you are interested in just a few fields, ideally you select them explicitly to avoid copying unnecessary data from one side to the other:
DATA: lv_name1 TYPE name1. SELECT SINGLE name1 INTO lv_name1 FROM KNA1 WHERE KUNNR = &amp;#39;1234567890&amp;#39;.</description></item><item><title>RICEF is not transgenic rice nor is it part of the UN</title><link>https://abapinho.com/en/2011/07/ricef/</link><pubDate>Mon, 25 Jul 2011 10:39:04 +0000</pubDate><guid>https://abapinho.com/en/2011/07/ricef/</guid><description>RICEF is an acronym in SAP world which apparently was not invented by SAP. And so it is an unofficial acronym. Which does not mean it is an illegal or secret acronym given that it has become a term in proper usage in more and more projects.
RICEF means Report , Interface , Conversion , Enhancement , Form and, basically, refers to any kind of development that might be needed in a SAP project.</description></item><item><title>I CTRL-clicked to select a word</title><link>https://abapinho.com/en/2011/07/ctrl-clique/</link><pubDate>Mon, 18 Jul 2011 11:19:51 +0000</pubDate><guid>https://abapinho.com/en/2011/07/ctrl-clique/</guid><description>A simple but valuable tip: anywhere in the SAP GUI - including the ABAP Editor - to select a word all you have to do is CTRL-click above it. Cool, no?
Unfortunately it doesn&amp;rsquo;t work on the Mac Java GUI :-(
(Thank you Sérgio Fraga for the tip)
Greetings from Abapinho.</description></item><item><title>Instant RANGE - just add water</title><link>https://abapinho.com/en/2011/07/range-instantaneo/</link><pubDate>Mon, 11 Jul 2011 11:07:07 +0000</pubDate><guid>https://abapinho.com/en/2011/07/range-instantaneo/</guid><description>I&amp;rsquo;m going to teach you a magic formula for creating a RANGE that is almost as easy as just adding water.
Imagine that you want to create a RANGE from a database selection to then use it in another SELECT. Obviously you can do it like this:
DATA: lt_kunnr TYPE STANDARD TABLE OF kunnr, lr_kunnr TYPE RANGE OF kunnr, wa_kunnr LIKE LINE OF lr_kunnr. FIELD-SYMBOLS: &amp;lt;kunnr&amp;gt; LIKE LINE OF lt_kunnr. SELECT kunnr INTO TABLE lt_kunnr FROM kna1.</description></item><item><title>LOOP ASSIGNING instead of LOOP INTO</title><link>https://abapinho.com/en/2011/07/assigning-vs-into/</link><pubDate>Sat, 02 Jul 2011 12:25:03 +0000</pubDate><guid>https://abapinho.com/en/2011/07/assigning-vs-into/</guid><description>&lt;p>In the beginning there was INTO.
Actually, in the beginning it was not even INTO.&lt;/p></description></item><item><title>Taking a nap</title><link>https://abapinho.com/en/2011/06/soneca/</link><pubDate>Fri, 17 Jun 2011 11:43:28 +0000</pubDate><guid>https://abapinho.com/en/2011/06/soneca/</guid><description>Whatever the case, it is necessary to put a program to sleep. And, as with almost everything else, there are several ways to do this, some better than others.
The most standard way to do this in ABAP is as follows:
WAIT UP TO 10 SECONDS. The advantage of WAIT UP TO N SECONDS is that the process is freed up during these 10 seconds, thereby making it available for those who want it.</description></item><item><title>Different versions of the same story</title><link>https://abapinho.com/en/2011/06/versoes-sap/</link><pubDate>Thu, 09 Jun 2011 13:41:50 +0000</pubDate><guid>https://abapinho.com/en/2011/06/versoes-sap/</guid><description>Everyone knows that the SAP versions are a big mess. The lords of Heidelberg who play around with the names they give their things are either an impulsive bunch, are making fun of us, or they must always be in uproar.
Here is a little table to help to unravel them:
Ano | UI | Edition | Version | Version | BASIS | WebAS | ECC | NetWeaver
&amp;mdash;|&amp;mdash;|&amp;mdash;|&amp;mdash;|&amp;mdash;|&amp;mdash;|&amp;mdash;|&amp;mdash;|&amp;mdash;
| Terminal</description></item><item><title>On your marks, get set, go!</title><link>https://abapinho.com/en/2011/05/corrida-de-tabelas/</link><pubDate>Tue, 24 May 2011 09:00:41 +0000</pubDate><guid>https://abapinho.com/en/2011/05/corrida-de-tabelas/</guid><description>&lt;p>Ladies and gentlemen, boys and girls, the race is about to begin.&lt;/p>
&lt;p>&lt;strong>Introduction&lt;/strong>&lt;/p>
&lt;p>The four competitors are as follows. They are 4 internal tables, of different races and creeds, which will fight for the athletics title of speed LOOP. Here they are:&lt;/p>
&lt;p>Competitor 1: DATA: LT_ITEM TYPE TABLE
Competitor 2: DATA: LT_ITEM_HASHED TYPE HASHED TABLE
Competitor 3: DATA: LT_ITEM_SORTED TYPE SORTED TABLE
Competitor 4: DATA: LT_ITEM TYPE TABLE + INTO INDEX&lt;/p></description></item><item><title>Global macros</title><link>https://abapinho.com/en/2011/05/macros-globais/</link><pubDate>Thu, 19 May 2011 18:02:41 +0000</pubDate><guid>https://abapinho.com/en/2011/05/macros-globais/</guid><description>In a previous article we talked about macros, a relatively obscure and little used feature that can be both useful as well as create a huge mess. But these aren’t the only ABAP macros. There are others that are even more obscure and with even greater potential to mix up a system: the global macros.
I don’t know if I should tell you this, as it’s so strange… But, I don’t think it’s a good idea to hide it… Therefore, I’ll tell all.</description></item><item><title>Start on the right footing</title><link>https://abapinho.com/en/2011/04/transaccao-inicial/</link><pubDate>Sat, 23 Apr 2011 09:27:25 +0000</pubDate><guid>https://abapinho.com/en/2011/04/transaccao-inicial/</guid><description>Normally when you log on to SAP the SAP menu appears. But you can use the function module NAVIGATION_SET_START_TCODE to pre-set an initial transaction. Anyway, it’s better to know it’s there than not to know it’s there, and even better than knowing that it’s not there. Who knows – it could be good for some users. There’s also the function module NAVIGATION_GET_START_TCODE to see what is pre-set.
Greetings from Abapinho.</description></item><item><title>Not even David Copperfield would do better</title><link>https://abapinho.com/en/2011/04/call-transaction/</link><pubDate>Thu, 21 Apr 2011 11:26:14 +0000</pubDate><guid>https://abapinho.com/en/2011/04/call-transaction/</guid><description>Sometimes we want to access a transaction and we don’t have permission. That’s annoying. Luckily there’s the function module ALINK_CALL_TRANSACTION which makes things better. But use it with care or someone will get angry. Welcome to the dark side of Abapinho. If they say it was me that said it, I deny everything.
Update: this function module will also do the trick: CALL_TRANSACTION_FROM_TABLE.
New update: if all the above fail try this other function module: RS_HDSYS_CALL_TC_VARIANT (clearing flag AUTHORITY_CHECK).</description></item><item><title>ABAP Ninja</title><link>https://abapinho.com/en/2011/03/abapninja/</link><pubDate>Fri, 25 Mar 2011 18:51:10 +0000</pubDate><guid>https://abapinho.com/en/2011/03/abapninja/</guid><description>One of the major new features in ERP 6.0 is the Enhancement Framework, a kind of “landlord’s friend” that allows you to hammer on all the SAP walls without chipping the paintwork. Unfortunately there’s still very little documentation about this and it’s always difficult to find the right Enhancement Point for the hammering you want.
The a ABAP Ninja site tries to help. It’s an Enhancement search engine. They say they have more than 13,000 Enhancement Points waiting to be found.</description></item><item><title>St. Isidore of Seville</title><link>https://abapinho.com/en/2011/03/santo-isidoro-de-sevilha/</link><pubDate>Sun, 20 Mar 2011 17:29:14 +0000</pubDate><guid>https://abapinho.com/en/2011/03/santo-isidoro-de-sevilha/</guid><description>Don’t know who to pray to in moments of desperation? Now you can relax. Programmers have a saint – St. Isidore of Seville.
A very learned and intelligent gentleman who lived in Spain in the 6th and 7th centuries and, to quote Wikipedia, “wrote about mathematics, astronomy, medicine, human anatomy, zoology, geography, meteorology, geology, mineralogy, botany and agriculture. He added nothing innovative or original, carried out no experiment, made no new observations or reinterpretations and discovered nothing, but his influence on the Middle Ages and the Renaissance was great”.</description></item><item><title>LOOP FROM INDEX</title><link>https://abapinho.com/en/2011/03/loop-from-index/</link><pubDate>Thu, 10 Mar 2011 12:15:12 +0000</pubDate><guid>https://abapinho.com/en/2011/03/loop-from-index/</guid><description>It’s very easy to get tied up in knots where performance is concerned when you’re working with internal tables – especially when they’re getting really big. In fact these problems often only arise after a few months, when the tables tend to grow as time goes by.
For example, when you’re looping two tables, one of headers and another of entries, do you do this?
LOOP AT itab1 ASSIGNING &amp;lt;fs1&amp;gt;. LOOP AT itab2 ASSGNING &amp;lt;fs2&amp;gt; WHERE field1 = &amp;lt;fs1&amp;gt;-field1.</description></item><item><title>Progress indicator</title><link>https://abapinho.com/en/2011/03/indicador-de-progresso/</link><pubDate>Mon, 07 Mar 2011 12:04:18 +0000</pubDate><guid>https://abapinho.com/en/2011/03/indicador-de-progresso/</guid><description>You know those progress bars that show how long it will take for a process to end? The ones that sometimes go back to the beginning when they reach the end and leave you frustrated and confused and wondering what use they are anyway? Here’s how you can use them in an ABAP program.
DATA: lv_texto TYPE char40, lv_valor type i. DO 10 TIMES. WAIT UP TO 1 SECONDS. CLEAR lv_texto.</description></item><item><title>&lt;!--:pt-->Executa um comando no teu computador&lt;!--:--></title><link>https://abapinho.com/en/2011/02/executar-comando-local/</link><pubDate>Wed, 16 Feb 2011 21:33:38 +0000</pubDate><guid>https://abapinho.com/en/2011/02/executar-comando-local/</guid><description>Imagina que queres executar um programa no teu PC a partir de um programa ABAP. Não sei porque carga de água quererás tu fazer isto mas ok, se queres mesmo fazer, é assim:
DATA: i_returncode TYPE i. CALL FUNCTION &amp;#39;GUI_EXEC&amp;#39; EXPORTING command = &amp;#39;Notepad.exe&amp;#39; parameter = &amp;#39;eu_sou_um_texto.txt&amp;#39; IMPORTING returncode = i_returncode. É provável que dê para fazer coisas boas com isto. Mas está à vista a grande javardice que se pode fazer por isso pensa bem antes de começares para aí a escangalhar os computadores dos utilizadores todos.</description></item><item><title>SAT – The new execution analysis tool</title><link>https://abapinho.com/en/2011/02/sat/</link><pubDate>Wed, 16 Feb 2011 14:31:40 +0000</pubDate><guid>https://abapinho.com/en/2011/02/sat/</guid><description>Since I was small I have been using the SE30 transaction for two different things:
To analyze a (normally standard) program I don’t know in order to find out what functions it uses, what BADIs it offers, etc;
To analyze a program of mine to search for performance problems.
The simple truth is that the SE30 transaction is a total mess. It’s extremely limited and inflexible and it’s useless for any more complex analysis.</description></item><item><title>&lt;!--:pt-->Como encavalitar tabelas&lt;!--:--></title><link>https://abapinho.com/en/2011/02/encavalitartabelas/</link><pubDate>Sat, 05 Feb 2011 16:38:20 +0000</pubDate><guid>https://abapinho.com/en/2011/02/encavalitartabelas/</guid><description>&lt;p>Às vezes temos de criar uma tabela Z. Às vezes temos até de criar várias tabelas Z. Às vezes estas tabelas estão relacionadas de alguma forma. Como quando uma contém dados de cabeçalho e a outra dados de item, por exemplo. Ora se estão relacionadas pode dar jeito que sejam editadas em conjunto. É para isso que servem os Clusters de Visão (view cluster).&lt;/p></description></item><item><title>&lt;!--:pt-->As estruturas PRE-a-porter&lt;!--:--></title><link>https://abapinho.com/en/2011/01/pre-a-porter/</link><pubDate>Tue, 11 Jan 2011 11:51:37 +0000</pubDate><guid>https://abapinho.com/en/2011/01/pre-a-porter/</guid><description>Quantas vezes não é necessária uma pequena estrutura para guardar, por exemplo, uma lista que relacione materiais e centros. Mas perder tempo a inventar a roda é sempre de evitar.
No reino do MM há uma pequena família de estruturas que uso amiúde: são elas as PRE*, uma série de estruturas que vai desde a PRE01 à PRE50, com uns saltos pelo meio. Embora sejam, na sua maioria, específicas demais para servirem algum propósito, há algumas úteis.</description></item><item><title>&lt;!--:pt-->A Ressurreição de um programa&lt;!--:--></title><link>https://abapinho.com/en/2010/12/ressurreicao/</link><pubDate>Thu, 16 Dec 2010 13:23:34 +0000</pubDate><guid>https://abapinho.com/en/2010/12/ressurreicao/</guid><description>Batendo impetuoso com seus braços no peito, o famoso guerreiro gritava desesperado: &amp;ldquo;Oh meu Zeus! Apaguei um grande programa , um programa precioso, feito de bronze, forjado por vós deuses no próprio Olimpo. Que será de mim quando isto for descoberto! Oh, ignomínia! Oh, funesto infortúnio! Zeus pai, não te enfureças com tal revés, Se és mesmo meu pai, acode-me ao invés.&amp;rdquo;
Assim falou; e Zeus compadeceu-se dele que chorava, garantindo que seu programa se salvaria e não pereceria.</description></item><item><title>&lt;!--:pt-->Imprimir para PDF local&lt;!--:--></title><link>https://abapinho.com/en/2010/12/imprimir-pdf/</link><pubDate>Wed, 01 Dec 2010 04:25:12 +0000</pubDate><guid>https://abapinho.com/en/2010/12/imprimir-pdf/</guid><description>Receita rápida:
Manda-se imprimir o que se quer, dizendo ao SAP para guardar a ordem de impressão no spool e não a imprimir imediatamente. Reserva-se o número da ordem de impressão num recipiente à parte.
A seguir, corre-se o programa RSTXPDFT4 , junta-se-lhe o número da ordem de impressão, mistura-se bem e executa-se o dito.
Por fim escolhe-se onde, no computador local, se quer desenformar o ficheiro PDF com o conteúdo da ordem de impressão.</description></item><item><title>&lt;!--:pt-->Depuração telepática&lt;!--:--></title><link>https://abapinho.com/en/2010/11/depuracaotelepatica/</link><pubDate>Fri, 26 Nov 2010 10:55:58 +0000</pubDate><guid>https://abapinho.com/en/2010/11/depuracaotelepatica/</guid><description>Imagine o seguinte cenário: um utilizador (ou utilizadora) está sentado no escritório dele, a correr uma transacção ou não sei o quê. Tem um problema e chama um programador (ou programadora) para o (ou a) ajudar a entender o que se passa. Normalmente o programador (ou programadora) teria de se deslocar lá, à sala do senhor utilizador (ou senhora utilizadora) e das duas uma: fazer debug no computador dele (ou dela) ou aprender como recriar o problema e depois fazer debug no seu computador.</description></item><item><title>&lt;!--:pt-->SELECT com mais olhos que barriga&lt;!--:--></title><link>https://abapinho.com/en/2010/11/select-todos-os-campos/</link><pubDate>Sun, 21 Nov 2010 22:56:36 +0000</pubDate><guid>https://abapinho.com/en/2010/11/select-todos-os-campos/</guid><description>&lt;p>Embora seja evidente que, ao fazer selecções de dados de uma tabela da base de dados, devemos ter o cuidado de escolher apenas os campos que necessitamos, a verdade é que há muito boa gente que não se dá a esse trabalho e manda vir tudo.&lt;/p>
&lt;p>Mediremos aqui a diferença real entre as duas abordagens.&lt;/p></description></item><item><title>&lt;!--:pt-->SE37.com&lt;!--:--></title><link>https://abapinho.com/en/2010/11/se37-com/</link><pubDate>Wed, 10 Nov 2010 12:52:03 +0000</pubDate><guid>https://abapinho.com/en/2010/11/se37-com/</guid><description>Neste site pode-se consultar documentação de módulos de função ABAP:
www.se37.com
Basta escolher continue as guest pois a inscrição só é necessária para edição ou adição de conteúdos. E depois é só introduzir um grupo de funções ou um módulo de função para ver a sua documentação.
Actualização: já não existe.
O Abapinho saúda-vos.</description></item><item><title>&lt;!--:pt-->Pede ajuda aos PDFs da SAP&lt;!--:--></title><link>https://abapinho.com/en/2010/11/pdfs-sap/</link><pubDate>Wed, 10 Nov 2010 12:39:55 +0000</pubDate><guid>https://abapinho.com/en/2010/11/pdfs-sap/</guid><description>A SAP disponibiliza uma série de documentos PDF que contém ajuda e informação preciosa nas mais variadas áreas. Estes PDFs estão dispersos pelos vários sites da SAP, mas alguém no site Easy Service Marketplace compilou todos numa conveniente lista:
www.easymarketplace.de/online-pdfs.php
Obriado Sérgio Fraga por este outro link com mais uma série de PDFs:
sapignite.com/download-sap-pdf-material-abap/
Espero que vos ajude!
Actualização: Isto parece já não existir.
O Abapinho saúda-vos.</description></item><item><title>&lt;!--:pt-->Um mal que veio por bem&lt;!--:--></title><link>https://abapinho.com/en/2010/11/um-mal-que-veio-por-bem/</link><pubDate>Sun, 07 Nov 2010 03:29:07 +0000</pubDate><guid>https://abapinho.com/en/2010/11/um-mal-que-veio-por-bem/</guid><description>Era uma vez um cliente com um sistema produtivo com 9 servidores mais rápidos que a própria sombra. Esses 9 servidores eram geridos por 4 administradores de sistema muito bons que os mantinham sempre oleados e a fluírem à velocidade máxima. Um dia tive de desenvolver um carregamento muito complexo que criava milhões de classificações. Quando se começou a testar o programa, constatou-se que algo estava muito lento, lento demais. Na maior parte do tempo o programa estava encalhado à espera de SELECTs sequenciais à tabela INOB, que era gigante.</description></item><item><title>&lt;!--:pt-->Downloadar e uploadar programas e afins&lt;!--:--></title><link>https://abapinho.com/en/2010/09/downloadupload/</link><pubDate>Tue, 28 Sep 2010 11:16:37 +0000</pubDate><guid>https://abapinho.com/en/2010/09/downloadupload/</guid><description>Há palavras em inglês que o português de Portugal não se dá ao trabalho de traduzir. O verbo inglês download vira downloadar ou fazer download. A seu tempo, há-de seguir o caminho que beef seguiu até conseguir chegar a bife , transformando-se lentamente em algo tipo daunelaudar. Mas até lá&amp;hellip; fazem-se downloads.
Já que a SAP nunca se preocupou em permitir o download e upload de objectos do DDIC e do ABAP Workbench, foram sempre aparecendo umas almas caridosas com uns programas mais ou menos medíocres que o permitiam.</description></item><item><title>&lt;!--:pt-->Dar de beber à dor&lt;!--:--></title><link>https://abapinho.com/en/2010/09/dar-de-beber-a-dor/</link><pubDate>Tue, 21 Sep 2010 10:47:05 +0000</pubDate><guid>https://abapinho.com/en/2010/09/dar-de-beber-a-dor/</guid><description>No Inverno de 2006 trabalhava no projecto SAP de um enorme retalhista internacional, com centenas de supermercados espalhados por todo um país. Uma bela manhã, pelas 11h45 comecei a ver várias pessoas com ar alarmado a correr de um lado para o outro no escritório. Perguntei o que se passava e se podia ajudar e explicaram-me que não conseguiam fazer a encomenda de leite para o dia seguinte que tinha de ser feita até às 12h15 mas que não tinha nada a ver comigo, que eu não podia ajudar.</description></item><item><title>&lt;!--:pt-->Pesquisar em tabelas internas simplórias&lt;!--:--></title><link>https://abapinho.com/en/2010/09/tabelas-internas-simplorias/</link><pubDate>Tue, 21 Sep 2010 10:36:51 +0000</pubDate><guid>https://abapinho.com/en/2010/09/tabelas-internas-simplorias/</guid><description>Imagina uma tabela interna tão simplória que nem sequer tem uma estrutura de dados com campos:
DATA: t_simploria TYPE STANDARD TABLE OF char30. Agora imagina que queres fazer uma pesquisa nessa tabela para saber se contém o valor &amp;lsquo;sumo de melão&amp;rsquo;. mas como não tem campos, como a fazes? Normalmente usarias algo tipo WITH KEY campo = valor. Mas ela não tem campos. O ABAP disponibiliza uma palavra especial que resolve este problema: TABLE_LINE.</description></item><item><title>&lt;!--:pt-->Transacção I18N = Internacionalização&lt;!--:--></title><link>https://abapinho.com/en/2010/09/i18n/</link><pubDate>Mon, 06 Sep 2010 13:54:15 +0000</pubDate><guid>https://abapinho.com/en/2010/09/i18n/</guid><description>Os americanos são tão bons como os tibetanos a arranjar mnemónicas e abreviaturas para tornar as coisas fáceis de decorar.
Internationalization é uma palavra inglesa com 20 letras. Então, a abreviatura adoptada foi I18N, constituida pela primeira e última letras entremeadas por um 18 que representa as 18 letras do meio. Meio maluco mas giro e a verdade é que pegou.
Pegou tanto que o SAP tem uma transacção chamada I18N.</description></item><item><title>&lt;!--:pt-->É meu, só meu e de mais ninguém&lt;!--:--></title><link>https://abapinho.com/en/2010/09/e-meu-so-meu-e-de-mais-ninguem/</link><pubDate>Wed, 01 Sep 2010 14:25:53 +0000</pubDate><guid>https://abapinho.com/en/2010/09/e-meu-so-meu-e-de-mais-ninguem/</guid><description>Imagina que estás a trabalhar num sistema partilhado por muitos outros utilizadores que não conheces. Como no IDESACCESS por exemplo. Nada impede que, por distracção ou perfídia, algum desses outros utilizadores altere ou mesmo apague os teus programas.
Na SE38, nas características técnicas do programa, existe um pisco chamado &amp;ldquo;Bloqueio do editor&amp;rdquo; que, se o activares, só tu próprio passarás a poder modificá-lo.
O Abapinho saúda-vos.</description></item><item><title>&lt;!--:pt-->Was ist ABAP?&lt;!--:--></title><link>https://abapinho.com/en/2010/08/was-ist-abap/</link><pubDate>Tue, 17 Aug 2010 17:26:52 +0000</pubDate><guid>https://abapinho.com/en/2010/08/was-ist-abap/</guid><description>Mas afinal o que é que quer dizer ABAP?
Em 1970 chamaram-lhe ABAP que queria dizer &amp;ldquo;Allgemeiner Berichts-Aufbereitungs-Prozessor&amp;rdquo;, ou em português &amp;ldquo;Processador de geração de reports genéricos&amp;rdquo;.
Em 1990 mudaram-lhe o nome para ABAP/4 e disseram que afinal queria dizer &amp;ldquo;Advanced Business Application Programming&amp;rdquo;, ou em português &amp;ldquo;Programação avançada para aplicações de negócio&amp;rdquo;.
Em 2000 largam o /4 e tornaram a chamar-lhe só ABAP e é o que ainda lhe chamam agora.</description></item><item><title>&lt;!--:pt-->Import/Export = Contrabando&lt;!--:--></title><link>https://abapinho.com/en/2010/08/importexport/</link><pubDate>Sat, 14 Aug 2010 00:37:24 +0000</pubDate><guid>https://abapinho.com/en/2010/08/importexport/</guid><description>&lt;p>O Java, uma linguagem de programação bem pensada, ajuda o programador a organizar o seu código obrigando-o a desenvolvê-lo de forma estruturada. A sua própria filosofia potencia o pensamento estruturado e promove coerência e arrumação.&lt;/p>
&lt;p>Já o ABAP&amp;hellip; promove o caos. Está cheio de caminhos perniciosos que levam direitinho a um inferno confuso e labiríntico. E geralmente são as coisas aparentemente mais convenientes que se revelam as mais perigosas.&lt;/p>
&lt;p>Uma das conveniências piores é a parelha &lt;strong>IMPORT&lt;/strong> e &lt;strong>EXPORT&lt;/strong>.&lt;/p></description></item><item><title>&lt;!--:pt-->Mensagens entre utilizadores&lt;!--:--></title><link>https://abapinho.com/en/2010/08/mensagens-entre-utilizadores/</link><pubDate>Fri, 13 Aug 2010 09:35:39 +0000</pubDate><guid>https://abapinho.com/en/2010/08/mensagens-entre-utilizadores/</guid><description>Muitas vezes precisamos de aceder aos dados de uma tabela através da SM30 ou a um qualquer documento e esbarramos com uma mensagem a dizer que os dados estão bloqueados por outro utilizador.
Há várias hipóteses:
Ter muita paciência e esperar;
Ter bastante paciência, enviar uma mensagem do SAPOffice e esperar que um dia o utilizador a vá ver;
Ter alguma paciência, enviar um e-mail e esperar;
Ser impaciente, ir ter com o outro e pedir-lhe para por favor sair dali;</description></item><item><title>&lt;!--:pt-->Dá e receberás&lt;!--:--></title><link>https://abapinho.com/en/2010/07/daereceberas/</link><pubDate>Mon, 12 Jul 2010 06:28:33 +0000</pubDate><guid>https://abapinho.com/en/2010/07/daereceberas/</guid><description>Vivia-se o ano do Senhor de 1998. No século XX portanto, quando ainda se trabalhava de gravata. Estava eu com 1 mês de experiência em SAP e pela primeira vez sozinho num cliente, de gravata ao pescoço, num armazém gigante, a fazer formulários de WM e coisas do género ao serviço de um funcional de WM. Certo dia fui directamente abordado por um senhor condutor de um empilhador que me disse que o código identificador na etiqueta das paletes tinha letras muito pequeninas e ele tinha muita dificuldade em lê-lo.</description></item><item><title>&lt;!--:pt-->Procurar uma BADI no palheiro&lt;!--:--></title><link>https://abapinho.com/en/2010/06/procurar-uma-badi-no-palheiro/</link><pubDate>Mon, 14 Jun 2010 10:46:04 +0000</pubDate><guid>https://abapinho.com/en/2010/06/procurar-uma-badi-no-palheiro/</guid><description>&lt;p>O SAP é um enorme palheiro. E os ABAPers são pessoas que trepam por esse palheiro acima e nele vasculham e escarafuncham em busca de agulhas de todo o género. Às vezes, desesperados, deitam-se a descansar e vêm uma quantidade enorme de bicharocos que vivem no palheiro fazer-lhes comichão. Para evitar que isso aconteça, o Artur Moreira propõe-nos uma série de diferentes técnicas para procurar BADIs neste grande palheiro que é o SAP.&lt;/p></description></item><item><title>&lt;!--:pt-->Enfiar um browser dentro do SAPGui&lt;!--:--></title><link>https://abapinho.com/en/2010/06/browser-no-sap/</link><pubDate>Thu, 10 Jun 2010 20:01:45 +0000</pubDate><guid>https://abapinho.com/en/2010/06/browser-no-sap/</guid><description>Quem não gosta de uma promiscuidadezita de vez em quando? Até o Abapinho. É por isso que hoje vos sugerimos que se deleitem a enfiar um browser dentro do SAPGui. E para conseguir isso basta correr este programa na SE38: SAPHTML_R3HTTP_DEMO.
Pronto, ficam a saber. E como há clientes para tudo, quem sabe não se encontre aí pelo mundo algum cliente que invente um problema para esta solução.
O Abapinho saúda-vos.</description></item><item><title>&lt;!--:pt-->ZTETRIS&lt;!--:--></title><link>https://abapinho.com/en/2010/05/ztetris/</link><pubDate>Sun, 09 May 2010 15:56:34 +0000</pubDate><guid>https://abapinho.com/en/2010/05/ztetris/</guid><description>O Abapinho aconselha todos os ABAPers a, pelo sim, pelo não, instalarem o programa ZTETRIS no seu ambiente de desenvolvimento. A versão do Tetris para ABAP é da autoria de Sergey Shumakov.
Quando te fartares de jogar podes sempre investigar como é que o programa faz para ir várias vezes ao servidor sem intervenção do utilizador.
O Abapinho saúda-vos.</description></item><item><title>&lt;!--:pt-->ALV Grid Control - Manuais de referência&lt;!--:--></title><link>https://abapinho.com/en/2010/05/alv/</link><pubDate>Tue, 04 May 2010 06:15:24 +0000</pubDate><guid>https://abapinho.com/en/2010/05/alv/</guid><description>Os ALVs são poderosos. Mas esse poder vem à custa de alguma complexidade. Além disso, como quase tudo em SAP, funcionam de forma obscura. Aqui ficam dois manuais de referência em PDF. São muito parecidos mas suficientemente diferentes para referir os dois.
Este chama-se BCSRVALV, é da SAP e data de 2001. No site da SAP encontra-se aqui. E aqui também se aprende sobre isto.
Já este chama-se ALV_Grid_Control, é de 2004 e está assinado por um senhor chamado Serdar ŞİMŞEKLER que diz ser turco.</description></item><item><title>&lt;!--:pt-->Transportar conteúdo de uma tabela&lt;!--:--></title><link>https://abapinho.com/en/2010/04/conteudo-tabela/</link><pubDate>Thu, 29 Apr 2010 11:26:54 +0000</pubDate><guid>https://abapinho.com/en/2010/04/conteudo-tabela/</guid><description>Fazes assim:
Vais à transacção SE01;
Crias uma nova ordem de workbench;
Editas a lista de objectos;
Adicionas-lhe o objecto R3TR-TABU-[nome_tabela];
Clicas na chave que aparece na coluna a seguir;
Metes um asterisco * na primeira linha;
Gravas a ordem de transporte;
Pedes a quem de direito para a passar para onde te aprouver;
Vais beber um sumo de melão;
Quando voltas, já está.
O Abapinho saúda-vos.</description></item><item><title>&lt;!--:pt-->Glossário SAP&lt;!--:--></title><link>https://abapinho.com/en/2010/04/glossario-sap/</link><pubDate>Tue, 27 Apr 2010 10:09:32 +0000</pubDate><guid>https://abapinho.com/en/2010/04/glossario-sap/</guid><description>É frequente em SAP cruzarmo-nos com um conceito desconhecido. Às vezes esqueço-me de que há ferramentas disponíveis muito fáceis de consultar. E o glossário SAP é um exemplo disso. Pode ser acedido de várias formas:
No próprio SAP: através da transacção STERM;
Online: num site da SAP: https://help.sap.com/saphelp_glossary/en/;
No nosso computador: usando o programa ABAP GLOS_DOWNLOAD_HTML para fazer download de todo o seu conteúdo.
Tenho a certeza de que, agora que sei onde está, o vou consultar muito mais vezes.</description></item><item><title>&lt;!--:pt-->Evernote - No anotar é que está o ganho&lt;!--:--></title><link>https://abapinho.com/en/2010/04/evernote/</link><pubDate>Mon, 19 Apr 2010 17:00:15 +0000</pubDate><guid>https://abapinho.com/en/2010/04/evernote/</guid><description>&lt;p>&lt;em>Il faut cultiver notre jardin - Voltaire&lt;/em>&lt;/p>
&lt;p>No SAP fala-se muito de experiência. Fulano tem muita experiência, sicrano tem pouca experiência. Tenta-se com isso medir a capacidade que alguém tem de usar o seu passado para lidar com o seu futuro. Mas nem sempre ter experimentado uma coisa é sinónimo de ganhar experiência com ela. O exemplo paradigmático ao alcance de todos é o amor: quantos desgraçados, por muitas experiências desgraçadas que tenham tido, se continuam a desgraçar-se no amor! O SAP não é o amor. Ainda assim não nos faltarão exemplos de consultores que no CV descrevem muitas experiências e na prática se revelam uns grandes inexperientes.&lt;/p>
&lt;p>A Inteligência terá certamente muito peso nessa capacidade de sublimar as experiências, de as conservar, de fazer delas Compota de Experiência. Mas, pelo menos no que toca ao mirabolante mundo do SAP, quem tem também muito a dizer é a senhora Memória. Ou melhor dizendo, a falta dela.&lt;/p>
&lt;p>O mundo do SAP é horizontal e vasto. Para onde quer que se olhe é a perder de vista. E embora seja um mundo bastante populado e onde se viaja muito, não houve até hoje, que eu saiba, cartógrafos de jeito. Os mapas que dele se fizeram são parcos, pobres, distorcidos e normalmente ainda o julgam plano quando toda a gente já sabe há muito tempo que ele é curvo.&lt;/p>
&lt;p>Há que cartografar o nosso mapa.&lt;/p></description></item><item><title>&lt;!--:pt-->Onde é que eu vi aquilo?&lt;!--:--></title><link>https://abapinho.com/en/2009/11/busca-abap/</link><pubDate>Wed, 04 Nov 2009 04:09:36 +0000</pubDate><guid>https://abapinho.com/en/2009/11/busca-abap/</guid><description>A pesquisa de objectos em ABAP e por todo o SAP é normalmente feita de duas formas: listando objectos de um tipo através de search helps ou procurando objectos em que um determinado objecto é usado, através da opção where used.
Só que às vezes o que buscamos não se trata de um objecto mas sim de uma frase qualquer ou mesmo um comentário que sabemos existir no código mas não fazemos ideia de onde.</description></item><item><title>&lt;!--:pt-->A técnica das Matrioskas&lt;!--:--></title><link>https://abapinho.com/en/2009/10/matrioskas/</link><pubDate>Fri, 09 Oct 2009 13:00:55 +0000</pubDate><guid>https://abapinho.com/en/2009/10/matrioskas/</guid><description>É sabido que quando é necessário fazer uma pequena alteração a uma função standard para a qual não há nenhum tipo de user-exit, o mais normal é fazer uma cópia dela para uma função Z e lá proceder à alteração necessária.
No entanto, quando esta alteração pode ser feita no início ou no final do programa, há uma forma mais elegante de conseguir o mesmo resultado: a técnica das Matrioskas. Criar uma função Z com os mesmos parâmetros que lá dentro invoca a função standard e que, além disso, antes ou depois de a invocar, tem o código para implementar a alteração necessária.</description></item><item><title>&lt;!--:pt-->O maravilhoso mundo do Application Log&lt;!--:--></title><link>https://abapinho.com/en/2009/09/application-log/</link><pubDate>Sat, 19 Sep 2009 09:51:49 +0000</pubDate><guid>https://abapinho.com/en/2009/09/application-log/</guid><description>&lt;p>Uma boa parte dos reports, interfaces ou jobs, têm de produzir algum tipo de relatório. É normal ver isso feito recorrendo ao comando WRITE. Ora nos dias que correm, usar o comando WRITE para isto é como recorrer a um par de pedras para acender uma fogueira. Afinal, porque não usar o Application Log que é muito mais simples e prático e standard e é só vantagens?&lt;/p></description></item><item><title>&lt;!--:pt-->Macros - Velocidade de ponta&lt;!--:--></title><link>https://abapinho.com/en/2009/09/macros-velocidade-de-ponta/</link><pubDate>Wed, 16 Sep 2009 02:37:52 +0000</pubDate><guid>https://abapinho.com/en/2009/09/macros-velocidade-de-ponta/</guid><description>&lt;p>Normalmente quando há um pedaço de código que pretendemos reutilizar várias vezes, transformamo-lo numa sub-rotina que pode depois ser invocada repetidamente. Embora a SAP não saiba estruturar o seu próprio código, ainda assim, o ABAP, coitadinho, permite-o. E até disponibiliza várias alternativas para modularizar o código. Eu conto quatro alternativas que listo aqui, da mais rígida para a mais flácida: METHOD, FUNCTION, FORM, DEFINE. Se os 3 primeiros são já familiar de todos, o último - DEFINE - quase ninguém usa. O DEFINE permite definir macros em ABAP. E o que são macros? São sub-rotinas aparentes.&lt;/p>
&lt;p>Aparentes porquê?&lt;/p></description></item><item><title>&lt;!--:pt-->Evitar mensagens dinâmicas&lt;!--:--></title><link>https://abapinho.com/en/2009/09/evitar-mensagens-dinamicas/</link><pubDate>Mon, 07 Sep 2009 17:40:15 +0000</pubDate><guid>https://abapinho.com/en/2009/09/evitar-mensagens-dinamicas/</guid><description>Qual é, digam lá, a melhor coisinha que o ABAP tem? É, digo eu, poder fazer where used em cima de tudo o que mexe.
E no entanto, esta maravilhosa funcionalidade só funciona maravilhosamente quando as coisas não são invocadas dinamicamente. Eu uso o where used amiúde para descobrir onde uma determinada mensagem está a ser usada. Ora não é nada incomum encontrar chamadas dinâmicas a mensagens, principalmente em casos onde as mensagens não são enviadas directamente para o utilizador mas sim, por exemplo, para o Application Log.</description></item><item><title>&lt;!--:pt-->READ TABLE blablabla TRANSPORTING NO FIELDS&lt;!--:--></title><link>https://abapinho.com/en/2009/08/transporting-no-fields/</link><pubDate>Thu, 20 Aug 2009 04:51:19 +0000</pubDate><guid>https://abapinho.com/en/2009/08/transporting-no-fields/</guid><description>Por vezes ao fazer READ TABLE a uma tabela interna queremos apenas verificar se um determinado registo existe, e não nos preocupamos com os dados retornados. Algo tipo:
READ TABLE lt_kna1 INTO wa_kna1 WITH KEY kunnr = l_kunnr. CHECK SY-SUBRC = 0. Ora já que a estrutura WA_KNA1 não vai ser necessária de qualquer forma, mais vale não a usar, usando antes a opção TRANSPORTING NO FIELDS:
READ TABLE lt_kna1 TRANSPORTING NO FIELDS WITH KEY kunnr = l_kunnr.</description></item><item><title>&lt;!--:pt-->Pesquisa SAP no Firefox e no Internet Explorer&lt;!--:--></title><link>https://abapinho.com/en/2009/06/pesquisa-sap-firefox/</link><pubDate>Thu, 18 Jun 2009 14:44:23 +0000</pubDate><guid>https://abapinho.com/en/2009/06/pesquisa-sap-firefox/</guid><description>Quando se faz desenvolvimentos em ABAP, pesquisar na SAP Community ou nas notas e na documentação da SAP é uma actividade recorrente. Como tal, quanto mais fácil for fazê-lo, melhor. Ideal seria que fazê-lo fosse tão fácil como pesquisar no Google. Ora uns senhores chamados JNYSolutions tornaram isso possível criando plugins de pesquisa para o Firefox e o Internet Explorer que adicionam a SDN, as notas e a documentação da SAP como motores de busca.</description></item><item><title>&lt;!--:pt-->Verificar pasta&lt;!--:--></title><link>https://abapinho.com/en/2009/06/verificarpasta/</link><pubDate>Sat, 13 Jun 2009 20:40:29 +0000</pubDate><guid>https://abapinho.com/en/2009/06/verificarpasta/</guid><description>Eis uma função para verificar se uma pasta existe e se nela temos permissões de escrita.
PARAMETERS: p_dir TYPE btctext80 DEFAULT &amp;#39;/usr/sap/trans&amp;#39;. CALL FUNCTION &amp;#39;PFL_CHECK_DIRECTORY&amp;#39; EXPORTING directory = p_dir write_check = &amp;#39;X&amp;#39; * FILNAME = &amp;#39; &amp;#39; EXCEPTIONS pfl_dir_not_exist = 1 pfl_permission_denied = 2 pfl_cant_build_dataset_name = 3 pfl_file_not_exist = 4 others = 5. CASE sy-subrc. WHEN 0. WRITE /: &amp;#39;Directory:&amp;#39;, p_dir, &amp;#39; exists&amp;#39;. WHEN 1. WRITE /: &amp;#39;Directory does not exist:&amp;#39;, p_dir.</description></item><item><title>&lt;!--:pt-->Constantes inconstantes&lt;!--:--></title><link>https://abapinho.com/en/2009/06/constantes/</link><pubDate>Tue, 02 Jun 2009 15:24:07 +0000</pubDate><guid>https://abapinho.com/en/2009/06/constantes/</guid><description>&lt;p>As constantes não o são. Toda a gente sabe. Quando se define uma constante, é certo como a morte que mais cedo ou mais tarde alguém vem e muda-a. Quando isto acontece, quem usa os valores directamente no código ABAP está feito ao bife; Quem define constantes no código só tem de alterar o valor num sítio mas vê-se ainda assim obrigado a editar o programa e a transportá-lo, coisa que, dependendo do grau de burocracia do ambiente em que se está, se pode revelar complicada. Este artigo apresenta uma solução simples mas sofisticada para gerir de forma centralizada todas as constantes de um sistema SAP através do uso de uma tabela de utilizador central onde se manterá todos os valores constantes e de uma classe com alguns métodos estáticos que serão usados para os obter.&lt;/p></description></item><item><title>&lt;!--:pt-->Testar na SE37 não grava dados? Grava.&lt;!--:--></title><link>https://abapinho.com/en/2009/05/se37-gravar/</link><pubDate>Wed, 20 May 2009 10:40:40 +0000</pubDate><guid>https://abapinho.com/en/2009/05/se37-gravar/</guid><description>Uma forma prática de aprender a usar um módulo de funções ou verificar se este nos é útil é através da funcionalidade de teste da transacção SE37. Escolhe-se o módulo de função, faz-se F8 (Executar) e tem-se uma forma interactiva de testar uma função.
Isto é óbvio.
O que não será óbvio para toda a gente é que este teste não faz COMMIT à transacção e, por isso, qualquer alteração que a função possa fazer à base de dados - como gerar um documento por exemplo - não é gravada.</description></item><item><title>&lt;!--:pt-->A transacção N&lt;!--:--></title><link>https://abapinho.com/en/2009/05/transaccao-n/</link><pubDate>Thu, 14 May 2009 12:44:21 +0000</pubDate><guid>https://abapinho.com/en/2009/05/transaccao-n/</guid><description>É intrigante o porquê de, nos dias que correm, a transacção SE16 continuar a ser tão utilizada, quando já existe há tantos anos uma muito melhor, a SE16N.
A transacção SE16N tem mais:
sainete: tem um interface mais dinâmico e sofisticado;
simpatia: mostra em simultâneo a descrição funcional e o nome técnico dos campos;
sabedoria: mostra em simultâneo o valor interno e externo dos campos com rotinas de conversão;
E pode, vejam só, ser também invocada através da transacção N.</description></item><item><title>&lt;!--:pt-->Melhorar os melhoramentos&lt;!--:--></title><link>https://abapinho.com/en/2009/03/melhorar-os-melhoramentos/</link><pubDate>Fri, 20 Mar 2009 10:17:37 +0000</pubDate><guid>https://abapinho.com/en/2009/03/melhorar-os-melhoramentos/</guid><description>&lt;p>No princípio era o INCLUDE.&lt;/p>
&lt;pre>&lt;code>Depois vieram os CMODs,
Seguiram-se logo as BADIs,
Agora são os Enhancements.
E no entanto, o caos continua.
&lt;/code>&lt;/pre>
&lt;p>&lt;strong>Crítica&lt;/strong>
Na maior parte dos projectos SAP em que já trabalhei, a metodologia de utilização de todas estas modificações é a tudo-ao-molho-e-fé-em-SAP e é normal encontrar num único include - como o MV45AFZZ - extensões de código tão grandes que, se o SAP fosse a princesa Rapunzel, dava para lhe fazer umas tranças até cá abaixo para o príncipe subir à sua torre. Este código normalmente implementa várias funcionalidades diferentes e independentes que, ao longo do tempo, se vão emaranhando quase irreversivelmente umas nas outras (tipo trança mesmo). Como consequência, qualquer alteração ao código existente requer cuidados redobrados e é sempre vista como um risco para o funcionamento de tudo o que lá está.&lt;/p>
&lt;p>Venho aqui propor uma solução simples e eficaz para este problema.&lt;/p></description></item><item><title>&lt;!--:pt-->Change pointers&lt;!--:--></title><link>https://abapinho.com/en/2009/03/change-pointers/</link><pubDate>Thu, 19 Mar 2009 17:07:02 +0000</pubDate><guid>https://abapinho.com/en/2009/03/change-pointers/</guid><description>&lt;p>Neste artigo tento explicar o que são &lt;em>change pointers&lt;/em> e revelar como são úteis e fáceis de usar.&lt;/p>
&lt;p>&lt;strong>O que é um change pointer&lt;/strong>
Um &lt;em>change pointer&lt;/em> é um mecanismo de registo de alteração de dados baseado em &lt;em>change documents&lt;/em> desenvolvido pela SAP especialmente para ALE. Permite saber, de forma simples e eficiente, quais os registos alterados em uma ou nas várias tabelas por ele monitorizadas. Os &lt;em>change pointers&lt;/em> são utilizados maioritariamente como gatilhos para a criação de IDOCs. Mas não devem ser vistos apenas como tal e espero que este artigo traga alguma luz a este mecanismo tão útil mas tão descurado no SAP.&lt;/p></description></item><item><title>&lt;!--:pt-->O Abapinho saúda-vos&lt;!--:--></title><link>https://abapinho.com/en/2009/03/inicio/</link><pubDate>Thu, 19 Mar 2009 10:51:11 +0000</pubDate><guid>https://abapinho.com/en/2009/03/inicio/</guid><description>Bem-vindo ao Abapinho, um blog sobre ABAP em português.</description></item></channel></rss>