Unicode Enabling Issues for HR ABAP.
Heay Guys,
I am working on a Unicode Enabling Project.
For those who has worked on a Unicode Enabling Project, could you please tell me if there would be any issues specific to HR ABAP Programs? This is an urgent requirement for me.
Please reply me as soon as possible.
Thanks and Regards,
Bhargava Kavuri.
Hi Bhargava,
I have some unicode related doc with me.
I will forward it to your id.
Those obslate statements are related to type
decarations. To find them you create ome small prog
and use PNP in that. and now you enable unicode
and do EPC it will show you all the obsolete
statements.
I have sent the help dod to your id please check now.
Thanks&Regards,
Siri.
Kindly award points to all the helpful answers.
Message was edited by: Srilatha T
Similar Messages
-
Unicode Enabling of HR ABAP programs
Hi everyone,
Would there be any difference in unicode enabling the normal ABAP programs and HR ABAp programs???
Can anyone please throw some light on this topic??
Please kindly respond.
Thanks and Regards,
Bhargava Kavuri....hi check the following links.
http://help.sap.com/saphelp_47x200/helpdata/en/db/74d038d35e11d5994400508b6b8b11/frameset.htm
http://www.sapdb.org/7.4/htmhelp/db/74d038d35e11d5994400508b6b8b11/content.htm
http://72.14.203.104/search?q=cache:ZAoOe49ukb8J:www30.sap.com/korea/Company/Events/techday05/img/data_01.pdfsapunicode&hl=en&gl=in&ct=clnk&cd=8
http://help.sap.com/saphelp_47x200/helpdata/en/1c/7fa22cd41a11d5994400508b6b8b11/frameset.htm
Please reward . -
Issue in creating web service for a ABAP Function Module
Hi,
now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
1. select the Function Module, named "zws_test".
2. in the context menu, select "create->proxy object". so we enter into wizard.
3. in the wizard, press the radio button "Service Provider".
4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
8. Save in the local package.
9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
15. I use t-code SM59 to test connection and get the following info.
Status HTTP Response 200
Status Text OK
Duration Test Call 328 ms.
who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
Thanks in advance
Johnneyhave you seen this weblog
/people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices -
UNICODE system access for further development of connectors
As there has been a bit of activity on the forums around issues with UNICODE and the various Scripting Language connectors, I'd like sort this out for Perl, Python and Ruby.
Unfortunately I do not have access to a UNICODE based system, so I have never been able to persue this.
Is there anyone (in particular someone at SAP - really) who could arrange access for me so that this work can be done - This is something that is in the interests of the community, so it's a chance for someone to make a contribution (hint hint and turning of screws etc. :-).
All that is required is basic development access ie. ABAP developer work bench, and the ability to run, monitor, and debug RFC calls.
Piers Harding.Hello everyone - I have spent a busy month reengineering saprfc for Ruby, including rewrtting a large portion of the C code, introduce comprehensive UNICODE support. This support inclues the use of librfcu, and libsapu16 supplied by SAP for UNICODE support in RFC. As I do not have access to a UNICODE enabled system, I have had to make do in a large part, by emulating conditions to get this code to a point where it can be community tested (thanks also goes to Gregor for loaning his environment also).
For the brave - please download from http://www.piersharding.com/download/ruby/saprfc-0.20.tar.gz and follwo the instructions in the README file, paying particular attention to the requirements for the UNICODE version of the RFCSDK, and retireving the u16lit.pl script from OSS.
And help with the testing.
Cheers,
Piers Harding. -
System copy --- Import issue in Import ABAP phase
HI Team, We are doing migration using system export/import method from win2008/SQL2008 to Win2012/SQL2012 . While doing export there was a problem with table SOFFCONT1 , So we have followed the note 1922094 and changed the size of the package from 1 GB to 2 GB in SOFFCONT1.cmd , After this We have exported the data from the source system using SWPM tool. Now we are importing in to Target system , During the Import ABAP phase we are facing the below issue for same table SOFFCONT1 . Could you please tell us how to fix this issue . Do we need to do same activity for the table while importing also ? =============================================================== H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20140712143736 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: version R7.20/V1.6 [UNICODE] Compiled Dec 4 2013 17:25:27 patchinfo (patches.h): (0.138) Abort R3load task if TOC file has not entry for the table (note 1914260) process id 11608 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe -ctf I \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DATA\SOFFCONT1.STR C:\Program Files\sapinst_instdir\BS2005\ERP60SR3 \LM\COPY\MSS\SYSTEM\CENTRAL\AS-ABAP\DDLMSS.TPL SOFFCONT1.TSK MSS -l SOFFCONT1.log H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: job completed H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20140712143736 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20140712143736 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: version R7.20/V1.6 [UNICODE] Compiled Dec 4 2013 17:25:27 patchinfo (patches.h): (0.138) Abort R3load task if TOC file has not entry for the table (note 1914260) process id 10364 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe -i SOFFCONT1.cmd -dbcodepage 4103 -l SOFFCONT1.log -loadprocedure fast (DB) INFO: connected to DB (GSI) INFO: dbname = "GFGH-SAP- " (GSI) INFO: vname = "MSSQL " (GSI) INFO: hostname = "GFGH-SAP- " (GSI) INFO: sysname = "Windows NT" (GSI) INFO: nodename = "GFGH-SAP-" (GSI) INFO: release = "6.3" (GSI) INFO: version = "9600 " (GSI) INFO: machine = "6x AMD64 Level 21 (Mod 2 Step 0)" (SQL) INFO: Searching for SQL file SQLFiles.LST (SQL) INFO: SQLFiles.LST not found (SQL) INFO: Searching for SQL file \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/SQLFiles.LST (SQL) INFO: \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/SQLFiles.LST not found (SQL) INFO: Searching for SQL file APPL1.SQL (SQL) INFO: APPL1.SQL not found (SQL) INFO: Searching for SQL file \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/MSS/APPL1.SQL (SQL) INFO: \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/MSS/APPL1.SQL not found (DB) INFO: SOFFCONT1 created (DB) INFO: SOFFCONT1~0 created Interface access functions from dynamic library dbmssslib.dll loaded. (IMP) INFO: ExeFastLoad failed with (IMP) ERROR: ExeFastload: rc = 2 (DB) INFO: disconnected from DB H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error (s) H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20140712163351 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20140712191514 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: version R7.20/V1.6 [UNICODE] Compiled Dec 4 2013 17:25:27 patchinfo (patches.h): (0.138) Abort R3load task if TOC file has not entry for the table (note 1914260) process id 8772 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe -i SOFFCONT1.cmd -dbcodepage 4103 -l SOFFCONT1.log -loadprocedure fast (DB) INFO: connected to DB (GSI) INFO: dbname = "GFGH-SAP- " (GSI) INFO: vname = "MSSQL " (GSI) INFO: hostname = "GFGH-SAP- " (GSI) INFO: sysname = "Windows NT" (GSI) INFO: nodename = "GFGH-SAP-" (GSI) INFO: release = "6.3" (GSI) INFO: version = "9600 " (GSI) INFO: machine = "6x AMD64 Level 21 (Mod 2 Step 0)" (DB) INFO: SOFFCONT1 deleted/truncated Interface access functions from dynamic library dbmssslib.dll loaded. (IMP) INFO: ExeFastLoad failed with (IMP) ERROR: ExeFastload: rc = 2 (DB) INFO: disconnected from DB H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error (s) H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20140712193907 Thanks, Pavan 91-991 233 6633HI Team, We are doing migration using system export/import method from win2008/SQL2008 to Win2012/SQL2012 . We have exported the data from the source system using SWPM tool. Now we are importing in to Target system , During the Import ABAP phase we are facing the below issue. Could you please tell us how to fix this issue .If you need any other info please reach me out on 91- 991 233 6633 =============================================================== H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20140712143736 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: version R7.20/V1.6 [UNICODE] Compiled Dec 4 2013 17:25:27 patchinfo (patches.h): (0.138) Abort R3load task if TOC file has not entry for the table (note 1914260) process id 11608 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe -ctf I \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DATA\SOFFCONT1.STR C:\Program Files\sapinst_instdir\BS2005\ERP60SR3 \LM\COPY\MSS\SYSTEM\CENTRAL\AS-ABAP\DDLMSS.TPL SOFFCONT1.TSK MSS -l SOFFCONT1.log H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: job completed H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20140712143736 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20140712143736 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: version R7.20/V1.6 [UNICODE] Compiled Dec 4 2013 17:25:27 patchinfo (patches.h): (0.138) Abort R3load task if TOC file has not entry for the table (note 1914260) process id 10364 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe -i SOFFCONT1.cmd -dbcodepage 4103 -l SOFFCONT1.log -loadprocedure fast (DB) INFO: connected to DB (GSI) INFO: dbname = "GFGH-SAP- " (GSI) INFO: vname = "MSSQL " (GSI) INFO: hostname = "GFGH-SAP- " (GSI) INFO: sysname = "Windows NT" (GSI) INFO: nodename = "GFGH-SAP-" (GSI) INFO: release = "6.3" (GSI) INFO: version = "9600 " (GSI) INFO: machine = "6x AMD64 Level 21 (Mod 2 Step 0)" (SQL) INFO: Searching for SQL file SQLFiles.LST (SQL) INFO: SQLFiles.LST not found (SQL) INFO: Searching for SQL file \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/SQLFiles.LST (SQL) INFO: \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/SQLFiles.LST not found (SQL) INFO: Searching for SQL file APPL1.SQL (SQL) INFO: APPL1.SQL not found (SQL) INFO: Searching for SQL file \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/MSS/APPL1.SQL (SQL) INFO: \\192.168.114.11 \y\Migration\Ghana_Migration_Ecc\\export\ABAP\DB/MSS/APPL1.SQL not found (DB) INFO: SOFFCONT1 created (DB) INFO: SOFFCONT1~0 created Interface access functions from dynamic library dbmssslib.dll loaded. (IMP) INFO: ExeFastLoad failed with (IMP) ERROR: ExeFastload: rc = 2 (DB) INFO: disconnected from DB H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error (s) H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20140712163351 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20140712191514 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: version R7.20/V1.6 [UNICODE] Compiled Dec 4 2013 17:25:27 patchinfo (patches.h): (0.138) Abort R3load task if TOC file has not entry for the table (note 1914260) process id 8772 H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe -i SOFFCONT1.cmd -dbcodepage 4103 -l SOFFCONT1.log -loadprocedure fast (DB) INFO: connected to DB (GSI) INFO: dbname = "GFGH-SAP- " (GSI) INFO: vname = "MSSQL " (GSI) INFO: hostname = "GFGH-SAP- " (GSI) INFO: sysname = "Windows NT" (GSI) INFO: nodename = "GFGH-SAP-" (GSI) INFO: release = "6.3" (GSI) INFO: version = "9600 " (GSI) INFO: machine = "6x AMD64 Level 21 (Mod 2 Step 0)" (DB) INFO: SOFFCONT1 deleted/truncated Interface access functions from dynamic library dbmssslib.dll loaded. (IMP) INFO: ExeFastLoad failed with (IMP) ERROR: ExeFastload: rc = 2 (DB) INFO: disconnected from DB H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error (s) H:\usr\sap\\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20140712193907 Thanks, Pavan 91-991 233 6633
Hi,
This is SAP Business one system administration forum. Please find correct forum and repost above discussion to get quick assistance.
Please close this thread here with helpful answer.
Thanks & Regards,
Nagarajan -
Upgrade Sap R/3 4.6b to ECC 6.0 -unicode enabling
Hi,
I am going to work Upgrade Sap R/3 4.6b to ECC 6.0
My role only Unicode enabling syntax check.
Can any one explain what are the work involved in
Custom Reports, Custom Transaction and Screens, BDC, Enhancements and Exits(BTE), Script ,Custom DDIC
Particularly need information Sapscript forms
Regards,
RamHi Ram,
For Unicode, transaction UCCHECK is your best friend. It will even tell you how to fix the error.
All programs Most of the time you will just go and set the Unicode Checks Active program attribute, save, activate.
- If there are Unicode errors, fix them.
http://iorboaz.blogspot.com/2008/03/sap-abap-solution-instructions-for.html
SAPScript - Not sure if it even needs Unicode-enabling. We are still in the middle of an upgrade. Will add more later.
Custom DDIC In our case, the BASIS team handled the Unicode conversion of the DDIC objects.I think they ran a consistency check first, then run SPUMG or something.
Search the web for a Combined Upgrade and Unicode Conversion Guide.
Hope this helps. -
Greetings,
We are going through an upgrade from 46C to ERP 5.0. Will we be able to unicode enable individule ABAP programs without setting the system to unicode enabled? Thanks in advance for your assistance.
Regards,
JasonIf your PRD system has been around for a long time, then YES. You should expect a large amount of work.
We have 3 R/3 PRD instances for 3 parts of the world.
We have applied Unicode to the 2 newer ones. It was a few days of hard work. But the systems are younger... and not a great deal of custom work.
Our original PRD system is 12.5 years old. We are not planning to go Unicode there. It would be an enormous project with little/no return to those businesses. -
Performance Issue for BI system
Hello,
We are facing performance issues for BI System. Its a preproductive system and its performance is degrading badly everyday. I was checking system came to know program buffer hit ratio is increaasing everyday due to high Swaps. So asked to change the parameter abap/buffersize which was 300Mb to 500Mb. But still no major improvement is found in the system.
There is 16GB Ram available and Server is HP-UX and with Netweaver2004s with Oracle 10.2.0.4.0 installed in it.
The Main problem is while running a report or creating a query is taking way too long time.
Kindly help me.Hello SIva,
Thanks for your reply but i have checked ST02 and ST03 and also SM50 and its normal
we are having 9 dialog processes, 3 Background , 2 Update and 1 spool.
No one is using the system currently but in ST02 i can see the swaps are in red.
Buffer HitRatio % Alloc. KB Freesp. KB % Free Sp. Dir. Size FreeDirEnt % Free Dir Swaps DB Accs
Nametab (NTAB) 0
Table definition 99,60 6.798 20.000 29.532 153.221
Field definition 99,82 31.562 784 2,61 20.000 6.222 31,11 17.246 41.248
Short NTAB 99,94 3.625 2.446 81,53 5.000 2.801 56,02 0 2.254
Initial records 73,95 6.625 998 16,63 5.000 690 13,80 40.069 49.528
0
boldprogram 97,66 300.000 1.074 0,38 75.000 67.177 89,57 219.665 725.703bold
CUA 99,75 3.000 875 36,29 1.500 1.401 93,40 55.277 2.497
Screen 99,80 4.297 1.365 33,35 2.000 1.811 90,55 119 3.214
Calendar 100,00 488 361 75,52 200 42 21,00 0 158
OTR 100,00 4.096 3.313 100,00 2.000 2.000 100,00 0
0
Tables 0
Generic Key 99,17 29.297 1.450 5,23 5.000 350 7,00 2.219 3.085.633
Single record 99,43 10.000 1.907 19,41 500 344 68,80 39 467.978
0
Export/import 82,75 4.096 43 1,30 2.000 662 33,10 137.208
Exp./ Imp. SHM 89,83 4.096 438 13,22 2.000 1.482 74,10 0
SAP Memory Curr.Use % CurUse[KB] MaxUse[KB] In Mem[KB] OnDisk[KB] SAPCurCach HitRatio %
Roll area 2,22 5.832 22.856 131.072 131.072 IDs 96,61
Page area 1,08 2.832 24.144 65.536 196.608 Statement 79,00
Extended memory 22,90 958.464 1.929.216 4.186.112 0 0,00
Heap memory 0 0 1.473.767 0 0,00
Call Stati HitRatio % ABAP/4 Req ABAP Fails DBTotCalls AvTime[ms] DBRowsAff.
Select single 88,59 63.073.369 5.817.659 4.322.263 0 57.255.710
Select 72,68 284.080.387 0 13.718.442 0 32.199.124
Insert 0,00 151.955 5.458 166.159 0 323.725
Update 0,00 378.161 97.884 395.814 0 486.880
Delete 0,00 389.398 332.619 415.562 0 244.495
Edited by: Srikanth Sunkara on May 12, 2011 11:50 AM -
Performance Issue in a ABAP Report
Hi All,
I am facing a big performance issue in a abap program which produce the cash flow details our group of company. This is the logic I used to develop the report. (It is a SAP Script)
- First I am getting the closed customer payment records from the table BSAD ( eg: - Type 'DZ')
- Then I am getting the correcponding invoices from the BSAD using the same BELNR ( eg :- Type <> 'DZ')
- Then checking the GL Entry (BSIS) for the correspongding records which select in the second stage.
- In a Z tabel I am keeping the account list by grouping seperate section ( Eg: - Customer recipts, fixed assets...etc).
I have done the same thing to get the open Item balances also.
Report is correct and running perfectly, but my issue is it's takeing long time to process. Because of this I made this report to run as a background job. But still it is taking such a long time. ( For Eg: - If 1000 records selected from the first stage, it will take about more than onr hour to process, which is not good enough to run in a live environment)
Pls advice me how to improve the preformance of this.Hi Ravi,
I am sorry I had problem in my internet connection yesterday, because of that i couldn't reply u. Here is my code. I don't is there any way to send the code as a attachement since it is a little bit big one. I am going to paste that here any way.
Here zcashflow_matrix is the "Z" table where I am going to keep my account details by grouping.
REPORT ZCASH_FLOW.
INCLUDE <%_LIST>.
* Author Thanura ....... *
TYPES :BEGIN OF ty_voucher1,
kunnr LIKE bseg-kunnr,
dmbtr LIKE bseg-dmbtr,
belnr LIKE bseg-belnr,
hkont LIKE bseg-hkont,
shkzg LIKE bseg-shkzg,
xblnr LIKE bsad-xblnr,
budat LIKE bsad-bldat,
blart LIKE bsad-blart,
bldat LIKE bsad-bldat,
lifnr LIKE bseg-lifnr,
END OF ty_voucher1.
DATA :it_voucher1 TYPE STANDARD TABLE OF ty_voucher1 ,
wa_voucher1 TYPE ty_voucher1.
DATA : it_voucher2 TYPE STANDARD TABLE OF ty_voucher1,
wa_voucher2 TYPE ty_voucher1.
DATA : it_voucher3 TYPE STANDARD TABLE OF ty_voucher1,
wa_voucher3 TYPE ty_voucher1.
Data : w_ITCPO type ITCPO.
Data : w_ITCPP type ITCPP.
DATA : w_Rcptamt LIKE bseg-dmbtr,
w_Netamt LIKE bseg-dmbtr,
w_IntIncomeAmt LIKE bseg-dmbtr,
w_IntIncome LIKE bseg-dmbtr,
w_FixedAmt LIKE bseg-dmbtr,
w_fixedasst LIKE bseg-dmbtr,
w_Sundry LIKE bseg-dmbtr,
w_SundryAmt LIKE bseg-dmbtr,
w_SuppayAmt LIKE bseg-dmbtr,
w_Suppay LIKE bseg-dmbtr,
w_SuppayAmt1 LIKE bseg-dmbtr,
w_Suppay1 LIKE bseg-dmbtr,
w_DutyAmt LIKE bseg-dmbtr,
w_Duty LIKE bseg-dmbtr,
w_SalaryAmt LIKE bseg-dmbtr,
w_Salary LIKE bseg-dmbtr,
w_TaxAmt LIKE bseg-dmbtr,
w_Tax LIKE bseg-dmbtr,
w_TaxAmt1 LIKE bseg-dmbtr,
w_Tax1 LIKE bseg-dmbtr,
w_SellAmt LIKE bseg-dmbtr,
w_Sell LIKE bseg-dmbtr,
w_AdminAmt LIKE bseg-dmbtr,
w_Admin LIKE bseg-dmbtr,
w_loanAmt LIKE bseg-dmbtr,
w_loan LIKE bseg-dmbtr,
w_ManAmt LIKE bseg-dmbtr,
w_Man LIKE bseg-dmbtr,
w_CapitalAmt LIKE bseg-dmbtr,
w_Capital LIKE bseg-dmbtr,
w_GroupAmt LIKE bseg-dmbtr,
w_Group LIKE bseg-dmbtr,
w_IntAmt LIKE bseg-dmbtr,
w_Int LIKE bseg-dmbtr,
w_InterAmt LIKE bseg-dmbtr,
w_Inter LIKE bseg-dmbtr,
w_AdPayAmt LIKE bseg-dmbtr,
w_AdPay LIKE bseg-dmbtr,
w_GTotal LIKE bseg-dmbtr,
W_COMPANYNAME like zcompany-copmname.
DATA : w_ORcptamt LIKE bseg-dmbtr,
w_ONetamt LIKE bseg-dmbtr,
w_OIntIncomeAmt LIKE bseg-dmbtr,
w_OIntIncome LIKE bseg-dmbtr,
w_OFixedAmt LIKE bseg-dmbtr,
w_Ofixedasst LIKE bseg-dmbtr,
w_OSundry LIKE bseg-dmbtr,
w_OSundryAmt LIKE bseg-dmbtr,
w_OSuppayAmt LIKE bseg-dmbtr,
w_OSuppay LIKE bseg-dmbtr,
w_OSuppayAmt1 LIKE bseg-dmbtr,
w_OSuppay1 LIKE bseg-dmbtr,
w_ODutyAmt LIKE bseg-dmbtr,
w_ODuty LIKE bseg-dmbtr,
w_OSalaryAmt LIKE bseg-dmbtr,
w_OSalary LIKE bseg-dmbtr,
w_OTaxAmt LIKE bseg-dmbtr,
w_OTax LIKE bseg-dmbtr,
w_OTaxAmt1 LIKE bseg-dmbtr,
w_OTax1 LIKE bseg-dmbtr,
w_OSellAmt LIKE bseg-dmbtr,
w_OSell LIKE bseg-dmbtr,
w_OAdminAmt LIKE bseg-dmbtr,
w_OAdmin LIKE bseg-dmbtr,
w_OloanAmt LIKE bseg-dmbtr,
w_Oloan LIKE bseg-dmbtr,
w_OManAmt LIKE bseg-dmbtr,
w_OMan LIKE bseg-dmbtr,
w_OCapitalAmt LIKE bseg-dmbtr,
w_OCapital LIKE bseg-dmbtr,
w_OGroupAmt LIKE bseg-dmbtr,
w_OGroup LIKE bseg-dmbtr,
w_OIntAmt LIKE bseg-dmbtr,
w_OInt LIKE bseg-dmbtr,
w_OInterAmt LIKE bseg-dmbtr,
w_OInter LIKE bseg-dmbtr,
w_OAdPayAmt LIKE bseg-dmbtr,
w_OAdPay LIKE bseg-dmbtr.
DATA : w_NNetamt LIKE bseg-dmbtr,
w_NIntIncome LIKE bseg-dmbtr,
w_Nfixedasst LIKE bseg-dmbtr,
w_NSundry LIKE bseg-dmbtr,
w_NSuppay LIKE bseg-dmbtr,
w_NSuppay1 LIKE bseg-dmbtr,
w_NDuty LIKE bseg-dmbtr,
w_NSalary LIKE bseg-dmbtr,
w_NTax LIKE bseg-dmbtr,
w_NTax1 LIKE bseg-dmbtr,
w_NSell LIKE bseg-dmbtr,
w_NAdmin LIKE bseg-dmbtr,
w_Nloan LIKE bseg-dmbtr,
w_NMan LIKE bseg-dmbtr,
w_NCapital LIKE bseg-dmbtr,
w_NGroup LIKE bseg-dmbtr,
w_NInt LIKE bseg-dmbtr,
w_NInter LIKE bseg-dmbtr,
w_NAdPay LIKE bseg-dmbtr.
RANGES : r_bwart FOR bsad-blart.
TABLES: bsad.
* Internal tables Begin with IT_ *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_bukrs LIKE bsad-bukrs OBLIGATORY.
SELECT-OPTIONS: s_bldat FOR bsad-bldat OBLIGATORY.
* SELECT-OPTIONS: s_hkont FOR bsad-hkont .
PARAMETERS: p_gjahr LIKE bkpf-gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1 .
* PARAMETERS : w_local TYPE char1 RADIOBUTTON GROUP g1 DEFAULT 'X'. .
* PARAMETERS : w_curr TYPE char1 RADIOBUTTON GROUP g1 .
w_ITCPO-TDNEWID = 'X'.
*w_itcpo-tdgetotf = 'X'.
*opern form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
* APPLICATION = 'TX'
* ARCHIVE_INDEX =
* ARCHIVE_PARAMS =
* DEVICE = 'PRINTER'
* DIALOG = ' '
form = 'ZCASHFLOW_FORM1'
* LANGUAGE = SY-LANGU
OPTIONS = w_ITCPO
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJECT =
* RAW_DATA_INTERFACE = '*'
* SPONUMIV =
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
* EXCEPTIONS
* CANCELED = 1
* DEVICE = 2
* FORM = 3
* OPTIONS = 4
* UNCLOSED = 5
* MAIL_OPTIONS = 6
* ARCHIVE_ERROR = 7
* INVALID_FAX_NUMBER = 8
* MORE_PARAMS_NEEDED_IN_BATCH = 9
* SPOOL_ERROR = 10
* CODEPAGE = 11
* OTHERS = 12
IF sy-subrc <> 0.
* message id sy-msgid type sy-msgty number sy-msgno
* with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
PERFORM select_data_closed.
PERFORM select_data_open.
* calculate the net figures
w_NNetamt = w_Netamt + w_ONetamt.
w_NIntIncome = w_IntIncome + w_OIntIncome.
*w_NInCompRct = w_InCompRct + w_OInCompRct.
w_NfixedAsst = w_fixedAsst + w_OfixedAsst.
w_NSundry = w_Sundry + w_OSundry.
w_NSuppay = w_Suppay + w_OSuppay.
w_NSuppay1 = w_Suppay1 + w_OSuppay1.
w_NDuty = w_Duty + w_ODuty.
w_NSalary = w_Salary + w_OSalary.
w_NTax = w_Tax + w_OTax.
w_NTax1 = w_Tax1 + w_OTax1.
w_NSell = w_Sell + w_OSell.
w_NAdmin = w_Admin + w_OAdmin.
w_NCapital = w_Capital + w_OCapital.
w_Nloan = w_loan + w_Oloan.
w_NMan = w_Man + w_OMan.
w_NGroup = w_Group + w_OGroup.
w_NInt = w_Int + w_OInt.
w_NInter = w_Inter + w_OInter.
w_NAdPay = w_AdPay + w_OAdPay.
w_GTotal = ( w_NNetamt + w_NIntIncome + w_NfixedAsst + w_NSundry ) - (
w_NSuppay + w_NSuppay1 + w_NDuty + w_NSalary + w_NTax + w_NTax1 +
w_NSell + w_NAdmin + w_NCapital + w_Nloan + w_NMan + w_NGroup + w_NInt +
w_NInter + w_NAdPay ).
* Write the Main Account Balance
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
function = 'SET'
type = 'BODY'
window = 'MAIN'.
IF sy-subrc <> 0.
** message id sy-msgid type sy-msgty number sy-msgno
** with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_ITCPP-TDNEWID = 'X'.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_ITCPP
* RDI_RESULT =
* TABLES
* OTFDATA =
* EXCEPTIONS
* UNOPENED = 1
* BAD_PAGEFORMAT_FOR_PRINT = 2
* SEND_ERROR = 3
* SPOOL_ERROR = 4
* CODEPAGE = 5
* OTHERS = 6
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM select_data_closed.
SELECT SINGLE copmname INTO w_companyname
FROM zcompany
WHERE copcode = p_bukrs.
* Select the receipts
SELECT SUM( dmbtr ) AS dmbtr belnr kunnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher3
FROM bsad
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart = 'DZ'
* AND blart = 'DZ' and shkzg = 'S'
GROUP BY kunnr belnr hkont shkzg xblnr budat blart bldat.
SORT it_voucher3 BY kunnr.
LOOP AT it_voucher3 INTO wa_voucher3.
* Select the invoices
SELECT SUM( dmbtr ) AS dmbtr belnr kunnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher1
FROM bsad
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart <> 'DZ' AND
augbl = wa_voucher3-belnr AND
kunnr = wa_voucher3-kunnr
GROUP BY belnr kunnr hkont shkzg xblnr budat blart bldat.
LOOP AT it_voucher1 INTO wa_voucher1.
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_Rcptamt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_Rcptamt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Netamt = w_Netamt + w_Rcptamt.
continue.
ENDIF.
ELSE.
w_Netamt = w_Netamt + w_Rcptamt.
continue.
ENDIF.
* Interest Income
SELECT SINGLE dmbtr FROM bsis INTO w_IntIncomeAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_IntIncomeAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_IntIncome = w_IntIncome + w_IntIncomeAmt.
continue.
ENDIF.
ELSE.
w_IntIncome = w_IntIncome + w_IntIncomeAmt.
continue.
ENDIF.
* Sale Of fixed Assets
SELECT SINGLE dmbtr FROM bsis INTO w_FixedAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_FixedAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_fixedasst = w_fixedasst + w_FixedAmt.
continue.
ENDIF.
ELSE.
w_fixedasst = w_fixedasst + w_FixedAmt.
continue.
ENDIF.
* Gl Receipts ( Sundry Income)
SELECT SINGLE dmbtr FROM bsis INTO w_SundryAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_SundryAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Sundry = w_Sundry + w_SundryAmt.
continue.
ENDIF.
ELSE.
w_Sundry = w_Sundry + w_SundryAmt.
continue.
ENDIF.
ENDLOOP.
ENDLOOP.
*Out Flow
r_bwart-sign = 'I'. r_bwart-option = 'EQ'. r_bwart-low = 'KZ'.
APPEND r_bwart TO r_bwart.
r_bwart-sign = 'I'. r_bwart-option = 'EQ'. r_bwart-low = 'VZ'.
APPEND r_bwart TO r_bwart.
SELECT SUM( dmbtr ) AS dmbtr belnr lifnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher3
FROM bsak
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart IN r_bwart
* AND blart = 'DZ' and shkzg = 'S'
GROUP BY lifnr belnr hkont shkzg xblnr budat blart bldat.
SORT it_voucher3 BY lifnr.
LOOP AT it_voucher3 INTO wa_voucher3.
* Select the invoices
SELECT SUM( dmbtr ) AS dmbtr belnr lifnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher1
FROM bsak
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart NOT IN r_bwart AND
augbl = wa_voucher3-belnr AND
lifnr = wa_voucher3-lifnr
GROUP BY belnr lifnr hkont shkzg xblnr budat blart bldat.
LOOP AT it_voucher1 INTO wa_voucher1.
* Supplier Payments (LOCAL)
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_SupPayAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_SupPayAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_SupPay = w_SupPay + w_SupPayAmt.
continue.
ENDIF.
ELSE.
w_SupPay = w_SupPay + w_SupPayAmt.
continue.
ENDIF.
* supplier Payments (Foreign )
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_SupPayAmt1 WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_SupPayAmt1 WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_SupPay1 = w_SupPay1 + w_SupPayAmt1.
continue.
ENDIF.
ELSE.
w_SupPay1 = w_SupPay1 + w_SupPayAmt1.
continue.
ENDIF.
* duty/clearing expenses
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_DutyAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY003' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_DutyAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY003' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Duty = w_Duty + w_DutyAmt.
continue.
ENDIF.
ELSE.
w_Duty = w_Duty + w_DutyAmt.
continue.
ENDIF.
* Salary /EPF/ETF/MSPS/OVERTIME
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_SalaryAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_SalaryAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Salary = w_Salary + w_SalaryAmt.
continue.
ENDIF.
ELSE.
w_Salary = w_Salary + w_SalaryAmt.
continue.
ENDIF.
* Income Taxes
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_TaxAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_TaxAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Tax = w_Tax + w_TaxAmt.
continue.
ENDIF.
ELSE.
w_Tax = w_Tax + w_TaxAmt.
continue.
ENDIF.
* other taxes ( VAT: TT:Debit tax )
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_TaxAmt1 WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY006' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_TaxAmt1 WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY006' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Tax1 = w_Tax1 + w_TaxAmt1.
continue.
ENDIF.
ELSE.
w_Tax1 = w_Tax1 + w_TaxAmt1.
continue.
ENDIF.
* Selling & Promotional Costs
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_SellAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY007' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_SellAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY007' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Sell = w_Sell + w_SellAmt.
continue.
ENDIF.
ELSE.
w_Sell = w_Sell + w_SellAmt.
continue.
ENDIF.
* Admistration costs
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_AdminAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY008' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_AdminAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY008' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Admin = w_Admin + w_AdminAmt.
continue.
ENDIF.
ELSE.
w_Admin = w_Admin + w_AdminAmt.
continue.
ENDIF.
* Capital Expenditure
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_CapitalAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY009' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_CapitalAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY009' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Capital = w_Capital + w_CapitalAmt.
continue.
ENDIF.
ELSE.
w_Capital = w_Capital + w_CapitalAmt.
continue.
ENDIF.
* Loan repayments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_LoanAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY010' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_LoanAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY010' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Loan = w_Loan + w_LoanAmt.
continue.
ENDIF.
ELSE.
w_Loan = w_Loan + w_LoanAmt.
continue.
ENDIF.
* maangment fees
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_ManAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY011' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_ManAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY011' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Man = w_Man + w_ManAmt.
continue.
ENDIF.
ELSE.
w_Man = w_Man + w_ManAmt.
continue.
ENDIF.
* Group charges
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_GroupAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY012' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_GroupAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY012' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Group = w_Group + w_GroupAmt.
continue.
ENDIF.
ELSE.
w_Group = w_Group + w_GroupAmt.
continue.
ENDIF.
* Interest Payments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_IntAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY013' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_IntAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY013' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Int = w_Int + w_IntAmt.
continue.
ENDIF.
ELSE.
w_Int = w_Int + w_IntAmt.
continue.
ENDIF.
* Other Intercompany payments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_InterAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY014' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_InterAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY014' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Inter = w_Inter + w_InterAmt.
continue.
ENDIF.
ELSE.
w_Inter = w_Inter + w_InterAmt.
continue.
ENDIF.
* Advacnes/Prepayments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_AdPayAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY015' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_AdPayAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY015' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_AdPay = w_AdPay + w_AdPayAmt.
continue.
ENDIF.
ELSE.
w_AdPay = w_AdPay + w_AdPayAmt.
continue.
ENDIF.
ENDLOOP.
ENDLOOP.
* Open Item Balances
ENDFORM. " Select_Data
FORM select_data_Open.
* SELECT SINGLE copmname INTO w_companyname
* FROM zcompany
* WHERE copcode = p_bukrs.
* Select the receipts
SELECT SUM( dmbtr ) AS dmbtr belnr kunnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher3
FROM bsid
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart = 'DZ'
* AND blart = 'DZ' and shkzg = 'S'
GROUP BY kunnr belnr hkont shkzg xblnr budat blart bldat.
SORT it_voucher3 BY kunnr.
LOOP AT it_voucher3 INTO wa_voucher3.
* Select the invoices
SELECT SUM( dmbtr ) AS dmbtr belnr kunnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher1
FROM bsid
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart <> 'DZ' AND
augbl = wa_voucher3-belnr AND
kunnr = wa_voucher3-kunnr
GROUP BY belnr kunnr hkont shkzg xblnr budat blart bldat.
LOOP AT it_voucher1 INTO wa_voucher1.
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_ORcptamt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_ORcptamt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_ONetamt = w_ONetamt + w_ORcptamt.
continue.
ENDIF.
ELSE.
w_ONetamt = w_ONetamt + w_ORcptamt.
continue.
ENDIF.
* Interest Income
SELECT SINGLE dmbtr FROM bsis INTO w_OIntIncomeAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OIntIncomeAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OIntIncome = w_OIntIncome + w_OIntIncomeAmt.
continue.
ENDIF.
ELSE.
w_OIntIncome = w_OIntIncome + w_OIntIncomeAmt.
continue.
ENDIF.
* Sale Of fixed Assets
SELECT SINGLE dmbtr FROM bsis INTO w_OFixedAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OFixedAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_Ofixedasst = w_Ofixedasst + w_OFixedAmt.
continue.
ENDIF.
ELSE.
w_Ofixedasst = w_Ofixedasst + w_OFixedAmt.
continue.
ENDIF.
* Gl Receipts ( Sundry Income)
SELECT SINGLE dmbtr FROM bsis INTO w_OSundryAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OSundryAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'XX005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OSundry = w_OSundry + w_OSundryAmt.
continue.
ENDIF.
ELSE.
w_OSundry = w_OSundry + w_OSundryAmt.
continue.
ENDIF.
ENDLOOP.
ENDLOOP.
*Out Flow
Clear r_bwart.
refresh r_bwart.
r_bwart-sign = 'I'. r_bwart-option = 'EQ'. r_bwart-low = 'KZ'.
APPEND r_bwart TO r_bwart.
r_bwart-sign = 'I'. r_bwart-option = 'EQ'. r_bwart-low = 'VZ'.
APPEND r_bwart TO r_bwart.
SELECT SUM( dmbtr ) AS dmbtr belnr lifnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher3
FROM bsik
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart IN r_bwart
* AND blart = 'DZ' and shkzg = 'S'
GROUP BY lifnr belnr hkont shkzg xblnr budat blart bldat.
SORT it_voucher3 BY lifnr.
LOOP AT it_voucher3 INTO wa_voucher3.
* Select the invoices
SELECT SUM( dmbtr ) AS dmbtr belnr lifnr hkont shkzg xblnr budat
blart bldat
INTO CORRESPONDING FIELDS OF TABLE it_voucher1
FROM bsik
WHERE bukrs = p_bukrs AND gjahr = p_gjahr
AND augdt IN s_bldat
AND blart NOT IN r_bwart AND
augbl = wa_voucher3-belnr AND
lifnr = wa_voucher3-lifnr
GROUP BY belnr lifnr hkont shkzg xblnr budat blart bldat.
LOOP AT it_voucher1 INTO wa_voucher1.
* Supplier Payments (LOCAL)
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OSupPayAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OSupPayAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY001' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OSupPay = w_OSupPay + w_OSupPayAmt.
continue.
ENDIF.
ELSE.
w_OSupPay = w_OSupPay + w_OSupPayAmt.
continue.
ENDIF.
* supplier Payments (Foreign )
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OSupPayAmt1 WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OSupPayAmt1 WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY002' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OSupPay1 = w_OSupPay1 + w_OSupPayAmt1.
continue.
ENDIF.
ELSE.
w_OSupPay1 = w_OSupPay1 + w_OSupPayAmt1.
continue.
ENDIF.
* duty/clearing expenses
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_ODutyAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY003' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_ODutyAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY003' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_ODuty = w_ODuty + w_ODutyAmt.
continue.
ENDIF.
ELSE.
w_ODuty = w_ODuty + w_ODutyAmt.
continue.
ENDIF.
* Salary /EPF/ETF/MSPS/OVERTIME
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OSalaryAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OSalaryAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY004' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OSalary = w_OSalary + w_OSalaryAmt.
continue.
ENDIF.
ELSE.
w_OSalary = w_OSalary + w_OSalaryAmt.
continue.
ENDIF.
* Income Taxes
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OTaxAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OTaxAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY005' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OTax = w_OTax + w_OTaxAmt.
continue.
ENDIF.
ELSE.
w_OTax = w_OTax + w_OTaxAmt.
continue.
ENDIF.
* other taxes ( VAT: TT:Debit tax )
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OTaxAmt1 WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY006' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OTaxAmt1 WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY006' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OTax1 = w_OTax1 + w_OTaxAmt1.
continue.
ENDIF.
ELSE.
w_OTax1 = w_OTax1 + w_OTaxAmt1.
continue.
ENDIF.
* Selling & Promotional Costs
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OSellAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY007' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OSellAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY007' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OSell = w_OSell + w_OSellAmt.
continue.
ENDIF.
ELSE.
w_OSell = w_OSell + w_OSellAmt.
continue.
ENDIF.
* Admistration costs
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OAdminAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY008' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OAdminAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY008' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OAdmin = w_OAdmin + w_OAdminAmt.
continue.
ENDIF.
ELSE.
w_OAdmin = w_OAdmin + w_OAdminAmt.
continue.
ENDIF.
* Capital Expenditure
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OCapitalAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY009' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OCapitalAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY009' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OCapital = w_OCapital + w_OCapitalAmt.
continue.
ENDIF.
ELSE.
w_OCapital = w_OCapital + w_OCapitalAmt.
continue.
ENDIF.
* Loan repayments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OLoanAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY010' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OLoanAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY010' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OLoan = w_OLoan + w_OLoanAmt.
continue.
ENDIF.
ELSE.
w_OLoan = w_OLoan + w_OLoanAmt.
continue.
ENDIF.
* maangment fees
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OManAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY011' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OManAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY011' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OMan = w_OMan + w_OManAmt.
continue.
ENDIF.
ELSE.
w_OMan = w_OMan + w_OManAmt.
continue.
ENDIF.
* Group charges
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OGroupAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY012' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OGroupAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY012' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OGroup = w_OGroup + w_OGroupAmt.
continue.
ENDIF.
ELSE.
w_OGroup = w_OGroup + w_OGroupAmt.
continue.
ENDIF.
* Interest Payments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OIntAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY013' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OIntAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY013' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OInt = w_OInt + w_OIntAmt.
continue.
ENDIF.
ELSE.
w_OInt = w_OInt + w_OIntAmt.
continue.
ENDIF.
* Other Intercompany payments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OInterAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY014' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OInterAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY014' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OInter = w_OInter + w_OInterAmt.
continue.
ENDIF.
ELSE.
w_OInter = w_OInter + w_OInterAmt.
continue.
ENDIF.
* Advacnes/Prepayments
* Find the corresponding entry in the GL open
SELECT SINGLE dmbtr FROM bsis INTO w_OAdPayAmt WHERE
* hkont = '0010003900' AND
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY015' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc <> 0.
* If the corresponding entry not found in GL open, look in the GL Closed
SELECT SINGLE dmbtr FROM bsas INTO w_OAdPayAmt WHERE
hkont IN ( select fglacc from zcashflow_matrix WHERE FCODE =
'YY015' ) AND bukrs = p_bukrs AND
gjahr = p_gjahr AND
belnr = wa_voucher1-belnr.
IF sy-subrc = 0.
w_OAdPay = w_OAdPay + w_OAdPayAmt.
continue.
ENDIF.
ELSE.
w_OAdPay = w_OAdPay + w_OAdPayAmt.
continue.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDFORM. " Select_Data -
Hi Friends
I am having performance issue for this function-module(HR_TIM_REPORT_ABSENCE_DATA) and one my client got over 8 thousend employees . This function-module taking forever to read the data. is there any other function-module to read the absences data IT2001 .
I did use like this .if i take out this F.M 'HR_TIM_REPORT_ABSENCE_DATA_INI' its not working other Function-module.please Suggest me .
call function 'HR_TIM_REPORT_ABSENCE_DATA_INI'
exporting "Publishing to global memory
option_string = option_s "string of sel org fields
trig_string = trig_s "string of req data
alemp_flag = sw_alemp "all employee req
infot_flag = space "split per IT neccessary
sel_modus = sw_apa
importing
org_num = fdpos_lines "number of sel org fields
tables
fieldtab = fdtab "all org fields
field_sel = fieldnametab_m. "sel org fields
To Read all infotypes from Absences type.
RP_READ_ALL_TIME_ITY PN-BEGDA PN-ENDDA.
central function unit to provide internal tables: abse orgs empl
call function 'HR_TIM_REPORT_ABSENCE_DATA'
exporting
pernr = pernr-pernr
begda = pn-begda
endda = pn-endda
IMPORTING
SUBRC = SUBRC_RTA
tables
absences = absences_01
org_fields = orgs
emp_fields = empl
REFTAB =
APLTAB =
awart_sel_p = awart_s[]
awart_sel_a = awart_s[]
abstp_sel = abstp_s[]
i0000 = p0000
i0001 = p0001
i0002 = p0002
i0007 = p0007
i2001 = p2001
i2002 = p2002
i2003 = p2003.
Thanks & Regards
Reddyguessing will not help you much, check with SE30 to get a better insight
SE30
The ABAP Runtime Trace (SE30) - Quick and Easy
what is the total time, what are the Top 10 in the hitlist.
Siegfried -
Memory Leak Issue for Adobe Access iOS API
Hi,
We are trying to develop an iOS app (with ARC enabled) using Adobe Acces API 4.0 and we have identified that the function [drmManager createDRMSession] has memory leak.
DRMSESSION = [drmManager createDRMSession:METADATA playlist:PLAYLIST error:nil complete:^() {}];
We are using:
DRMSESSION -> weak
METADATA ->strong (as need to share within object)
PLAYLIST ->strong (as need to share within object)
After calling this function, the object is unable to dealloc and most of the leaking object related to networking (such as CFNetwork...)
Is this a known issue for the Adobe Access iOS API or we are missing some key steps.
Any suggestions is appreciated. Thanks in advance.ans0600, sorry about that, I read Hiroshi's forward too quickly. I've done a little digging and have come up with two work-arounds:
Create a file with ARC disabled to translate the returned object to be an autorelease
declare the returned DRMSession as __unsafe_unretained and use CFRelease, as noted on stackexchange
In the future we may change this method to return an autoreleased object to avoid this issue. Let us know if you have any further questions! -
[SOLVED] Enabling debug for ath9k in compat-drivers-patched from AUR
Wireless card: TP-LINK TL-WN951N. lspci says that it is an Atheros AR5416 adapter [AR5008].
Some background: I'm having the same issues as the OP in this thread, which references this bug report. The problem is that I get a 2000 ms ping every 30 seconds. So 2 seconds of inactivity every 30 seconds. I have the same wireless PCI card, as well. I need to fix this, because it's making online gaming impossible. I should also note that the card is working just fine in Windows 8, however. I am using net-auto-wireless. I have tried using wicd, enabling ath9k's nohwcrypt option, toggling the card's power save, installing the latest compat-drivers-patched from the AUR, toggling different settings in my motherboard's BIOS, and removing the antennae from the card. But nothing has made a significant difference.
I think I'm really close now. I just have to disable ANI. But in order to do that, it seems that I need to enable debugging for ath9k. But this means that I need to either recompile a custom kernel, or somehow enable debug for ath9k in compat-drivers-patched from the AUR. I'd prefer the latter, as that means that I will have a more bleeding-edge driver. That, and I won't have to touch the kernel as much. What I want is described on this page. But it seems too complicated to me. Please let me explain.
I've installed things from the AUR before, as mentioned above, and have properly configured my makepkg.conf for my system. So I'd like to use the CFLAGS and such that I've set. I don't understand how everything works in the PKGBUILD; I don't have much experience with sed and awk and regular expressions, and haven't done much shell scripting at all. It seems that at some point in the PKGBUILD, I need to enable debugging for ath9k before it is compiled. Apparently on the last page I linked to, I need to add:
export CONFIG_ATH_DEBUG=y
export CONFIG_ATH9K_DEBUG=y
export CONFIG_ATH9K_DEBUGFS=y
to some config.mk file. I can only get access to the config.mk file after I install the package with pacman. I've tried adding those lines to my /etc/profile file, and checked, after a reboot, with "set", that those variables are indeed set. But the thing is, with these variables set in /etc/profile, when I run makepkg, makepkg fails with an error 2. I tried again and got the same error. I removed those lines from my /etc/profile, rebooted, tried makepkg again, and everything worked. So putting those lines in my /etc/profile is not the solution, and I feel like I'm doing something very stupid. What am I doing wrong?
I should also note that I've tried to read the wiki page on compiling a custom kernel using ABS, but it seems to just say "get your custom configuration files" and then just continue (so it assumes that I should already be familiar with the configuration part). The PKGBUILD and Creating Packages wiki pages also seem to be a little... too advanced for me at this point in time.
So how do I enable debugging for ath9k in compat-drivers-patched from the AUR? I'd prefer to stick with only editing the PKGBUILD and using makepkg, if possible.
I've really tried to search the web and the arch forums on how to fix this problem myself, but alas, it seems that I need help this time. I greatly appreciate your time for reading my long post.
UPDATE:
I've made a lot of progress. I ended up removing the AUR package with pacman by invoking "pacman -Rsn compat-drivers-patched".
Instructions for [almost] success: First, download compat-drivers-patched from AUR. Then move it to the "builds" directory (or "local", if using ABS). Extract the tarball. After the new directory is created, cd into it. Now here's the important part: run
$ makepkg -so
Then cd into src, cd into the directory inside src, then edit the config.mk file. Make sure these lines are uncommented (or created, if not already there):
export CONFIG_CFG80211_DEBUGFS=y
export CONFIG_MAC80211_DEBUGFS=y
export CONFIG_ATH_DEBUG=y
export CONFIG_ATH9K_DEBUG=y
export CONFIG_ATH9K_DEBUGFS=y
(source)
Now run "cd ../.." to go back up two directories. Now run:
$ makepkg -e
# pacman -U <file that was produced>
And I ran "mkinitcpio -p linux" just in case, but I'm not sure if that is necessary at all. I'm... not touching the kernel, right?
Now I ran:
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani
But bash would say that the file or directory doesn't exist. Even if I prepend it with "sudo", I get the same results. I was only able to get the command to work if I logged in as root. I even put the line in my /etc/profile. The 2000 ms ping every 30 seconds is now GONE. HOWEVER! If I reboot and log in as a normal user, the problem is there again. If I reboot and log in as root, the problem is gone. If I then log out and then log back in as a normal user, the problem does not come back.
So really, I can avoid the problem if I first log in as root, log out, and then log back in as a normal user. But this is a great inconvenience. I would much prefer if I could just log in as a normal user right after boot, and have everything working.
Now, how do I get the command to automatically run at boot as root (without me having to log in as root), and work?
UPDATE 2:
I got it working. Putting the line in /etc/profile is not the solution. I created a custom systemd .service file.
Put this into /etc/systemd/service (name it "disable_ani.service"):
EDIT: Wow. I made a glaring typo here. It should be /etc/systemd/system/disable_ani.service
[Unit]
Description=disable_ani
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani"
[Install]
WantedBy=multi-user.target
Then make sure to "sudo chmod 755 /etc/systemd/service/disable_ani.service", since root owns this file.
Then run "sudo systemctl enable disable_ani.service".
EDIT: It has been brought to my attention that there is a much simpler way than creating a custom service.
Using a tmpfile:
/etc/tmpfiles.d/disable_ani.conf
w /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani - - - - 1
Done.
Now ANI is persistently disabled between boots, even if I log in as a normal user right after boot.
Thanks for reading.
Last edited by vyu223 (2013-03-12 10:20:19)So zsh is telling you that the command didn't work, since it claims that there is no such file or directory. I had a lot of trouble with getting the echo command to work, as well. I found that if out of these lines:
export CONFIG_CFG80211_DEBUGFS=y
export CONFIG_MAC80211_DEBUGFS=y
export CONFIG_ATH_DEBUG=y
export CONFIG_ATH9K_DEBUG=y
export CONFIG_ATH9K_DEBUGFS=y
If the first and second line above were not uncommented in the config.mk file, I couldn't leave the last line above uncommented as well, or else makepkg would fail and give me an error. So originally I had only the 3rd and 4th lines above uncommented/inserted in my config.mk. With that configuration, I could not get the echo command to work, no matter what. Have you uncommented or inserted all of the above 5 lines into your config.mk?
After making sure all of the above 5 lines were in my config.mk, the echo command still didn't work, even if I preceded the command with sudo, or entered a su session. Bash would tell me that there was no such file or directory. I found that if I actually logged out of my normal user, and then logged back into the computer as root, the command would work. If your shell does not give you any feedback (particularly, "no such file or directory"), then the command worked. In order to get the command to run every time the computer boots, I used a systemd service, so that the command is issued as root. For some reason, it doesn't work if you put the command into /etc/profile.
Oh, and it would probably be helpful to mention that for the compat-drivers-patched package from the AUR, the PKGBUILD checks to see what your _selected_drivers variable is before compilation. If you set _selected_drivers=ath9k, your compile times will be much shorter. -
Enabling QoS for enterprise on a router
Hello,
I plan to enable QOS for enterprise on a customer's router between three (3) to five (5) days. Will this have an impact on the router for the said days?
Thanks you in advance,
Martin.Generally speaking no, qos will not impact any operations at all. It will just classify, mark, police/shape, guarantee bandwidth according to the criteria you specify.
But it will not cause any performance issues.
-Terry
Please rate all helpful posts and mark the thread as answered if you have no other queries. -
Problem With Insert statement using field symbols with unicode enabled
I was writng a function module for dyanamic operations on the table. We are using the field symbols, function module is unicode enabled.
Assign statements are working fine, with which we created work are <fs_wa_header> and internal table <fs_tb_item> dynamically based on the table name (IM_TB_HENAME) which we get as import parameter.
we have query which is giving us dump.
INSERT (IM_TB_HENAME) FROM <FS_WA_HEADER>.Hi
INSERT (IM_TB_HENAME) FROM <FS_WA_HEADER> is good for inserting a line in the database, so IM_TB_HENAME has to have the name of dictionary table.
U should write:
INSERT <FS_WA_HEADER> INTO (IM_TB_HENAME).
But I believe you can't use the variable IM_TB_HENAME, you should use another field-symbols:
ASSIGN (IM_TB_HNAME) TO <FS_TB_ITEM>.
INSERT <FS_WA_HEADER> INTO <FS_TB_ITEM>.
Max -
Security issues for Discoverer 10g apps 12i
gurus,
I have couple of things to get it done at client.
We are on Oracle Apps rel 12i with dicoverer 10g.
Did anyone setup MOAC to be enabled and operational in business areas?
Setting up secure responsibilities in discoverer for MOAC?
Any setup needs to be done for custom report security in discoverer ?
thxHi,
I did setup new MOAC security profiles and assigned multiple organizations to that profile for testing purpose.
After this, I did run concurrent program "Security List Maintennce" etc...
Tested Upding profile at user level or responsibility level.
On APPS side fine.
I need the some basic steps on setup of security issues for discoverer side.
1) Business areas (any security steps need to be followed in order to access data for single or multi-org)
2) Custom Reports ( any security setup or any moac security profile setting against responsibilty for accessing single or multi-org data)
Since we dont have default operating unit parameter as specified in the concurrent program, how do you restrict data?
3) Reconciling security approach r12 with discoverer (any steps need to be followed here after r12 configuration with security issues)
4) Custom Views ( any steps to be followed for single or multi-org data as security aspect)
Looking for info on these setups.
Thx
Maybe you are looking for
-
Can't get 2 ipods on same account to work anymore!
My partner and I both have an iPod touch and we've always used the same account since we got him one. Now, having both updated to v5.0, I can't get past the final step of the update process because when I try to update the apple id it tells me that t
-
ITunes won't start WITHOUT error message
I cannot get iTunes to start at all. When I click on it in the start menu or on my desktop I see the hourglass but then nothing happens. I have tried re-downloading the software and clicking "Repair", I have tried restarting my computer but still not
-
IPod Shuffle (2nd Gen) not being recognised or playing
My iPod shuffle is not being recognised by iTunes, and I cannot play any music through it. When I connect it to my iMac the green LED flashes 3 times, then goes out, and nothing else happens. Can anyone help? Thanks
-
InfoPath 2010 does not work in claims authentication mode on SharePoint 2010
Hi everyone, I created an Infopath 2010 Forms published on a Claims-based authentication site collection. This form has an external datasource plugged on the _vti_bin/UserProfileService.asmx webservice (within the same site collection). This datasour
-
Adobe CC and Photoshop Photography Program on the same computer.
Hi! I'm currently using Adobe CC (very happy with it!). And I'm also about to install it on a laptop which the EULA allows. However my SO is thinking of signing on the Photoshop Photography Program on the very same laptop. 1. Is that possible? Does i