Application Development and Automation 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: 
Read only

finding code in KSB1

Former Member
0 Likes
2,991

I currently have a ticket open concerning adding fields to FBL3N. I am trying to find the code in KSB1 which retreives the offset accounting name for the offset account. Our Business analyst said that my process should mirror the way KSB1 does it. I have been tracing all morning and I cannot seemed to find out where the code to retrieve the offset account name. I have been focasing on the FM K_LINE_ITEMS_SELECT_AND_PRINT with no luck. I have been using the <F5> <F6> <F&> approach and getting deeper into the code to the point of losing focus. Is this the way I should proceed? Does anybody know where the code is within KSB1 to gets the offset account name? thanks in advance for the help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,652

Thanks for the quick replay. I have looked at the tables and I am not sure what I am looking at. I was told that I have to use the offset account type so that I look in the correct table to get the correct account name. in CSKB there is field KATYP but this doesn't match to the offset account type field on the form.

I think that the GL account descriptions are stored in a different table than the vendor account descriptions as well as the customer account descriptions

18 REPLIES 18
Read only

suresh_datti
Active Contributor
0 Likes
2,652

Try tables CSKB & CSKU

Regards,

Suresh Datti

P.S. Yes debugging KSB1 is such a pain..

Read only

Former Member
0 Likes
2,653

Thanks for the quick replay. I have looked at the tables and I am not sure what I am looking at. I was told that I have to use the offset account type so that I look in the correct table to get the correct account name. in CSKB there is field KATYP but this doesn't match to the offset account type field on the form.

I think that the GL account descriptions are stored in a different table than the vendor account descriptions as well as the customer account descriptions

Read only

0 Likes
2,652

Look at table SKAT.

Rob

Read only

0 Likes
2,652

KSB1 reads offset account texts in FORM READ_MASTER_GKONT of include LKAEPFSL check the code, it's using function modules based on accout type to get texts from tables LFA1, SKAT, CSKT.

Regards

Sridhar

Read only

0 Likes
2,652

chekc the standard programs RKAEP000 for KSB1 and RFITEMGL for FBL3N...

debug it may be it helps u

Read only

Former Member
0 Likes
2,652

I ahve my code built to retrieved data from SKAT but I was told that SKAT only has the GL accounts?. what if the offset account is a vendor account (offset type K) or a customer (offset type D). these accounts would not be located in SKAT would they?

Read only

0 Likes
2,652

Then LFA1 and KNA1 too, or you can use the address number from the vendor or customer and use central address management. I generally just go to the tables.

Rob

Read only

Former Member
0 Likes
2,652

i am looking for the include LKAEPFSL. I don't see it as part of the program RKAEP000. Is there way to display this include?

Read only

0 Likes
2,652

I think it's part of a function module called from RKAEP000, put a breakpoint in the form and execute KSB1.

That form is called from func module K_LINE_ITEMS_SELECT_AND_LIST

Regards

Sridhar

Message was edited by: Sridhar K

Read only

Former Member
0 Likes
2,652

Hi

I assume that you need to add aditional fields in the list output of FBL3N. One of the field is account name (offset) for the account number. Am I right?.

KSB1 has logical database assignment. Debugging that program is not suggestible.

FBL3N is showing an ALV list. In that list each GL account is listed with its description (account name).

Let me clearly explain your requirement. I am waiting to hear from you.

Bala

Read only

Former Member
0 Likes
2,652

I currently have a message opened "adding a field to FBL3N" which explains what I am trying to do and what I have done so far. Please let me know if you need more inforamtion than what is explanin in the massage.

Read only

0 Likes
2,652

Hi

SKAT is the GL account master table. It must keep all account number and its name. So if you search for a account name for any account (offset / customer / vendor etc..) you should have the account name in SKAT for that account.

My question is..FBL3N already shows each account, its name in the list. What do you want to add as new in FBL3N?

Bala

Read only

0 Likes
2,652

You're right. That post (adding a field to FBL3N) is still open. Since you're obviously done with it, why don't you assign some points and close it?

Rob

Read only

Former Member
0 Likes
2,652

Bala,

I hava a requirement to use the offset account number and type to retrieve the offset account name snd add it to FBL3N . I was told that the ofset account names are in differenct tables and based on the offset account ype, determines what table I need to use to get the name.

Read only

0 Likes
2,652

Hi Timothy,

The Offsetting Account Number(GKONT) & Offsetting Account Type (GKOAR) are stored in the table COEP (CO Object: Line Items (by Period)). This table is a monster & I would never attempt a direct SELECT on it. Go yo COBK first, grab the relvent document number for the Period in Question and then read COEP. You can also try the database View COVP.

Regards,

Suresh Datti

Read only

0 Likes
2,652

Hi

There is a FM FI_OFFSET_ACCOUNT_DETERMINE. This FM sets the offset account detaisl in internal tables. It referes tables ACCIT, ACCCR, ACCTIT.

Try this FM and SAP tables. ACCTIT has account type, name etc.

Bala

Best of luck

Note: Award points if helpful

Read only

0 Likes
2,652

Look at my previous post:

GL accounts - SKAT

Customers - KNA1

Vendors - LFA1

Rob

Read only

Former Member
0 Likes
2,652

Rob,

I still have an oustanding question on the FLB3N thread. Once I get that answered, I will be more than happy to assign the points and close the ticket.