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: 

select KONTO_TXT, KOSTL, HKONT, *ACCNT* from which tables?

Former Member
0 Kudos

Hi All,

I am trying to select the following data - but am coming up against no direct read and data structure problems. I have even tried to write a program to select data but am getting data dictionary errors.

<u>Desired Select</u>

(for user who wants to see all line items on their cost centre, by GL account and referencing Vendor where data is available)

Line item with GL, Cost Centre AND Vendor name (where applicable).

Data information (from screen FB60 - which maybe the wrong place to look) - <b>but probably more to do with report KSB1</b>

Vendor - INVFO-ACCNT (top line) ... no direct read on INVFO table

GL - ACGL_ITEM-HKONT(line item) ... ACGL_ITEM is a data structure ... on table SKB1

Cost Centre - ACGL_ITEM-KOSTL (line item) ... ACGL_ITEM is a data structure ... on INVFO table

Short Text - ACGL_ITEM-KONTO_TXT (line item) ... ACGL_ITEM is a data structure ... on INVFO table

<u><b>Question</b></u>

<b>Is there a simple join I can write to bring back this information?</b>

I'm just having trouble finding tables I can query against and have had no luck using SE11, SE12, SQVI, ST05 or SQ01. Sorry, but my SAP knowloedge is limited

eg

report GetDesiredData.

data: wa_data-LineItem type <u><b>????,</b></u>

wa_data-CostCentre type <u><b>????,</b></u>

wa_data-GLacc type <u><b>????,</b></u>

wa_data-Vendor type <u><b>????.</b></u>

select * from <b>????</b> into corresponding fields of wa_data.

  • will create screen and where variables later

new-line.

write: (20) wa_data-LineItem color col_normal,

(10) wa_data-CostCentre color col_negative,

(10) wa_data-GLacc color col_normal,

(10) wa_data-Vendor color col_negative.

endselect.

Many many thanks for all and any help.

Kind Regards,

Gavin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Gavin

FOr Controlling check ->

Please check COEP or COEJ

K_DOCUMENT_SELECT and K_LINE_ITEMS_SELECT_AND_LIST function modues

For FI ->

Please use transaction FBL1n for Vendor items and FBL3N for GL items ( check dynamic selections to choose additional data like Cost centre etc)

Regards,

Arun

5 REPLIES 5

Former Member
0 Kudos

Hello Gavin

FOr Controlling check ->

Please check COEP or COEJ

K_DOCUMENT_SELECT and K_LINE_ITEMS_SELECT_AND_LIST function modues

For FI ->

Please use transaction FBL1n for Vendor items and FBL3N for GL items ( check dynamic selections to choose additional data like Cost centre etc)

Regards,

Arun

0 Kudos

Hi Arun,

Thanks for the reponse.

Via FBL3N I can get close to what I need using the method you suggested But unfortunately I still cannot get the Vendor attached to the line item (Vendor not Trade Partner).

The vendor field I am looking for is visible on FB60 - but getting that back into FBL3N via Dynamic Selections and Change layout does not seems possible It's this Vendor field that is causing me the problems but is key to the users request. Likewise KSB1 also pulls back almost all of the required data - except vendor... however if I drill down in KSB1 I can add vendor to the layout.

As for the COEP, COEJ, K_DOCUMENT_SELECT, K_LINE_ITEMS_SELECT_AND_LIST - I have been unable to use these (transactions/report/object does not exist etc etc)

Any other pearls of wisdom you could throw my way?

Again - many thanks for responding...

... kind regards,

Gavin

0 Kudos

Hi

Please try BAPI_AP_ACC_GETOPENITEMS and later you can fetch the additional details.

Or in the worst case check BKPF/BSEG or better use secondary tables like BSAK/BSIK + BSAS/BSIS + BSAD/BSID

Regards,

Arun

0 Kudos

Thanks Arun

It's going to take me a liitle while to hack through those table, check what data we have populated in them and try and join things together (it's ages since I did BC400!)

Thank you very much for your help and I will come back to this tommorow.

Kind Regards,

Gavin

0 Kudos

Hi Arun,

Sorry for the delay in getting back. You know how it can get at work sometimes :s

Those table names were very helpfull - thanks

Unfortunately I got a few "No Direct Read errors" on some of them... but I have progressed this one as far as I can and the user is happy with my response.

Thank you for your assistance,

Kind Regards,

Gavin

PS DO you know what might have caused the "no direct read" error?