Askb and afab
hi,
1) AFAB makes the postings for all depreciations areas. since it is posting for all area why still need ASKB?
2) ASKB is to post assets periodically in General Ledger. those asset posting in GL is 2 will be posted via ASKB.
Why not post realtime?
3) posting to GL is to post depreciation value to GL? if yes, why there is askb as afab already can do the posting.
thanks
hi,
there are as many depreciation areas, based on clients requirement and also there is country specific requirements.
Foe each depcn area u specify how depcn will be posted and according the use of AFAB and ASKB will be used.
Both are different in functionality wise(one is OLRT and other works as Batch)
Regards,
Atul
Similar Messages
-
No booking after running ASKB and AFAB
Hello dear all,
After launch the transaction ASKB and AFAB the system has not make any booking in area 07.
Anyone can tell me why ?
Thank you in advance
TarekHi,
please check Area 07 config. Is periodic postings allowed or no posting is set?
Regards,
Sridevi -
Hello,
i found a thread where this is explained but still i don't understand in what order iam using this two transactions.
Difference Between AFAB and ASKB
Do i first start AFAB to calculate the depreciations and post them in real time into GL and start then ASKB to post the remaining values (periodical) into the gl
or do i first start ASKB and then start AFAB because the depreciation posting run needs the (periodical )values from ASKB....
iam a bit confused.
Thanks for any helpHi,
both programs are absolutely independent from each other. One program posts periodic APC values, and the other posts periodic depreciation.
You can run ASKB on a daily basis, or whatever periodicity you like. Whereas you usually start the depreciation run once at the end of a posting period.
There is no overlap in between the reports.
Regards,
Markus -
Hi,
When I am using ABUMN to tranfer one asset to another asset ordinary depreciation in value adjustments column is updated in 01 depreciation area. I need to update in the 10 depreciation area as well. But its not doing that...Please let me know is this SAP standard behaviour?? Any inputs are highly appreciated...There is an OSS Note that lists all the ABUMN variants, and explains how they work.
You may not have set SAP to transfer from/to all depreciation areas, as someone hinted in answer.
Another thing you must check is the ODep Start dates on sender and receiver, for both your DAs.
View this on the Deprec areas tab, or on the Parameters tabs.
Since both areas show on the Deprec areas tab, I recommend it for easier viewing.
To a certain degree, the APC is truly transferred - but an asset transfer is not really a transfer when it comes to accumulated depreciation. This is said because the accumulated depreciation is actually recalculated for both assets after the ABUMN posts. So run ASKB and AFAB.
Remember that an AFAB Repeat may be necessary if the Planning run has already been processed for the month of transfer, yet before the transfer posted.
It will look like an accumulated depreciation transfer if the ODep Starts are the same for all 4 settings.
This may not be your issue, but is worth a glance. Regards -
Hi,
Please suggest to me for below given issue.
As per business requirement, we need open new FY2012 and close the old FY2010 and we trying to close the FY2010 in AJAB but system through the error message as u201CTransactions not complete ly periodically posted u201C( message no : AU075),
As per this error message system show the procedure as
1.Check which depreciation areas are supposed to post APC values periodically to Financial Accounting according to their Customizing definitions (indicator: "Post assets periodically in General Ledger")
See the Define How Depreciation Areas Post to General Ledger IMG activity.
2.Start the program for posting APC values. In the Asset Accounting main menu, choose Periodic processing. Start this program in update mode, regardless of whether or not documents are displayed in test mode, or if a message appears stating that there are no documents to be posted.
Start APC Posting Program
As per second step we run the periodic asset postings in AKSB, while running this postings system through the error message as u201CPosting periods 2010 not openu201D and we suggest to business need to open 2010 periods, they are asking once we reopen that period FY 2010 what about FY 2010 result values.
So please suggest to me on urgent basis.
Many thanks in advance for your valuable suggestionsIt seems that if you reopen FY10 and run ASKB in live mode you will get postings - and hopefully the postings will net to zero but probably not. Running the test mode should tell you what the outcome would be, accounting wise.
If you do this, chances are that you would also need to rerun AFAR and AFAB depending on whatever comes through ASKB to completed asset records. Again, analyzing ASKB test mode data will tell you whether a depreciation REPEAT would be needed.
If your FY10 g/l has already been audited, or FY11 has already been audited, then you might consider booking journal entry in FY11 (that will reverse in FY12) moving the accounting impact to a year that has not been audited yet. This type of entry is usually referred to as an adjusting entry that defers accounting recognition. I just call it a deferral which is the opposite of an accrual. Hopefully the magnitude of the accounting is not material in the eyes of your auditor.
1) add ASKB to your end of year routines
2) you forgot to close FY10 until you were reminded when you tried to open FY12, as only two fiscal years can be open at same time
Regards -
Account 'Contra account: Acquisition value' could not be found in ASKB
Hi SAP experts
1. First we have created new asset with reference old assets in As01
2. After that we have transfer all asset from old to new asset with in the company code in the ABUMN T.code in the month on 01.04.2010
3. After that we have run the deprecation for April, May and Jun. Up to this, there were no problem those periods
(now here we are following first we are running the ASKB and after that we are running AFAB)
4. now we are facing the new issue for July month while running ASKB Like Below
Account 'Contra account: Acquisition value' could not be found for Deprecation area 52
Message no. AU133
Diagnosis: When creating the accounting document, the system could not find account
'Contra account: Acquisition value' for company code 0216.
System Response
Procedure: Enter this account in the account determination for Asset Accounting.
Here in Error log it showing three account determinations 100002,100010 and 100040
5.As per my knowledge we can maintain the G/L account for account determination in the T.code AO90 for deprecation area wise but why the new error massage has come into picture.
Please let me know if you require more information about the issue
Can you any body please give me suggestion based on the issue and
Thanks and Regards
sudharshana vamsiHi Sridevi
Thanks for your suggestions
if i will maintain G/L account for account determination in the T.code AO90 for deprecation area wise, is there any effects for another company codes and balance sheet wise
And also we are running depreciation since 2003, now suddenly it is coming into picture in the month of July. and may i know the reason. Are there any new patches are added in sap
And also if you donu2019t mind can you tell me what are purpose to maintain the Contra G/L account in the AO90.
Thanks and Regards
sudharshana vamsi -
Asset accounting and Inventory management.
Hi gurus, I need your advice.
We want to control our inventory and our fixed assets in order to be able to match the amounts between both modules. The main difficulty is that not all the items we register into the inventory module generate a fixed asset (we have sixty thousand inventory items and seven thousand fixed assets).
The way I have thought to solve it is the next: currently we have and asset class per Fixed Asset GL Account. I want to create two asset classes per GL Account, one for the fixed assets that are into the Inventory Module and other for the Fixed Assets that aren´t in the Inventory Module.
Do you think it is ok or do you have a better/easier solution??
Many thanks in advance.
BR//Alberto.Since you mention there is an inventory module, and there is a fixed assets module - consider that the two are very different.
Inventory is merchandise for sale. When its costs are recognized, those costs are recorded as costs of sale or costs of goods sold. Inventory can be purchased or it can be constructed, but when we sell the items to customers we recognize both the revenue and the costs at the same time. The gross margin is the net gross profit or loss. Inventory has no depreciation.
Fixed assets are capital assets used by the organization to do the things the firm is in the business of doing. The tools used to build/construct inventory are capital assets (used in more than one year). Fixed assets will not be sold as a main purpose of the organization. Only inventory is sold as a main purpose of the organization to earn a profit. Since fixed assets benefit the organization for more than one year, we spread the costs over all those years in which revenue is generated by the fixed asset use. This is the matching principle to recognize costs when the revenue is recognized. To achieve this, we use the AFAR and AFAB depreciation process to spread that APC value across all periods that will benefit from the "tools."
I think you are already using MM for your inventory module. There can be different classes of inventory just as there can be different classes of fixed assets in SAP. Each class has its own reconciling account. Each is its own subsidiary ledger/listing of items that sum to the balance in the reconciling account. Subledger transactions will automatically update the reconciling account balances for the class - whether we are talking fixed assets or inventory.
I hope this can help, since it sounded like the terminology was confusing. Neither SAP or accounting is simple. Regards -
Asset Accounting and GL not in sync
Hi Gurus
I have created a Transaction type 110 copy and limit it local ledger. I posted an acquisition with the custom transaction code and it worked fine. I have used used AS01 and created an asset with value 100.It is fine and it is showing in all ledger.Now I posted the additional 10 dollar through custom transaction type 810 ( copy of 110 ) and posted .In asset explorer it is showing that additional posting and balance but when I run GL balance the additional addition is not appearing. Let me clarify.
1.APC 100$ shows in US Gap and Local correctly. ( AS01 ).
2.Addition of 10$ using ABZE with transaction type 810 ( 110 custom) . Successful and in asset explorer showing correctly as 110 in only local ledger not in US gap ,which is what I want.
3.In GL FBL3N it is showing $100 in both US and local ledger. I am expecting 110 in Non leading ledger.
What I am missing ? Is I have to run some t-code to post asset balance to GL ?
Thanks
SatyaI tried to run ASKB and found this error.
"When creating the accounting document, the system could not find account 'Capital. difference/Non-operatng expense' in depreciation area 35 for company code xx19. "
Depreciation area 35 is our delta dep area and I am trying to add the value to existing asset. It worked in Asset ledger but not reflected in GL.
Can some give me lead how to fix this error ?
Thanks
Satya -
MR11 and FAGLL03 not in balance
Good Morning Gurus-
Should GR/IR account via MR11 be in balance to FAGGLL03 G/L GR/IR for the same period? What scenario would result these be different? We have a minor difference.
Thank you.I tried to run ASKB and found this error.
"When creating the accounting document, the system could not find account 'Capital. difference/Non-operatng expense' in depreciation area 35 for company code xx19. "
Depreciation area 35 is our delta dep area and I am trying to add the value to existing asset. It worked in Asset ledger but not reflected in GL.
Can some give me lead how to fix this error ?
Thanks
Satya -
Hello All,
Currently I have depreciation area "31" configured to 4 -Area Posts APC Directly and Depreciation. We have assigned the local ledger to this area. Currently the issue is whenever we have an APC there is double booking to the local ledger. I thought have 31 configred to "4 -Area Posts APC Directly and Depreciation" would solve this issue but the system is asking to run ASKB when I close my asset year.
Any work around to not to have double booking?
Regards,
PremHello Brigtte,
I did set the area based on the parallel valuation for depreciation area:
01 Area 0L Local GAAP -> 1
31 Area 31 IAS 3 CL (local ledger) : Note this is the area I use to revalue for Inflation.
73 Derived area 6 CL (local ledger)
I ran inflation posted the revalued amount; APC is not double booking in my "CL" local ledger anymore.
However I have an error when I close the asset year; asking me to run ASKB.
I ran ASKB and I am getting the below error:
"Error when creating line items using line item schema SAP_200_001...
Message no. AA548
Diagnosis
The system found inconsistencies in the structure of the FI document line items. Line item schema SAP_200_001 does not provide reliable results in relation to posting to the general ledger.
Procedure
Check line item schema SAP_200_001 for this posting transaction. There are two possible causes for the error:
1. A value field was updated on the asset, and this value field is updated to a reconciliation account in FI (for example, an asset balance sheet account, accumulated depreciation or down payments), but there is no line item defined for this value field in the line item schema.
2. The error message can also be caused by incorrect account allocation. In order to find out if you have incorrect account allocations in the account determination for Asset Accounting, carry out a consistency check of the accounts. The consistency check is part of FI-AA Customizing."
I ran the consistencies check for GL account config everything seems fine. Any idea about this issue.
Regards,
Prem
Hi,
If I understand you correctly, you have set up a ledger scenario.
You mentioned that in OADB you have indicator '4' set, which I assume is in the derived area.
However, the derived area should have indicator 5 or 6.
Ensure that you have the correct ledger scenario in place: refer to the standard ledger scenario logic documentation.
A basic configuration of depreciation areas and posting indicators in asset transaction OADB should be:
Posting to G/L Ledger
Area 01 local GAAP 1 -> 0L
Area XX IAS 3 -> 1L (your ledger code)
Area YY (IAS -local GAAP) 6 -> 1L (your ledger code)
Same needs to be done for other ledgers if you have.
Be aware also that according to ledger scenario logic acquisition/transfer/retirement postings in area 01 go to ALL ledgers, independently of the setting in OADB (this is not an error). The difference is posted through the derived area.
I hope this helps.
Best regards,
Brigitte -
Error in ASKB after creating parallel & delta depreciation area
Hi All,
We have APC and depreciation values in Area 1 for an Asset. Now I have created parallel depreciation area 70 and delta depreciation area 90. area 70 posting to parallel ledger. As soon as I created area 90, the following values are showing in AW01N
01 - Dep Area
APC - $45000
Depreciation - 1500
70 - Depr Area
APC - Null
Depreciation - Null
90 - Dep Area
APC - $45000
Depreciation - 1500
So when I run ASKB it gives me an error saying 'Balancing field in Profit center in line item 001 not filled'. The ledger group it is trying to post is the non-leading ledger.
Can you please help.Hi Murali & Vinod,
Thanks for your replies. The document splitting settings are fine. It was the issue corss-system depreciation are settings. The client had activated area 70 for an Asset in one company code, but did not have it in the transferred Asset in the other company code. It was an intercompany transfer. We fixed this activating area 70 and now it is ok.
Now the problem is after I run ASKB, and check ABST2, the reconciliation report shows a line item with
Account : 1XXXXXX (Accum. Depr A/c)
Ledger : 3G (non leading ledger)
Period : 999
2ndLCGL :example 1000
2ndLC in AA: 0
2ndLC Delta : 1000
3rdLCGL :example 1000
3rdLC in AA: 0
3rdLC Delta : 1000
Leading ledger postings reconcile properly. Non leading ledger APC values in all 3 currencies reconcile properly. Only for Depr A/c in non-leading ledger it is not posting to LC2 and LC3.
Any thoughts?
Regards
Panneer -
Can not close company code in asset accounting for prior year in ECC 6.0
Hi,
I have problem with closing one company code in particular for 2007. I have run through the basic steps, however when I run AJAB. I am told to restart the posting run. I restarted the asset posting run ASKB and depreciation rub AFAB. Both finished without error. Again AJAB gives me the same message afterwards. I confirmed with my security team that I have access to close the company code. I ran a trace on the AJAB transaction for company 7600 and received the following:
All these errors repeated about 200 times.
I_ANLN1 incremented to about 215.
(This is about the same number of unposted assets I have on this company code, which i think might have something to do with this.)
First error:
CALL FUNCTION 'VANLA2_READ_RANGE_TRIGGER'
Table V_ANLA_2
SELECT * FROM V_ANLA_2
WHERE BUKRS = GD_ABRA-BUKRS
AND ZUJHR IN R_ZUJHR
AND ANLN1 IN T_R_ANLN1
AND ANLN2 IN T_R_ANLN2
AND ANEQS > 0 This is what causes this step to fail
AND DEAKT = '00000000'
ORDER BY MANDT BUKRS ANLN1 ANLN2.
2nd error
CALL FUNCTION 'VANLA1_READ_RANGE_TRIGGER'
Table : V_ANLA_1
SELECT * FROM V_ANLA_1
WHERE BUKRS = GD_ABRA-BUKRS
AND ZUJHR IN R_ZUJHR
AND ANLN1 IN T_R_ANLN1
AND ANLN2 IN T_R_ANLN2
AND AKTIV = '00000000'
AND ZUJHR <> '0000' This is what causes this step to fail
AND ZUJHR <= '2007'
ORDER BY MANDT BUKRS ANLN1 ANLN2.
3rd error
CALL FUNCTION 'ANEP_READ_MULTIPLE_GJAHR_ALL'
Table: ANEP
SELECT * FROM ANEP INTO TABLE T_ANEP
WHERE BUKRS = I_BUKRS
AND ANLN1 = I_ANLN1 This is what causes this step to fail (000001000000) does not exist on table
AND ANLN2 = I_ANLN2
AND AFABE IN R_AFABE
AND GJAHR BETWEEN I_GJAHR AND I_BISGJAHR
ORDER BY PRIMARY KEY.
4th error
FUNCTION GET_NEXT_ANLV.
My theory is this has something to do with unposted assets, however this has never been an issue with prior version of SAP and is only now emerging with our uprgade to ECC 6.0.
Please help.
AllenHello,
You will get a better response to this type of query in the forum ERP Financials - Asset Accounting.
SAP ERP Financials - Asset Accounting
-Paul -
No posting information for depreciation are 30 US GAAP
Dear expert:
We use parallel accounting with account-base solution(specific accounts + common accounts) for local and US GAAP,our system key configure as following:
OADB:define depreciation area
Area. Name of area Real g/l
01 Book depreciation ticked 1
30(Copy 01) US GAAP depreciation ticked 4
FS00:Create G/L accounts according to AO90,One accounts group set of local FA default accounts,another accounts group set of FA for US GAAP which start with "U" .
AO90: define G/L for depreciation area 01 and 30 seperately with different accounts group set of FA.
finanly use f-90/AFAB/ABAVN.. to post, FI document only has the local FA g/l accounts of depreciation area 01, No information about the US GAAP FA G/L accounts of depreciation area 30.
Please help me out ,thanks.
Best regardsHello John
The indicator of Post to G/L account of depreciation area 30 is "4 area posts APC directly and depreciation",here is APC directly,maybe it shouldn't need to run ASKB,
If the indicator of Post to G/L account is "2 APC and depreciation area on periodic basis**" it should need to run ASKB.
I do not quite understand the function ASKB, and system returns error when I run ASKB as you said:
Error 1
Account F21100001 in company code 1000 cannot be directly posted to
Message no. F5354
Diagnosis
Account "F21100001" in company code "1000" is marked as a reconciliation account for account type "A" and cannot therefore be directly posted to.
System Response
Error
Procedure
Select a different account.
AFAB depreciation can gerenate FI documents correctly with Accumulate depreciation account being recon. account, why cannot be recon. accounts here??
Error 2
Account 'Capital. difference/Non-operatng expense' could not be found for area 60
Message no. AU133
Diagnosis
When creating the accounting document, the system could not find account 'Capital. difference/Non-operatng expense' in depreciation area 60 for company code 1000.
Procedure
Enter this account in the account determination for Asset Accounting.
Edited by: Jason0901 on Aug 3, 2011 4:55 AM -
could the error generated be because of the file?? the code is as follows:
a<u>sset upload</u>
report ZAST_UPL line-size 255.
data: remaining_life_yrs type p,
remaining_life_periods type p,
days type p,
remainder type p,
useful_life type p,
useful_period type p.
include bdcrecx1.
parameters: pfile type rlgrap-filename.
tables: ankb.
*data: pfile1 type string.
TYPES: begin of t_datatab ,
assets_class(10),
c_code(4),
description(50),
add_description(50),
serial(18),
capitalisation(8),
c_centre(10),
plant(4),
asset_location(10),
amount1(13),
amount2(13),
end of t_datatab.
data: begin of t_datatabfinal occurs 0,
assets_class(10),
c_code(4),
description(50),
add_description(50),
serial(18),
capitalisation(8),
c_centre(10),
plant(4),
asset_location(10),
amount1(13),
amount2(13),
end of t_datatabfinal.
data : assets_class1(4) value '0000',
class_asset(8).
data : date_diff type p, earliest type C, timediff type p.
data : a_new type d, b_new type d.
data : capitalisation type string.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab,
wa_datatab TYPE t_datatab.
DATA: wa_record TYPE t_datatab,
it_record TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0.
DATA: itab LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
DATA: gd_currentrow TYPE i.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfile.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'PFILE'
IMPORTING
file_name = pfile.
data: itab like ALSMEX_TABLINE occurs 0 with header line.
*pfile1 = pfile.
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = pfile
I_BEGIN_COL = '1'
I_BEGIN_ROW = '1' "Column headers not required
I_END_COL = '11'
I_END_ROW = '4'
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Sort table by rows and colums
SORT itab BY row col.
Get first row retrieved
READ TABLE itab INDEX 1.
Set first row retrieved to current row
gd_currentrow = itab-row.
LOOP AT itab.
Reset values for next row
IF itab-row NE gd_currentrow.
APPEND wa_datatab TO it_record.
CLEAR wa_datatab.
gd_currentrow = itab-row.
ENDIF.
CASE itab-col.
WHEN '0001'.
wa_datatab-assets_class = itab-value.
WHEN '0002'.
wa_datatab-c_code = itab-value.
WHEN '0003'.
wa_datatab-description = itab-value.
WHEN '0004'.
wa_datatab-add_description = itab-value.
WHEN '0005'.
wa_datatab-serial = itab-value.
WHEN '0006'.
wa_datatab-capitalisation = itab-value.
WHEN '0007'.
wa_datatab-c_centre = itab-value.
WHEN '0008'.
wa_datatab-plant = itab-value.
WHEN '0009'.
wa_datatab-asset_location = itab-value.
WHEN '0010'.
wa_datatab-amount1 = itab-value.
WHEN '0011'.
wa_datatab-amount2 = itab-value.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
APPEND wa_datatab TO it_record.
LOOP AT it_record INTO t_datatabfinal.
APPEND t_datatabfinal.
ENDLOOP.
start-of-selection.
refresh bdcdata.
clear bdcdata.
perform open_group.
Loop at t_datatabfinal.
data: stop(1),
date1(8).
stop = `.`.
concatenate assets_class1 t_datatabfinal-assets_class into class_asset.
concatenate t_datatabfinal-capitalisation(2) stop t_datatabfinal-capitalisation2(2) stop t_datatabfinal-capitalisation6(2) into date1.
select * from ankb where ANLKL = class_asset
and AFABE = '01'
and afasl = 'LINS'.
if sy-subrc = 0 .
useful_life = ankb-NDJAR.
useful_period = ankb-NDPER.
endif.
useful_life = useful_life * 365.
useful_period = useful_period * 30.
endselect.
perform bdc_dynpro using 'SAPLAIST' '0105'.
perform bdc_field using 'BDC_CURSOR'
'ANLA-BUKRS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ANLA-ANLKL' "TOPICK Asset class
t_datatabfinal-assets_class.
'4000'.
perform bdc_field using 'ANLA-BUKRS' "TOPICK Company code
t_datatabfinal-c_code.
'2000'.
perform bdc_dynpro using 'SAPLAIST' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=TAB02'.
perform bdc_field using 'ANLA-TXT50' "TOPICK Asset description
t_datatabfinal-description.
'Compaq Evo D3102'.
perform bdc_field using 'ANLA-TXA50' "TOPICK Additional asset description
t_datatabfinal-add_description.
'Desktop Computer'.
perform bdc_field using 'ANLA-SERNR' "TOPICK Serial number
t_datatabfinal-serial.
'V309LB42A259'.
perform bdc_field using 'RA02S-XHIST'
'X'.
perform bdc_field using 'BDC_CURSOR'
'ANLA-AKTIV'.
perform bdc_field using 'ANLA-AKTIV' "TOPICK Asset capitalization
date1.
'13.10.03'.
perform bdc_dynpro using 'SAPLAIST' '1000'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'ANLZ-KOSTL'.
perform bdc_field using 'ANLZ-KOSTL'
t_datatabfinal-c_centre.
'203000'.
perform bdc_dynpro using 'SAPLAIST' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=ALTD'.
perform bdc_field using 'BDC_CURSOR'
'ANLZ-STORT'.
perform bdc_field using 'ANLZ-GSBER' "TOPICK Business area
t_datatabfinal-bus_area.
'B008'.
perform bdc_field using 'ANLZ-KOSTL' "TOPICK Cost center
t_datatabfinal-c_centre.
'203000'.
perform bdc_field using 'ANLZ-WERKS' "TOPICK Plant
t_datatabfinal-plant.
'2001'.
perform bdc_field using 'ANLZ-STORT' "TOPICK Asset location
t_datatabfinal-asset_location.
'001'.
perform bdc_field using 'ANLZ-FISTL' "TOPICK Funds center
t_datatabfinal-c_centre.
'203000'.
perform bdc_dynpro using 'SAPLALTD' '1100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RALT_DYNP_STRUC-ANBTR01(06)'.
perform bdc_field using 'RALT_DYNP_STRUC-ANBTR01(01)'
t_datatabfinal-amount1.
' 450000'.
perform bdc_field using 'RALT_DYNP_STRUC-ANBTR01(06)'
t_datatabfinal-amount2.
' 25000'.
perform bdc_dynpro using 'SAPLALTD' '1100'.
perform bdc_field using 'BDC_CURSOR'
'ANLA-ANLN1'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_transaction using 'AS91'.
concatenate t_datatabfinal-capitalisation4(4) t_datatabfinal-capitalisation2(2) t_datatabfinal-capitalisation(2) into capitalisation.
a_new = '20070701'. "Date format is YYYYMMDD
b_new = capitalisation. "Date format is YYYYMMDD
CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
EXPORTING
date1 = a_NEW
time1 = '000000'
date2 = b_NEW
time2 = '000000'
IMPORTING
DATEDIFF = date_diff
EXCEPTIONS
INVALID_DATETIME = 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.
***calculation of remaining life in years and periods for the asset***
remaining_life_yrs = ( useful_life - date_diff ) div 365.
remainder = ( useful_life - date_diff ) mod 365.
remaining_life_periods = remainder div 30.
perform bdc_dynpro using 'SAPLAIST' '0100'.
perform bdc_field using 'BDC_CURSOR'
'ANLA-ANLN1'.
perform bdc_field using 'BDC_OKCODE'
'=D190'.
perform bdc_field using 'ANLA-ANLN1'
'40006'.
perform bdc_field using 'ANLA-ANLN2'
'0'.
perform bdc_field using 'ANLA-BUKRS'
t_datatabfinal-c_code.
'2000'.
perform bdc_dynpro using 'SAPLAIST' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_field using 'BDC_CURSOR'
'ANLB-AFABG(01)'.
perform bdc_field using 'ANLB-NDJAR(01)'
remaining_life_yrs.
' 1'.
perform bdc_field using 'ANLB-NDPER(01)'
remaining_life_periods.
' 8'.
perform bdc_field using 'ANLB-AFABG(01)'
'01.07.2007'.
perform bdc_transaction using 'AS92'.
endloop.
perform close_group.Formatting error in file. resolved.
-
ABAP Dump while Changing the Layout fields in Report output - RCOPCA02
Hi,
I Copied the Standard Program RCOPCA02 to ZRCOPCA02. I added two new fields(AUART, AUGRU) in the report output. It is executing correctly with default layout, While Changing the layout for displaying new fields it is dumping.
I am not understanding, What should i do...
Here is the Code.
report ZRCOPCA02 no standard page heading message-id km
line-count (2) line-size 81.
type-pools: slis, ecarc.
DDIC-Tabellen *******************************************************
tables: glpca, "Einzelposten / Ist
glu1, "Übergabestruktur FI-SL-Anzeige
t000,
tka01,
sscrfields,
vbak.
Variablen und int. Tabellen *****************************************
data: l_vbeln like vbak-vbeln,
l_auart like vbak-auart,
l_augru like vbak-augru.
data: afield type slis_fieldcat_alv,
sp_group type slis_sp_group_alv,
t_listheader type slis_t_listheader with header line,
t_layout type slis_layout_alv,
t_fieldcat type slis_t_fieldcat_alv,
t_spec_groups type slis_t_sp_group_alv,
event type slis_alv_event,
t_events type slis_t_event,
g_variant like disvariant,
gx_variant like disvariant,
g_exit(1) type c,
g_save(1) type c,
g_repid like sy-repid,
msgtyp like sy-msgty,
lt_dynpread like dynpread occurs 1 with header line,
ls_rpcak like rpcak, "note 0310592
packsize type i value 1000,
text1(60) type c,
text2(60) type c,
oldkokrs like glpca-kokrs,
oldracct like glpca-racct.
data: whr_size type i value 50,"Maximum of single values per MIC 46a
"charact. in the where-clause of the select-statement
lines type i, "number of lines of range table MIC 46a
cnt_rldnr type i, "Zähler Anzahl selektierter Ledger
cnt_kokrs type i, "Zähler Anzahl selektierter KoReKreise
cnt_poper type i, "Zähler Anzahl selektierter Perioden
cnt_ryear type i, "Zähler Anzahl selektierter GeschJahre
cnt_rvers type i, "Zähler Anzahl selektierter Versionen
cnt_bukrs type i, "Zähler Anzahl selektierter BuKreise
empge like dkobr-empge,
ksl_curr like tka01-pcacur,
hsl_curr like t001-waers,
a_rec like rstirec.
data: begin of dim_data.
include structure rgcdi. "data for dimensions
data: end of dim_data.
data: begin of tab_fields occurs 80,
name like dntab-fieldname, "fields in table i_glpca
end of tab_fields.
data: begin of i_glpca occurs 0.
include structure rpca2.
data: racct_ktext like rpcak-ktext,
psppp like prps-posid,
v_auart like vbak-auart,
v_augru like vbak-augru,
end of i_glpca.
data: rw_subrc like sy-subrc, "Flag: Report-Writer-Schnittstelle
re_subrc like sy-subrc, "Flag: Recherche-Schnittstelle
subrc like sy-subrc.
data: set_id like sethier-setid, "Set-ID "RDI_SETS_4.0
set_class like sethier-setclass, "Setklasse "RDI_SETS_4.0
set_sname like sethier-shortname."Setname (24) "RDI_SETS_4.0
data: authorised(1),
s_message(1),
auth_dbcount like sy-tabix,
Hex-Konstanten für Minimum/Maximum-Werte
begin of hex00,
x1(12) type c,
x2(12) type c,
end of hex00,
begin of hexff,
x1(12) type c,
x2(12) type c,
end of hexff.
ranges rclnt for glpca-rclnt.
field-symbols: type ecarc_glpca_curr.
Selektionsoptionen *************************************************
select-options:
rldnr for glpca-rldnr default '8A' no-display,
rassc for glpca-rassc no-display,
rrcty for glpca-rrcty default 0,
rrcty for glpca-rrcty,
rvers for glpca-rvers default '000',
kokrs for glpca-kokrs memory id cac,
bukrs for glpca-rbukrs memory id buk,
poper for glpca-poper default sy-datlo+4(2),
ryear for glpca-ryear default sy-datlo,
poper for glpca-poper,
ryear for glpca-ryear,
prctr for glpca-rprctr matchcode object prct,
pprctr for glpca-sprctr matchcode object prct,
RACCT FOR GLPCA-RACCT MATCHCODE OBJECT KART, "RD_P30K128304
racct for glpca-racct, "RD_P30K128304
drcrk for glpca-drcrk,
activ for glpca-activ,
rhoart for glpca-rhoart,
rfarea for glpca-rfarea,
stagr for glpca-stagr,
rtcur for glpca-rtcur,
runit for glpca-runit,
versa for glpca-versa no-display,
eprctr for glpca-eprctr no-display,
afabe for glpca-afabe no-display,
rmvct for glpca-rmvct no-display,
hrkft for glpca-hrkft no-display, "note 550972
sbukrs for glpca-sbukrs no-display, "note 550972
shoart for glpca-shoart no-display, "note 550972
sfarea for glpca-sfarea no-display, "note 550972
docct for glpca-docct,
docnr for glpca-docnr,
refdocct for glpca-refdocct,
refdocnr for glpca-refdocnr,
werks for glpca-werks,
repmatnr for glpca-rep_matnr matchcode object pca_shlp_rep_matnr,
rscope for glpca-rscope.
parameters: no_rrint no-display default ' '." skip "MICP40K066037
" report-report-interface
display variant ">>MICP40K039857
selection-screen begin of block 0 with frame title text-e01.
parameters: p_vari like disvariant-variant.
selection-screen comment 47(40) varname for field p_vari.
selection-screen end of block 0.
parameters log_grp(4) type c no-display default 'KE5Z'.
"<<MICP40K039857
ranges: v_racct for glpca-racct,
v_prctr for glpca-rprctr,
v_pprctr for glpca-sprctr.
Tabelle mit Werten aus den Berichts-Set vom Report-Writer *
data begin of val_tab occurs 50.
include structure rgciv.
data end of val_tab.
MICP30K166368
feldkatalog und interface für bb-schnittstelle rw MICP30K166368
MICP30K166368
"MICP30K166368
data begin of bbs_fieldtab occurs 20. "MICP30K166368
include structure rstifields. "MICP30K166368
data end of bbs_fieldtab. "MICP30K166368
archiv
type-pools: rsds.
types: begin of ty_archive_objects,
object like arch_obj-object,
end of ty_archive_objects,
ty_t_archive_objects type ty_archive_objects occurs 2.
constants: lc_set type c value 'X',
lc_report type progname value 'KE5Z',
lc_reporttype type reporttype value 'TR'.
tables: admi_files.
select-options lr_files for admi_files-archiv_key no-display.
parameter: read_db type c default 'X' no-display,
read_ar type c no-display,
arc_obj like arch_obj-object no-display,
read_as type c default 'X' no-display.
data : lt_arch_obj type ty_t_archive_objects with header line,
ls_selections type rsds_frange,
lt_selections type rsds_frange_t,
ls_selopt type rsdsselopt,
lt_glpca_archiv type ecarc_t_glpca_curr.
*********************************************************>>MICP40K039857
INITIALIZATION
initialization.
Diverse Initialisierungen
perform init_vars.
g_repid = sy-repid.
Set default values for record type
rrcty-sign = 'I'.
rrcty-option = 'EQ'.
rrcty-low = '0'.
append rrcty.
rrcty-low = '2'.
append rrcty.
Set default values for period and year (if kokrs or bukrs is known)
get parameter id 'BUK' field bukrs-low.
get parameter id 'CAC' field kokrs-low.
if kokrs-low is initial "get contr. area from company code
and not bukrs-low is initial.
call function 'KOKRS_GET_FROM_BUKRS'
exporting
i_bukrs = bukrs-low
importing
e_kokrs = kokrs-low
exceptions
no_kokrs_found = 1
others = 2.
if sy-subrc <> 0.
clear kokrs-low.
endif.
endif.
if not kokrs-low is initial.
call function 'K_KOKRS_READ' "get fiscal year variant
exporting
kokrs = kokrs-low
importing
e_tka01 = tka01
exceptions
not_found = 1
not_found_gjahr = 2
others = 3.
if sy-subrc = 0.
call function 'G_PERIOD_GET'
exporting
date = sy-datlo
variant = tka01-lmona
importing
period = poper-low
year = ryear-low
exceptions
ledger_not_assigned_to_company = 1
period_not_defined = 2
variant_not_defined = 3
others = 4.
if sy-subrc = 0.
poper-sign = 'I'.
poper-option = 'EQ'.
append poper.
ryear-sign = 'I'.
ryear-option = 'EQ'.
append ryear.
endif.
endif.
endif.
Settings for display variants
g_save = 'A'. "Schalter Varianten benutz./allg. speichern
clear g_variant.
g_variant-report = g_repid.
g_variant-log_group = log_grp.
g_variant-username = sy-uname.
Get default variant
gx_variant = g_variant.
call function 'REUSE_ALV_VARIANT_DEFAULT_GET'
exporting
i_save = g_save
changing
cs_variant = gx_variant
exceptions
not_found = 2.
if sy-subrc = 0.
p_vari = gx_variant-variant.
endif.
Set variant
if p_vari is initial.
p_vari = '1SAP'.
move p_vari to gx_variant-variant.
call function 'REUSE_ALV_VARIANT_EXISTENCE'
exporting
i_save = g_save
changing
cs_variant = gx_variant
exceptions
not_found = 1.
if sy-subrc ne 0.
clear p_vari.
clear gx_variant-variant.
endif.
endif.
varname = gx_variant-text.
"<<MICP40K039857
archiv
call function 'KARL_DATA_INPUT_INIT'
exporting
i_report = lc_report
i_reporttype = lc_reporttype
importing
e_xusedb = read_db
e_xusear = read_ar
e_archobj = arc_obj
e_infosys = read_as
tables
t_arch_sel = lr_files.
data: lt_excluding like sy-ucomm occurs 0 with header line.
call function 'RS_SET_SELSCREEN_STATUS'
exporting
p_status = 'SELSCREEN'
p_program = 'RCOPCA02'
tables
p_exclude = lt_excluding.
Initialisieren der Bericht/Bericht-Schnittstellen *
data: ld_no_rrint type boole_d. "note 490484 begin
import rri = ld_no_rrint from memory id 'RCOPCA02_NO_RRI'.
if ld_no_rrint = 'X'.
free memory id 'RCOPCA02_NO_RRI'.
else. "note 490484 end
call function 'G_REPORT_INTERFACE_INIT' "Report-Writer?
exporting "MICP30K166368
table = 'GLPCT' "MICP30K166368
importing
subrc = rw_subrc "MICP30K166368
tables "MICP30K166368
it_fieldr = bbs_fieldtab. "MICP30K166368
call function 'RSTI_APPL_STACK_POP'"oder Recherche?
importing
i_rec = a_rec
exceptions
appl_stack_not_initialized = 1.
re_subrc = sy-subrc.
if re_subrc = 0.
check Receiver is this report
if not ( ( a_rec-rtool = 'RT' and a_rec-ronam = 'RCOPCA02' )
or ( a_rec-rtool = 'TR' and a_rec-ronam = 'KE5Z' ) ) .
re_subrc = 2.
endif.
endif.
endif.
AT SELCTION-SCREEN on value request**********************************
*at selection-screen on value-request for racct-low. "RD "4.6a
"RD "4.6a
call function 'K_RACCT_VALUE_REQUEST' "RD "4.6a
importing "RD "4.6a
e_racct = racct-low. "RD "4.6a
"RD "4.6a
"RD "4.6a
*at selection-screen on value-request for racct-high. "RD "4.6a
"RD "4.6a
call function 'K_RACCT_VALUE_REQUEST' "RD "4.6a
importing "RD "4.6a
e_racct = racct-high. "RD "4.6a
at selection-screen on value-request for p_vari. "MICP40K039857
perform f4_for_variant. "MICP40K039857
at selection-screen on value-request for poper-low. "RD "4.6a
begin of insertion note 522715
call function 'K_KOKRS_READ'
exporting
kokrs = kokrs-low
exceptions
not_found = 1
not_found_gjahr = 2
others = 3.
if sy-subrc = 0.
end of insertion note 522715
call function 'ECPCA_RPMAX_VALUE_REQUEST' "RD "4.6a
exporting "RD "4.6a
i_kokrs = kokrs-low "RD "4.6a
i_ryear = ryear-low "RD "4.6a
importing "RD "4.6a
e_rpmax = poper-low "RD "4.6a
begin of insertion note 522715
exceptions
table_empty = 1.
endif.
end of insertion note 522715
at selection-screen on value-request for poper-high. "RD "4.6a
begin of insertion note 522715
call function 'K_KOKRS_READ'
exporting
kokrs = kokrs-low
exceptions
not_found = 1
not_found_gjahr = 2
others = 3.
if sy-subrc = 0.
end of insertion note 522715
call function 'ECPCA_RPMAX_VALUE_REQUEST' "RD "4.6a
exporting "RD "4.6a
i_kokrs = kokrs-low "RD "4.6a
i_ryear = ryear-low "RD "4.6a
importing "RD "4.6a
e_rpmax = poper-high "RD "4.6a
begin of insertion note 522715
exceptions
table_empty = 1.
endif.
end of insertion note 522715
AT SELCTION-SCREEN ***************************************************
at selection-screen.
perform pai_of_selection_screen.
begin of insertion note 522715
if not kokrs-low is initial.
call function 'K_KOKRS_READ'
exporting
kokrs = kokrs-low
exceptions
not_found = 1
not_found_gjahr = 2
others = 3.
if sy-subrc <> 0.
message e101(ki) with kokrs-low.
endif.
endif.
end of insertion note 522715
archiv
if sy-ucomm = 'FC01' or sy-ucomm = 'UCDS'
or sy-ucomm = 'ONLI' and read_ar = 'X'
and read_as is initial and lr_files[] is initial.
if lt_arch_obj[] is initial.
lt_arch_obj-object = 'PCA_OBJECT'. append lt_arch_obj.
lt_arch_obj-object = 'EC_PCA_ITM'. append lt_arch_obj.
endif.
call function 'KARL_DATA_INPUT_SELECT'
exporting
i_db_and_arc = lc_set
i_infosys_possible = lc_set
i_object_fixed = 'V'
i_documentation = 'KARL_DATA_INPUT_SEL_KE5YZ'
i_report = lc_report
i_reporttype = lc_reporttype
tables
t_objects = lt_arch_obj
t_arch_sel = lr_files
changing
c_xusedb = read_db
c_xusear = read_ar
c_archobj = arc_obj
c_infosys = read_as.
endif.
START-OF-SELECTION **************************************************
start-of-selection.
Default-Werte löschen, falls Aufruf über Recherche
oder Report-Writer erfolgt ist
if no_rrint is initial and ld_no_rrint is initial. "note 490484
if rw_subrc eq 0 or re_subrc eq 0.
refresh: rldnr, rrcty, rvers, kokrs, bukrs, poper, ryear,
racct, prctr, pprctr, drcrk, activ, rhoart, rfarea,
versa, afabe, eprctr,
v_racct, v_prctr, v_pprctr.
clear: rldnr, rrcty, rvers, kokrs, bukrs, poper, ryear,
racct, prctr, pprctr, drcrk, activ, rhoart, rfarea,
versa, afabe, eprctr,
v_racct, v_prctr, v_pprctr.
endif.
Parameter einlesen über Report-Writer-Schnittstelle *
if rw_subrc eq 0.
perform rw_get_parameters.
oder Parameter einlesen über Recherche-Schnittstelle *
elseif re_subrc eq 0.
perform re_get_parameters.
endif.
endif.
if read_db = 'X'. " read from DB (archiv)
Bewegungsdaten einlesen und puffern...................................
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
text = 'Einzelposten selektieren'(p10).
Use dirty trick to mislead DB-optimizer
call function 'DB_DO_NOT_USE_CLIENT_INDEX'
exporting
value = sy-mandt
tables
mandttab = rclnt.
select (tab_fields) from glpca
client specified
package size packsize
APPENDING CORRESPONDING FIELDS OF TABLE i_glpcaO
into corresponding fields of table i_glpca
where rldnr in rldnr
and rrcty in rrcty
and rvers in rvers
and kokrs in kokrs
and rbukrs in bukrs
and ryear in ryear
and rassc in rassc
and hrkft in hrkft "note 550972
and sbukrs in sbukrs "note 550972
and shoart in shoart "note 550972
and sfarea in sfarea "note 550972
and racct in racct
and rprctr in prctr
and sprctr in pprctr
and poper in poper
and drcrk in drcrk
and activ in activ
and rhoart in rhoart
and rfarea in rfarea
and versa in versa
and eprctr in eprctr
and afabe in afabe
and rmvct in rmvct
and docct in docct
and docnr in docnr
and stagr in stagr
and rtcur in rtcur
and runit in runit
and refdocct in refdocct
and refdocnr in refdocnr
and werks in werks
and rep_matnr in repmatnr "RDIP40K020663
and rscope in rscope "RDIP40K020663
and rclnt in rclnt. "dirty trick to mislead DB-optimizer
if sy-dbcnt > 1.
text1 = sy-dbcnt.
condense text1.
concatenate text1 text-m01 into text2 separated by space.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
text = text2. " ... Datensätze gelesen
endif.
endselect.
Entfernt nicht zugehörige Einträge....................................
loop at i_glpca where ( not rprctr in v_prctr )
or ( not sprctr in v_pprctr )
or ( not racct in v_racct ).
delete i_glpca.
endloop.
endif.
*archiv
if read_ar = 'X' and not
( read_as is initial and lr_files[] is initial ).
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
text = 'Lesen im Archiv'(p12).
define fill_lt_selections.
if not &2[] is initial.
clear ls_selections.
move &1 to ls_selections-fieldname.
loop at &2.
clear ls_selopt.
move-corresponding &2 to ls_selopt.
append ls_selopt to ls_selections-selopt_t.
endloop.
append ls_selections to lt_selections.
endif.
end-of-definition.
fill_lt_selections 'RLDNR' rldnr.
fill_lt_selections 'RRCTY' rrcty.
fill_lt_selections 'RVERS' rvers.
fill_lt_selections 'KOKRS' kokrs.
fill_lt_selections 'RBUKRS' bukrs.
fill_lt_selections 'POPER' poper.
fill_lt_selections 'RYEAR' ryear.
fill_lt_selections 'RPRCTR' prctr.
fill_lt_selections 'SPRCTR' pprctr.
fill_lt_selections 'RACCT' racct.
fill_lt_selections 'DRCRK' drcrk.
fill_lt_selections 'ACTIV' activ.
fill_lt_selections 'RHOART' rhoart.
fill_lt_selections 'RFAREA' rfarea. "note 401961
fill_lt_selections 'STAGR' stagr.
fill_lt_selections 'RTCUR' rtcur.
fill_lt_selections 'RUNIT' runit.
fill_lt_selections 'VERSA' versa.
fill_lt_selections 'EPRCTR' eprctr.
fill_lt_selections 'AFABE' afabe.
fill_lt_selections 'RMVCT' rmvct.
fill_lt_selections 'DOCCT' docct.
fill_lt_selections 'DOCNR' docnr.
fill_lt_selections 'REFDOCCT' refdocct.
fill_lt_selections 'REFDOCNR' refdocnr.
fill_lt_selections 'WERKS' werks.
fill_lt_selections 'REP_MATNR' repmatnr.
fill_lt_selections 'RSCOPE' rscope.
fill_lt_selections 'HRKFT' hrkft. "note 550972
fill_lt_selections 'SBUKRS' sbukrs. "note 550972
fill_lt_selections 'SHOART' shoart. "note 550972
fill_lt_selections 'SFAREA' sfarea. "note 550972
call function 'EC_PCA_SELECT_FROM_ARCHIVE'
exporting
i_selections = lt_selections[]
i_files_sequential_read = lr_files[]
importing
e_glpca = lt_glpca_archiv[]
exceptions
no_infostruc_found = 1.
if sy-subrc = 1.
message id sy-msgid type 'I' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
clear i_glpca.
loop at lt_glpca_archiv assigning to i_glpca.
append i_glpca.
endloop.
endif.
if i_glpca[] is initial. "Info,nichts gefunden
message s000.
exit.
endif.
get texts for accounts ...............................................
sort i_glpca by kokrs racct.
loop at i_glpca assigning -racct_ktext = ls_rpcak-ktext.
endloop.
Liste mit Einzelposten geeignet sortieren.............................
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
text = 'Einzelposten sortieren'(p30).
if show_ref is initial.
sort i_glpca by rldnr ryear rbukrs rrcty rvers
docct docnr docln.
else.
sort i_glpca by rldnr kokrs ryear rbukrs rrcty rvers poper
refdocct refdocnr refdocln.
endif.
Berechtigungsprüfung und gemerkte Belege aufbereiten .................
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
text = 'Berechtigungsprüfungen'(p40).
clear: cnt_rldnr, cnt_kokrs, cnt_ryear, cnt_rvers, cnt_bukrs.
loop at i_glpca assigning .
Berechtigungscheck
perform check_repo_authority changing authorised.
if authorised is initial.
delete i_glpca.
s_message = 'X'.
zählen der Sätze ohne Berechtigung
auth_dbcount = auth_dbcount + 1.
else. "Weitere Bearbeitung nur für berechtigte Belege...
Zusätzlich merken der Anzahl der Ausprägungen
bestimmter Dimensionen
on change of -rbukrs
ct = '10'
importing
currency = hsl_curr.
endon.
externe Immobilienbezeichnung "ww/kb
on change of i_glpca-imkey.
if ( not -dabrz
I_length = 20
importing
e_empge = -konty.
endif.
CONCATENATE I_GLPCA-KONTY I_GLPCA-EMPGE INTO I_GLPCA-IMBEZ.
endif.
endon.
on change of i_glpca-dabrz.
call function 'REMD_IMKEY_TO_EMPGE'
exporting
i_imkey = i_glpca-imkey
i_dabrz = i_glpca-dabrz
i_length = 20
importing
e_empge = i_glpca-empge
e_konty = i_glpca-konty.
CONCATENATE I_GLPCA-KONTY I_GLPCA-EMPGE INTO I_GLPCA-IMBEZ.
endon.
Konvertierungsproblem mit PSP-Nummer bereinigen
if not -psppp.
endif.
endif.
Währungen in Hilfsfeldern speichern
if -ksl_curr = ksl_curr.
endif.
modify i_glpca.
endif.
endloop.
Nachricht, wenn nicht alle Einzelposten angezeigt werden.
if not s_message is initial.
message s407(km) with auth_dbcount.
endif.
EP ausgeben...........................................................
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
text = 'Einzelposten ausgeben'(p50).
t_layout-detail_initial_lines = 'X'.
t_layout-detail_popup = 'X'.
t_layout-f2code = 'PIC1'. "MICP40K039857
t_layout-get_selinfos = 'X'.
t_layout-group_change_edit = 'X'. "note 576149
perform fill_listheader.
perform fieldcat_fill.
perform spec_groups_fill.
perform events_fill. "MICP40K039857
">>MICP40K039857
call function 'K_KKB_LIST_DISPLAY'
exporting
i_callback_program = 'RCOPCA02'
i_callback_user_command = 'USR_CMD'
i_callback_top_of_page = 'TOP_OF_PAGE'
I_CALLBACK_END_OF_PAGE =
I_CALLBACK_END_OF_LIST =
i_callback_pf_status_set = 'SET_PF_STATUS'
I_CALLBACK_LAYOUT_SAVE =
I_CALLBACK_FIELDCAT_SAVE =
i_tabname = 'I_GLPCA'
is_layout = t_layout
it_fieldcat = t_fieldcat
I_FCTYPE = 'R'
IT_EXCLUDING =
it_special_groups = t_spec_groups
IT_SORT =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
tables
t_outtab = i_glpca
exceptions
others = 1.
loop at i_glpca.
select single vbeln auart augru
into (l_vbeln, l_auart, l_augru)
from vbak where vbeln = i_glpca-aubel.
if sy-subrc = 0.
move l_auart to i_glpca-v_auart.
move l_augru to i_glpca-v_augru.
modify i_glpca.
endif.
endloop.
call function 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
i_callback_program = 'ZRCOPCA02'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USR_CMD'
i_structure_name = 'I_GLPCA'
is_layout = t_layout
it_fieldcat = t_fieldcat
IT_EXCLUDING =
it_special_groups = t_spec_groups
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = g_save
is_variant = g_variant
it_events = t_events
IT_EVENT_EXIT =
IS_PRINT =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = i_glpca
exceptions
program_error = 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.
"<<MICP40K039857
clear i_glpca.
*& Form CHECK_REPO_AUTHORITY
Check only new auth-object K_PCA *
--> p1 text
<-- p2 text
form check_repo_authority changing authorized like authorised.
fill structure for userexit in K_PCA_RESP_AUTHORITY_CHECK
data: auth like pca_i_auth. "46a MIC check K_PCA and G_GLTP
auth-bukrs = -rrcty.
clear authorized.
check PrCtr/account/activity
call function 'K_PCA_RESP_AUTHORITY_CHECK'
exporting
i_kokrs = -racct
i_vorgn = 'REPP'
i_actvt = '28'
i_auth = auth
i_no_dialog_message = 'X'
exceptions
no_authority = 1
data_missing = 2
others = 3.
if sy-subrc = 0. "ok
check ledger/version/record type
call function 'PCA_G_GLTP_AUTH_CHECK'
exporting
rldnr = -rrcty
exceptions
no_authorisation = 1
others = 2.
if sy-subrc = 0. "ok, User is authorized
authorized = 'X'.
endif.
endif.
endform. " CHECK_REPO_AUTHORITY
*& Form INIT_VARS
Initialisieren diverser Hilfsvariablen und -tabellen *
form init_vars.
data begin of nametab occurs 80. "Tabelle mit Feldern aus der RPCA2
include structure dntab.
data end of nametab.
select single * from t000
client specified
where mandt = sy-mandt.
refresh nametab.
call function 'NAMETAB_GET'
exporting
only = 'T'
tabname = 'RPCA2'
tables
nametab = nametab.
Übernehmen der Feldnamen, die auch in der GLPCA
vorkommen.
loop at nametab where fieldname ne 'KSL_CURR'
and fieldname ne 'HSL_CURR'
and fieldname ne 'EMPGE' "ww/kb
and fieldname ne 'KONTY'. "ww/kb
move nametab-fieldname to tab_fields-name.
append tab_fields.
endloop.
fill Fields of receiver for BBS "MIC46C
call function 'RSTI_REPORT_FIELDS_FIND'
exporting
e_repid = 'RCOPCA02'
e_type = 'R'
tables
it_fields = bbs_fieldtab.
correct fieldnames
read table bbs_fieldtab with key rfield = 'PRCTR'.
if sy-subrc = 0.
bbs_fieldtab-rfield = 'RPRCTR'.
modify bbs_fieldtab index sy-tabix.
endif.
read table bbs_fieldtab with key rfield = 'PPRCTR'.
if sy-subrc = 0.
bbs_fieldtab-rfield = 'SPRCTR'.
modify bbs_fieldtab index sy-tabix.
endif.
read table bbs_fieldtab with key rfield = 'BUKRS'.
if sy-subrc = 0.
bbs_fieldtab-rfield = 'RBUKRS'.
modify bbs_fieldtab index sy-tabix.
endif.
Unicode
class cl_abap_char_utilities definition load.
clear hex00 with cl_abap_char_utilities=>minchar.
clear hexff with cl_abap_char_utilities=>maxchar.
endform. " INIT_VARS
FORM FILL_LISTHEADER *
List-Header in Abhängigkeit der selektierten Daten *
form fill_listheader.
read table i_glpca index 1.
if sy-subrc ne 0.
exit.
endif.
t_listheader-typ = 'S'.
t_listheader-key = 'Ledger '(h01).
if cnt_rldnr <= 1.
t_listheader-info = i_glpca-rldnr.
else.
t_listheader-info = '*'.
endif.
append t_listheader.
t_listheader-typ = 'S'.
t_listheader-key = 'Kostenrechnungskreis'(h02).
if cnt_kokrs <= 1.
t_listheader-info = i_glpca-kokrs.
else.
t_listheader-info = '*'.
endif.
append t_listheader.
t_listheader-typ = 'S'.
t_listheader-key = 'Buchungskreis '(h03).
if cnt_bukrs <= 1.
t_listheader-info = i_glpca-rbukrs.
else.
t_listheader-info = '*'.
endif.
append t_listheader.
t_listheader-typ = 'S'.
t_listheader-key = 'Buchungsperiode '(h04).
if cnt_poper <= 1.
t_listheader-info = i_glpca-poper.
else.
t_listheader-info = '*'.
endif.
append t_listheader.
if cnt_ryear <= 1.
t_listheader-typ = 'S'.
t_listheader-key = 'Geschäftsjahr '(h05).
t_listheader-info = i_glpca-ryear.
append t_listheader.
endif.
t_listheader-typ = 'S'.
t_listheader-key = 'Version '(h06).
if cnt_rvers <= 1.
t_listheader-info = i_glpca-rvers.
else.
t_listheader-info = '*'.
endif.
append t_listheader.
endform. "fill_listheader
*& Form FIELDCAT_FILL
*& Aufbau des Feldkataloges für den K_KKB_LIST_DISPLAY, *
*& bzw REUSE_ALV_LIST_DISPLAY, *
*& weitere Infos enthält die FktBaustein-Doku *
form fieldcat_fill.
data: i type i value 0.
refresh t_fieldcat.
Ledger
if cnt_rldnr > 1.
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'RLDNR'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
afield-key = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '1'.
append afield to t_fieldcat.
endif.
Satzart
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'RRCTY'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
append afield to t_fieldcat.
Version
if cnt_rvers > 1.
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'RVERS'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
append afield to t_fieldcat.
endif.
Periode
if cnt_poper > 1.
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'POPER'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
append afield to t_fieldcat.
endif.
Geschäftsjahr
if cnt_ryear > 1.
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'RYEAR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
append afield to t_fieldcat.
endif.
Referenzbelegtyp
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'REFDOCCT'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '2'.
afield-seltext_s = 'Typ'(t01).
afield-seltext_m = 'Belegtyp'(t02).
afield-seltext_l = 'Ref.Belegtyp'(t03).
afield-outputlen = 3. "Platz für die Sterne der Zwischensummen
if not show_ref is initial.
afield-key = 'X'.
else.
afield-no_out = 'X'.
endif.
append afield to t_fieldcat.
Referenzbelegnummer
add 1 to i.
clear afield.
afield-col_pos = i.
afield-fieldname = 'REFDOCNR'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '2'.
afield-seltext_s = 'Refbeleg'(t04).
afield-seltext_m = 'Refbelegnr'(t05).
afield-seltext_l = 'Ref.Belegnummer'(t06).
if not show_ref is initial.
afield-key = 'X'.
else.
afield-no_out = 'X'.
endif.
appendHi Prabhu,
You are right, problem is with Field Catalog...
When I use FM 'REUSE_ALV_GRID_DISPLAY' it is dumping...
When i tried with FM 'REUSE_ALV_LIST_DISPLAY' it is working perfectly....
how can i use FM 'REUSE_ALV_GRID_DISPLAY' without dumping????
do i need to pass any thing in FM????
Here is the dump:
Runtime Errors MESSAGE_TYPE_X
Occurred on 12/21/2006 at 01:03:24
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Error analysis
Short text of error message:
Technical information about the message:
Message classe...... "0K "
Number.............. 000
User, transaction...
Language key........ "E"
Transaction......... "SE38 "
Program............. "SAPLSLVC "
Screen.............. "SAPLSLVC_FULLSCREEN 0500"
Screen line......... 3
Information on where termination occurred
The termination occurred in the ABAP program "SAPLSLVC " in "LINE_OUT_NEW_2".
The main program was "ZRCOPCA02 ".
The termination occurred in line 918 of the source code of the (Include)
program "LSLVCF01 "
of the source code of program "LSLVCF01 " (when calling the editor 9180).
Source code extract
008880 gs_roid-row_id = rs_row-index * -1.
008890 endif.
008900 gs_roid-sub_row_id = rs_row-rowtype+7(10).
008910 gs_poid-row_id = gs_roid-row_id.
008920 gs_poid-sub_row_id = gs_roid-sub_row_id.
008930 gs_poid-rowtype = rs_row-rowtype.
008940 gs_poid-index = rs_row-index.
008950 insert gs_poid into table rt_poid.
008960 endif.
008970 append gs_roid to rt_roid.
008980
008990 loop at rt_fieldcat assigning <ls_fieldcat> where tech ne 'X' and
009000 no_out ne 'X'.
009010
009020 if gflg_invisible = 'X'.
009030 if <ls_fieldcat>-do_sum is initial.
009040 clear gflg_invisible.
009050 continue.
009060 else.
009070 clear g_col_counter.
009080 clear gflg_invisible.
009090 endif.
009100 endif.
009110
009120 clear gs_lvc_data.
009130 clear g_style.
009140
009150 assign component
009160 <ls_fieldcat>-fieldname of structure rt_data to <g_field>.
009170 if sy-subrc ne 0.
> message x000(0k).
009190 endif.
009200
009210 g_col_counter = g_col_counter + 1.
009220
009230 gs_lvc_data-row_pos = r_row_counter.
009240 gs_lvc_data-col_pos = g_col_counter.
009250 gs_lvc_data-row_id = gs_roid-row_id.
009260 gs_lvc_data-sub_row_id = gs_roid-sub_row_id.
009270
009280 * Endtotal and average
009290 if rs_row-rowtype(1) ca 'T' and <ls_fieldcat>-do_sum = 'C'.
009300 * save the actual grouplevel information
009310 gs_grouplevels = rs_grouplevels.
009320 clear g_lines.
009330
009340 * get number of lines of the collect table
009350 describe table rt_data lines g_lines.
009360 * if there is only one line or the field has no references so
009370 * that only the first line has to be considered
Thanks,
fractal
null
Maybe you are looking for
-
I have an older ipod with a large itunes library. I have a new ipad2. Both have the same email address but different passwords. Can I merge both itunes libraries?
-
If I click a contact in the contact payne of a write window, it comes up in the To: place as <" joeblogs"@talktalk.com> for example. Even though in the address book it is [email protected] When I try to send the email, it comes back as an unrecognise
-
Screen flashes between battery level and screen saver
Hi When I charge my iPhone up in my new iH8 alarm clock I get the "switch to airplane mode" message - fair enough. But once its been charging a few minutes the screen comes on by itself and then flashes between the image of the battery and the screen
-
Elementsautoanalyzer.exe crash, unhandled exception at 0x004099BA in photoshop server.exe 0xc000005: acess violation writing location 0x000000 This the output of visual studio debugger when it crashes. It crashes on startup and also when the organiz
-
Adobe is a mess. I will re-type this question a FIFTH TIME: I HAVE PURCHASED LIGHTROOM A FULL WEEK AGO, through a dealer, and I did not receive a serial number. I got an email asking me to join LWS, but no serial number - and the product was not l