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

BSEG and KOB1

Former Member
0 Likes
897

Hi all,

I have created a program to draw out a profitability report for a Profit Centre Group/ Profit Centres (parameters from selection screen) of a particular company code.

The program will extract records from BSEG table based on the profit centre specified, where Sales and Purchase can be determined using field SHKZG (S-Debit/ H-Credit).

However, when I have completed the program and get ready for user testing, user claims that my total sales value is incorrect, user claims that the value should be the same as the result from transaction KOB1 (where user inserted Profit Centre Group and G/L account number at the selection screen of KOB1).

I am wondering why the value/result should be the same as KOB1 where BSEG should be the table to calculate profit.

Anyone has any ideal on the relationship between BSEG and transaction KOB1?

Thanks and regards,

Patrick

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
733

Hi

I don't know how you calculate the total, but you should only consider if SHKZG is equal to H, the item is negative and you should get only the item of G/L account type, so BSEG-KOART = 'S'.

Max

4 REPLIES 4
Read only

Former Member
0 Likes
734

Hi

I don't know how you calculate the total, but you should only consider if SHKZG is equal to H, the item is negative and you should get only the item of G/L account type, so BSEG-KOART = 'S'.

Max

Read only

Former Member
0 Likes
733

Hi,

Best option would be, to debug the program of the tcode: KOB1.

Find out how they bring the results. The standard SAP may be using some function module to fetch the amount figures, you can also use the same function module in your program to get that result.

Regards

Subramanian

Read only

Former Member
0 Likes
733

Hi,

I have solved it.

Thanks and regards,

Patrick

Read only

0 Likes
733

I'd be interested in knowing that relationship.

Rob