https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/BW-Business-Explorer-(SAP-BEx)-qa.xml SAP Community - BW Business Explorer (SAP BEx) 2026-03-03T12:10:10.007386+00:00 python-feedgen BW Business Explorer (SAP BEx) Q&A in SAP Community https://community.sap.com/t5/technology-q-a/request-where-used-list-for-hana-views-amp-bex-queries-in-sac-models/qaq-p/14142511 Request: Where-Used List for HANA Views & BEx Queries in SAC Models/Stories 2025-07-02T12:09:08.557000+02:00 Sivaramakrishnan_Manickam https://community.sap.com/t5/user/viewprofilepage/user-id/874631 <P>How can I generate a comprehensive Where-Used list of HANA views and BEx queries that are being utilized in existing SAP Analytics Cloud (SAC) models and stories, to ensure impact analysis before making changes to the underlying data sources?</P> 2025-07-02T12:09:08.557000+02:00 https://community.sap.com/t5/technology-q-a/sap-bw-analysis/qaq-p/14143900 SAP BW ANALYSIS 2025-07-03T17:41:40.651000+02:00 Hocine08 https://community.sap.com/t5/user/viewprofilepage/user-id/1593590 <P>Hello,</P><P>End users have saved locally Excel workbooks containing Analysis for Office (AO) reports.<BR />Since then, the underlying BEx query has been modified (fields added/removed, filters changed, etc.).</P><P>However, when users open their files, these changes are not reflected.<BR />We would like to update the BW query data source in the AO workbooks while preserving the existing Excel formatting.</P><P><STRONG>Goal:</STRONG><BR />Ensure the updated versions of the BEx queries are applied to locally saved AO files, without breaking the layout or formatting.</P> 2025-07-03T17:41:40.651000+02:00 https://community.sap.com/t5/technology-q-a/need-help-setting-up-sap-btp-feeling-stuck/qaq-p/14147978 Need Help Setting Up SAP BTP – Feeling Stuck 2025-07-09T09:12:41.040000+02:00 Adanna https://community.sap.com/t5/user/viewprofilepage/user-id/2186074 <P>Hi all,</P><P>I have&nbsp; started exploring SAP Business Technology Platform (BTP) &amp; while the possibilities seem exciting, I am&nbsp; facing issue when it comes to the setup part. I have been trying to work through the trial account and get things going with <A href="https://www.sap.com/india/index.html" target="_self" rel="noopener noreferrer">SAP</A> Build Apps &amp; Cloud Foundry but I keep getting confused around role collections, entitlements &amp; service configurations.</P><P>I have followed a few guides but either I am missing a step or things have changed from what is shown. Coming from a DevOps background, I am used to tools such as Atlassian. I just finished <A href="https://www.igmguru.com/agile-and-scrum/jira-project-management-training" target="_self" rel="nofollow noopener noreferrer">jira training</A> last month &amp; compared to that, SAP’s environment feels a bit more complex to navigate.</P><P>If anyone here could share how they got started with SAP BTP or suggest any beginner-friendly resources or videos, I would be&nbsp; grateful. Even a checklist of key steps would help a ton.</P><P>Appreciate any help.</P><P>Thank you....:)</P> 2025-07-09T09:12:41.040000+02:00 https://community.sap.com/t5/enterprise-resource-planning-q-a/bex-web-application-error-while-loading-the-application-return-value-quot-4/qaq-p/14148017 BEx Web Application Error while loading the application (return value "4") 2025-07-09T09:46:56.308000+02:00 AnchalSaini https://community.sap.com/t5/user/viewprofilepage/user-id/1532787 <P>Hello Everyone,</P><P>We have this issue in production portal where, when users run the WAD reports they are getting error "BEx Web Application Error while loading the application "" (return value "4")</P><P>The issue is intermittent and is seen only against the WAD reports.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnchalSaini_0-1752047134319.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/284407i3CB796FB90D124AA/image-size/medium?v=v2&amp;px=400" role="button" title="AnchalSaini_0-1752047134319.png" alt="AnchalSaini_0-1752047134319.png" /></span></P><P>&nbsp;</P> 2025-07-09T09:46:56.308000+02:00 https://community.sap.com/t5/technology-q-a/how-to-send-the-data-as-excel-attachment-via-email-in-sap-bw-on-hana/qaq-p/14148223 how to send the data as excel attachment via email in sap bw on hana 2025-07-09T13:09:41.761000+02:00 BWConsultant1 https://community.sap.com/t5/user/viewprofilepage/user-id/127253 <P>Hello All,</P><P>I've requirement where user need a data as an excel format and send via email to vendor (broadcast). In attachment data should be vendor specific if file contain that vendor data should be go to that vendor only with subject line of vendor and date of data.</P> 2025-07-09T13:09:41.761000+02:00 https://community.sap.com/t5/technology-q-a/how-to-change-the-billing-document-that-has-already-created/qaq-p/14166919 how to change the billing document that has already created 2025-07-30T14:30:57.186000+02:00 karan3032l https://community.sap.com/t5/user/viewprofilepage/user-id/2213258 <P>how to change the billing document that has already created by using bapi</P> 2025-07-30T14:30:57.186000+02:00 https://community.sap.com/t5/technology-q-a/easy-way-to-get-the-list-of-base-keyfigure-info-objects-used-in-a-bex-query/qaq-p/14167255 Easy way to get the list of Base Keyfigure Info Objects Used in a Bex Query 2025-07-30T19:28:28.989000+02:00 kirankumar440 https://community.sap.com/t5/user/viewprofilepage/user-id/162222 <P>Hi Experts,</P><P>Could you please let me know if there is any easy way to get&nbsp; the list of base keyfigures which are used in all places Ex : Selections/RKF's/CKF's/Formulas/Cells/Conditions etc in a <STRONG>Given BEX Query</STRONG>. , As Manually it takes time to open each component in the query to know.</P><P>Is there any way we can get them easily by linking the Query Related SYSTEM tables?</P><P>Thanks</P><P>Kiran</P> 2025-07-30T19:28:28.989000+02:00 https://community.sap.com/t5/technology-q-a/issue-with-tab-strips/qaq-p/14167614 Issue with tab strips 2025-07-31T06:49:50.971000+02:00 karan3032l https://community.sap.com/t5/user/viewprofilepage/user-id/2213258 <P>I’m working on a tabstrip screen that contains two tabs:&nbsp;<STRONG>Expense Logic</STRONG>&nbsp;and&nbsp;<STRONG>Attendance Logic</STRONG>. I’ve noticed an issue where, after clicking the second tab and executing the logic, the screen automatically reverts back to the first tab (Expense Logic) when I navigate back.</P><P>What I need is:</P><BLOCKQUOTE><P><STRONG>The selected tab should remain active after execution</STRONG>&nbsp;— it should not switch back automatically.</P></BLOCKQUOTE><P>Could you please help me resolve this issue?</P><P>&nbsp;</P><P>I’ve attached the relevant portion of my code from the program&nbsp;<STRONG>ZABAB</STRONG>, along with a screenshot for your reference.</P><P><SPAN>SELECTION-SCREEN BEGIN OF TABBED BLOCK tab_strip FOR 30 LINES.</SPAN><BR /><SPAN>&nbsp; SELECTION-SCREEN TAB (20) tab1 USER-COMMAND tab11 DEFAULT SCREEN 0100.</SPAN><BR /><SPAN>&nbsp; SELECTION-SCREEN TAB (40) tab2 USER-COMMAND tab22 DEFAULT SCREEN 0200.</SPAN><BR /><SPAN>SELECTION-SCREEN END OF BLOCK tab_strip.</SPAN><BR /><BR /><SPAN>SELECTION-SCREEN BEGIN OF SCREEN 0100 AS SUBSCREEN.</SPAN><BR /><BR /><SPAN>&nbsp; SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; PARAMETERS: r_emp &nbsp;RADIOBUTTON GROUP rad1 USER-COMMAND asd1 DEFAULT 'X',</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r_dept RADIOBUTTON GROUP rad1,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r_type RADIOBUTTON GROUP rad1.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; PARAMETERS: P_name &nbsp; TYPE zemploys-emname MODIF ID m1,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_year &nbsp; TYPE zexpense-year_no MODIF ID m2,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_amt &nbsp; &nbsp;TYPE zexpense-amount MODIF ID m3,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_dept &nbsp; TYPE zemploys-departmnt MODIF ID m4,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_month &nbsp;TYPE zemploys-month_no MODIF ID m5,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P_expyr &nbsp;TYPE zexpense-expense_type MODIF ID m7,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_mntnme TYPE zexpense-mnth_nme MODIF ID m8.</SPAN><BR /><SPAN>&nbsp; &nbsp; SELECT-OPTIONS: s_date FOR zexpense-expense_date MODIF ID m6.</SPAN><BR /><BR /><SPAN>&nbsp; SELECTION-SCREEN END OF BLOCK b1.</SPAN><BR /><SPAN>SELECTION-SCREEN END OF SCREEN 0100.</SPAN><BR /><BR /><BR /><BR /><SPAN>SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.</SPAN><BR /><BR /><SPAN>&nbsp; SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; PARAMETERS:</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; p_att1 RADIOBUTTON GROUP rad2 USER-COMMAND tad2, "DEFAULT 'X',</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; p_att2 RADIOBUTTON GROUP rad2,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; p_att3 RADIOBUTTON GROUP rad2,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; p_att4 RADIOBUTTON GROUP rad2,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; p_att5 RADIOBUTTON GROUP rad2.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; PARAMETERS: P_yrs &nbsp; &nbsp;TYPE zattendancedet-year_no MODIF ID a2,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P_emid &nbsp; TYPE ZATTENDANCEDEt-emid MODIF ID a3 MATCHCODE OBJECT zsh_active_emp,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P_depts &nbsp;TYPE zemploys-departmnt MODIF ID a5,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p_months TYPE ZATTENDANCEDEt-month_no MODIF ID a4.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; SELECT-OPTIONS: S_dte FOR ZATTENDANCEDEt-date_NO MODIF ID a6.</SPAN><BR /><BR /><SPAN>&nbsp; SELECTION-SCREEN END OF BLOCK b2.</SPAN><BR /><SPAN>SELECTION-SCREEN END OF SCREEN 0200.</SPAN><BR /><BR /><BR /><SPAN>INITIALIZATION.</SPAN><BR /><SPAN>&nbsp; tab1 = 'Expense logics'.</SPAN><BR /><SPAN>&nbsp; tab2 = 'Attendance logics'.</SPAN><BR /><SPAN>&nbsp; gv_active_tab = 'TAB11'.</SPAN><BR /><BR /><BR /><SPAN>AT SELECTION-SCREEN.</SPAN><BR /><SPAN>&nbsp; CASE sy-ucomm.</SPAN><BR /><SPAN>&nbsp; &nbsp; WHEN 'TAB11' OR 'TAB22'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; gv_active_tab = sy-ucomm.</SPAN><BR /><SPAN>&nbsp; ENDCASE.</SPAN><BR /><BR /><SPAN>AT SELECTION-SCREEN OUTPUT.</SPAN><BR /><BR /><SPAN>&nbsp; CASE gv_active_tab.</SPAN><BR /><SPAN>&nbsp; &nbsp; WHEN 'TAB11'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; tab_strip-activetab = 'TAB11'.</SPAN><BR /><SPAN>&nbsp; &nbsp; WHEN 'TAB22'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; tab_strip-activetab = 'TAB22'.</SPAN><BR /><SPAN>&nbsp; ENDCASE.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; LOOP AT SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; IF r_emp = 'X'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'M1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M7'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M8'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; IF r_dept = 'X'.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'M1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M7'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M8'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; IF r_type = 'X'.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'M1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M7'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'M8'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><BR /><BR /><SPAN>&nbsp; LOOP AT SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; IF &nbsp;p_att1 = 'X'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'A2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; IF &nbsp;p_att2 = 'X'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'A2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; IF &nbsp;p_att3 = 'X'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'A2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; IF p_att4 = 'X'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'A2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; IF p_att5 = 'X'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF screen-group1 = 'A2'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A3'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '1'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A4'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A5'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF screen-group1 = 'A6'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; ELSEIF screen-group1 = 'A7'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; ELSEIF screen-group1 = 'A8'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; screen-active = '0'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; MODIFY SCREEN.</SPAN><BR /><SPAN>&nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; ENDLOOP.</SPAN><BR /><BR /><BR /><SPAN>START-OF-SELECTION.</SPAN><BR /><BR /><SPAN>&nbsp; CASE gv_active_tab.</SPAN><BR /><SPAN>&nbsp; &nbsp; WHEN 'TAB11'.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF r_emp = 'X'.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; SELECT a~emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a~emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a~departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a~status,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a~month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a~year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;b~expense_date,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;b~expense_type,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;b~amount</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zemploys AS a</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN zexpense AS b</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON a~emid = b~emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_table.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT it_table INTO wa_table.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF p_month IS INITIAL AND p_year IS INITIAL AND p_dept IS INITIAL</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND p_amt IS INITIAL AND s_date IS INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_total_expense = lv_total_expense + wa_table-amount.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / &nbsp;'Grand Total Expense:', lv_total_expense,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Name &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Department &nbsp;:', wa_table-departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Month &nbsp; &nbsp; &nbsp; :', wa_table-month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Year &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Type &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-expense_type,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Amount &nbsp; &nbsp; &nbsp;:', wa_table-amount.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEIF p_month IS NOT INITIAL AND p_year IS NOT INITIAL</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND wa_table-month_no = p_month AND wa_table-year_no = p_year.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Name &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Month &nbsp; &nbsp; &nbsp; :', wa_table-month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Year &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Amount &nbsp; &nbsp; &nbsp;:', wa_table-amount.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEIF &nbsp;p_dept IS NOT INITIAL AND p_month IS INITIAL AND p_year IS INITIAL</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND wa_table-departmnt = p_dept.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_total_expense = lv_total_expense + wa_table-amount.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Name &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Month &nbsp; &nbsp; &nbsp; :', wa_table-month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Year &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Department &nbsp;:' , wa_table-departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Amount &nbsp; &nbsp; &nbsp;:', wa_table-amount.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEIF p_amt IS NOT INITIAL AND s_date IS NOT INITIAL</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND wa_table-expense_date IN s_date AND wa_table-amount &gt;= p_amt.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_total_expense = lv_total_expense + wa_table-amount.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Date &nbsp; :', wa_table-expense_date,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Amount :', wa_table-amount.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEIF p_year IS NOT INITIAL AND p_month IS INITIAL AND p_dept IS INITIAL</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND s_date IS INITIAL AND p_amt IS INITIAL</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND wa_table-year_no = p_year.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_total_expense = lv_total_expense + wa_table-amount.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Grand Total Expense:', lv_total_expense,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Month &nbsp; &nbsp; &nbsp; :', wa_table-month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Year &nbsp; &nbsp; &nbsp; &nbsp;:', wa_table-year_no.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF r_dept = 'X'.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; IF p_month IS INITIAL AND p_year IS INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( amount ) AS total_exp</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1407137">@DATA</a>(it_total_expense)</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zexpense</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY emid, month_no, year_no.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ELSE.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( amount ) AS total_exp</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zexpense</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE ( month_no IS NOT INITIAL AND month_no = @p_month )</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND ( year_no &nbsp;IS NOT INITIAL AND year_no &nbsp;= @p_year &nbsp;)</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY emid, month_no, year_no</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INTO TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_total_expense.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT it_total_expense INTO DATA(wa_total_expense).</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " Check if entry exists in ZMONTHSALARIES</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT SINGLE emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zmonthsalaries</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE emid &nbsp; &nbsp; = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/779487">@wa</a>_total_expense-emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND month_no = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/779487">@wa</a>_total_expense-month_no</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND year_no &nbsp;= <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/779487">@wa</a>_total_expense-year_no</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1407137">@DATA</a>(lv_exist_emid).</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF sy-subrc = 0.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-emid &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= wa_total_expense-emid.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-month_no &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= wa_total_expense-month_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-year_no &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = wa_total_expense-year_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-totalexpenses &nbsp; &nbsp; = wa_total_expense-total_exp.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-last_updated_</SPAN><SPAN>date = sy-datum.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-last_updated_</SPAN><SPAN>time = sy-uzeit.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MODIFY zmonthsalaries FROM zmonthsalaries.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Updated:', wa_total_expense-emid, 'Total Expense:', wa_total_expense-total_exp.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Insert</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-emid &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= wa_total_expense-emid.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-month_no &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= wa_total_expense-month_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-year_no &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = wa_total_expense-year_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-totalexpenses &nbsp; &nbsp; = wa_total_expense-total_exp.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-last_updated_</SPAN><SPAN>date = sy-datum.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zmonthsalaries-last_updated_</SPAN><SPAN>time = sy-uzeit.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INSERT zmonthsalaries FROM zmonthsalaries.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Inserted:', wa_total_expense-emid, 'Total Expense:', wa_total_expense-total_exp.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF &nbsp;R_TYPE = 'X'.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CLEAR: ITK_TABLE, WAK_TABLE.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT A~EMID,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A~EMNAME,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A~DEPARTMNT,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;B~MONTH_NO,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;B~MNTH_NME,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;B~YEAR_NO,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( B~AMOUNT ) AS TOTALEXPENSES</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO TABLE @ITK_TABLE</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM ZEMPLOYS AS A</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN ZEXPENSE AS B ON A~EMID = B~EMID</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY A~EMID, A~EMNAME, A~DEPARTMNT, B~MONTH_NO, B~MNTH_NME, B~YEAR_NO.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOOP AT ITK_TABLE INTO WAK_TABLE.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Employee:', WAK_TABLE-EMID, WAK_TABLE-EMNAME,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Dept:', WAK_TABLE-DEPARTMNT,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Month:', WAK_TABLE-MNTH_NME,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Year:', WAK_TABLE-YEAR_NO,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Total Expense:', WAK_TABLE-TOTALEXPENSES.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; WHEN 'TAB22'.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; IF &nbsp;p_att1 = 'X'.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; IF p_months IS INITIAL AND p_yrs IS INITIAL.</SPAN><BR /><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COUNT(*) AS present_days</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_attendance</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY emid, month_no, year_no.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF p_months IS NOT INITIAL AND p_yrs IS NOT INITIAL .</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COUNT(*) AS present_days</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_attendance</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE month_no = @p_months</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND year_no = @P_yrs</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND atendnce_stus = 'P'</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GROUP BY emid, month_no, year_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT it_attendance INTO wa_ATTENDANCE.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Employee ID:',wa_ATTENDANCE-emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Year:', wa_ATTENDANCE-year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Month:',wa_ATTENDANCE-month_</SPAN><SPAN>no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Total Present Days:',wa_ATTENDANCE-present_</SPAN><SPAN>days.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF &nbsp;p_att2 = 'X'.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; IF p_months IS INITIAL AND p_yrs IS INITIAL AND S_dte IS INITIAL AND p_depts IS INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT zemploys~emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zemploys~departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; zattendancedet~date_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zemploys~emname,</SPAN></P><P><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( CASE WHEN zattendancedet~atendnce_stus = 'P' THEN 1 ELSE 0 END ) AS present_days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( CASE WHEN zattendancedet~atendnce_stus = 'A' THEN 1 ELSE 0 END ) AS absent_days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( CASE WHEN zattendancedet~atendnce_stus = 'L' THEN 1 ELSE 0 END ) AS leave_days</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_attendance</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM Zemploys</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INNER JOIN zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON zemploys~emid = zattendancedet~emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY zemploys~emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zemploys~departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Zemploys~emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~date_NO.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF &nbsp;p_months IS NOT INITIAL AND p_yrs IS NOT INITIAL AND S_dte IS &nbsp;NOT INITIAL AND p_depts IS NOT INITIAL .</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT zemploys~emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zemploys~departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~date_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zemploys~emname &nbsp;,</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( CASE WHEN zattendancedet~atendnce_stus = 'P' THEN 1 ELSE 0 END ) AS present_days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( CASE WHEN zattendancedet~atendnce_stus = 'A' THEN 1 ELSE 0 END ) AS absent_days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SUM( CASE WHEN zattendancedet~atendnce_stus = 'L' THEN 1 ELSE 0 END ) AS leave_days</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_attendance</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM Zemploys</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON zemploys~emid = zattendancedet~emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE zemploys~departmnt = @p_depts</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND zattendancedet~month_no = @p_months</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND zattendancedet~year_no = @p_yrs</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND zattendancedet~Date_no IN @S_dte</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY zemploys~emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zemploys~departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Zemploys~emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zattendancedet~date_NO.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT it_attendance INTO wa_attendance.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Department:', wa_attendance-departmnt,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Employee ID:', wa_attendance-emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Employee Name:', wa_attendance-emname,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Year:', wa_attendance-year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Month:', wa_attendance-month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Date:', wa_attendance-date_no,</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp;'Total Present Days:',wa_attendance-present_</SPAN><SPAN>days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Total Absent Days:', wa_attendance-absent_days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Total Leave Days:', wa_attendance-leave_days.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF p_att3 = 'X'.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; IF p_months IS INITIAL AND p_yrs IS INITIAL AND p_emid IS INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COUNT(*) AS present_days</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398638">@LT</a>_present_data</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY emid, month_no, year_no.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF &nbsp;p_months IS NOT INITIAL AND p_yrs IS NOT INITIAL AND p_emid IS &nbsp;NOT INITIAL .</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COUNT(*) AS present_days</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398638">@LT</a>_present_data</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE atendnce_stus = 'P'</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND month_no = @p_months</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND year_no &nbsp;= @p_yrs</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND emid &nbsp; &nbsp; = @p_emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY emid, month_no, year_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT lt_present_data INTO ls_present_data.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CLEAR wa_attendance_summary.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_attendance_summary-emid &nbsp; &nbsp; &nbsp; &nbsp; = ls_present_data-emid.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_attendance_summary-month_no &nbsp; &nbsp; = ls_present_data-month_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_attendance_summary-year_no &nbsp; &nbsp; &nbsp;= ls_present_data-year_no.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_attendance_summary-present_</SPAN><SPAN>days = ls_present_data-present_days.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT COUNT(*) INTO <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/779487">@wa</a>_attendance_summary-</SPAN><SPAN>workingdays</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE emid &nbsp; &nbsp; = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1450925">@LS</a>_present_data-emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND month_no = <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1450925">@LS</a>_present_data-month_no</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND year_no &nbsp;= <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1450925">@LS</a>_present_data-year_no.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF wa_attendance_summary-</SPAN><SPAN>workingdays &gt; 0.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_attendance_summary-</SPAN><SPAN>attendnpercent =</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( ls_present_data-present_days * 100 ) / wa_attendance_summary-</SPAN><SPAN>workingdays.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_attendance_summary-</SPAN><SPAN>attendnpercent = 0.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; APPEND wa_attendance_summary TO it_attendance_summary.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'EMID', 'MONTH', 'YEAR','WORKINGDAYS','</SPAN><SPAN>PRESENTDAYS', 'ATTENDANCE %'.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT it_attendance_summary INTO wa_attendance_summary.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / wa_attendance_summary-emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wa_attendance_summary-month_</SPAN><SPAN>no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wa_attendance_summary-year_</SPAN><SPAN>no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wa_attendance_summary-</SPAN><SPAN>workingdays,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wa_attendance_summary-</SPAN><SPAN>present_days,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wa_attendance_summary-</SPAN><SPAN>attendnpercent.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><SPAN>* &nbsp; &nbsp; &nbsp;endif.</SPAN><BR /><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF p_att4 = 'X'.</SPAN><BR /><BR /><SPAN>&nbsp; IF p_months IS INITIAL AND p_yrs IS INITIAL AND p_emid IS INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;date_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;day_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;atendnce_stus,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;leave_typ,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; INTO TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398638">@LT</a>_att</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; FROM zattendancedet.</SPAN><BR /><BR /><SPAN>&nbsp; elseif p_months IS not INITIAL AND p_yrs IS not INITIAL AND p_emid IS not INITIAL.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;date_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;day_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;atendnce_stus,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;leave_typ,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;year_no,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;month_no</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; INTO TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1398638">@LT</a>_att</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; FROM zattendancedet</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WHERE year_no &nbsp;= @p_yrs</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp;AND emid &nbsp; &nbsp; = @p_emid</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp;AND month_no = @p_months.</SPAN><BR /><BR /><BR /><SPAN>ENDif.</SPAN><BR /><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ sy-uline(60).</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Employee Attendance Details - Month:', p_months, 'Year:', p_yrs, 60 sy-vline.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ sy-uline(60).</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ sy-uline(130).</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ 'EmpID' COLOR 2,20 sy-vline,'Date' COLOR 2,40 sy-vline,'Day' COLOR 2,60 sy-vline,'atendnce stus' COLOR 2, 80 sy-vline, 'Leave Type' COLOR 2, 100 sy-vline, 'year' COLOR 2, 120 sy-vline,'Month',130 sy-vline.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ sy-uline(130).</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; "Loop and Display Records</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT lt_att INTO wa_att.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ wa_att-emid COLOR 2,20 sy-vline, wa_att-date_no DD/MM/YYYY COLOR 2,40 sy-vline,wa_att-day_no COLOR 2,60 sy-vline, wa_att-atendnce_stus COLOR 2, 80 sy-vline, &nbsp;wa_att-leave_typ COLOR 2, 100 sy-vline,wa_att-month_no COLOR 2, 120 sy-vline,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wa_att-year_no, 130 sy-vline.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " Count attendance categories</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CASE wa_att-atendnce_stus.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHEN 'P'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_present = lv_present + 1.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHEN 'A'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_absent &nbsp;= lv_absent + 1.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHEN 'L'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_leave &nbsp; = lv_leave + 1.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDCASE.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; "Summary Section</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; lv_total = lv_present + lv_absent + lv_leave.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE:/ sy-uline(130).</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Summary:'.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Total Working Days:', lv_total.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Total Present &nbsp; &nbsp; :', lv_present.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Total Absent &nbsp; &nbsp; &nbsp;:', lv_absent.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Total Leave &nbsp; &nbsp; &nbsp; :', lv_leave.</SPAN><BR /><BR /><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; ELSEIF p_att5 = 'X'.</SPAN><BR /><BR /><SPAN>IF p_emid IS INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;emname</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_attendance</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM zemploys.</SPAN><BR /><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ELSEIF p_emid IS not INITIAL.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;emname</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INTO CORRESPONDING FIELDS OF TABLE <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1442952">@IT</a>_attendance</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM zemploys</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE emid = @p_emid.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDIF.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; LOOP AT it_attendance INTO wa_ATTENDANCE.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WRITE: / 'Employee ID:',wa_ATTENDANCE-emid,</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'Name:', wa_ATTENDANCE-emname.</SPAN><BR /><SPAN>&nbsp; &nbsp; &nbsp; &nbsp; ENDLOOP.</SPAN><BR /><BR /><SPAN>&nbsp; &nbsp;ENDIF.</SPAN><BR /><SPAN>&nbsp; ENDCASE.</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 900px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/294307i360B77CD3ABED604/image-size/large?v=v2&amp;px=999" role="button" title="image.png" alt="image.png" /></span></SPAN></P> 2025-07-31T06:49:50.971000+02:00 https://community.sap.com/t5/technology-q-a/bex-filter-info-object-search-by-text-fails/qaq-p/14179714 Bex filter info Object search by text fails 2025-08-13T14:10:26.408000+02:00 solman_solman2 https://community.sap.com/t5/user/viewprofilepage/user-id/493094 <P>Hi</P><P>I have a basic sample query with&nbsp;one ifoobject 0material__0prodh3</P><P>I"ve set it to retrieve data from mater data table</P><P>When I run the query and try to filter that infoobjet, I manage to find my object when I search by key but not by text</P><P>I even tried to look in the basic text table /BI0/TPROD_HIER<BR />And I get similar behavior</P><P>&nbsp;</P><P>Any ideas?</P><P>&nbsp;</P><P>Thanks</P><P>Shlomi</P> 2025-08-13T14:10:26.408000+02:00 https://community.sap.com/t5/enterprise-resource-planning-q-a/possible-to-create-multiple-sales-order-in-one-go-through-any-t-code/qaq-p/14186184 Possible to create multiple sales order in one go through any T.code? 2025-08-21T11:21:16.873000+02:00 VB12 https://community.sap.com/t5/user/viewprofilepage/user-id/1574204 <P>Hi,</P><P>In our organization sometime we have to create more than 600 sales order in one go. Is there any T-code so we can create it bulk?</P> 2025-08-21T11:21:16.873000+02:00 https://community.sap.com/t5/enterprise-resource-planning-q-a/we-wanted-to-know-the-exact-estimation-which-we-needed-for-bulk-sales/qaq-p/14214301 We wanted to know the Exact estimation which we needed for Bulk Sales Process Automation 2025-09-11T11:09:28.717000+02:00 VB12 https://community.sap.com/t5/user/viewprofilepage/user-id/1574204 <P>Dear All,</P><P>Can we get the detailed estimation for below things in technical and functional days format?</P><P><SPAN>Requirement to handle the following processes in bulk:</SPAN><BR /><SPAN>• Create Sales Orders in bulk</SPAN><BR /><SPAN>• Convert Sales Orders to Tax Invoices in bulk</SPAN><BR /><SPAN>• Generate Proforma Invoices in bulk</SPAN><BR /><SPAN>• Generate bulk outputs for both Proforma and Tax Invoices</SPAN></P> 2025-09-11T11:09:28.717000+02:00 https://community.sap.com/t5/technology-q-a/transport-of-analytical-query-variants/qaq-p/14215170 Transport of analytical query variants 2025-09-11T23:13:08.993000+02:00 SAPSupport https://community.sap.com/t5/user/viewprofilepage/user-id/121003 <P>Hello,</P><P>Is it possible to transport analytical query variant created with queries from the Query Browser app (F1068)? I cannot find any documentation on this subject. Look forward to your response.&nbsp;</P><P>&nbsp;</P><P>Kind regards,</P><P>&nbsp;</P><BR />------------------------------------------------------------------------------------------------------------------------------------------------<BR /><B>Learn more about the SAP Support user and program <A target="_blank" href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-sap/maximizing-the-power-of-sap-community-at-product-support/ba-p/13501276">here</A>.</B> 2025-09-11T23:13:08.993000+02:00 https://community.sap.com/t5/technology-q-a/sap-precalculation-server-quot-error-program-biprecxy-not-registered-quot/qaq-p/14221332 SAP Precalculation Server "ERROR: program BIPRECXY not registered" 2025-09-18T14:50:07.411000+02:00 RouvenGob https://community.sap.com/t5/user/viewprofilepage/user-id/1542269 <P>Hi everyone,</P><P>i am currently installing SAP precalculation server for SAP BW. When creating an server via transaction "rsprecalcadmin" i am not able to register the TP.</P><P>In SM59 the connection check of the created RFC connection shows following error:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RouvenGob_0-1758199661767.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/316440i692B5310F961AD8E/image-size/medium?v=v2&amp;px=400" role="button" title="RouvenGob_0-1758199661767.png" alt="RouvenGob_0-1758199661767.png" /></span></P><P>I did set the&nbsp;gw/acl_mode to 0.</P><P>Reginfo is configured to allow any registrations.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RouvenGob_1-1758199740320.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/316443iB1FE1E9890BCF6B5/image-size/medium?v=v2&amp;px=400" role="button" title="RouvenGob_1-1758199740320.png" alt="RouvenGob_1-1758199740320.png" /></span></P><P>&nbsp;</P><P>Greetings<BR />Rouven&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2025-09-18T14:50:07.411000+02:00 https://community.sap.com/t5/technology-q-a/sap-bw-bex-report-i-have-issue-with-japan-currency-divding-by-100-kigfigure/qaq-p/14255757 SAP bw bex report I have issue with japan currency divding by 100 kigfigure for current period 2025-10-29T07:26:26.091000+01:00 aneelkumar_b https://community.sap.com/t5/user/viewprofilepage/user-id/145872 <P>Hi Team&nbsp;</P><P>Please help me I have issue with only JAPAN Currency inthe SAP BEX report value showing divided by 100, but remaining countries currency are working fine , This issue for only current period for Japan. But when I check infoprovoder&nbsp; it's correct values for Japan .</P><P>Could you please provide me the solution.</P><P>&nbsp;</P><P>Thank you&nbsp;</P><P>Anil Kumar Busarapu&nbsp;</P> 2025-10-29T07:26:26.091000+01:00 https://community.sap.com/t5/technology-q-a/marketplace-app-deployment-amp-lifecycle-management-using-sap-devops-tools/qaq-p/14263882 Marketplace App Deployment & Lifecycle Management Using SAP DevOps Tools 2025-11-10T08:07:25.840000+01:00 tarunnagar https://community.sap.com/t5/user/viewprofilepage/user-id/2259450 <P>In this discussion, we aim to explore the complete process of deploying and managing the lifecycle of a marketplace app development project using SAP DevOps tools. The goal is to understand how developers, DevOps engineers, and project managers can streamline continuous integration, testing, and delivery within the SAP ecosystem.</P><P>We’ll discuss best practices for:</P><P>Automating deployment pipelines for marketplace applications.</P><P>Integrating SAP Cloud Platform, CI/CD, and version control systems.</P><P>Managing updates, bug fixes, and scalability throughout the app’s lifecycle.</P><P>Ensuring security, compliance, and performance optimization in live environments.</P><P>Real-world challenges faced during app deployment and how SAP DevOps tools can help overcome them.</P><P>What to discuss:</P><P>What are your preferred SAP DevOps tools or workflows for marketplace app deployment?</P><P>How do you handle version control, rollbacks, and testing in a live environment?</P><P>Any insights or lessons learned from your own deployment experiences?</P><P>Let’s collaborate and share strategies, tools, and practical insights to make marketplace app deployment smoother, faster, and more reliable.</P> 2025-11-10T08:07:25.840000+01:00 https://community.sap.com/t5/technology-q-a/configuration-for-setting-up-reminders-for-dp-exceptions-in-sap-vim/qaq-p/14265112 Configuration for Setting Up Reminders for DP Exceptions in SAP VIM 2025-11-11T09:05:26.967000+01:00 vikastanneeru https://community.sap.com/t5/user/viewprofilepage/user-id/2026244 <P>Hello Experts,</P><P>Is there any configuration available in SAP VIM to set up reminders for DP (Document Processing) Exceptions? Could you please explain the configuration steps or process involved in enabling and managing these reminders?</P><P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/189124">@vamsixk</a>&nbsp;.</P> 2025-11-11T09:05:26.967000+01:00 https://community.sap.com/t5/technology-q-a/sap-bw-filtering-with-contains-pattern/qaq-p/14271380 SAP BW filtering with contains pattern 2025-11-17T21:17:03.544000+01:00 aczeitnerBW https://community.sap.com/t5/user/viewprofilepage/user-id/2101902 <P>Dear collegues !<BR />In SAP BW4/hana in a customer exit I would want to take the value from a variable take everything befure '-' and filter in another variable with * sign around it with the contains pattern.&nbsp;<BR />In another world if my variable hold 23141424-001-A&nbsp; I would like to take the part *23141424* and filter with contains pattern in the another variable.</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code> Data: W_A_VAR_RANGE like LINE OF I_T_VAR_RANGE, L_S_RANGE like LINE OF C_T_RANGE, searchText like W_A_VAR_RANGE-LOW, lv_result TYPE string . CASE I_STEP. when 1. when 2. if I_VNAM = 'AQV_AMATERIAL_EOON'. Loop at I_T_VAR_RANGE into W_A_VAR_RANGE where VNAM = 'AQV_AMATERIAL_EOOI' and SIGN = 'I' and OPT = 'EQ' . SEARCHText = W_A_VAR_RANGE-LOW. SHIFT SEARCHText LEFT DELETING LEADING '0'. SPLIT SEARCHText AT '-' INTO lv_result DATA(lv_rest). clear searchtext. CONCATENATE '*' lv_result '*' into searchtext. W_A_VAR_RANGE-VNAM = 'AQV_AMATERIAL_EOON'. W_A_VAR_RANGE-OPT = 'CP'. W_A_VAR_RANGE-LOW = searchtext. MOVE-CORRESPONDING W_A_VAR_RANGE to L_S_RANGE. append L_S_RANGE to c_t_range. endloop. endif. endcase. endmethod.</code></pre><P>&nbsp;</P><P>The logic works fine but when I run the query it runs on an error.</P><P>As soon as I change the CP in the code to EQ the problem disappear.&nbsp;<BR />Can it be that in customer exits the contains pattern cannot be used&nbsp; for filtering the query ?<BR />If you could use it could you please give me an example code that it works with please ?&nbsp;<BR />I am using customer exit variable with multiple single values, because I will have several values.</P><P>Any help taken kindly thank you</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aczeitnerBW_0-1763410473704.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/342035i4F29AACB85DD7EE9/image-size/medium?v=v2&amp;px=400" role="button" title="aczeitnerBW_0-1763410473704.png" alt="aczeitnerBW_0-1763410473704.png" /></span></P><P>&nbsp;</P> 2025-11-17T21:17:03.544000+01:00 https://community.sap.com/t5/technology-q-a/0employee-attr-amp-pa0000-cds-view-bw4hana/qaq-p/14285326 0EMPLOYEE_ATTR & PA0000(CDS View) BW4HANA 2025-12-07T07:13:55.603000+01:00 SANA11 https://community.sap.com/t5/user/viewprofilepage/user-id/1696282 <P>hello All!&nbsp;</P><P>Could anyone assist me? I’m creating a CompositeProvider in Eclipse for BW/4HANA modeling. I need to filter records for Transfer Postings, so I applied the MASSN code <STRONG>Z7</STRONG> in <STRONG>PA0000</STRONG> to extract all transfer-posting cases. To retrieve the latest updated information, I’m joining these PERNRs with <STRONG>PA0001</STRONG>, applying the filter <STRONG>ENDDA = 31.12.9999</STRONG>, so I can get the corresponding <STRONG>PERSK</STRONG> and <STRONG>PERSG</STRONG> values for the most current records.</P><P>Since the <STRONG>PA0001</STRONG> data is available through the standard InfoObject <STRONG>0EMPLOYEE_ATTR</STRONG>, I use that to retrieve <STRONG>PERSG</STRONG> and <STRONG>PERSK</STRONG>. However, for <STRONG>PA0000</STRONG>, I created a custom DataSource with code to extract the required MASSN-based records.</P><P>&nbsp;</P><DIV><DIV><P><SPAN>define</SPAN> <SPAN>view</SPAN> <SPAN>ZCDS_PA0000_Z7</SPAN> <SPAN>as</SPAN> <SPAN>select</SPAN> <SPAN>from</SPAN> <SPAN>pa0000</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><P><SPAN>{</SPAN></P><P><SPAN>key</SPAN> <SPAN>concat</SPAN><SPAN>(</SPAN> <SPAN>pernr</SPAN><SPAN>,</SPAN> <SPAN>begda</SPAN> <SPAN>)as</SPAN> <SPAN>ZCONC_KEY_UNIQUE</SPAN><SPAN>,</SPAN></P><P>&nbsp;</P><P><SPAN>key</SPAN> <SPAN>pernr</SPAN><SPAN>,</SPAN></P><P><SPAN>key</SPAN> <SPAN>begda</SPAN><SPAN>,</SPAN></P><P><SPAN>// key endda, </SPAN></P><P><SPAN>massn</SPAN></P><P><SPAN>}</SPAN></P><P>&nbsp;</P><P><SPAN>where</SPAN></P><P>&nbsp;</P><P><SPAN>//massn = 'Z4' </SPAN></P><P><SPAN>//or </SPAN></P><P><SPAN>massn</SPAN> <SPAN>=</SPAN> <SPAN>'Z7'</SPAN></P><P>&nbsp;</P><P>Here is the rephrased version in a clear and professional way:</P><HR /><P>I mapped the <STRONG>start date (BEGDA)</STRONG> field to the standard InfoObject <STRONG>0VALIDFROM</STRONG>.<BR />When I run the InfoObject independently, it works fine and returns accurate results.<BR />However, when I combine it with <STRONG>0EMPLOYEE_ATTR</STRONG>, the output becomes incorrect for the condition <STRONG>ENDDA = 31.12.9999</STRONG>.</P><P>Whether I use a <STRONG>left outer join</STRONG> or an <STRONG>inner join</STRONG>, the issue remains the same:</P><UL><LI><P><STRONG>PA0000</STRONG> gives <STRONG>199</STRONG> records (MASSN = Z7)</P></LI><LI><P><STRONG>PA0001 / 0EMPLOYEE_ATTR</STRONG> gives <STRONG>153</STRONG> updated records</P></LI><LI><P>But in the <STRONG>CompositeProvider</STRONG>, it still shows <STRONG>199</STRONG> records instead of <STRONG>153</STRONG>, even though <STRONG>0EMPLOYEE_ATTR</STRONG> should return only the updated records.</P></LI></UL><P>I am not sure why this mismatch is happening, since <STRONG>0EMPLOYEE_ATTR</STRONG> is supposed to provide only the latest active record with <STRONG>ENDDA = 31.12.9999</STRONG>.</P><HR /></DIV></DIV> 2025-12-07T07:13:55.603000+01:00 https://community.sap.com/t5/crm-and-cx-q-a/how-to-create-a-maintenance-plan-next-planned-date-shall-be-considered/qaq-p/14289881 How to create a maintenance plan, next planned date shall be considered based on the previous mainte 2025-12-14T02:41:01.556000+01:00 VENKAT51 https://community.sap.com/t5/user/viewprofilepage/user-id/1747340 <P><SPAN>How to create a maintenance plan, next planned date shall be considered based on the previous maintenance call completion date.</SPAN></P><P><SPAN>What is the strategy parameters for this case</SPAN></P> 2025-12-14T02:41:01.556000+01:00 https://community.sap.com/t5/technology-q-a/bex-query-with-totals-and-plan-by-user-input-periods/qaq-p/14304155 BEx query with totals and plan by user input periods 2026-01-09T07:32:50.654000+01:00 satishreddy_arra https://community.sap.com/t5/user/viewprofilepage/user-id/2273737 <P>Hi All,</P><P>I have requirement where user will input Fiscal period for example Jul.2025-Jun.2025 than query should display in rows item and branches and columns Unit, Price, estimated and budget values should display total for user input period whereas plan should display by period. Please find below screenshot for more details.&nbsp;</P><P>My question is how to create structure where some keyfigures should show totals while other plan keyfigures should display plan data by month. Please suggest,&nbsp; all your help and advise are welcome and greatly appreciated and points rewarded. </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="120703.jpg" style="width: 4096px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/359633i6DD3C5D48F76C7B1/image-size/medium/is-moderation-mode/true?v=v2&amp;px=400" role="button" title="120703.jpg" alt="120703.jpg" /></span></P><P> </P> 2026-01-09T07:32:50.654000+01:00