суббота, 9 августа 2025 г.

SAP CDS View 'Analytical Query'

Any custom report or a query can be easily generated via SQVI t-code as shown in the example below:

Suppose custom report needs to contain join of ANLA (Asset Master Record Segment), ANLZ (Time- Dependent Asset Allocations), T499S (Location) and ADRC(Addresses) tables. 
This can be achieved through creating table join via SQVI t-code:

Query output can be generated in ALV grid, classical view, Excel file and etc.:

Easy as that.


Now let's try utilizing CDS view called 'Analytical Query' in S/4 HANA for creating required query / or custom report. 


Step 1: Custom analytical query creation:

Go to 'Reporting' --> 'Query Design' option of the menu:


Select 'Custom Analytical Queries' tile:


Step 2: Create new query:



Step 3: Specify query name:



Step 4: Select query data source:




Step 5: Specify query output fields in 'Field Selection' tab of the view:


Step 6: Add filters and maintain fields status in 'User Input Values' tab of below view:


Step 7: Publish new query by pressing 'Publish' option:


Step 8: Go to Analysis for Office and select new query as data source:



Step 9: Maintain 'Asset Location Report' prompts: 


Step 10: Custom analytical query output validation:


Now in order to add T499S and ADRC table columns into the report, custom CDS view needs to be generated. 


Step 11: Custom CDS view generation: Go to 'Extensibility' --> 'Custom CDS Views' tile:


Press 'Create' option:



Step 12: Maintain primary and associated data sources:


Step 13: Select fields for custom CDS view output. Go to 'Fields selection' tab --> maintain fields in 'Selected Fields and Associations' tab of the below view:


Step 14: Publish custom CDS view:


Step 15: Creating a new query based on ZZ1_ASSET_LOCATION_03 view

Specify query name and select custom CDS view as data source:


Select fields for query output:



Maintain filters for Prompts screen of the report:


Save and publish new query:


Step 16: Go to ‘Query design’ tab and select ‘View browser’ app:


Step 17: Restrict view search by ‘Application component’ and by release status:


Step 18: Search results:



Step 19: Select ZZ1_FA_LOCATION query for fields validation:


Step 20: Show content of ZZ1_FA_LOCATION query:


Step 21: Adding dimensions into the view output:


Query output is correct as per below verifications:


Step 22: Save query as a tile:



Add new query into ‘My home’ tab of Fiori Launchpad:


Et voilà! :)


пятница, 27 декабря 2024 г.

Error message XS850 'Cannot process message; maximum size exceeded'

Solving error no. XS850 error 'Cannot process message; maximum size exceeded':

So requirement is to issue email notification from background job with spool request as an attachment in it. 
Prerequisites:
(a) Create background job via SM36 t-code, by enabling sending email notification with spool requests in it:
(b) Schedule background job via SM36 t-code 
(c) Add email receiver under SMTP node via SCOT t-code:
(d) In my case attachment size is ca 3 MB, hence need to extend MAXLEN_BODYPART_ALI_SMTP  parameter size to 3 MB accordingly via SM30 t-code in SXPARAMS configuration view:

 





понедельник, 6 апреля 2020 г.

SAP FI TAX, BR NBS codes configuration

Services Codes (based on legal requirement LC 116)


Prerequisite:
There is no pre-configuration (customizing) needed.

SAP Configuration:
Transaction code: J1BTAX

Country: BR
Go to Entities menu and select NBS Codes option:
  • In the Nomenclature Services Code column insert the codes numbers
  • In the Description column insert the correct description of the NBS Code


Start entering NBS directory in above view manually.
Save.








пятница, 3 апреля 2020 г.

SAP Material Ledger, Configuration of PU rule(s)


Issue description:
When posting of PU document for posted Invoice Receipt document via J1GP01 t-code, you’re getting error message stating that combination of Plant/Valuation class/Item category/Tax code entry is missing:


Root cause:
Missing configuration in J1GP02 view.

Solution:
Maintain missing entry in J1GP02 view. And then re-run J1GP01 t-code once again.
For more information on Materials Ledger t-codes check the following link.
Enjoy.

пятница, 31 января 2020 г.

SAP Material Ledger t-codes

According to recent statistics, SAP Material Ledger topic is becoming the most viewed one...)
Okay, so below is the list of t-codes of Hellenization standard solution:

J1GVL_T01 t-code
Not needed any longer, but project should start with initial upload of stock to valuation table via J1GVL_T01 t-code (initial upload with 561 movement type);

MIGO/MIRO
Completion of GR/IR postings;

J1GP01 t-code
PU postings (FI postings that transfer the balance from SAP Stock account to the appropriate Greek purchasing account): update of foreign purchase accounts. It checks if the PU posting had already been done or not and then it continues to gather the necessary information needed to perform the posting;

J1GP05 t-code
Clearing of open items;

J1GVL_T04 t-code
Offline update of ML; 

J1GVL_T11 t-code
Initialize production run; 

J1GVL_T05, J1GVL_R3, J1GVL_RPU, J1GVL_RRV
Material valuation results check via running reconciliation reports; 

J1GVL_VL
Material valuation program;

J1GVL_P01 t-code
Running WHB analytical report; 

J1GVL_ALDI t-code
Reconciliation between WHB and ML: Analytical posing in testing/production modes;

J1GVL_S12 t-code
Compare valuation and AL postings; 

J1GVL_T15 t-code
WHB to CD utility. Export to .txt output file;

J1GVL_INVB t-code
to be executed during year end.

понедельник, 27 января 2020 г.

SAP PY and FI-AP, PA30 t-code issue when maintaining Bank Details infotype

When trying to create Bank Details (InfoType 0009) via PA30 t-code for ABCD employee, following error occurs: 


Please do not enter bank data for payment method Cash Payment 
Message No. RP568 
Diagnosis 
The bank data cannot be processed for the payment method specified ('). 
Procedure 
Please use a different payment method or delete the entries for bank key, bank account (and bank control key, if applicable). 

Basically solution here is to maintain payment method for bank account,which is very straightforward APP setting, but according to statistics of my posts, APP posts are the most viewed ones..? 

Anyways solution is as following:


FBZP t-code -Pmnt method in Country 


Following entry to be added: 
Country: XYZ
Pymt Method: ABC 
Description  Bank Transfer 
Description  Bank Transfer 

Payment method for: 
‘Outgoing payments’- checked 

Payment method classification: 
‘Bank transfer’- checked 
‘Allowed for personnel payments’- checked 

Required master record specifications: 
‘Street, PO box or PO box postal code’- checked 
‘Bank details’- checked 
‘Account number required’- checked 
‘IBAN required’- checked 

Posting details: 
Document type for payment: [  ]         
Clearing document type: [  ]              

FBZP t-code -Payment methods in Company code

Following new entry to be added:

Paying co. code 1234   CoCd Description
Pymt Method     ABC     Bank Transfer

Minimum amount                                 LC
Maximum amount    999,999,999.00   LC
Distribution amnt                                  LC

среда, 15 января 2020 г.

SAP PS, Project Budget Tolerance Limit

This post will be short and straightforward one and will be covering PS basics, but in case you find it useful, GOOD! :)

So, assume, you've set project budget tolerance limit to 15% for the Group and now certain entities are willing to change it to 10%, i.e. you they wanting system to hard stop any Project/WBS related activities, when budget exceeds 10%.

I'd do the following in this case:

(a) create additional Project Profile in V_TBPFD_P view (SM30 or check for configuration t-code in SPRO), you should be having something like following:

AS IS:

CoAr.    PROF.  DESCRIPTION            TR.GRP     ACT.      USAGE:
XYZ 0 General budget profile ++               1 105,00
XYZ 0 General budget profile ++               3 115,00

TO BE:
CoAr.    PROF.  DESCRIPTION            TR.GRP     ACT.      USAGE:
XYZ 0 General budget profile ++               1 105,00
XYZ 0 General budget profile ++               3 115,00
XYZ 1 General budget profile ++               3 110,00

(b) create new substitution step that is valid for Project System via OPSN t-code, substition to be something like following:


(c) activate the new substitution for all of the Project Profiles in following way:

And this is it. Now that you'll be creating new WBS element, system will be defaulting 'Budget Profile' field value to '0' initially, but once you save WBS element, 'Project Profile' field value will be replaced with '1' ,hence new project tolerance limit will be applied.


вторник, 14 января 2020 г.

SAP FI, Defaulting of 'Tax Reporting Date' (BKPF-VATDATE) in FB01 t-code

As per SAP standard, Tax Reporting Date in Document Header section of FB01 t-code is being defaulted with Posting Date. Let's assume, you're required to enhance it so that it stops defaulting the value in Tax Reporting Date field or ,as an example, you want it to be defaulted with Document Date field value.
Note that below described approach is not supported by SAP standard, so I'd advise you to discuss the approach with your ABAP people.

SE18 t-code:
Enhancement Spot VATDATE_RULES with the BADI definition VATDATE_VALUES.
A default implementation: VATDATE_VALUES_DEFAULT_SAP

Create Z* enhancement implementation:

And add the following logic into it:
IF BKPF-BUKRS= 'this and that' then BKPF-VATDATE to be equal to BKPF- BLDAT when posting document through FB01, FB60, MIRO and VF01 t-codes.

That's about it :) 






понедельник, 13 января 2020 г.

SAP MM, Material Ledger, post New G/L migration issue with J* reports

Suppose New G/L migration is happening in FY 2020, and ,out of the blue, J1GGL report stops displaying data for the specified ledger(s) for G/L accounts, which is linked to GLT0 table update post New G/L migration.
When asking SAP, they might advise you to take a look at the following SAP note # 923946 with some correction instructions provided in it, which ,in fact, is not solving the issue with J* reports. Programs that can be affected are as following:
J_1GALTB Ledger Trial Balance (Official)
J_1GALTL Update A/L (FI) from SPL
J_1GGL000 Detailed Ledger
J_1GJR_ROUTINES Document Journal
J_1GSL000 Summarized Ledger
J_1GTBAC0 Ledger Trial Balance in ASCII file
J_1GTBGL0 Ledger Trial Balance (Unofficial)
J_1GVL_ALPOST_DI Analytical Ledger (A/L) postings for Materials
J_1GVL_WHBT05 Read actual values for given WHB column

In reality workaround to the issue is as simple as below:

(1) Execute J1GGL for ALL of the the prior to FY 2020 fiscal years (i.e. all of the FYs prior to New G/L migration). I believe, some FM is being re-generated at this step. If you know FM technicalities, then just re-generating it via SE37 should be enough (and share FM naming in comments section!:))

(2) Execute J1GGL for the FY 2020 and validate whether now data is being displayed correctly. 


SAP FI, Adding of user-specific fields into Asset standard reportings (for example, Asset Balances report)

Suppose requirement is to add user- specific field Transaction Type into Asset Balances report, in order to do so, ANEP table needs to be added into OAVI t-code/or V_T086_N view, which is not possible through SAP standard restrictions.

So below approach is aimed to enhance Asset Balances report with this regards, which is ,once again, is not supported by SAP standard.


SE38: RABEWG_ALV01 program
Structure: FIAA_SALVTAB_RABEWG




Component: .INCLUDE to be copied into new ZFIAA_SALVTAB component, by using Append Structure, highlighted on above screenshot.
Component type is FIAA_SALVTAB_ALL.

Add BWASL into newly created component ZFIAA_SALVTAB:

Check whether ANEPV-BWASL will be available in ALV fields on RABEWG_ALV01 report.
Alternatively, validate whether adding ANEPV-BWASL into structure CI_REPRABEWG can be applicable.



понедельник, 3 июля 2017 г.

NW, Portal, switching between users

So..
When working in Portal, you want to switch between users ,and when you try to do so, it appears that IE is logging- in with previous credentials.
This appeared not to be Portal issue or something.
All you need to do in this case is following:

GO TO IE settings;
'Advanced' tab;
Scroll down to 'Security' menu;
Tick 'Empty Temporary IE files when browser is closed'

SAVE
Restart

That's about it.

Now every time IE is closed, your NW session is getting closed as well and with following run, you will have to enter credentials of new user.


среда, 12 апреля 2017 г.

J1UFTVG, FK888 error message

While trying to generate batch input, following error may occur (not just in that particular specified t-code, but pretty much everywhere, where SM35 is getting called):

Enter a valid date (for example, 03/30/2017)

Message No. FK888

Diagnosis

A non-existent date was entered.

System Response

The program was terminated.

Procedure

Enter a valid date or inform the System manager.

Solution is- to change date format in user settings from MM/DD/YYYY to DD.MM.YYYY, log- out and log- in again and re-run the problematic t-code.

суббота, 25 февраля 2017 г.

Unreleasing of released tasks/TRs

To all the Basis people out there: tasks and requests CAN be unreleased via RDDIT076 program.

Just specify request/or task on one single field of above mentioned program:


Switch to 'Change' mode and change status of released request/or a task from 'R' to 'D' (which stands for modifiable):



Easy as it is. 

четверг, 5 января 2017 г.

Sergei Donatovich

Dovlatov...

For now, probably, one of my the most fav writers of Soviet era. Even though he himself ,most probably, wouldn't agree with being classified as Soviet writer, Soviet citizen, Soviet person.

He left Soviet Union due to... not really sure if this was his own personal decision, or he didn't have any other alternatives. For some reason, I have a feeling he deeply, well ok, with no exaggeration, he probably somewhere deep inside had a feeling of regret of his decision to abandon home. Needless to say, Vertinsky, Yesenin, Kuprin and etc. etc., all of them were having same feeling of regret of leaving home country. Ah, Joseph Brodsky, I bet he was having a great desire to come back. Actually he even did an attempt to cross the border between EU and Soviet Union via Helsinki (he was about to travel from Helsinki central railway station, which I was using to commute from home to my workplace back and forth every single day) but of course, things were way too complicated.. Not sure of Soljenitzyn though. Same with Nabokov and so on and so forth...

Well this is not the topic actually... you know, what's done is done. You can't judge history, period.

It is great that nowadays Sergey Dovlatov is becoming as popular as he probably would never be while being alive, while trying to meet ends when in Tallinn or in New York. He even lived in Tallinn which I have a special feeling about... they say that one of the streets in Tallinn was named after him, I wonder if it is somewhere in old part of the city, which would be so lovely. Last year they have installed a very decent monument in Dovlatov's Leningrad, on his own Rubinstein street- just a simple, huge man, with a sad look. I think it is just my own incorrect perception that he was more of sad person, not satisfied with how things go in his sometimes messy life (again this perception is based on his own fiction only, which is of course can not be 100% true or something of a kind).

What else... ah, well fiction of Dovlatov is amazingly great; I don't remember me reading a book, laughing out indeed loud. 'Chemodan' and part with Tsar Peter! Dialogues are simple and weird and ironic, full of brilliant humor. If you happened to like Bukovsky, then for sure you will fall in love with books of Soviet and none- Soviet at the same time Dovlatov.

ps: been searching for Lurie's 'Dovlatov's Leningrad' with no luck. I really am interested in his city, even though I am already familiar with most of the places- Pushkino, Rossi street (220 meters long, buildings 22 meters hight and width), LGU, Nevsky district and etc. and etc.

pps: here, Dovlatov carrying Mikhail Baryshnikov






вторник, 14 июня 2016 г.

SAP FI-AA, basic configuration guide

It will be a very high level explanation. Basically there's only one SAP training for FI-AA configuration, which is AC305. Just attending this one single course should be enough for understanding the module. 

For sure, there should be new updates for S/4 HANA, because you might probably know that this new S/4 HANA Finance changed the concept of FI-AA module a lot, which I would like to cover a little bit later. But now there's no more ANLP, ANEK, ANEA, ANLC tables any longer (if you ever experienced writing a logic for calculating ,for instances, cumulative depreciation, then you'd probably know how complicated this can be with all those tables). Now there's only one table for line items, which is ACDOCA. Well, let me try to cover the topic later, when I feel more encouraged to do so.

So if you're about to start FI-AA implementation, then here is the list of steps you might need to accomplish: 

(1)  Assumption is that you’re done with As-Is part of the program;

(2)  Organization structure: Chart of Depreciation. It is maintained according to business needs, whether they want to have IFRS, local accounting standards, tax depreciation area, revaluation depreciation areas, and maybe they need depreciation areas in different currencies and with some business specific accounting rules and needs, all together. All that is getting maintained by copying some SAP standard depreciation area into your new, company code specific one, and then you simply add/delete/edit depreciation areas in newly created depreciation area. So you go to IMG/SPRO:

Financial Accounting (New) →Asset Accounting →Organizational Structures → Copy Reference Chart of Depreciation/Depreciation Areas → Copy Reference Chart of Depreciation or EC08 t-code.

In order to configure depreciation areas into newly created depreciation plan, go to:

Financial Accounting (New) →Asset Accounting →Organizational Structures → Copy Reference Chart of Depreciation/Depreciation Areas →Copy/Delete Depreciation Areas or OADB t-code.

What else.. you will have to define whether depreciation area posts APC to G/L in real time, or periodically (OABC t-code), how depreciation is getting posted to G/L, or maybe there’s no depreciation posting happening and it is just informative display of depreciation values (OABD t-code) and etc. and etc.

Next what you’re doing is, assigning newly created depreciation plan to company code. Depending on organization structure of the company, there can be lots of company codes, with their own accounting principles, due to geographical dimension, then you will be maintaining lots of depreciation plans for each company code, and assign them by the following menu path:

Financial Accounting (New)  →Asset Accounting  →Organizational Structures  →Assign Chart of Depreciation to Company Code or OAOB t-code.
Organization structure: Asset Classes. This one is pretty simple, normally accountants already have asset classes/groups they’re using in legacy system. So on As-Is part of the project, you already know how many classes/what are the names of asset classes and etc. When maintaining asset class, you will have to start from:
a)     Configuring account determination directory (based on which integration with General Ledger will be maintained next);
b)     Screen layout groups (suppose, different asset classes, have different requirements for statuses of fields on asset master data level);
c)     Number range of asset class (can be external/can be internal, depending on business requirements) via AS08 t-code;
Centralized t-code for maintaining asset classes is OAOA, which can be accessed by following SPRO menu path:
Financial Accounting (New) → Asset Accounting → Organizational Structures → Asset Classes→ Define Asset Classes

(3)  Master Data:

You’ve already created screen layouts for asset classes on step above. Then you probably are in need of configuring statuses of fields on tabs level and etc. (you might need to check for AOLA and AOLK t-codes in order to proceed). Also there’s separate screen layout that needs to be defined for depreciation... There are several so called blank fields, which can be used for whatever purposes you have. Check for ANLA-GDLGRP. Asset different dimensions, tax groups, and things like that can be stored here. These fields are informative, and good to have them for different reporting purposes. Besides, there’s nothing much to be said here.. So let’s continue with next step.

(4)  Business transactions: such as acquisitions, write- off, asset transfer. There’s a list of standard acquisition types that are already there, but if you need something specific, then you should go by the following menu path:
Financial Accounting → Asset Accounting→ Transactions → Acquisitions → Define Transaction Types for Acquisitions or AO73 t-code. Then there should be integration with G/L configured via AO90 t-code, or by the following menu path: Financial Accounting→  Asset Accounting → Integration with the General Ledger → Assign G/L Accounts. While maintaining Integration with G/L for each asset class, on step (2) of current guide, you might noticed that there is single field, where you should put precise G/L account for asset acquisitions. But, suppose, you want different G/Ls to be used for acquisition of same asset class, depending on transaction type (like, for instance, you want acquisition G/L 1000 to be used for transaction type 100, G/L 2000 for acquisition type 110 and etc.) This can be done via small user- exit in GGB1. Create some Z* table, write the logic of user exit so that, on line items level:
If ANLA- ANLKL= ‘A01’ and BWASL= ‘100’, then KTANSW= ‘1000’
Or something of a kind.
Same goes with write- offs- transaction types, integration with G/L. Nothing complicated.
Regarding transfer, there should always be two types of transaction types configured for asset transfer: for old assets and for newly acquired ones. Also I’ve highlighted one small thing about asset transfer Enjoy t-code by the following topic in my blog: http://autumnmoodpushkin.blogspot.com/2016/06/sap-fi-aa-asset-values-transfer-t-code.html
Capitalization of AUC- integration with CO, or Investment Management, depending on design of your ERP system, or you can also do it in FI-AA itself.

(5)  Period –End closing: Depreciation run (monthly, yearly and etc). Depreciation keys are specified by the following menu path:
Financial Accounting → Asset Accounting→ Depreciation→ Valuation Methods→ Depreciation Key→ Maintain Depreciation Key or AFAMA t-code. These keys are assigned to asset classes in OAYZ t-code. Depreciation run program is RAPERB2000. What else is here.. Depreciation posting is done in real time only in one single depreciation area, rest are getting updated in G/L periodically.

(6)  Data migration: master data is happening in both iterations, first is, you create new-old asset master data via AS91 t-code, and afterwards, you upload all of the asset values via AS92 t-code. This can be done via LSMW, via batch input with help of ABAP developer and etc. LSWM tool is quite easy to use here. I will be uploading LSMW guide a little bit later.

(7)  Finally, set the status of the company code as ‘Production’ and that’s pretty much about it.