Cenvat opening balance problem
Hi,,
At the time of 50% cenvat credit transfer of capital goods from Credit on Hold a/c (31040) of F.Y:07-08 of Rs.26047791/- to Cenvat credit BED/CESS/SCESS a/c (F.Y:08-09), opening balance is not transferring. Because of this we are unable to pass the utilisation entry against the excise duty liability for the month of April'08, May'08. & June 08.
How this Cenvat opening balance transfer is possible in J2I8 ?
Beside we have not close last year financial account till now. Kinldy tell me which one should be first priority. Should I close last year financial account first and then excise opening balance can be transferred later or vice versa.
With Regards,
Samrat
Hi
Please follow the below:
Entering the closing balance of the RG23A Part II and PLA registers in table J_2IACCBAL, as they were on the day prior to extracting the register data.
For example,. the extract the registers from 1 April 2006. Maintain the closing balances in the table J_2IACCBAL as on 31 March 2006.
Make the entries in table J_2IACCBAL as described below:
Field Entry
EXGRP Excise group of the registers
REGISTER Type of register
Make an entry for each of the following:
u2022 RG23ABED
u2022 RG23ASED
u2022 RG23AAED
u2022 PLABED
u2022 PLASED
u2022 PLAAED
u2022 PLACESS
DATUM Date of the closing balance
WERKS Leave this field blank
OP BAL Leave this field blank
CL BAL Closing balance in the register
EXAMT Leave this field blank
EXIND Leave this field blank
USNAM User ID of the person making the entries
CPUDT Date of entry
CPUTM Time of entry
regards
Sridevi
Similar Messages
-
Hi,
I want to put the opening balances.The client uses tally and they dont have goods recieved not invoiced account in it.But there are are some goods receipts done but vendor invoice not recieved yet.In this scenario, what balance do I put against the goods recieved not invoiced account in the opening balance for SAP B1.Also , let me know what are other such scenarios which i need to take precaution.
RegardsSBO2005B: Please refer the following URL for complete details
http://help.sap.com/saphelp_sbo2005b/helpdata/en/index.htm
In Journal Entry Window: Country-Specific Fields, General Area: India
Field(s)
Description/Activity
CENVAT Component
Displays the tax type, if the tax is under CENVAT tax category. In a manual journal entry, if CENVAT Component is selected, the Material type must also be selected.
Material Type
Displays the Material type, if the tax is under CENVAT tax category. In a manual journal entry, if Material type is selected, CENVAT Component must also be selected.
SBO2007B: Please refer the following URL for complete details
http://help.sap.com/saphelp_sbo2007b/helpdata/en/b1/8fe14910cf46b9b2ff2de2f315e5a2/frameset.htm
Journal Entry Window: Country-Specific Fields, General Area: India
CENVAT Component Displays the tax types under the CENVAT tax category.
Material Type Displays the material type, if the tax is under the CENVAT tax category.
Location Location in header area:
Select the location by which relevant journal entries are displayed.
You must specify the location if Generate Excise Reg. No or Automatic. Tax is selected.
Location in table area:
You must specify the location if:
Tax Code is used in manual journal entries; default value is the location in the header area
Material Type or Material Component is not NULL
Location, CENVAT Component, and Material Type are copied from the previous or first line and are read-only.
Hope this clarifies your query.
Regards
Satish -
How can I input an opening balance in SAP B1. We are unable to transfer data using the Data Transfer Workbench so I have to input the opening balance manually. I tried at first however the balance is in credit. Can I get tips on how I can input the opening balances correctly. I'm also not so sure about the Opening Balance Account. I hope anybody could help us with our implementation. We want to start using B1 in our company already.
Thanks.Hi,
Check this thread
Re: opening balance account
Re: Opening Balance
Re: Inventory Opening Balance
Re: Opening balance problem
*Close the thread if issue solved.
Regards
Jambulingam.P
Edited by: Jambulingam P on Aug 11, 2009 1:06 PM -
Problem in getting opening balance for multiple GL Account
Hi,
I am working on a Trail Balance Report in which i am trying to fetch the data for the opening balance for multiple GL Accounts but it is not coming accurate.. Here is the link to the code which i am using currently right now:-
http://docs.google.com/View?id=dfxswwff_13fgpdcbgt
here i am showing the logic for the data of previous year only... i.e. data from begining to 1 day less of the date-low.Hi,
It is a tranparent table which is getting data from the 2 other tables,the filling of this table is right. The execution of this query is right in the program but the problem comes when it is trying to calculate the opening balance for the respective GL Account present in the query it is not doing it. i.e. if there are 2 gl account ids having 3 rows of data each it is not calculating the of it in a single row.. i hope it is clear now... -
Problem of create inventory opening balance
hi experts,
i extract the inventory according the document "How to handle inventory management scenarios in BW", i activate the 0IC_C03, and want to load the opening stock balance, but in the infopackage, i cannot find the "create opening balance" option, what's the problem? pls help.
thanks.Hi,
After activation of infocube, do setup at source(R/3) for initial stock balances and load data using datasource: 2lis_03_BX and compress WITH marker update.
Later setup moments and load data using datasource: 2lis_03_bf and compress WITH OUT marker updated.
Srini -
S_ALR_87012309 PROBLEM WITH OPENING BALANCES
Dear Experts,
My client having problem with opening balances in cash journal report that same showing in INR but not tallyed with carryforward balances. Cash journal carryforawd balances and FS10N balances are tallyed.
So,please any suggestion to solve that error.
Best Rgds
SumaIt is problem with carryforward balances from one year to another year. We have again run the same programe carryforward programe to fix this problem.
-
I have imported opening balance for customer.I have used Suspence account as offset account for opening balance.But some account heads are considered by default.
For eg,
AVANTI PROTECTIVE SERVICE Db-1200
Suspense Account Cr-0
Miscellaneous Expenses Cr-1200
Here Cr is credit and Db is debit.Miscellaneuos account is not considered in opening balance.Still it is shown in the journal entry.I am presuming that you are importing all the Invoice as Service Invoices. You will need to Complete the OInvoices template
RecordKey CardCode DocDate DocDueDate DocNum DocType
1 C1234 20070901 20070915 123455 dDocument_Service
HandWritten NumAtCard SalesPersonCode
tYES CUST PO # 8
NOTE: If you going to import the document with their Original numbers then you have to specify HandWritten as tYES. If you miss this SAP will start with the numbering set for this document in the document numbering. NumatCard is Cust PO number and SalesPersonCode is optional, I have shown it for your info. You have to specify the internal number from the OSLP table (SLPCODE for the Sales Person)
DocumentLines template
RecordKey AccountCode LineTotal TaxCode
1 _SYS00000000225 1200 Exempt or 0
NOTE: The _SYSxxxxx number should be obtained from the OACT table. Use you Suspense Account number itself if you are not using Segmented Accounts.
Let me know if you need further assistance
Suda
1 -
Reg. Problem for fetching Opening Balance of an Account
Hello Friends,
In a report i hv to display the data for Opening balance of account according to input date..
so plz tell me the some FM if available for getting data fro Opening balance of an account.
its urgent
MarmikHi
U can use the BAPI BAPI_AR_ACC_GETOPENITEMS (for customer account) and BAPI_AP_ACC_GETOPENITEMS (for vendor account).
Anyway you should consider that Opening balance of account according to input date, are:
- The totals of all open item posted before inpu date,
- the totals of all cleared item posted before input date, but cleared after input data.
See also the BAPIs BAPI_GL_GETGLACCBALANCE, BAPI_AR_GETGLACCBALANCE and BAPI_AP_GETGLACCBALANCE.
Max -
To caluclate the opening balances
I want to calulate the opening balances and closing balances for each month in the result like this :
Month uom Opening Closing
Apr
May
Jun
Jul
Aug
sep
Oct
Nov
Dec
Jan
Feb
Mar
SELECT UOM,
SUM(OPSTK) OPSTK, SUM(OPVAL) OPVAL
SUM(INQTY) INQTY, SUM(INVAL) INVAL,
SUM(OUTQTY) OUTQTY, SUM(OUTVAL) OUTVAL,
SUM(CLSTK) CLSTK, SUM(CL_VAL) CL_VAL
FROM
SELECT
UOM, ITEM_CODE, ITEM_NAME,
ROUND(OPSTK/CNV/ML,2) OPSTK, ROUND(OPVAL,3)OPVAL,
ROUND(INQTY/CNV/ML,2) INQTY, ROUND(INVAL,3) INVAL,
ROUND(OUTQTY/CNV/ML,2) OUTQTY, ROUND(OUTVAL,3)OUTVAL,
ROUND((NVL(OPSTK,0)+NVL(INQTY,0)-NVL(OUTQTY,0))/CNV/ML,2) CLSTK,
ROUND((NVL(OPVAL,0)+NVL(INVAL,0)-NVL(OUTVAL,0)),3) CL_VAL
FROM
SELECT
ITEM_UOM_CODE UOM, ITEM_CODE, ITEM_NAME,
IU_CONV_FACTOR CNV,
IU_MAX_LOOSE_1 ML
FROM OM_ITEM,OM_ITEM_UOM
WHERE ITEM_CODE = IU_ITEM_CODE AND IU_UOM_CODE = ITEM_UOM_CODE
SELECT
SL_ITEM_CODE OP_ICODE,
SUM(DECODE(SL_RCVD_ISSD,'R',1,'I',-1)*SL_QTY_BU) OPSTK,
ROUND(SUM(DECODE(SL_RCVD_ISSD,'R',1,'I',-1)*SL_VAL_1),2) OPVAL
FROM OS_STK_LEDGER
WHERE SL_DT < TO_DATE(:P249_DATE1,'DD-MM-YYYY')
GROUP BY SL_ITEM_CODE
SELECT
SL_ITEM_CODE TX_ICODE,
SUM(DECODE(SL_RCVD_ISSD,'R',1)*SL_QTY_BU)INQTY,
SUM(DECODE(SL_RCVD_ISSD,'R',1)*SL_VAL_1) INVAL,
SUM(DECODE(SL_RCVD_ISSD,'I',1)*SL_QTY_BU)OUTQTY,
SUM(DECODE(SL_RCVD_ISSD,'I',1)*SL_VAL_1) OUTVAL
FROM OS_STK_LEDGER
WHERE SL_DT BETWEEN TO_DATE(:P249_DATE1,'DD-MM-YYYY') AND TO_DATE(:P249_DATE2,'DD-MM-YYYY')
GROUP BY SL_ITEM_CODE
WHERE ITEM_CODE = OP_ICODE(+)
AND ITEM_CODE = TX_ICODE(+)
AND ITEM_CODE LIKE 'R%'
--AND ITEM_CODE LIKE :P249_ITEMCODE
ORDER BY ITEM_CODE
GROUP BY UOM
The below given query gives me the opening and closing balances, for the date range entered by me.
For ex. if I enter the date in TO_DATE(:P249_DATE1,'DD-MM-YYYY') field as '01-04-2008', then i get the opening balance for the month April. The SL_DT is the date column in the table.
Kindly guide me for this to solve..There seems to be a problem with your query formatting. I've formatted it and the ORDER BY clause is not needed in the In line view. Remove it. I have added new GROUP BY column.
SELECT UOM,
SUM(OPSTK) OPSTK, SUM(OPVAL) OPVAL
SUM(INQTY) INQTY, SUM(INVAL) INVAL,
SUM(OUTQTY) OUTQTY, SUM(OUTVAL) OUTVAL,
SUM(CLSTK) CLSTK, SUM(CL_VAL) CL_VAL
FROM ( SELECT UOM, ITEM_CODE, ITEM_NAME,
ROUND(OPSTK/CNV/ML,2) OPSTK, ROUND(OPVAL,3)OPVAL,
ROUND(INQTY/CNV/ML,2) INQTY, ROUND(INVAL,3) INVAL,
ROUND(OUTQTY/CNV/ML,2) OUTQTY, ROUND(OUTVAL,3)OUTVAL,
ROUND((NVL(OPSTK,0)+NVL(INQTY,0)-NVL(OUTQTY,0))/CNV/ML,2) CLSTK,
ROUND((NVL(OPVAL,0)+NVL(INVAL,0)-NVL(OUTVAL,0)),3) CL_VAL
FROM ( SELECT ITEM_UOM_CODE UOM, ITEM_CODE, ITEM_NAME,
IU_CONV_FACTOR CNV,
IU_MAX_LOOSE_1 ML
FROM OM_ITEM,OM_ITEM_UOM
WHERE ITEM_CODE = IU_ITEM_CODE AND IU_UOM_CODE = ITEM_UOM_CODE
( SELECT SL_ITEM_CODE OP_ICODE,
SUM(DECODE(SL_RCVD_ISSD,'R',1,'I',-1)*SL_QTY_BU) OPSTK,
ROUND(SUM(DECODE(SL_RCVD_ISSD,'R',1,'I',-1)*SL_VAL_1),2) OPVAL
FROM OS_STK_LEDGER
WHERE SL_DT < TO_DATE(:P249_DATE1,'DD-MM-YYYY')
GROUP BY SL_ITEM_CODE
( SELECT SL_ITEM_CODE TX_ICODE,
SUM(DECODE(SL_RCVD_ISSD,'R',1)*SL_QTY_BU)INQTY,
SUM(DECODE(SL_RCVD_ISSD,'R',1)*SL_VAL_1) INVAL,
SUM(DECODE(SL_RCVD_ISSD,'I',1)*SL_QTY_BU)OUTQTY,
SUM(DECODE(SL_RCVD_ISSD,'I',1)*SL_VAL_1) OUTVAL,
trunc(SL_DT, 'MM')
FROM OS_STK_LEDGER
WHERE SL_DT BETWEEN TO_DATE(:P249_DATE1,'DD-MM-YYYY') AND TO_DATE(:P249_DATE2,'DD-MM-YYYY')
GROUP BY SL_ITEM_CODE, trunc(SL_DT, 'MM')
WHERE ITEM_CODE = OP_ICODE(+)
AND ITEM_CODE = TX_ICODE(+)
AND ITEM_CODE LIKE 'R%'
--AND ITEM_CODE LIKE :P249_ITEMCODE
GROUP BY UOM;Cheers
Sarma. -
Fault found with opening balances output on Trial Balance report
When running the Trial Balance report and adding "Opening Balances" and taking the "OB from Start of Fiscal Year" option, the relevant opening balances are not shown from the closing balance of the prior period.
All balance sheet accounts should always show a "brought forward" balance if one exists, whereas P&L Accounts should only carry balances forward over monthend boundaries, resetting at the point of a yearend. This is not the output provided by the report.
This issue has been checked on numerous patch levels (including the beta release of 2007a SP01 by a support consultant) and returns the same problem.Hi Julian,
I checked the functionality by myself and I have two findings:
1) that the Trial balance displays in the opening balance balances for the P&L accounts from previous period.
2) On the other side there is a functionality "Add closing balances" on the Trial balance selection criteria with option "Closing balances before Selected Period Only" which would adjust the presented opening balances for P&L accounts in point 1.
Based on your description I understand that Global Support Center knows about the issue, so I think the point 2 could be used as temporary workaround till the system is corrected.
Best Regards,
Martin Slavik
SAP Business One Solution Manager -
How to get Open Balance for the year and Total Ending Balance?
For a given account, how to get Open Balance for the year (Cumulative Ending Balance) and Total Ending Balance (Cumulative Ending Balance)?
Is there any function module available? or should I read from some tables? Please advice.Hello Paul,
You could try calling one of the following BAPIs - see which one meets your requirement. They are documented well so shouldn't be a problem finding out the correct one for your requirements.
BAPI_GL_GETGLACCBALANCE
BAPI_GL_GETGLACCCURRENTBALANCE
BAPI_GL_ACC_GETBALANCE
BAPI_GL_ACC_GETCURRENTBALANCE
BAPI_GL_ACC_GETPERIODBALANCES
BAPI_COND_VAL_DECRE_BALANCES
You might have to put in some of your own logic after the BAPI call to get what you want.
Hope this helps,
Cheers,
Sougata.
p.s. Also look at FM FAGL_GET_ACCOUNT_BALANCE
Edited by: Sougata Chatterjee on May 7, 2008 11:47 AM -
I want to find out opening balance as on date in fi(for customer)
hi
experts,
my req is user enter date through selection screen like (07.04.09)
i want to find opening balance.
thanks
ajay.Dear Ajay,
Try for Bapi for opening balance on perticular date. This will definately solve your problem
I have come across this problem long back.
Try this. I will give you name of Bapi sortly.
Regards,
Vijay -
Hi Experts,
In my RG23A AND RG23C ANNEXURE10 report opening balance is not coming. Herewith i am sending the code of the report. Kindly do the needful.
Regards,
Shankar
CODING:
REPORT YMS_ANNEXURE10NEW NO STANDARD PAGE HEADING LINE-SIZE 255
LINE-COUNT 60.
*REPORT ZKVB_CENVAT_CREDIT_LEDGER_NEW
DICTIONARY STRUCTURES USED *
TABLES: J_1IPART2 , J_1IEXCHDR , J_1IEXCDTL , GLT0 .
INTERNAL TABLES USED *
DATA : BEGIN OF ITAB_EXCISE OCCURS 0 ,
SERIALNO LIKE J_1IPART2-SERIALNO , "SERIAL NUMBER
BUDAT LIKE J_1IPART2-BUDAT , "DATE
TRNTYP LIKE J_1IPART2-TRNTYP , "TRANSACTION TYPE
EXNUM LIKE J_1IEXCHDR-EXNUM , "EXCISE INVOICE NUMBER
EXDAT LIKE J_1IEXCHDR-EXDAT , "EXCISE INVOICE DATE
EXBED LIKE J_1IEXCHDR-EXBED , "CENVAT
EXSED LIKE J_1IEXCHDR-EXSED , "SED
CVDIND LIKE J_1IEXCHDR-CVDIND ,
RDOC3 LIKE J_1IEXCDTL-RDOC3 ,
ECS LIKE J_1IPART2-ECS,
ECS1 LIKE J_1IPART2-ECS,
OCT_ECS LIKE J_1IPART2-ECS,
END OF ITAB_EXCISE.
DATA : BEGIN OF ITAB_EXCISE1 OCCURS 0 ,
SERIALNO LIKE J_1IPART2-SERIALNO , "SERIAL NUMBER
SERIALNO_C LIKE J_1IPART2-SERIALNO ,
BUDAT LIKE J_1IPART2-BUDAT , "DATE
TRNTYP LIKE J_1IPART2-TRNTYP , "TRANSACTION TYPE
EXNUM LIKE J_1IEXCHDR-EXNUM , "EXCISE INVOICE NUMBER
EXDAT LIKE J_1IEXCHDR-EXDAT , "EXCISE INVOICE DATE
EXBED LIKE J_1IEXCHDR-EXBED , "CENVAT
EXSED LIKE J_1IEXCHDR-EXSED , "SED
CVDIND LIKE J_1IEXCHDR-CVDIND ,
RDOC3 LIKE J_1IEXCDTL-RDOC3 ,
SERIALNO1 LIKE J_1IPART2-SERIALNO ,
EXBED1 LIKE J_1IPART2-EXBED,
EXSED1 LIKE J_1IPART2-EXSED,
ECS LIKE J_1IPART2-ECS,
ECS1 LIKE J_1IPART2-ECS,
OCT_ECS LIKE J_1IPART2-ECS,
END OF ITAB_EXCISE1.
*DATA : ITAB1 LIKE ZEXCISE_SED_BED OCCURS 0 WITH HEADER LINE .
DATA : ITAB_EXCISE2 LIKE ITAB_EXCISE1 OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF ITAB_DISPLAY OCCURS 0,
SERIALNO LIKE J_1IPART2-SERIALNO , "SERAIL NUMBER
BUDAT LIKE J_1IPART2-BUDAT , "DATE
CENVAT_OPG type p decimals 3, "OPENING CENVAT
SED_OPG LIKE J_1IPART2-EXSED , "OPENING SED
ECS LIKE J_1IPART2-ECS , "OPENING ECS
EXNUM_CR LIKE J_1IEXCHDR-EXNUM , "CERDIT EXC INV NUMBER
EXDAT_CR LIKE J_1IEXCHDR-EXDAT , "CREDIT EXC INV DATE
CENVAT_CR type p decimals 3, "CREDIT CENVAT
ADDL_DTY type p decimals 2,
SED_CR LIKE J_1IEXCHDR-EXSED , "CREDIT SED
TOT_CENVAT_CR type p decimals 3,
TOT_CENVAT_CESS type p decimals 3,
TOT_SED_CR LIKE J_1IEXCHDR-EXSED ,
EXNUM_DB LIKE J_1IEXCHDR-EXNUM ,
EXDAT_DB LIKE J_1IEXCHDR-EXDAT ,
CENVAT_DB type p decimals 3,
SED_DB LIKE J_1IEXCHDR-EXSED ,
CENVAT_CLS type p decimals 3,
SED_CLS LIKE J_1IPART2-EXSED ,
total_ecs like J_1IPART2-ECS,
ECS1 LIKE J_1IPART2-ECS,
CNT TYPE P,
OCT_ECS LIKE J_1IPART2-ECS,
END OF ITAB_DISPLAY.
DATA : BEGIN OF ITAB_EXNUM OCCURS 0 ,
EXNUM LIKE J_1IEXCHDR-EXNUM ,
EXDAT LIKE J_1IEXCHDR-EXDAT ,
CENVAT like J_1IEXCHDR-exbed,
ADDL_DTY like J_1IEXCHDR-exbed,
SED LIKE J_1IEXCHDR-EXSED ,
CNT TYPE P,
END OF ITAB_EXNUM.
DATA : BEGIN OF ITAB_EXNUM1 OCCURS 0 ,
EXNUM LIKE J_1IEXCHDR-EXNUM ,
EXDAT LIKE J_1IEXCHDR-EXDAT ,
CENVAT LIKE J_1IEXCHDR-EXBED ,
SED LIKE J_1IEXCHDR-EXSED ,
CNT TYPE P,
END OF ITAB_EXNUM1.
DATA: BEGIN OF ITAB_GLT0 OCCURS 0,
RACCT LIKE GLT0-RACCT,
TSLVT LIKE GLT0-TSLVT,
TSL01 LIKE GLT0-TSL01,
TSL02 LIKE GLT0-TSL02,
TSL03 LIKE GLT0-TSL03,
TSL04 LIKE GLT0-TSL04,
TSL05 LIKE GLT0-TSL05,
TSL06 LIKE GLT0-TSL06,
TSL07 LIKE GLT0-TSL07,
TSL08 LIKE GLT0-TSL08,
TSL09 LIKE GLT0-TSL09,
TSL10 LIKE GLT0-TSL10,
TSL11 LIKE GLT0-TSL11,
TSL12 LIKE GLT0-TSL12,
END OF ITAB_GLT0.
DATA : BEGIN OF OPEN_BAL_OCT OCCURS 0,
ECS LIKE J_1IPART2-ECS,
END OF OPEN_BAL_OCT.
DATA : BEGIN OF ITAB_CESSCO OCCURS 0,
ECS LIKE J_1IPART2-ECS,
TRNTYP LIKE J_1IPART2-TRNTYP ,
END OF ITAB_CESSCO.
DATA : MM(2) TYPE C ,
GR_TOTAL_CESS_SEPT LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_OCT LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_NOV LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_DEC LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_JAN LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_FEB LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_MAR LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_APR LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_MAY LIKE J_1IPART2-ECS, " FOR JUNE OPENING BALANCE
GR_TOTAL_CESS_JUN LIKE J_1IPART2-ECS, " FOR JULY OPENING BALANCE
GR_TOTAL_CESS_JUL LIKE J_1IPART2-ECS, " FOR AUGUST OPENINGBALANCE
GR_TOTAL_CESS_AUG LIKE J_1IPART2-ECS, " FOR SEPT OPENING BALANCE
GR_TOTAL_CESS_SEP LIKE J_1IPART2-ECS,
GR_TOTAL_CESS_CO LIKE J_1IPART2-ECS,
CREDIT_ECS LIKE J_1IPART2-ECS,
DEBIT_ECS LIKE J_1IPART2-ECS ,
CREDIT_ECS1 LIKE J_1IPART2-ECS,
DEBIT_ECS1 LIKE J_1IPART2-ECS ,
CREDIT_ECS2 LIKE J_1IPART2-ECS,
DEBIT_ECS2 LIKE J_1IPART2-ECS ,
CREDIT_ECS3 LIKE J_1IPART2-ECS,
DEBIT_ECS3 LIKE J_1IPART2-ECS ,
CREDIT_ECS4 LIKE J_1IPART2-ECS,
DEBIT_ECS4 LIKE J_1IPART2-ECS ,
CREDIT_ECS5 LIKE J_1IPART2-ECS,
DEBIT_ECS5 LIKE J_1IPART2-ECS ,
CREDIT_ECS6 LIKE J_1IPART2-ECS,
DEBIT_ECS6 LIKE J_1IPART2-ECS,
CREDIT_ECS7 LIKE J_1IPART2-ECS, " FOR JUNE OPENING BALANCE
DEBIT_ECS7 LIKE J_1IPART2-ECS,
CREDIT_ECS8 LIKE J_1IPART2-ECS, " FOR JULY OPENING BALANCE
DEBIT_ECS8 LIKE J_1IPART2-ECS,
CREDIT_ECS9 LIKE J_1IPART2-ECS, " FOR AUGUST OPENING BALANCE
DEBIT_ECS9 LIKE J_1IPART2-ECS,
CREDIT_ECS10 LIKE J_1IPART2-ECS, " FOR SEPT OPENING BALANCE
DEBIT_ECS10 LIKE J_1IPART2-ECS,
CREDIT_ECS11 LIKE J_1IPART2-ECS, " FOR OCT OPENING BALANCE
DEBIT_ECS11 LIKE J_1IPART2-ECS,
CREDIT_ECSCO LIKE J_1IPART2-ECS,
DEBIT_ECSCO LIKE J_1IPART2-ECS.
DATA : ITAB_GLT0_1 LIKE ITAB_GLT0 OCCURS 0 WITH HEADER LINE.
SELECT OPTION INTERNAL TABLE DEFINATIONS *
RANGES : R_TRNTYP FOR J_1IPART2-TRNTYP.
R_BUDAT FOR J_1IPART2-BUDAT.
DATA VARIABLES USED *
DATA: V_LIN LIKE SY-TABIX .
DATA : V_OPENING_BED LIKE ITAB_DISPLAY-CENVAT_OPG.
DATA : V_OPENING_SED LIKE ITAB_DISPLAY-SED_OPG.
DATA : OCT_ECS LIKE J_1IPART2-ECS.
DATA : TOTAL_ECS LIKE J_1IPART2-ECS.
DATA : TOTAL_ECS_1 LIKE J_1IPART2-ECS.
DATA : GR_TOTAL_ECS LIKE J_1IPART2-ECS.
DATA : INIT_ECS LIKE J_1IPART2-ECS.
DATA : GR_TOTAL_CREDIT_CESS LIKE J_1IPART2-ECS.
DATA : GR_TOTAL_DEBIT_CESS LIKE J_1IPART2-ECS.
DATA : GR_CLOSE_BAL_CESS LIKE J_1IPART2-ECS.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME.
PARAMETERs : P_WERKS LIKE J_1IEXCDTL-WERKS MEMORY ID WRK.
SELECT-OPTIONS : S_BUDAT FOR J_1IPART2-BUDAT,
S_REGTYP FOR J_1IPART2-REGTYP.
SELECTION-SCREEN END OF BLOCK BLK1 .
*RANGES R_BUDAT FOR J_1IPART2-BUDAT.
EVENT ----> TOP OF PAGE *
TOP-OF-PAGE.
PERFORM F_003_TOPI_PEHNAO.
EVENT ----> AT SELECTION SCREEN *
*t selection-screen.
perform f_006_check_karo.
EVENT ----> START OF SELECTION *
START-OF-SELECTION.
PERFORM F_001_SERIAL_NOS_UTHAO.
PERFORM F_002_DISPLAY_TABLE_BHARO.
PERFORM F_005_CREDIT_SUBTOTAL.
EVENT ----> END OF SELECTION *
END-OF-SELECTION.
PERFORM F_004_DIKHAO.
*& Form F_001_SERIAL_NOS_UTHAO
text
--> p1 text
<-- p2 text
FORM F_001_SERIAL_NOS_UTHAO.
PERFORM F_002_TRNTYP_CHUNO.
DATA : BEGIN OF OPEN_BAL_OCT OCCURS 0,
ECS LIKE J_1IPART2-ECS,
TOTAL_ECS LIKE J_1IPART2-ECS,
END OF OPEN_BAL_OCT.
DATA : LOWMM(2) TYPE N.
DATA : LOWYR(4) TYPE N.
DATA : LOWDT(2) TYPE N.
DATA : L1 LIKE J_1IPART2-BUDAT.
DATA : L2 LIKE J_1IPART2-BUDAT.
LOWMM = S_BUDAT-LOW+4(2).
IF LOWMM = '01'.
LOWMM = '12'.
ELSE.
LOWMM = LOWMM - 1.
ENDIF.
IF LOWMM = '12'.
LOWYR = S_BUDAT-LOW+0(4) - 1.
ELSE.
LOWYR = S_BUDAT-LOW+0(4).
ENDIF.
LOWDT = S_BUDAT-LOW+6(2).
CONCATENATE LOWYR LOWMM LOWDT INTO L1.
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = L1
IMPORTING
LAST_DAY_OF_MONTH = L2
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
RANGES CO_BUDAT FOR J_1IPART2-BUDAT.
IF P_WERKS = '1000'.
CO_BUDAT-LOW = '20041001'.
ELSEIF P_WERKS = '3000'.
CO_BUDAT-LOW = '20041201'.
ELSEIF P_WERKS = '4000'.
CO_BUDAT-LOW = '20041201'.
ELSEIF P_WERKS = '2000'.
CO_BUDAT-LOW = '20041201'.
ELSEIF P_WERKS = '5000'.
CO_BUDAT-LOW = '20041201'.
ENDIF.
CO_BUDAT-HIGH = L2.
CO_BUDAT-SIGN = 'I'.
CO_BUDAT-OPTION = 'BT'.
APPEND CO_BUDAT.
CLEAR CO_BUDAT.
SELECT J_1IEXCDTL1RG23ASER J_1IEXCDTL1RG23CSER
J_1IPART21BUDAT J_1IPART21TRNTYP
J_1IEXCHDR1EXNUM J_1IEXCHDR1EXDAT J_1IEXCDTL1~EXBED
J_1IEXCDTL1EXSED J_1IEXCHDR1CVDIND J_1IEXCDTL1~RDOC3
J_1IPART21SERIALNO J_1IPART21EXBED J_1IPART21~EXSED
J_1IPART21~ECS
INTO TABLE ITAB_EXCISE1 FROM
( J_1IPART2 AS J_1IPART21 INNER JOIN J_1IEXCHDR AS J_1IEXCHDR1 ON
J_1IPART21TRNTYP EQ J_1IEXCHDR1TRNTYP AND
J_1IPART21DOCYR EQ J_1IEXCHDR1DOCYR AND
J_1IPART21DOCNO EQ J_1IEXCHDR1DOCNO )
LEFT OUTER JOIN J_1IEXCDTL AS J_1IEXCDTL1 ON
J_1IPART21TRNTYP EQ J_1IEXCDTL1TRNTYP AND
J_1IPART21DOCYR EQ J_1IEXCDTL1DOCYR AND
J_1IPART21DOCNO EQ J_1IEXCDTL1DOCNO
WHERE J_1IPART21~REGTYP IN S_REGTYP AND
J_1IPART21~BUDAT IN S_BUDAT AND
J_1IEXCHDR1~WERKS EQ P_WERKS AND
J_1IEXCHDR1~STATUS NE 'D'.
IF P_WERKS = '1000'.
SELECT ECS TRNTYP FROM J_1IPART2 INTO TABLE ITAB_CESSCO WHERE
EXGRP EQ '01' AND
REGTYP = 'A' AND
BUDAT IN CO_BUDAT.
ELSEIF P_WERKS = '2000'.
SELECT ECS TRNTYP FROM J_1IPART2 INTO TABLE ITAB_CESSCO WHERE
EXGRP EQ '81' AND
REGTYP = 'A' AND
BUDAT IN CO_BUDAT.
ELSEIF P_WERKS = '3000'.
SELECT ECS TRNTYP FROM J_1IPART2 INTO TABLE ITAB_CESSCO WHERE
EXGRP EQ '31' AND
REGTYP = 'A' AND
BUDAT IN CO_BUDAT.
ELSEIF P_WERKS = '4000'.
SELECT ECS TRNTYP FROM J_1IPART2 INTO TABLE ITAB_CESSCO WHERE
EXGRP EQ '41' AND
REGTYP = 'A' AND
BUDAT IN CO_BUDAT.
ELSEIF P_WERKS = '5000'.
SELECT ECS TRNTYP FROM J_1IPART2 INTO TABLE ITAB_CESSCO WHERE
EXGRP EQ '55' AND
REGTYP = 'A' AND
BUDAT IN CO_BUDAT.
ENDIF.
LOOP AT ITAB_CESSCO.
CASE ITAB_CESSCO-TRNTYP.
WHEN 'GRPO' OR 'DIEX' OR 'EWPO'.
CREDIT_ECSCO = CREDIT_ECSCO + ITAB_CESSCO-ECS.
WHEN 'MRDY'.
DEBIT_ECSCO = DEBIT_ECSCO + ITAB_CESSCO-ECS.
ENDCASE.
ENDLOOP.
MM = S_BUDAT-LOW+4(2).
GR_TOTAL_CESS_CO = CREDIT_ECSCO - DEBIT_ECSCO.
LOOP AT ITAB_EXCISE1.
ITAB_EXCISE1-OCT_ECS = OCT_ECS.
MODIFY ITAB_EXCISE1.
ENDLOOP.
DELETE ITAB_EXCISE1 WHERE NOT TRNTYP IN R_TRNTYP .
SORT ITAB_EXCISE1 BY SERIALNO BUDAT.
DELETE ADJACENT DUPLICATES FROM ITAB_EXCISE1 COMPARING SERIALNO
BUDAT
SERIALNO1
EXBED1.
APPEND LINES OF ITAB_EXCISE1 TO ITAB_EXCISE2.
DELETE ITAB_EXCISE2 WHERE NOT SERIALNO IS INITIAL.
DELETE ITAB_EXCISE1 WHERE SERIALNO IS INITIAL.
SORT ITAB_EXCISE2 BY SERIALNO BUDAT SERIALNO1 EXBED1.
DELETE ADJACENT DUPLICATES FROM ITAB_EXCISE2 COMPARING SERIALNO
BUDAT
SERIALNO1
EXBED1.
APPEND LINES OF ITAB_EXCISE2 TO ITAB_EXCISE1.
SORT ITAB_EXCISE1 BY SERIALNO BUDAT.
LOOP AT ITAB_EXCISE1.
MOVE-CORRESPONDING ITAB_EXCISE1 TO ITAB_EXCISE .
IF ITAB_EXCISE1-SERIALNO IS INITIAL.
MOVE : ITAB_EXCISE1-SERIALNO1 TO ITAB_EXCISE-SERIALNO.
MOVE : ITAB_EXCISE1-EXBED1 TO ITAB_EXCISE-EXBED.
MOVE : ITAB_EXCISE1-EXSED1 TO ITAB_EXCISE-EXSED.
MOVE : ITAB_EXCISE1-OCT_ECS TO ITAB_EXCISE-OCT_ECS.
MOVE : ITAB_EXCISE1-ECS TO ITAB_EXCISE-ECS.
ENDIF.
COLLECT ITAB_EXCISE .
ENDLOOP.
CLEAR ITAB_EXCISE1.REFRESH ITAB_EXCISE1.FREE ITAB_EXCISE1.
DELETE ADJACENT DUPLICATES FROM ITAB_EXCISE COMPARING SERIALNO.
DESCRIBE TABLE ITAB_EXCISE LINES V_LIN.
IF V_LIN LE 0.
MESSAGE E000(8I) WITH 'No Records Found'.
ENDIF.
PERFORM F_005_DIEX_DTL_SE_UTHAO.
ENDFORM. " F_001_SERIAL_NOS_UTHAO
*& Form F_002_TRNTYP_CHUNO
text
--> p1 text
<-- p2 text
FORM F_002_TRNTYP_CHUNO.
MOVE : 'I' TO R_TRNTYP-SIGN.
MOVE : 'EQ' TO R_TRNTYP-OPTION.
MOVE : 'GRPO' TO R_TRNTYP-LOW.
APPEND R_TRNTYP.
MOVE : 'DIEX' TO R_TRNTYP-LOW.
APPEND R_TRNTYP.
MOVE : 'MRDY' TO R_TRNTYP-LOW.
APPEND R_TRNTYP.
MOVE : 'EWPO' TO R_TRNTYP-LOW.
APPEND R_TRNTYP.
ENDFORM. " F_002_TRNTYP_CHUNO
*& Form F_002_DISPLAY_TABLE_BHARO
text
--> p1 text
<-- p2 text
FORM F_002_DISPLAY_TABLE_BHARO.
DATA : V_CNT TYPE I.
DATA : V_PREV_EXDAT LIKE J_1IEXCHDR-EXDAT ,
V_PREV_EXNUM LIKE J_1IEXCHDR-EXNUM .
DATA : V_DATE LIKE SY-DATUM.
DATA : V_YYYY(4) , V_MM(2) , V_DD(2).
PERFORM F_006_KHOL_BUND.
SORT ITAB_EXCISE BY SERIALNO.
LOOP AT ITAB_EXCISE.
MOVE : ITAB_EXCISE-SERIALNO TO ITAB_DISPLAY-SERIALNO.
MOVE : ITAB_EXCISE-BUDAT TO ITAB_DISPLAY-BUDAT.
MOVE : V_OPENING_BED TO ITAB_DISPLAY-CENVAT_OPG.
MOVE : V_OPENING_SED TO ITAB_DISPLAY-SED_OPG.
MOVE : ITAB_EXCISE-OCT_ECS TO ITAB_DISPLAY-OCT_ECS.
CASE ITAB_EXCISE-TRNTYP.
WHEN 'GRPO' OR 'DIEX' OR 'EWPO'.
To pick up RDOC3 as date for transaction type DIEX
IF ITAB_EXCISE-TRNTYP EQ 'DIEX'.
IF ITAB_EXCISE-RDOC3 CA '.'.
SPLIT ITAB_EXCISE-RDOC3 AT '.' INTO V_DD V_MM V_YYYY.
CONCATENATE V_YYYY V_MM V_DD INTO ITAB_DISPLAY-EXDAT_CR.
ELSE.
CONCATENATE ITAB_EXCISE-RDOC34(4) ITAB_EXCISE-RDOC32(2)
ITAB_EXCISE-RDOC3+0(2) INTO ITAB_DISPLAY-EXDAT_CR
ENDIF.
ELSE.
MOVE : ITAB_EXCISE-EXDAT TO ITAB_DISPLAY-EXDAT_CR.
ENDIF.
MOVE : ITAB_EXCISE-EXNUM TO ITAB_DISPLAY-EXNUM_CR.
Checking for Addl Duty of customs
IF ITAB_EXCISE-CVDIND EQ 'X'.
MOVE : ITAB_EXCISE-EXBED TO ITAB_DISPLAY-ADDL_DTY.
ELSE.
MOVE : ITAB_EXCISE-EXBED TO ITAB_DISPLAY-CENVAT_CR.
ENDIF.
MOVE : ITAB_EXCISE-EXSED TO ITAB_DISPLAY-SED_CR.
MOVE : ITAB_EXCISE-ECS TO ITAB_DISPLAY-ECS.
Getting the count of EXNUM
IF V_PREV_EXDAT EQ ITAB_EXCISE-EXDAT AND
V_PREV_EXNUM EQ ITAB_EXCISE-EXNUM.
V_CNT = V_CNT + 1.
ELSE.
V_CNT = 1.
ENDIF.
MOVE : V_CNT TO ITAB_DISPLAY-CNT.
MOVE : ITAB_EXCISE-EXNUM TO V_PREV_EXNUM.
MOVE : ITAB_EXCISE-EXDAT TO V_PREV_EXDAT.
Debits
WHEN 'MRDY'.
MOVE : ITAB_EXCISE-EXNUM TO ITAB_DISPLAY-EXNUM_DB.
MOVE : ITAB_EXCISE-EXDAT TO ITAB_DISPLAY-EXDAT_DB.
MOVE : ITAB_EXCISE-EXBED TO ITAB_DISPLAY-CENVAT_DB.
MOVE : ITAB_EXCISE-EXSED TO ITAB_DISPLAY-SED_DB.
MOVE : ITAB_EXCISE-ECS TO ITAB_DISPLAY-ECS1.
ENDCASE.
Total Credits
ITAB_DISPLAY-TOT_CENVAT_CR = ITAB_DISPLAY-CENVAT_OPG +
ITAB_DISPLAY-CENVAT_CR +
ITAB_DISPLAY-ADDL_DTY .
ITAB_DISPLAY-TOT_SED_CR = ITAB_DISPLAY-SED_OPG +
ITAB_DISPLAY-SED_CR .
Closing Balance
ITAB_DISPLAY-CENVAT_CLS = ITAB_DISPLAY-TOT_CENVAT_CR -
ITAB_DISPLAY-CENVAT_DB.
ITAB_DISPLAY-SED_CLS = ITAB_DISPLAY-TOT_SED_CR -
ITAB_DISPLAY-SED_DB.
APPEND ITAB_DISPLAY.
MOVE : ITAB_DISPLAY-CENVAT_CLS TO V_OPENING_BED.
MOVE : ITAB_DISPLAY-SED_CLS TO V_OPENING_SED.
CLEAR : ITAB_DISPLAY .
ENDLOOP.
ENDFORM. " F_002_DISPLAY_TABLE_BHARO
*& Form F_003_TOPI_PEHNAO
text
--> p1 text
<-- p2 text
FORM F_003_TOPI_PEHNAO.
WRITE:/70 'CENVAT CREDIT LEDGER FOR PERIOD:' , (12) S_BUDAT-LOW ,
'to' , (12) S_BUDAT-HIGH , 180 'Page :' , SY-PAGNO .
SKIP 3.
WRITE :/25(30) 'OPENING BALANCE' CENTERED ,
66(50) 'CREDIT' CENTERED ,
118(28) 'CREDIT SUBTOTAL' CENTERED ,
150(28) 'TOTAL CREDIT' CENTERED ,
182(36) 'DEBIT' CENTERED ,
225(28) 'BALANCE OF CREDIT' CENTERED .
WRITE:/1 TEXT-001 ,
12 TEXT-002 ,
24(12) TEXT-003 CENTERED,
40(12) TEXT-004 CENTERED,
56 TEXT-005 ,
66(12) TEXT-003 CENTERED,
81(12) TEXT-006 CENTERED,
102(12) TEXT-004 CENTERED,
118(12) TEXT-003 CENTERED,
134(12) TEXT-004 CENTERED,
150(12) TEXT-003 CENTERED,
166(12) TEXT-004 CENTERED,
182 TEXT-007 , "Doc no
194(12) TEXT-003 CENTERED,
210(12) TEXT-004 CENTERED,
225(12) TEXT-003 CENTERED,
240(12) TEXT-004 CENTERED. "(255)
WRITE:/56 TEXT-008 , 81 TEXT-009 CENTERED
, 182 TEXT-002.
WRITE:/56 TEXT-002 , 81 TEXT-010 CENTERED .
WRITE:/1(11) '1' CENTERED ,
12(11) '2' CENTERED ,
24(12) '3' CENTERED ,
40(12) '4' CENTERED ,
55(11) '5' CENTERED ,
66(12) '8a' CENTERED ,
81(12) '8b' CENTERED ,
102(12) '8c' CENTERED ,
150(12) '9' CENTERED ,
166(12) '10' CENTERED ,
182(11) '11' CENTERED , "Doc no
194(12) '12a' CENTERED ,
210(12) '12B' CENTERED ,
225(12) '13' CENTERED ,
240(12) '14' CENTERED . "(255)
WRITE :/
ENDFORM. " F_003_TOPI_PEHNAO
*& Form F_004_DIKHAO
text
--> p1 text
<-- p2 text
FORM F_004_DIKHAO.
DATA : V_FIRST , V_PREV_EXNUM LIKE J_1IEXCHDR-EXNUM .
DATA : V_PREV_EXDAT LIKE J_1IEXCHDR-EXDAT , V_CNT TYPE I .
SORT ITAB_DISPLAY BY SERIALNO BUDAT EXNUM_CR.
LOOP AT ITAB_DISPLAY.
IF SY-TABIX = 1.
TOTAL_ECS = GR_TOTAL_CESS_CO .
TOTAL_ECS_1 = GR_TOTAL_CESS_CO .
ENDIF.
WRITE:/1 ITAB_DISPLAY-SERIALNO ,
12 ITAB_DISPLAY-BUDAT ,
24(15) ITAB_DISPLAY-CENVAT_OPG .
WRITE: 40(14) TOTAL_ECS.
IF NOT ITAB_DISPLAY-EXNUM_CR IS INITIAL.
WRITE : 55 ITAB_DISPLAY-EXNUM_CR ,
66(15) ITAB_DISPLAY-CENVAT_CR ,
82(14) ITAB_DISPLAY-ADDL_DTY .
---------------------INCLUDING CESS CREDIT VALUE---------
IF NOT ITAB_DISPLAY-ECS IS INITIAL.
WRITE : 102(14) ITAB_DISPLAY-ECS.
ENDIF.
READ TABLE ITAB_EXNUM1 WITH KEY EXNUM = ITAB_DISPLAY-EXNUM_CR
EXDAT = ITAB_DISPLAY-EXDAT_CR
CNT = ITAB_DISPLAY-CNT .
IF SY-SUBRC EQ 0.
WRITE : 118(15) ITAB_EXNUM1-CENVAT.
IF NOT ITAB_EXNUM1-SED IS INITIAL.
WRITE : 134(14) ITAB_EXNUM1-SED.
ENDIF.
ENDIF.
ENDIF.
WRITE : 150(15) ITAB_DISPLAY-TOT_CENVAT_CR.
IF NOT ITAB_DISPLAY-TOT_SED_CR IS INITIAL.
WRITE : 166(14) ITAB_DISPLAY-TOT_SED_CR.
ENDIF.
WRITE : 166(14) TOTAL_ECS.
IF NOT ITAB_DISPLAY-EXNUM_DB IS INITIAL.
WRITE : 182 ITAB_DISPLAY-EXNUM_DB ,
194(15) ITAB_DISPLAY-CENVAT_DB .
*--GETTING CESS VALUE FOR DEBIT--
IF NOT ITAB_DISPLAY-ECS1 IS INITIAL.
WRITE : 210(14) ITAB_DISPLAY-ECS1.
ENDIF.
ENDIF.
WRITE : 225(15) ITAB_DISPLAY-CENVAT_CLS.
RECENT CHANGES -
IF NOT ITAB_DISPLAY-ECS IS INITIAL.
TOTAL_ECS = ITAB_DISPLAY-ECS + TOTAL_ECS.
ENDIF.
IF NOT ITAB_DISPLAY-ECS1 IS INITIAL.
TOTAL_ECS = TOTAL_ECS - ITAB_DISPLAY-ECS1 .
ENDIF.
WRITE : 240(13) TOTAL_ECS.
RECENT CHANGES -
IF NOT ITAB_DISPLAY-EXNUM_CR IS INITIAL.
WRITE :/55 ITAB_DISPLAY-EXDAT_CR.
ENDIF.
IF NOT ITAB_DISPLAY-EXNUM_DB IS INITIAL.
WRITE :/182 ITAB_DISPLAY-EXDAT_DB.
ENDIF.
GR_TOTAL_ECS = GR_TOTAL_ECS + TOTAL_ECS.
COMPUTE GR_TOTAL_CREDIT_CESS = GR_TOTAL_CREDIT_CESS +
ITAB_DISPLAY-ECS .
COMPUTE GR_TOTAL_DEBIT_CESS = GR_TOTAL_DEBIT_CESS +
ITAB_DISPLAY-ECS1 .
COMPUTE GR_CLOSE_BAL_CESS = ( TOTAL_ECS_1 + GR_TOTAL_CREDIT_CESS )
- GR_TOTAL_DEBIT_CESS.
AT LAST.
IF NOT ITAB_DISPLAY-ECS IS INITIAL.
TOTAL_ECS = ITAB_DISPLAY-ECS + TOTAL_ECS.
ENDIF.
IF NOT ITAB_DISPLAY-ECS1 IS INITIAL.
TOTAL_ECS = TOTAL_ECS - ITAB_DISPLAY-ECS1 .
ENDIF.
WRITE:/(255) SY-ULINE.
WRITE:/212(12) GR_TOTAL_DEBIT_CESS.
SUM.
WRITE:/(255) SY-ULINE.
WRITE:/40(12) GR_TOTAL_ECS ,
WRITE: 66 ITAB_DISPLAY-CENVAT_CR ,
82 ITAB_DISPLAY-ADDL_DTY ,
102 ITAB_DISPLAY-SED_CR ,
102(12) GR_TOTAL_CREDIT_CESS,
168(12) GR_TOTAL_CREDIT_CESS,
194 ITAB_DISPLAY-CENVAT_DB .
210 ITAB_DISPLAY-SED_DB.
WRITE : 240(13) GR_CLOSE_BAL_CESS.
WRITE:/(255) SY-ULINE.
ENDAT.
MOVE : ITAB_DISPLAY-EXNUM_CR TO V_PREV_EXNUM.
MOVE : ITAB_DISPLAY-EXDAT_CR TO V_PREV_EXDAT.
IF NOT ITAB_DISPLAY-ECS IS INITIAL.
TOTAL_ECS = ITAB_DISPLAY-ECS + total_ecs.
ENDIF.
IF NOT ITAB_DISPLAY-ECS1 IS INITIAL.
TOTAL_ECS = TOTAL_ECS - ITAB_DISPLAY-ECS1 .
ENDIF.
GR_TOTAL_ECS = GR_TOTAL_ECS + TOTAL_ECS.
ENDLOOP.
ENDFORM. " F_004_DIKHAO
*& Form F_005_CREDIT_SUBTOTAL
text
--> p1 text
<-- p2 text
FORM F_005_CREDIT_SUBTOTAL.
DATA : V_CENVAT LIKE J_1IEXCHDR-EXBED , V_SED LIKE J_1IEXCHDR-EXSED.
DATA : V_CNT TYPE I.
LOOP AT ITAB_DISPLAY WHERE EXNUM_CR NE SPACE.
MOVE : ITAB_DISPLAY-EXNUM_CR TO ITAB_EXNUM-EXNUM.
MOVE : ITAB_DISPLAY-EXDAT_CR TO ITAB_EXNUM-EXDAT.
MOVE : ITAB_DISPLAY-CENVAT_CR TO ITAB_EXNUM-CENVAT.
MOVE : ITAB_DISPLAY-ADDL_DTY TO ITAB_EXNUM-ADDL_DTY.
MOVE : ITAB_DISPLAY-SED_CR TO ITAB_EXNUM-SED.
APPEND ITAB_EXNUM.
ENDLOOP.
SORT ITAB_EXNUM BY EXNUM EXDAT.
LOOP AT ITAB_EXNUM.
AT NEW EXDAT.
MOVE : ITAB_EXNUM-EXNUM TO ITAB_EXNUM1-EXNUM.
CLEAR : V_CNT , V_CENVAT , V_SED.
ENDAT.
V_CNT = V_CNT + 1.
V_CENVAT = V_CENVAT + ITAB_EXNUM-CENVAT + ITAB_EXNUM-ADDL_DTY.
V_SED = V_SED + ITAB_EXNUM-SED.
AT END OF EXDAT.
MOVE : ITAB_EXNUM-EXDAT TO ITAB_EXNUM1-EXDAT.
MOVE : V_CENVAT TO ITAB_EXNUM1-CENVAT.
MOVE : V_SED TO ITAB_EXNUM1-SED.
MOVE : V_CNT TO ITAB_EXNUM1-CNT.
APPEND ITAB_EXNUM1.
ENDAT.
ENDLOOP.
DELETE ITAB_EXNUM1 WHERE CNT EQ 1.
ENDFORM. " F_005_CREDIT_SUBTOTAL
*& Form F_006_CHECK_KARO
text
--> p1 text
<-- p2 text
*FORM F_006_CHECK_KARO.
DATA : ITAB_CHECK LIKE ZEXCISE_SED_BED OCCURS 0 WITH HEADER LINE.
SELECT * FROM ZEXCISE_SED_BED INTO TABLE ITAB_CHECK WHERE
ZDATE IN S_BUDAT
DESCRIBE TABLE ITAB_CHECK LINES V_LIN.
IF V_LIN GT 0.
SORT ITAB_CHECK BY ZDATE DESCENDING.
READ TABLE ITAB_CHECK INDEX 1.
MESSAGE E000(8I) WITH 'Please execute the report for date after'
ITAB_CHECK-ZDATE.
ENDIF.
*ENDFORM. " F_006_CHECK_KARO
*& Form F_006_KHOL_BUND
text
--> p1 text
<-- p2 text
FORM F_006_KHOL_BUND.
TABLES : MARD .
DATA : MM LIKE MARD-LFMON , YYYY LIKE MARD-LFGJA.
CALL FUNCTION 'Z_GET_FINANCIAL_YEAR'
EXPORTING
DATE = S_BUDAT-LOW
IMPORTING
F_PERIOD = MM
F_YEAR = YYYY
EXCEPTIONS
OTHERS = 1.
****KANS INSERT
IF P_WERKS EQ '1000'.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000155110' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
COLLECT ITAB_GLT0.
ENDSELECT.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000155130' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
COLLECT ITAB_GLT0_1.
ENDSELECT.
ELSEIF P_WERKS EQ '3000'.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000157110' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
COLLECT ITAB_GLT0.
ENDSELECT.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000157130' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
COLLECT ITAB_GLT0_1.
ENDSELECT.
Begin of corrections
ELSEIF P_WERKS EQ '4000'.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000158110' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
COLLECT ITAB_GLT0.
ENDSELECT.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000158130' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
COLLECT ITAB_GLT0_1.
ENDSELECT.
ELSEIF P_WERKS EQ '2000'.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000156110' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
COLLECT ITAB_GLT0.
ENDSELECT.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000156130' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
COLLECT ITAB_GLT0_1.
ENDSELECT.
ELSEIF P_WERKS EQ '5000'.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000159110' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
COLLECT ITAB_GLT0.
ENDSELECT.
SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
RYEAR EQ YYYY AND
RACCT EQ '0000159130' .
MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
COLLECT ITAB_GLT0_1.
ENDSELECT.
****End of corrections (20.04.2002 for Plant 4000)
ENDIF.
READ TABLE ITAB_GLT0 INDEX 1.
READ TABLE ITAB_GLT0_1 INDEX 1.
CASE MM.
WHEN '01'.
MOVE : ITAB_GLT0-TSLVT TO V_OPENING_BED.
MOVE : ITAB_GLT0_1-TSLVT TO V_OPENING_SED.
WHEN '02'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01.
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01.
WHEN '03'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02.
WHEN '04'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 .
WHEN '05'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 .
WHEN '06'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 .
WHEN '07'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
ITAB_GLT0-TSL06 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
ITAB_GLT0_1-TSL06 .
WHEN '08'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 .
WHEN '09'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
ITAB_GLT0-TSL08 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
ITAB_GLT0_1-TSL08 .
WHEN '10'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
ITAB_GLT0-TSL08 + ITAB_GLT0-TSL09 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
ITAB_GLT0_1-TSL08 + ITAB_GLT0_1-TSL09 .
WHEN '11'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
ITAB_GLT0-TSL08 + ITAB_GLT0-TSL09 +
ITAB_GLT0-TSL10 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
ITAB_GLT0_1-TSL08 + ITAB_GLT0_1-TSL09 +
ITAB_GLT0_1-TSL10 .
WHEN '12'.
V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
ITAB_GLT0-TSL08 + ITAB_GLT0-TSL09 +
ITAB_GLT0-TSL10 + ITAB_GLT0-TSL11 .
V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
ITAB_GLT0_1-TSL08 + ITAB_GLT0_1-TSL09 +
ITAB_GLT0_1-TSL10 + ITAB_GLT0_1-TSL11 .
ENDCASE.
ENDFORM. " F_006_KHOL_BUND
*& Form F_005_DIEX_DTL_SE_UTHAO
text
--> p1 text
<-- p2 text
FORM F_005_DIEX_DTL_SE_UTHAO.
*ppend lines of itab_excise to itab_excise1.
*elete itab_excise where trntyp eq 'DIEX'.
*elete itab_excise1 where trntyp ne 'DIEX'.
ENDFORM. " F_005_DIEX_DTL_SE_UTHAOStar ,
Tell me how u are calc.Opening Balance?
Regards
Prabhu -
EBS Closing balance not matching with opening balance.
Hi,
The Scenario: The first file for EBS is uploaded. The Second file opening balance did not match with the first files closing balance.
As per my understanding the system throws an information message that FB729 that the closing balance did not match with the opening balance. The docuemnts also gets posted
Question: If the bank sends the corrected file after uploading the first error statement how will we update the corrected account statement with appropriate opening balace.
Thanks,
Raja.Hi Taro,
Thanks for your reply. Infact Initially I was of the same opinion that if there is inconsistency in the closing and opening balance SAP would not process the statement. Thanks for your investigation the sysytem is behaving differently for different formats.
The SAP note 947857 only deals with a particular scenario where there is no inconsistency between closing balance and opening balance but the error comes up.
I will try to explain why I am asking about a functionality which updates the opening and closing balances of a statement based on our past experiences:
If we receive a wrong statement with wrong opening balance from the bank it would take us two weeks to convince the bank about the wrong opening balance and subsequently bank sending the corrected account statement. If the FB729 message is an error message then there is no option but to wait till two weeks to upload the next statements.
So I want SAP to upload the wrong statement and the subsequent statements as they come form bank. To correct the opening and closing balances i want to check if there is some statndard functionality which can do this. Rather than Table update as you suggested I would prefer a custom program for this functionality if standard does not allow.
If the difference between closing and opening balance is due to a missing statement then SAP has suggested a note "SAP Note 1025077 - Problem with uploading out-of-sequence BAI2 bank statement" which actually allows the out of sequence statements to be uploaded.
Finally I would prefer the option of the wrong statements to be uploaded into SAP in the order they have come from the bank and subsequent corrections to the statements as approved by the bank.
Thanks,
Raja. -
DIfference in closing and Opening Balance in Cash journal
Dear ALL
in facing problem in cash journal
in my cash journal closing balance showing Rs.2,10,200:00 04/12/2006
where as opening balance is showing Rs.2,10,100:00 on 05/12/2006
what could be the problem ?
can any one Explain
Regards,
choudaryPlease refer SAP note no.377853
Maybe you are looking for
-
How do you import audio books so they are like the ones you buy from itunes
how do you import audio books so they are like the ones you buy from itunes?
-
Scale selection to document height, and center on width+height of page
Hi there I've got little experince with ID-scripting. Can anyone help me out here? It should be really simple What I'm doing now is pasting my graphics and then check the doc height in the 'Document Setup' and type the doc height in mm in the scale-h
-
Snow Leopard not working after installation
After successful installation of Snow Leopard on a new internal hard drive (connected through IDE to SATA adapter) in my Macbook (late 2006), it is not working. No icon is clickable, only cursor can move. Please help!
-
Reading texts out in blue tooth
I am a pretty smart girl and I THINK I have tried everything with this phone but I cannot get it to read my text messages out loud in my blue tooth. Got a new Jabra Clear bluetooth and it plays music from my phone beautifully. BUT I cannot get it to
-
I am running Lion on iMAC witht he latest version. I have browsed through most of the post and try everything but still getting the follwoing error: The network backup disk does not support the required AFP features. Open Time Machine preferences to