Sep 11, 2023

Fiori App "Production Cost Analysis" status mismatch versus SAP GUI

 

I recently run into this while testing the new Fiori App "Production Cost Analysis" and wanted to share it with the community.


This new Fiori App, has a somewhat "weird" or new way to deal with Order statuses as we were used to in the past when we would display them in GUI (Ex. CO03).

If you see my 1st screen capture, my Production Order 10004582, shows with status "Closed" in the Fiori App. Which for me it was an issue right away when I saw it, because I knew I did not Closed (CLSD) this Order yet.


If you display this same Order number in GUI Tcode CO03 (2nd screen capture), you can clearly see the highlighted Order statuses as being REL - Released and DLV for Delivered. But nowhere in the Order statuses you will see CLSD - Closed.

Is the Fiori App working properly ? YES

Is this some sort of bug in the App that needs to be reported and fix ? NO

Is there any OSS Note that fixes this issue ? NO

No, this is not a bug and the Fiori App is working properly (as per SAP design). 

According to OSS Note 3295371 ( APP F1780 "production cost analysis" doesn’t show correct order status ), this works as intended. It considers the status DLV - Delivered that the order has been completed and therefore is Closed as in the Fiori App.

Being used to the traditional Order statuses, this makes me a lot of noise and is a bit misleading as in the backend the order is not even TECO - Technically Complete yet, and the Fiori App already shows it as Closed.

This could lead to several issues and impacts if not understood properly.

No TECO in the orders. Orders could remain in those statuses for ever. You will need to use other reports to make sure the shop floor people TECO them. (I know you should not use this report to analyze order statuses, but still the mismatch is what bugs me ...)

Same case for real CLSD - Close that should be put in the Orders after a period of time.

I find it weird, but I guess that only for the purpose of analyzing "Production Variances" a DLV status means no more work on the order. But from a technical point of view, this status will not prevent the shop floor from continuing using the order and book costs against it if they want.


Below is the OSS Note and an extract of it where it explains this situation.

OSS Note 3295371 - APP F1780 "production cost analysis" doesn’t show correct order status

https://me.sap.com/notes/3295371

    Please compare order number XXXXXX (Status ID = REL) in the system. In SAP GUI (t-code COOIS, CO02/3, COR2/3, etc.), the manufacturing order has more statuses which some are relevant and others aren't relevant for the FIORI app (usually CRTD->REL->PCNF->CNF->DLV->TECO->CLSD etc.).

    In the Fiori app, the manufacturing orders with the 'Released' status [REL] (or partially released [PREL]) but not 'Delivered' [DLV] or 'Technically Completed' [TECO] or 'Closed' [CLSD] statuses are considered as 'OPEN.' The orders with DLV, TECO, and CLSD statuses are considered CLOSED in the Fiori apps.

The order gets OPEN since it's released, and later it gets status CLOSED once TECO, DLV or CLSD status is set. These two statuses: OPEN and CLOSED, are available for selection in the smart filter dropdown box (Open, Closed, Open and Closed).


If your Company and/or Project needs to implement this, or any of the functionalities described in my Blog, or advise about them, do not hesitate to reach out to me and I will be happy to provide you my services.

Jul 29, 2023

Practical use case of SE16H with a quick Query to understand Material account determination (FI-MM)

INTRO

The days of using SE16N (or even the old SE16) should be over now and you should now embrace the new evolution of it. The new SE16H !!! "H" for the HANA database era and capabilities.

This new version (SE16H) offers grouping capabilities, sorting, aggregation (like COUNT for counting records) and one of the most important one, JOIN capabilities. Now you can JOIN other tables to retrieve the content or descriptions that you can find in other satellite tables or Header to Line items relationships in one big Query / Result instead of jumping from one to another.

In the past we used to execute several Queries with SE16N (or SE16 for the old folks), download to Excel and then VLOOKUP those values to join them and or get descriptions. Now you can do all of that directly in SAP with SE16H in one step.

QUERY

This Query will allow you to quickly understand and give you more information about all your FI-MM account determination from your system by providing GL account descriptions and Valuation Classes names,

FI-MM Account determination configuration can be found in Table T030.

Once in SE16H, go to "Outer Join Definition" and create a new one. Provide a Name and a Name / Description. 

Then add Table SKAT - GL Account Master record descriptions by clicking the green add icon with the "+" on the 1st table for "Definition of Secondary Tables". 

Once added click on the "Output" icon (same as the Multiple selection icon for reports). This will allow you to select which fields you want to output from your "joined" SKAT table in your final query results. Accept and you will go back to the prior screen.

Then on the 2nd part of the screen (Selected Secondary Table) you have to enter the different fields that you need to join both tables. In our case, I am looking to display the GL accounts descriptions / names that I have in Table T030 as there is no way that I would know them by hard by just looking at T030 directly, and there are quite a few of them.

Enter SAKNR on Table field, select Method "Reference" (as you will reference / join it with the value of table T030), Reference field KONTS (GL account) from Table T030 then Table T030.

Add 2 other lines for KTOPL (Chart of accounts code), but in this case it will be as a "Constant" and value 0001 as my Chart of Accounts is 0001. Note: don't put this value as '0001' or you will get an error in your query, you do not need the colons for a constant as you would do while writing code.

Then add SPRAS (Language) as you are bring Text descriptions from a Table (SKAT) that is language dependent. In this case E for English and not EN. E for the technical unconverted value for English language. If you are not sure of your language technical value, display SKAT first in a separate SE16H window to know yours.

Finally, I want to add a 2nd table that will show me the Valuation Classes descriptions, as there are several and you do not always know them all by hard. Follow the same process but in this case for Table T025T (T for Text table for original table T025 Valuation classes).



Save your "Join Conditions" and then go back to SE16H main screen and select your "Outer Join Definition" name that you just created and Execute.
You can also select which fields you want to output from T030 in this main screen too. Then you can save your "layout" and re-use it next time in conjunction with your Outer Join definition.

At the end, after adding the 2 tables for GL account and Valuation Classes descriptions, your end result will show you all the T030 records with their corresponding descriptions for GL and Valuation classes. This will help you understand your FI-MM Account determination in a better way.


PS.: It is a shame that we do not have a table to get the descriptions for the field "Transactions" / KTOSL that would tell us what BSX, GBB, PRD, WRX, etc mean that we could add here too. But as an SAP Consultant, we need to know them or have proper notes / documentation with their meaning and usage.


If your Company and/or Project needs to implement this, or any of the functionalities described in my Blog, or advise about them, do not hesitate to reach out to me and I will be happy to provide you my services.

Apr 11, 2023

Some banks can't deal with characters with accents and special characters, how to remove them with no-code ...

Recently, while doing a banking implementation with a US bank, I run into an issue that never had before. It caught my attention and thought it was worth sharing it because it is quite specific that I am sure it is going to benefit someone.

I was doing payment files testing with a US Bank (a really big one) for my client's US and Canadian operations and because my client also operates in the province of Quebec, Canada (where we also speak French); we run into some particular issue because we have data with French accented characters. 

It is really common in the French language to have accents on people's name, streets and companies too. But this bank's systems where not able to handle and read our files because of this "special characters / strange characters". Many times bank's systems are so antiquated that they are still running mainframe servers that were conceived in the 80's easily. Many of this servers and operating systems do not have the ability to handle some of this characters and even had a complete different code page too. In some of this cases, since we were passing them ASCII files (as per their request), their systems were not interpreting these characters and adding an extra space to the line record. This was making the record longer and therefore failing.

These are some of these "special characters" (Ex, À Á Ã È É Ê Ì Í Ò Ó Ô Ù Ú Û à á â è é ê ì í î ò ó ô ù ú û ).

Now there are 2 different scenarios that I had where I needed to remove this special characters, one without code and another one with.

# 1 - DME file creation (Ex. Electronic Payments, Positive Pay or any type of Banking file)

#2 - Check printing


# 1 - DME file creation

In this scenario we were creating 2 different types of files for this bank, an ASCII Positive Pay file and an XML ISO 20022 payment file. The ASCII one was the one that the bank was not able to process properly. 

In order to remove the 'special characters' on the DME file, you just need to flag one option on the corresponding field and the DME engine will take care of the rest.

Ex. I want to remove the 'special characters' from the Vendor Name (PayeeName1 field in my DME) that is part of the output file.


Select the Field name (Element or Atom) and click on the "Conv.Function" icon. You will get a pop-up like this one (see below).



Here you have a series of options to right justify or left justify your characters. Then on the 2nd part, you have the option "Replace National Chars". This option will allow you to replace these series of "accented" characters by no accented ones by executing a standard FM behind the scenes. (which opens the door to talk about my option #2).


#2 - Check printing

I mentioned that the output file was related to Positive Pay, so in this case, we needed to have a exact match file vs. printed check otherwise the bank was going to reject our checks. So, we also needed to adjust our check forms so that the printed names do not have these accented characters either. 

To do this, we will be using the exact same Function Module that is available in the DME engine, but in this case calling it via code.

FM SCP_REPLACE_STRANGE_CHARS


You can test it here to see the results before incorporating it in your code.


Here you will see how in the Input text I put all sort of accented characters and the FM returned all the same characters but without accents. The same can be executed in your forms or any other Abap program to remove these characters.


Bonus track ...

You can also use program RSCP0155 that has a selection screen where you can play with more sophisticated options like input and output code page and range of Unicode characters. Then this selection screen will end up executing this same FM and returning all the input characters and converted characters for the whole ASCII code. So you can see upfront what your characters will look like after conversion.



Part of this Post is based on OSS Note 
1062237 - Transliteration of characters with SCP_REPLACE_STRANGE_CHARS

(requires a valid SAP Marketplace ID to display the Note) 



If your Company and/or Project needs to implement this, or any of the functionalities described in my Blog, or advise about them, do not hesitate to reach out to me and I will be happy to provide you my services.