Friday, 29 December 2023

How to get stock on posting date: manually and programmatically

Sometimes for planning purposes we need to get logistics stocks by plant/storage location/material for the specific date. In the blog I will describe some ways to solve the problem depending on version of SAP NetWeaver.

Manual approach via tcode MB5B


Transaction MB5B could help us to read stocks. Tcode could be find via menu path Logistics -> Materials Management -> Inventory Management -> Environment -> Stock -> MB5B – Stock for Posting Date. As we could see from the screenshot below there are also some others useful transactions in the menu path.

Wednesday, 27 December 2023

Abap SQL Common Table Expression (CTE)

I this short blog post, I would like share a few useful CTE examples.

Sometimes we require complex sql queries and at that point we have a few options.

  • CDS
  • AMDP
  • CTE

By considering, DRY principle, if we will use it in multiple places, we may prefer to create cds or amdp depending on requirement. But if our requirement is to use it once, than we can use CTE.

Wednesday, 20 December 2023

Hierarchies: How to Assign a Hierarchy to a Dimension and How to Consume a Hierarchy in an Analytical Query

CDS offers the possibility to structure hierarchical data. For instance, if you have employee data and would like to organize this data based on their manager, you can structure the data hierarchically. You are then able to query data of employees under each manager (sales, for instance). The general structure of a CDS hierarchy is depicted below:

Wednesday, 13 December 2023

Effortless Material Creation using Excel Sheets via Fiori App (e.g., SolidWorks’ CAD-Driven Data)

Introduction


Material creation in SAP is simpler using Fiori and Excel, we can tweak data before uploading, even integrating info from CAD software like SolidWorks or any other data source. This connection makes creating new materials in SAP a smoother process. Let’s dive into how this system works seamlessly.

Summary


In this blog, we’re diving into a streamlined material creation process within SAP. We’ll explore the creation of a Fiori app and an OData service designed to seamlessly integrate data from external sources for material creation. For this blog, we will be using data comes from SolidWorks automation.

Saturday, 9 December 2023

How to display photo of employees from PA30 to module pool custom container

In this blog post you will learn how to make a basic Module Pool program using custom container to display image of employee from PA30.

Module pool programming is a special type of programming which is used to create custom SAP screens.

We will first upload the image for the employee on the SAP Server using the transaction OAAD. The name of the image we upload is APPLE and is in black and white (the supported formats are .jpg and .png).

Wednesday, 6 December 2023

Tips about fetching attachment list from Service Notification

If the requirement is to send the PDF files fetched from the attachment list of service notifications once the service order reaches to specific status, how to get those linked document files based on the service order number will be the key. That is the purpose of this article.

Tips about fetching attachment list from Service Notification

Monday, 4 December 2023

Fiori Element: Display Rating Indicator’s & Images

We had the requirement to display the rating indicator to determine the Employee’s ratings based on their performance, skills and their availability. Here I am trying to display rating indicator by using product details, also displaying the Images of respected product by forming the URL Via OData.

Let’s begin with example.

Here RAP Model also involved to preview the Application but the agenda is that we have to display the ratings for each product

Wednesday, 22 November 2023

Tips about Error EA299 ‘Could not write IDoc to file’ for RFFOEDI1

There is one standard IDOC type DIRDEB with Basic type PEXR2003 used to generate EDI payment documents. It worked fine all the time until last week when one user complained one file was missing in the desired AL11 directory even with multiple re-runs.

Tips about Error EA299 ‘Could not write IDoc to file’ for RFFOEDI1

Monday, 20 November 2023

Service Due Indicator for Managers

Background:


In Many Tables there might be a need to provide a quick high-level view of the Pending status of every record for a quick view by Managers.

For example, a Service Team Manager might want to see the list of Service Orders whose Service Due date is in the past (or) Service Due date which is today (or) Service Due date which is in future.

In these scenarios, we can provide an Indicator in the first column so that the Manager will be able to see the status immediately.

Monday, 23 October 2023

Comparison of Report Development in 3SL & 2SL in SAP S/4HANA Cloud, Public Edition – A customer use case study

Last year, SAP officially launched the 3SL in S/4HANA Cloud, public edition. This three-system setup offers scalability in ABAP development in ADT, allowing developers to create projects on SAP S/4HANA Cloud, and leverage the benefits of custom ABAP code for development extensions. From an analytical perspective, what are the advantages of report development under the three-system Landscape compared to the two-system Landscape only has key user extensibility? What limitations of the two-system embedded analytics can be overcome? This blog post will explore the differences in report development under these two using a customer use case.

Friday, 20 October 2023

S/4HANA Multi Level BOM Unboxed: Navigating BOM Hierarchy: A Recursive Adventure – Part1

Introduction


Greetings, fellow SAP enthusiasts! Today, we’re diving into the intricate world of Bill of Materials (BOM) and tackling a challenging yet fascinating user requirement. Our mission? To develop a Report that navigates through the recursive nature of BOM data, providing users with a comprehensive view of the hierarchy.

The Challenge


The provided scenario outlines a case requirement wherein the described approach can be employed whenever recursion is necessary, contingent upon external specifications.

Our user wants to start with a material and a specific field, the serial number, from the STPO table. The goal is to traverse through the BOM data, then explore related tables (STKO, EQST, EQUI) to finally present a detailed hierarchy of BOM and its related Composite Equipment’s info like materials and serial numbers.

Wednesday, 18 October 2023

Writing ABAP UNIT using test double framework(DOC)

Let’s begin with an example.Below method has one function module dependency and one method external method dependency.The Class having this method is CUT(Code Under Test).The aim of the ABAP unit is to validate the code residing in this method,not to validate the code of the dependent function module / other method.

SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification

Wednesday, 11 October 2023

Do not try this at home – performance improvement in the LIME engine

Disclaimer – this post is about changes in the customer namespace, which maybe belong in the standard and it is not a good idea to develop them in a customer project.

But, as we know, necessity is the mother of invention…

Recently within a customer project the customer was experiencing performance issues with the standard /scwm/pi_upload transaction.

The load of a .CSV file would end in a short dump, saying that the current work process was out of memory. And the system limit per WP was around 8G.

The file itself was not big, but even reducing it to a small number of lines, around 20-30, would not help solve the issue.

Saturday, 7 October 2023

FSCM Workflow – Credit Limit Approval Alternative

SAP ABAP Career, SAP ABAP Skills, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Certification, SAP ABAP Tutorial and Materials

Sometimes SAP standard does not meet all requirements and that’s where the “Custom Code” comes in…

Friday, 29 September 2023

Upload transport files from SAP

Introduction


This blog is useful consultants/Admins/functional folks who can’t not have access to operating system to transfer cofiles and data files

This blog describes detailed steps “How to upload and download cofiles/data files directly from SAP” pretty useful. You don’t need to have access to OS.

How to Do: Download and upload Co-files/Data files (Transports) directly from SAP

Wednesday, 20 September 2023

New Debugger options

Introduction


The New Debugger is a tool that helps technical consultants execute the program line by line or module by module. It stops the program to check the logic, identify errors, analyze the issue, understand the concept, etc. It has many more options compared to the old debugger. We will see some of the uncommon features that are helpful to the developers and functional consultants in their analysis.

If you want to analyze the program’s data flow, then you need to debug the program. To enable or start the debugger, enter “/h” or “/H” in the command area of SAP.

Friday, 8 September 2023

Radio Buttons In SAP Build Apps

Introduction:

SAP Build is an extensive development suite that offers simple and efficient low-code/no-code solutions for developing software, automating tasks, and building business websites. The suite is made up of three essential tools: SAP Build Apps, SAP Build Process Automation, and SAP Build Work Zone.

SAP Build Apps allows users to create applications with ease, from simple to complex, using its low-code architecture. This means that extensive coding knowledge or experience is not required.

Saturday, 2 September 2023

ALV IDA Using CDS View Long Text using (Calculation Field)

Mostly people facing problem to how to use long text using function module, Call class in CDS while creating ALV IDA from CDS View. In this blog I will share my knowledge of ALV IDA Using CDS View and ALV IDA Calculation field (Mostly is used for virial element). Using Calculation Field in this blog I am going to display Long Text and Other Field

In this blog I will focus on below points.

1. Create CDS View (Generic) with 2 or 3 fields.
2. Create class with interface calculation field.
3. Long Text working in method
4. Creation of ALV IDA Program

Monday, 29 May 2023

Dynamic logo in smart form using variables

Introduction


Dealing with logos is always a big deal in Smart form. This blog shows how to generate a Smart form with a dynamic logo in SE38. The objective is by using the parameter values set dynamic logo in the report program.

Requirement: Pass Purchase document number (EBELN) as input parameter and fetch Document date (BEDAT). If the Purchase document date is lower than require date then, print the First logo. Else print the Second logo.