‎2017 Aug 02 5:10 PM
Hello All ,
I try to get some posts in BSEG with BKPF Key
GET BSIK
GET BKPF
GET BSEG
append gs_bseg to gt_bseg
i found just the first post for each header bkpf data
so just bseg-buzei = 1
in my case in bseg table i have three posts for a header data
Please , i'm beginner in logical database
can you please provide me an answer to my question
Thanks in advance,
Rachid
‎2017 Aug 03 6:51 AM
Your first GET is GET BSIK so I suppose your are using logical database KDF (?) which only contains the record with vendor account in BSEG node, so usually only one per document, except if you add GET GSEG for offset accounts. If you want every item you must append BSEG and GSEG records to rebuild the full document.
Hint: As logical database are now obsolete (and rarely used outside of HR) why wouldn't you build you report with direct access to database table so BSIK and BSAK -> BKPF -> BSEG every records.
NB: In cas of doubt, build a simple test query/dataset with SQ01/SQ02 on the logical database. Or look for statements PUT bseg/gseg in the logical database program. (You should find a SELECT SINGLE with equal BUZEI and a SELECT INTO TABLE with non-equal BUZEI)
‎2017 Aug 02 5:32 PM
‎2017 Aug 02 5:42 PM
Thanks Horst ,
but i didn't found what i need there , i'm asking if i can get all posts for a bkpf header ,because here it retrieves just the first post for each header data
‎2017 Aug 03 7:00 AM
The idea is, if you want to use obsolete Logical Databases, you have to learn how they work and with that knowledge analyze your problem, e.g. by debugging the program flow.
‎2017 Aug 02 8:38 PM
Why are you using a logical database? If you have the document number then just do SELECT yourself. It's not clear what you're doing or trying to achieve though.
‎2017 Aug 03 6:51 AM
Your first GET is GET BSIK so I suppose your are using logical database KDF (?) which only contains the record with vendor account in BSEG node, so usually only one per document, except if you add GET GSEG for offset accounts. If you want every item you must append BSEG and GSEG records to rebuild the full document.
Hint: As logical database are now obsolete (and rarely used outside of HR) why wouldn't you build you report with direct access to database table so BSIK and BSAK -> BKPF -> BSEG every records.
NB: In cas of doubt, build a simple test query/dataset with SQ01/SQ02 on the logical database. Or look for statements PUT bseg/gseg in the logical database program. (You should find a SELECT SINGLE with equal BUZEI and a SELECT INTO TABLE with non-equal BUZEI)
‎2017 Aug 03 9:22 AM
Thanks Raymond
Yes , i'm working with 'KDF' as logical database
I add a GET GSEG to retrieve other posts
That's what i want to achieve