<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Neha Kumari on Medium]]></title>
        <description><![CDATA[Stories by Neha Kumari on Medium]]></description>
        <link>https://medium.com/@zzcvgqtn?source=rss-7cd03c5ac7ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*85XUuQC_z2V4o6KJQpvj2w.jpeg</url>
            <title>Stories by Neha Kumari on Medium</title>
            <link>https://medium.com/@zzcvgqtn?source=rss-7cd03c5ac7ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 07:10:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zzcvgqtn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Printer Determination: TM module + PPF — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/printer-determination-tm-module-ppf-sap-abap-8f4cea4a2598?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f4cea4a2598</guid>
            <category><![CDATA[printers]]></category>
            <category><![CDATA[adobe-forms]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[transport-management]]></category>
            <category><![CDATA[abap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Mon, 20 May 2024 08:01:58 GMT</pubDate>
            <atom:updated>2024-05-20T08:01:58.331Z</atom:updated>
            <content:encoded><![CDATA[<h3>Printer Determination: TM module + PPF — SAP ABAP</h3><p>In my previous post on TM form series. I discussed about scheduling and start condition. In continuation, today we will discuss about Printer Determination in TM.</p><p>There are two ways we can determine Printer for specific PPF action in TM.</p><ol><li>By setting default value in configuration.</li><li>By determining based on code.</li></ol><p>Let us first see where this printer is populated for PPF action in the frontend. When we generate PPF action in TM, there is default information for printer. As we can see below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AEtHQD1Qf0i0qGL-bO8wUQ.png" /></figure><h4>1. By setting default value in configuration.</h4><p>Pinter is populated from configuration in SPRO transaction. We can follow the below process to set it.</p><p>Navigate to <strong>Maintain PPF Settings</strong> using below path, and execute it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FcZUjFnVLDEf0sH7QDr5wQ.png" /></figure><p>Select application <strong>/SCMTMS/TRANSPORTATION</strong> and click on <strong>Condition Configuration</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M08QnJEjD07tLRrG-e5IKQ.png" /></figure><p>Navigate to the desired action-profile on the left-hand navigation panel, then select the desired action-definition on the right and side. Once we select we’ll see <strong>Processing Details </strong>tab at the bottom. In the Details of Selected Processing section we’ll see <strong>Printer</strong> tab. Once you navigate to printer tab you can set a default printer value there. As youc an see beow in this case the value is ZPDF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*owpCbULpYRX_VB8NzBewiA.png" /></figure><h4>2. By determining based on code.</h4><p>For this we have to implement filter BADI —<strong> PRINTER_DETERM_PPF</strong>. I have created implementation <strong>ZENH_PRINTER_DET_PPF</strong>. Activate the implementation and PPF-actions for which we want the printer to be determined based on code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v4wKwg-N0MLPNtn520kFGQ.png" /></figure><p>Go to Interface tab and double lick on method GET_PRINTER_DATA to to implement the logic in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*PGpHEQyZM4_AivIuQD0AZg.png" /></figure><p>Inside the method you can add case based on <strong>FLP_VAL</strong> field which will have value for PPF action-definition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*GXjNK9v3gLJS_8SX1IrFMw.png" /></figure><p>But, have added below code to make the object generic and utilize it in multiple forms.</p><blockquote><em>For this we have store the form name and print-class details, hence we can use standard tables like </em><strong><em>TVARVC </em></strong><em>or we can create a custom one.</em></blockquote><blockquote><em>Here, I have created a custom table ZTA_CONTROL with below data maintained, where VARVEY1 contains action-definition name and VARDATA1 contains print-class responsible for that action-definition.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*Y8qFM2gps-KJDdjpMZPMCQ.png" /><figcaption><strong>ZTA_CONTROL table</strong></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89d5b571610acc5381223a73c2f5ff1f/href">https://medium.com/media/89d5b571610acc5381223a73c2f5ff1f/href</a></iframe><p>You can add below<em> </em><strong><em>static method</em></strong> in the print-class which you created for implementing data fetching logic for adobe-forms inheriting from standard class <strong>/SCMTMS/CL_PRINTOUT</strong>. In my <a href="https://medium.com/@zzcvgqtn/adobe-form-in-tm-module-sap-abap-636bbd83e43b"><em>previous blog</em></a> for Adobe-forms in TM, I have create ZCL_OTC_BOL_PRINT so I have added static method PRINTER_DETERMINATION in the same class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*MxMSxbtVgebx7LnhSRXtOw.png" /></figure><p>Add parameter similar to the BADI method so that we call use any necessary data from the parameters and it will be easy to pass data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*S0MOMiCuYEj5roQ50vD2Eg.png" /></figure><p>In the code we can design our logic based on our business requirement. For me, I have used extended BRF+ condition ZTM_PRINTER_DET with below parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPkAmtMTRTTFQy2WTB-ZkQ.png" /></figure><p>In TM we can fetch data from these conditions based on nodes, here I am using TOR root and static method <strong>PROC_CONDITONS</strong> of standard class <strong>/SCMTMS/CL_COND_OL </strong>for the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8517f4d2850b68df396a38cd4c2fb0bc/href">https://medium.com/media/8517f4d2850b68df396a38cd4c2fb0bc/href</a></iframe><p>With this we are done with the coding part. Now we have to do the configuration. In the beginning, we were setting a default printer below but now we have to tick the check-box <strong>Printer Determination</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n78RCgWM2Ov6aMJCqF_YKg.png" /></figure><p>With this we are done.</p><p>Bye! (●’◡’●)</p><p>You can read pervious posts on TM forms to get a better understanding.</p><ol><li><a href="https://medium.com/@zzcvgqtn/adobe-form-in-tm-module-sap-abap-636bbd83e43b">Creating and configuring adobe-form in TM.</a></li><li><a href="https://medium.com/@zzcvgqtn/scheduling-condition-start-condition-tm-module-ppf-sap-abap-e8d40ff61b24">Scheduling and Start condition for TM forms.</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f4cea4a2598" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FORMATTED EXCEL — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/formatted-excel-sap-abap-ad2284494bf?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad2284494bf</guid>
            <category><![CDATA[abap]]></category>
            <category><![CDATA[download]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[sap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 10:07:27 GMT</pubDate>
            <atom:updated>2024-09-23T14:23:57.493Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6-PhApZFXDhkxNjpFN21mw.png" /></figure><h3>Formatted Excel using XML — SAP ABAP</h3><h4>Excel download with esthetic features to make it visually appealing to the user</h4><p>Often we come across requirement in SAP where data need to be downloaded as excel sheet or this excel is supposed to be rendered as email attachment.</p><p>Most of us, generally use static method <strong>GUI_DOWNLOAD</strong> from global class <strong>CL_GUI_FRONTEND_SERVICES</strong> or function module <strong>GUI_DOWNLOAD</strong> directly.</p><p>But the result we get from this is something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*oRJdtVRs8gQK3Fmd9DvQYA.png" /><figcaption>No spacing, no formatting.</figcaption></figure><p>No offence but it doesn’t look nice! 🤐 And sometimes when the data is lengthy it gets overlapped and the business users have to do the formatting before utilizing this sheet.</p><p>What if I say, we can make this look something like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*EjHhHaRY9G5qKm1MOA_-Dw.png" /></figure><p>Yes, I know it looks gorgeous right! 🤭</p><p>Let’s see how we create achieve this:</p><p>Let’s create a global class using SE24 t-code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*TkFnK058_nZ1IKDZq1nTjw.png" /></figure><p>Add below constants in the attribute section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nH1BcWfj7FaWj_UYTEBcwQ.png" /></figure><p>Then add below instance variables in the attribute section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*Ou1rPpxlAXfi7b5rYVqIQA.png" /></figure><p>Now one by one we will add methods to build our code.</p><p>Create instance method <strong>CREATE_EXCEL</strong> without any parameters. This method will create the XML for excel sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*KpI-d4wNNWVvmGbyk0o85w.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22f7077727438fded259984655d53477/href">https://medium.com/media/22f7077727438fded259984655d53477/href</a></iframe><p>Then create instance method <strong>CREATE_HEADER_STYLE</strong> with below importing parameter and make sure to make all the parameters optional. This method will create XML for header style, and keeping the fields optional will give user flexibility to play around to get the perfect excel sheet that they are looking for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*4qaoLKSg0fBZdySGkYR0NQ.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8f9a0410b4239da548ef74630105a7b2/href">https://medium.com/media/8f9a0410b4239da548ef74630105a7b2/href</a></iframe><p>Now, add another instance method <strong>CREATE_DATA_STYLE </strong>with below parameters and make this optional. This method will create XML for styling the data rows in the excel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*hF0svvXge43f6lB5awqrfw.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc930d44f2b29c903546b7a5440d12bc/href">https://medium.com/media/dc930d44f2b29c903546b7a5440d12bc/href</a></iframe><p>Now, we will create instance method <strong>SET_EXCEL_COLUMNS</strong> which will create XML for header data using below parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*jGpWzPrP9AqCyR53EINf1Q.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b603a458cb150670a1c8b1faa7853b4e/href">https://medium.com/media/b603a458cb150670a1c8b1faa7853b4e/href</a></iframe><p>Add instance method <strong>GET_COMPONENS </strong>with below parameters. This is a helper method to fetch the column names for the internal table which will be needed for creating XML for the excel data rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*ZJOKKBtPNVJbBd2VOatTBA.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23d1b472795cd89879ec42800a8846eb/href">https://medium.com/media/23d1b472795cd89879ec42800a8846eb/href</a></iframe><p>Then we will create instance method <strong>SET_EXCEL_DATA</strong> using above helper method and with below parameters. This method will create XML for the excel data rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*iJzo48rtQNmv5STDiThuFQ.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/037f11a8aa17bc0560e0e529870daf72/href">https://medium.com/media/037f11a8aa17bc0560e0e529870daf72/href</a></iframe><p>After this, we will create instance method <strong>GET_BIN_EXCEL</strong> with below parameters. This method will help to get binary file for the excel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*OZP6K8dyu_ua7-qm3BRx0A.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4757a7af280ca4d54f37b276c7e31d68/href">https://medium.com/media/4757a7af280ca4d54f37b276c7e31d68/href</a></iframe><p>We now have all the method will will help to generate the XML code for the excel sheet. Furthermore, we will add a couple of methods to download the excel sheet.</p><p>Let’s create a helper method <strong>GET_FULLPATH </strong>which will fetch the frontend PC path to save the excel in desired location; with below parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*lCAEIr9UdnceiPVZKauFwQ.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b0644f4c86cfb76358282d13bcc63d5/href">https://medium.com/media/3b0644f4c86cfb76358282d13bcc63d5/href</a></iframe><p>Now using above helper method create instance method <strong>DOWNLOAD_EXCEL</strong> with below parameter. This will download the excel sheet in the front-end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*1OtmjqOlEgoYv3dQU47_rA.png" /></figure><p>Add below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4cfe464a1e20cd63b83786569d50e282/href">https://medium.com/media/4cfe464a1e20cd63b83786569d50e282/href</a></iframe><p>Let’s see how to use this class in our code to download excel. I have create a test program <strong>ZTEST_EXCEL</strong> to demonstrate the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f551976fb09dca71c3e374085ddabb53/href">https://medium.com/media/f551976fb09dca71c3e374085ddabb53/href</a></iframe><p>When we execute the above program we get below pop-up, select the desired path for the file, provide file name and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*uc3wYVlHiITM_u7-xsXpRQ.png" /></figure><p>You will get below success message once the file is downloaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*sq-bxw6R3rL-HLKyHra_Rg.png" /></figure><p>Then go to the path where you have saved the excel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ju6roxLAlhTnOPz-nS6RRA.png" /></figure><p>Excel file is successfully downloaded, now let’s check the content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*ozdgpzx8O2oxZgVXZxoigg.png" /></figure><p>Hallelujah! we have our formatted excel.</p><p>Finally let’s check how to use this class to add excel as attachment in email using the same report.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/054e0868c2198730e150003093abc740/href">https://medium.com/media/054e0868c2198730e150003093abc740/href</a></iframe><p>When we execute this report and check SOST t-code for email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jxh6DCgbzX72uZSxHm97qg.png" /></figure><p>Email is there, we can see the attachment in the email. I have not added anything in the email body but you can 😊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ax6rmEQsuY56-r1oBgviA.png" /></figure><p>Let’s open the attachment and check the excel content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*BV4tM7hxHH87pxgQRDstQA.png" /></figure><p>Hah! we have our formatted excel.</p><p>Farewell!!! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad2284494bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scheduling-condition & Start-condition: TM module + PPF — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/scheduling-condition-start-condition-tm-module-ppf-sap-abap-e8d40ff61b24?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8d40ff61b24</guid>
            <category><![CDATA[abap]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[otc]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[transport-management]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Tue, 02 Apr 2024 07:40:20 GMT</pubDate>
            <atom:updated>2024-04-02T07:40:20.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2w0eQWTLjlo_47zXl3-A7Q.png" /></figure><h4>Scheduling-condition &amp; Start-condition: TM module + PPF — SAP ABAP</h4><p>While working with TM form we configure <em>action-profile</em> with freight order, etc. Each <em>action-profile </em>can have multiple <em>action-definitions, </em>hence when output is generated, if conditions are not applied form will be generated for each <em>action-definitions</em> in the <em>action-profile</em>.</p><p>To restrict this from happening we you will come across two different types of condition checks as below:</p><ol><li><strong>Scheduling-condition check:</strong> to generated the output form automatically/manually. Only when the check is passed the output will be visible in the <em>unprocessed</em> section of <em>output-management</em>. (The schedule condition decides whether an action should be scheduled for processing. An action is therefore only generated if the schedule condition is met.)</li><li><strong>Start-condition check</strong>: to process the output form automatically/manually. Only when this check is passed the output is visible in the <em>processed</em> section of <em>output-management</em>. (The start condition is checked before the action is executed. The action is only executed when the start condition has been fulfilled.)</li></ol><p>To implement these checks we need to implement below filter BADIs:</p><ol><li><strong>EVAL_SCHEDCOND_PPF</strong>: for <em>scheduling-condition</em>.</li><li><strong>EVAL_STARTCOND_PPF</strong>: for <em>start-condition</em>.</li></ol><p>Now there are multiple ways we can utilize these BADIs for our forms. One of which can be to implement these two BADIs for each <em>action-definition</em>. But this is a bit too much work for me. So the approach I used is to implement the BADIs such that it remains generic and can me utilized for various TM forms.</p><p>Let’s see how I have done it!</p><p>Create custom implementation <strong>ZENH_SCHEDCOND_PPF</strong> for BADI <strong>EVAL_SCHEDCOND_PPF </strong>using SE18 t-code. As this is filter BADI provide desired name and description, I have used a generic name <strong>ZENH_SCHEDCOND_FILTER </strong>(Description: <em>Schedule condition for PPF</em>) because we will use the filter for multiple forms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q4v9pbnoPMB9VNIxW_zTkQ.png" /></figure><p>Note: This filter value is stored in below value table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*Ki7Gjd8Szbvh6v3f2O0IXw.png" /></figure><p>Now navigate <em>Interface</em> tab to the class created and double click on the method <strong>EVALUATE_SCHEDULE_CONDITION </strong>to add our schedule condition logic inside the custom enhancement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*zzxRAVRtTQiDhwX0U3MNBw.png" /></figure><p>Inside the method we have to implement various checks</p><p>I have added below code to make the object generic and utilize it in multiple forms.</p><blockquote>For this we have store the form name and print-class details, hence we can use standard tables like <strong>TVARVC </strong>or we can create a custom one.</blockquote><blockquote>Here, I have created a custom table<em> </em>ZTA_CONTROL with below data maintained, where VARVEY1<em> </em>contains <em>action-definition</em> name and VARDATA1 contains <em>print-class</em> responsible for that action-definition.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*EAS16nAGF9XDfI8kuPwFpw.png" /><figcaption><strong>ZTA_CONTROL table</strong></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffbae9ecbb978d4f97170d61df4d41c3/href">https://medium.com/media/ffbae9ecbb978d4f97170d61df4d41c3/href</a></iframe><p>You can add below<em> </em><strong><em>static method</em></strong> in the print-class which you created for implementing data fetching logic for adobe-forms inheriting from standard class <strong>/SCMTMS/CL_PRINTOUT</strong>. In my <a href="https://medium.com/@zzcvgqtn/adobe-form-in-tm-module-sap-abap-636bbd83e43b"><em>previous blog</em></a> for Adobe-forms in TM, I have create ZCL_OTC_BOL_PRINT so I have added below method in the same class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/12f84bb983c4f36c99d93b2904d52806/href">https://medium.com/media/12f84bb983c4f36c99d93b2904d52806/href</a></iframe><p>Similarly for start condition, create custom implementation <strong>ZENH_STARTCOND_PPF</strong> for BADI <strong>EVAL_STARTCOND_PPF </strong>using SE18 t-code. As this is filter BADI provide desired name and description, I have used a generic name <strong>ZENH_STARTCOND_FILTER </strong>because we will use the filter for multiple forms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CevdPLxxD4NFa6ST_yMYIg.png" /></figure><p>Note: This filter value is stored in below value table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*jJbnQsmtN6Qno7DKb8uMIQ.png" /></figure><p>Now navigate <em>Interface</em> tab to the class created and double click on the method <strong>EVALUATE_START_CONDITION </strong>to add our schedule condition logic inside the custom enhancement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*Q2KD7Rwc4263hlAsu4wMog.png" /></figure><p>Inside the method we can implement various checks which need to be performed for start condition.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/400e25b08febb3a8f728e566675a62a4/href">https://medium.com/media/400e25b08febb3a8f728e566675a62a4/href</a></iframe><p>You can add below<em> </em><strong><em>static method</em></strong> in the print-class which you created for implementing data fetching logic for adobe-forms inheriting from standard class <strong>/SCMTMS/CL_PRINTOUT</strong>. I have added below method in the class ZCL_OTC_BOL_PRINT.</p><p>As I don’t have any requirement to check in start condition I have set ETP_RC = 0. If there is any condition checked then we have to set ETP_RC = 0 when condition is fulfilled otherwise ETP_RC = 4 for failure.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f53370f395bf2c73a1459a7861a6a99/href">https://medium.com/media/7f53370f395bf2c73a1459a7861a6a99/href</a></iframe><p>Now the filter BADI values need to be configured with the action-definitions. Follow below path in SPRO transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WoKA4Ao14u8dfUC1xNcYKA.png" /></figure><p>Execute ‘<em>Maintain Output Management Adapter Settings</em><strong><em>’</em></strong>, select <strong>/SCMTMS/TRANSPORTATION</strong> and click on <em>Condition Configuration</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDS_P32dC0vxXRwlxraZiA.png" /></figure><p>Add the filter value created for scheduling condition BADI in scheduling condition tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*iP-turL3z8Qk8U3FyJhVzQ.png" /></figure><p>And add the filter value created for start condition BADI in start condition tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*f4xOD2weZ-SaBMXQOWB3xw.png" /></figure><p>Once these two values are configured our BADI implementations will be triggered. Add break-point and test the implementations.</p><p>Finally ‘THE END’ ! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8d40ff61b24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adobe-form in TM module — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/adobe-form-in-tm-module-sap-abap-636bbd83e43b?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/636bbd83e43b</guid>
            <category><![CDATA[abap]]></category>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[adobe]]></category>
            <category><![CDATA[class]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Fri, 03 Nov 2023 17:05:42 GMT</pubDate>
            <atom:updated>2023-11-06T06:40:33.189Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adobe-form in TM module — SAP ABAP</h3><p>After working on multiple adobe-forms of TM module, here I am with all the basics steps needed for it.</p><p>Yes! you are at the right place…😁</p><p>For each TM form development there are two parts:</p><ol><li>Form designing</li><li>Data fetching logic</li></ol><p>And for each part we must create at least below mandatory objects for successfully triggering and printing the form.</p><h3><strong>Part-1:</strong></h3><p>For form design we will create below elements:</p><ol><li><em>DDIC structure</em></li><li><em>DDIC table-type</em></li><li><em>Adobe-form interface</em></li><li><em>Adobe-form</em></li></ol><p>To start with we have to create <em>DDIC structure</em> for data to be printed in the <em>adobe-form</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EuO6PvchPae3GzcHPjSuHA.png" /><figcaption>DDIC Structure</figcaption></figure><p>Once the structure is in place, create a <em>DDIC table-type </em>using the structure we have created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*kwVSpELjNPqzV5sbZIcKBw.png" /><figcaption>DDIC table-type</figcaption></figure><p>Now we have to create <em>adobe-form interface</em> using the <em>table-type</em> we have create. And make sure that the <em>parameter-name</em> for the <em>table-type</em> that we are adding must be <strong><em>IT_PRINTOUT</em></strong>. The reason for using this name will be explained when we will created <em>print-class</em> for implementing data fetching logic for our form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*puJs2K-hMgYi7yimIQH7qQ.png" /><figcaption>Adobe-form interface</figcaption></figure><p>Moving ahead we will create <em>adobe-form</em> using the <em>adobe-form interface</em> we already created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*Bx9Iq740RjjaBVvh_Oc1AA.png" /><figcaption>Adobe-form</figcaption></figure><p>Now we can proceed with the layout design part along with binding the desired fields with layout elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tg402xBtrIHZo84saCjUCg.png" /><figcaption>Adobe-form layout</figcaption></figure><p>Kudos! we are done with the form designing part. Let’s move on to the data fetching part.</p><h3>Part-2:</h3><p>This part is little tricky, so be patient.</p><p>For logic implementation we have to create two classes:</p><ol><li>Service-class.</li><li>Print-class.</li></ol><h4>Service-class:</h4><p>Now we have to create service-class and inherit from standard class <strong><em>/BOFU/CL_PPF_SERV_FOR_BO</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*CllmL6GJFivKHOFWTLAqNw.png" /><figcaption>Service-class</figcaption></figure><p>Once this is done we have to redefine instance-method <strong><em>PERSONALIZE_DOC_BY_ABAP</em></strong><em> </em>using the button highlighted in red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*nh3gAYqB7wRIhlqp2KfbgA.png" /></figure><p>Inside the method, we can implement our logic by using <em>CASE</em> statement. But I have used dynamic creation of objects because one <em>output-agent</em> can have only one <em>service-class</em> configured with it and this should contain the logic for each <em>action-definition</em>.</p><blockquote>One <strong>output-agent</strong> can have only one <strong>service-class</strong> configured with it.</blockquote><blockquote>One <strong>output-agent</strong> can have <strong>M </strong>number of <strong>action-profile</strong> and each <strong>action-profile</strong> can further have <strong>N</strong> number of <strong>action-definition. M </strong>&amp;<strong> N </strong>and be any positive integer.</blockquote><p>Below you can see an example of the <em>output-agent</em> I am using for the demo and the <em>service-class</em> configured with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jr7W5UoWp8BhjAw5TMs1Mw.png" /><figcaption>Configuration of service-class with output-agent</figcaption></figure><h4>Method redefinition using CASE:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83fda7e34a22716bd5599e116568ee9e/href">https://medium.com/media/83fda7e34a22716bd5599e116568ee9e/href</a></iframe><h4>Method redefinition using dynamic coding:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4fb3d7773303a3fe691ab6a985dfa324/href">https://medium.com/media/4fb3d7773303a3fe691ab6a985dfa324/href</a></iframe><blockquote>For dynamic code above I have used custom table which looks something like below. You can create your own custom table with desired fields.</blockquote><blockquote>Here, yellow box and red box represents <strong>action-definition</strong> and corresponding <strong>print-class</strong> respectively.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GF2Qz699Grppjh6Lx7c6Lw.png" /><figcaption>Custom table with action-definition &amp; print-class corresponding to it</figcaption></figure><p>With this we have completed the coding for <em>service-class</em> and now we move on the <em>print-class</em>.</p><h4>Print-class:</h4><p>For this we have to create a class inheriting from standard class <strong><em>/SCMTMS/CL_PRINTOUT</em></strong> as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*j7_YOnuL5psGSmzFVAJ_aA.png" /><figcaption>Print-class</figcaption></figure><p>Moving on, we have to redefine instance-method <strong><em>FILL_PRINTSTRUCTURE</em></strong>. This is the method where we have to write the data fetching logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*MVavEeH15toXIJMHEKPK9A.png" /></figure><h4>Method redefinition:</h4><ol><li>Create work-area <strong><em>LWA_FORM_STRUCTURE</em></strong> using the same <em>DDIC</em> <em>structure</em> you created for form.</li><li>Fetch data and fill this structure.</li><li>Refer below code and add field-symbol<strong> <em>&lt;LFS_TA_PRINTOUT_FRO&gt;</em></strong><em> </em>with <em>DDIC table-type</em> that we created earlier.</li><li>This field-symbol will be assigned to exporting parameter <strong><em>ET_PRINTOUT</em></strong>.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69e027f26adda1ca9823cddc36cf326b/href">https://medium.com/media/69e027f26adda1ca9823cddc36cf326b/href</a></iframe><p>Take a deep breadth because we are done!</p><blockquote>In the beginning we came across a question: Why are we using<strong> IT_PRINTOUT</strong> in the <strong>adobe-form interface</strong>?</blockquote><blockquote>As you can see below the inherited method <strong>PRINT_DOCUMENT</strong> from standard class checks for this parameter to sent the value we have populated in the exporting parameter <strong>ET_PRINTOUT</strong> of method <strong>FILL_PRINTSTRUCTURE</strong> to the <strong>adobe-form interface </strong>for print of the form. Hence if the same name is not maintained in <strong>adobe-form interface</strong>,<strong> </strong>you will get a dump while executing the form.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*dL9LLsD_0OyyOP84iIFW9Q.png" /></figure><h4>Final step:</h4><p>Trigger the <em>abode-form</em> from front-end and check the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQZOjAsojgdHREgaXEfpRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*5_wiexPSANyE_jrcvJ1oPA.png" /><figcaption>Adobe-form output</figcaption></figure><p>Happy coding! Bye! 🙋‍♀️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=636bbd83e43b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Collapsible rows and columns in ALV Grid — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/collapsible-rows-and-columns-in-alv-grid-sap-abap-a3700a2a43d3?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3700a2a43d3</guid>
            <category><![CDATA[abap]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[row]]></category>
            <category><![CDATA[report]]></category>
            <category><![CDATA[column]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 20:08:11 GMT</pubDate>
            <atom:updated>2023-08-14T20:08:11.277Z</atom:updated>
            <content:encoded><![CDATA[<h3>Collapsible rows and columns in ALV Grid — SAP ABAP</h3><p>Recently came across a requirement where we have to display data in collapsible rows and columns. The collapsible columns we will dynamically determined at runtime.</p><p>We can achieve this requirement using ALV Grid and RTTC classes in classical ABAP. Collapsible rows are way more easier to achieve than collapsible columns. Also for collapsible columns we need two screen, and things become a bit more trickier when we have columns which need to be determined dynamically. Try combining all the scenarios together and this is where you’ll have a blast. 😉</p><p>Now we’ll have a look at a sample which is based on the above requirement, and for the visualization please check below video.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z0ina4xxgFAGAfIoh0hE5g.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXuFaFlVzPqI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXuFaFlVzPqI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXuFaFlVzPqI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/12afd0a85970dc169b4eacf2862d5538/href">https://medium.com/media/12afd0a85970dc169b4eacf2862d5538/href</a></iframe><p>And here goes the ABAP code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5f89dcb9cb192b1a1c77d43d278d2b9/href">https://medium.com/media/d5f89dcb9cb192b1a1c77d43d278d2b9/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/231afa2b97c222bd495b99aa2a281943/href">https://medium.com/media/231afa2b97c222bd495b99aa2a281943/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c19bcd8e022080c3c4b59e41d12a5b6/href">https://medium.com/media/2c19bcd8e022080c3c4b59e41d12a5b6/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03055062f9a7aeb257598a7043d806c7/href">https://medium.com/media/03055062f9a7aeb257598a7043d806c7/href</a></iframe><p>Apart from this code we also have to add GUI status &amp; title and we are good to go.</p><p><em>What we learned from this post:</em></p><ol><li><em>Defining method for events in class CL_GUI_ALV_GRID</em></li><li><em>Creating dynamic table using Runtime Type Creation (RTTC)</em></li><li><em>Collapsible rows</em></li><li><em>Collapsible columns</em></li><li><em>ALV with dynamic table</em></li></ol><p>Thanks for reading! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3700a2a43d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fetch the data from the output of a program — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/how-to-fetch-the-data-from-the-output-of-a-program-sap-abap-3c87afd15f5c?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c87afd15f5c</guid>
            <category><![CDATA[output]]></category>
            <category><![CDATA[report]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[executable]]></category>
            <category><![CDATA[abap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Sat, 07 Jan 2023 17:02:30 GMT</pubDate>
            <atom:updated>2023-08-14T20:34:31.430Z</atom:updated>
            <content:encoded><![CDATA[<h3>Report output in Internal Table — SAP ABAP</h3><p>Once I came across a requirement where the output of a standard report has to be sent in tabular format to third party system using BAPIs.</p><p>And needless to say that it’s a big deal to digest a massive program and replicate all it’s functionalities in just 2 weeks. So while doing my research for this requirement, I came across the solution to fetch the standard report data in the form of internal tables and here is how you can do it.</p><p>With the help of below three statement(s)/FM(s), you can get the output data of a program and easily process it as per your requirement.</p><ol><li><em>SUBMIT &lt;program&gt; statement</em></li><li><em>Function module — LIST_FROM_MEMORY</em></li><li><em>Function module — LIST_TO_ASCI</em></li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/784a6fcc9b736c5e2a94419259313567/href">https://medium.com/media/784a6fcc9b736c5e2a94419259313567/href</a></iframe><p>Thanks for reading! Cheers! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c87afd15f5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to send email which have subject with more than 50 character — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/how-to-send-email-which-have-subject-with-more-than-50-character-sap-abap-8e2f583c98f6?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e2f583c98f6</guid>
            <category><![CDATA[sost]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[subject]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[abap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Sun, 25 Dec 2022 18:34:37 GMT</pubDate>
            <atom:updated>2023-08-14T20:28:12.024Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to send email which have subject with more than 50 character — SAP ABAP</h3><p>In many scenarios, you’ll come across this requirement where the subject for email will be more than 50 characters. Today we’ll see how to achieve it.</p><p>Most of the time for setting the subject we use static method <strong>CREATE_DOCUMENT </strong>of class <strong>CL_DOCUMENT_BCS</strong> to set the subject. And as you can see below the importing parameter <strong>I_SUBJECT</strong> for this method have type <strong>SO_OBJ_DES</strong> which is of 50 characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dhiV0tQaugfTr_3oqpxxJQ.png" /></figure><p>The solution is quite simple, we can use instance method <strong>SET_MESSAGE_SUBJECT</strong> of class <strong>CL_BCS</strong>. The importing parameter <strong>IP_SUBJECT</strong> here have type <strong>STRING</strong> which can have variable length.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*Ni5Qv-sPvLbPQzR_z-pCpQ.png" /></figure><p>Here is the code for sending email with subject of more the 50 characters:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49d9883dcf513404b4c7b6fe06273ffa/href">https://medium.com/media/49d9883dcf513404b4c7b6fe06273ffa/href</a></iframe><p>If you carefully observe the code there are only two small changes for the requirement. First of all, we’ll set the subject in <strong>CREATE_DOCUMENT</strong> as space because we don’t need it. Then we’ll set the subject using <strong>SET_MESSAGE_SUBJECT</strong>. We are done!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ud1DPin4yqBxw9qOsFvV0Q.png" /></figure><p>After executing the program, when you’ll check <strong>SOST</strong> transaction you’ll see the subject is empty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DOOBINFHq62wkxJr11n8kA.png" /></figure><p>To check the new subject with 50+ character go to display icon and click on the dropdown and select <em>Display Document Properties</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STPwNqsah-qBmgfFOhmj7Q.png" /></figure><p>You can see <strong>Title(Long)</strong>, this is our new subject which can be greater than 50 Characters. 😎</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGLNIe6EM6LQtvYRVNRl_w.png" /></figure><p>Thanks for reading! Cheers! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e2f583c98f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending email from BADI or any other enhancement without commit work — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/sending-email-from-badi-or-any-other-enhancement-without-commit-work-sap-abap-b55f20ed85de?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/b55f20ed85de</guid>
            <category><![CDATA[abap]]></category>
            <category><![CDATA[rfc]]></category>
            <category><![CDATA[badi]]></category>
            <category><![CDATA[sap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Sat, 10 Dec 2022 12:21:02 GMT</pubDate>
            <atom:updated>2022-12-10T12:34:49.907Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sending email from BADI or any other enhancement without commit work — SAP ABAP</h3><p>Recently I was working on a requirement, where we have to implement BADI for preliminary checks for ASN (<em>Advanced Shipping Notification</em>). These checks are needed because ASN fails during processing due to missing data in deliveries which results in expensive penalties for the company.</p><p>So once the check is performed and log table is populated with warnings and errors, we have to send email with all the warnings and errors to the concerned party so that the missing data can be filled, to avoid penalties.</p><p>The problem that we faced is that, email was being send in all different cases except for the case when no delivery was created due to custom error (from our implementation) or standard error. This happens because there is no COMMIT WORK inside the BADI and no commit is performed when delivery is not created due to custom/standard errors. The latter doesn’t happens in other cases, which is the reason why email is being send in those cases.</p><p>Needless to say, COMMIT WORK can’t be used inside any enhancements because it commits the ongoing LUW (<em>Logical Unit of Work</em>) and a new LUW starts which is a disaster. It can cause a lot of inconsistency and many update processes will be impacted.</p><p>Now, is there a way we can achieve our goal of sending email without a COMMIT WORK inside the BADI?</p><p>Short answer: YES!</p><p>Let’s check out how:</p><p>First of all, we have to create a Remote Enabled FM which takes all required data as input to send email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*T17m4NbmEoc_Na1dL80ZcA.png" /></figure><p>In addition to this, write the email sending logic inside the Remote Enabled FM with COMMIT WORK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*yUFkxQ0pkGhKUj5bp3fx8Q.png" /></figure><p>Further more, you have to call the FM as per your requirement with the extension as you can see below.</p><blockquote><strong>STARTING NEW TASK ‘&lt;task name&gt;’ DESTINATION ‘NONE’</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*IFZ4Lw5THxVftt96s7AE0A.png" /></figure><p>With this now we can ensure that the email will be sent irrespective of whether we have a commit or not in the further processing.</p><blockquote>Note: Calling an RFC with above extension helps to start a separate LUW and once the COMMIT WORK is performed, the flow comes back to the old LUW without any hindrance in the processing.</blockquote><p>Hope this was worth reading! Cheers! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b55f20ed85de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ATCUD for Billing Document — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/atcud-for-billing-document-sap-abap-772c254cb012?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/772c254cb012</guid>
            <category><![CDATA[sd]]></category>
            <category><![CDATA[billing-document]]></category>
            <category><![CDATA[atcud]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[abap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Sat, 03 Dec 2022 21:05:57 GMT</pubDate>
            <atom:updated>2023-08-14T20:23:56.783Z</atom:updated>
            <content:encoded><![CDATA[<h3>ATCUD for Billing Document — SAP ABAP</h3><p>Recently we had a requirement to print ATCUD code in all the pages for Billing Documents printouts.</p><p>For those of you who are thinking “What is this ATCUD?”. Check out <a href="https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/9b351d6e33a0496598e4b58782565e8a/20b0d3ae78714b6d905c7d9a5715ac68.html?version=2020.latest"><em>here</em></a>.</p><p>And ATCUD code to be printed looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*WmsF8LI-0AFYS6w613_g2w.png" /><figcaption>The 8 highlighted characters are ATUCD code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*oyf3CPcnu2fcNbpGrEB46Q.png" /><figcaption>The 10 characters are the Number Range Series</figcaption></figure><p>Now the issue that we faced is that, unlike ATCUD for Delivery, we didn’t find any standard class to fetch the ATCUD code which need to be printed on the Billing Documents which involve <em>invoice</em>, <em>proforma</em>, <em>credit memo</em>, etc.</p><p>So at last I created a global FM which will take the Billing document number and will provide the ATCUD code to be printed on the forms.</p><blockquote>Tables for ATCUD code are SIPT_VBRK &amp; SIPT_NUMST_SD</blockquote><p>Here is the code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f83364f647e3b3a09dcf5f18960db474/href">https://medium.com/media/f83364f647e3b3a09dcf5f18960db474/href</a></iframe><p>Thanks for reading. Cheers! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=772c254cb012" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending Email to Distribution List (DL) — SAP ABAP]]></title>
            <link>https://medium.com/@zzcvgqtn/sending-email-to-distribution-list-dl-sap-abap-21719a4150f6?source=rss-7cd03c5ac7ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/21719a4150f6</guid>
            <category><![CDATA[abap]]></category>
            <category><![CDATA[distribution-list]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[sap]]></category>
            <dc:creator><![CDATA[Neha Kumari]]></dc:creator>
            <pubDate>Sat, 26 Nov 2022 14:05:21 GMT</pubDate>
            <atom:updated>2023-08-14T20:21:30.050Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sending Email to Distribution List (DL) — SAP ABAP</h3><p>Most of the time, I see people fetching all the emails within a DL using standard FM <strong>SO_DLI_READ_API1</strong> and then using loop to add receivers and finally send the email using <strong>CL_BCS</strong> class.</p><p>Believe me the above way for sending email to DL is superfluous because we can directly send email to DL.</p><p>How?</p><p>Using <strong>CL_DISTRIBUTIONLIST_BCS</strong> class.</p><p>Check below: 👇</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5a1d3fcecffa032ed09a79804956c9c/href">https://medium.com/media/d5a1d3fcecffa032ed09a79804956c9c/href</a></iframe><p>Thanks for reading! Cheers! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21719a4150f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>