Blog

Retrieving Data Behind the SAP FBL5N Transaction Code

FBL5N (Customer Line Items) is a standard SAP transaction code available within R/3 SAP systems depending on your version and release level. How exactly can the data behind the FBL5N tcode be retrieved? Based on the amount of posts and articles on the internet, this is a question asked by ABAP developers quite often. Since I could never seem to find the solution in one place, I thought it’d be helpful to put all of the information ABAP developers need to solve this problem in one spot. The information below explains how to get the data behind that transaction and how to filter it like FBL5N does.

1. Customer Account

This is a customer or vendor number.

2. Company Code

When running FBL5N, a specific company code or range can be used. This can be done in back end logic as well, or ran for all.

3. Open Items

BSAD and BSAK are tables for cleared items, so it seems like they should be ignored, but FBL5N pulls in records from those tables if the clearing date is greater than the as of date (Open at key date in screenshot above).

BSID/BSIK where budat <= open at key date(3)

BSAD/BSAK where budat <= open at key date(3), augdt > open at key date(3)

4-5. Cleared Items

In this scenario, only cleared items should be retrieved, so only tables BSAD and BSAK should be used along with rules 7-11.

BSAD/BSAK where budat <= open at key date(5), augdt in clearing date range(4)

6. All Items

BSID/BSAD/BSIK/BSAD where budat in posting date range(6)

7. Normal Items:

bstat = space, umskz = space

8. Special Items:

umskz <> space, bstat <> S, V, W, Z

9. Noted Items:

bstat = S,

10. Parked Items:

bstat = V or W

11. Vendor Items:

bstat = space, umskz = space

In conclusion, the data behind the transaction FBL5N is easily obtainable by using the above rules. Ensure that the rules chosen go with the type of data needed to be retrieved from the backend and the results will always match what is shown in transaction FBL5N.

 

About the Author:

Brandi Setzler is a Principal Consultant at Sparq and has been with the company for 14 years. She’s spent her career specializing in SAP ABAP. Brandi has led remote teams and worked as a developer for several clients as well as trained new employees to work in the space. She lives for her family, which includes a husband, two children, three French Bulldogs, and two bearded dragons.

Related Blogs
See All Blogs
Snowflake logo
Blog
Jun 26, 2025

Snowflake Summit 2025 Announcements

Snowflake Summit 2025’s latest announcements made it clear: the path to genuine AI-driven impact hinges on frictionless access to data, the ability to act on it with clarity, and absolute confidence in its protection. Learn more about how they're making that happen for customers in this article.

Read More
A team in an office smiling.
Blog
Jun 25, 2025

How ChatPRD Helps Build Better Stories (and a Stronger Team)

When user stories are vague, it slows down delivery, trust, and momentum. This article by Senior Product Strategy Consultant Traci Metzger shows how she used a lightweight, AI-guided system (ChatPRD) to write clearer, developer-ready requirements that actually accelerated execution.

Read More
Man working on a computer
Blog
Jun 6, 2025

QA in the Age of AI: The Rise of AI-Powered Quality Intelligence

As organizations push code to production faster, respond rapidly to new customer needs and build adaptive systems, the expectations on quality have changed. It's no longer enough to simply catch bugs at the end of the cycle. We’re entering an era where quality engineering must evolve into quality intelligence and organizations adopting quality intelligence practices are reporting measurable gains across key delivery metrics. Learn more in this article by Principal Engineer Jarius Hayes.

Read More
See All Blogs
noun-arrow-2025160 copy 2
noun-arrow-2025160 copy 2
See All Blogs