Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Building a logic to get data from a table

Former Member
0 Kudos
1,217

Hello,

I am trying to figure out how I can write a logic for getting the invoice number from DFKKP-XBLNR but the XBLNR is not a key in the table. I try to get the data from the table but it takes a long time to retrieve the data. I found that this might be an option.

ERDK-OPBEL ===> ERDB-OPBEL => ERDB-INVOPEL ===> DFKKOP-OPBEL

1 ACCEPTED SOLUTION

Ashg1402
Contributor
0 Kudos
718

Hi,

whenever you get such kind of issue use transaction SQVI. Create a new quickview as a table join and star adding tables, you will automatically get the conditions.

11 REPLIES 11

Ashg1402
Contributor
0 Kudos
719

Hi,

whenever you get such kind of issue use transaction SQVI. Create a new quickview as a table join and star adding tables, you will automatically get the conditions.

Former Member
0 Kudos
718

Hello,

So I would need to use SQVI and create a query then add that to the ABAP program? The users wants to be able to select from the Invoice Number but when I add the XBLNR to the program it takes a very long time and doesn't select it by the Invoice Number. So the transaction SQVI will help me with this problem? Thanks for you response.

0 Kudos
718

Hello,

Well, this gives a graphical representation of table joins, which in many cases is very helpful.

Clemenss
Active Contributor
0 Kudos
718

Hi Shawn Reed,

I don't know what you got and what you want. If you know the ERDK data, why don't you just select XBLNR from DFKKOP where OPBEL = ERDK-OPBEL?

Otherwise you can reduce runtime by joining (selecting first) from DFKKKO with a known HERKF value.

I would like to help you but the information given is like nothing. Just say what you are doing or what you are asked for (process!)

Regards Clemens

Former Member
0 Kudos
718

There is already a custom report in place and the report runs fast when I select from the BP and CA but when I added the "Invoice Number" the report takes a very long time in the aging report to return with the selection. I used SE11 to see what the Primary Key is for the tables. XBLNR isn't the primary key in the DFKKOP table so it'll take too long to run the report so I cam trying to see how I can speed up the selection process. When I am in DFKKOP in SE11 using the invoice number "XBLNR" in the table it takes a long time to get the data but when I input the BP "GPART" it returns the data very quick. The end users wants to be able to select from the Invoice Number because when the customer is paying for their utility bill they only use the Invoice Number and it takes the cashier longer trying to look for their account.

former_member182805
Active Participant
0 Kudos
718

DFKKP is not a database table in SE11. Is it a structure that gets filled during a transaction.

In which document are you running your code? Can you explain the requirement?

0 Kudos
718

ERDK-OPBEL ===> ERDB-OPBEL => ERDB-INVOPEL ===> DFKKOP-OPBEL and I need to be able to select from XBLNR (Reference Document Number) in DFKKOP. I am trying to get the "Invoice Doc" from CIC0

0 Kudos
718

did you ask the functional consultant to provide you with the table keys and join conditions?

0 Kudos
718

No. We don't have a functional consultant

0 Kudos
718

Who has written the functional specification document?

Who has given the requirement?

0 Kudos
718

It is a custom report that was created a very long time ago and the person is no longer employed here. As for me, I am going on 9 months with this company. So I am new to SAP.