Page 1 of 1

Logical Database DDF

PostPosted: Mon Oct 26, 2015 10:21 am
by rpinxt
I used this database in a query as I thought it would give me amongst others the data also found in FBL5N

However I have a problem with the due date not being the same in DDF versus FBL5N

In my query I had to calculate it, Doc date + payment term days.
This works for normal transaction but for instance a credit note should have same due date as document date.

FBL5N does this correcty my query (obviously) not as it adds the days from the payment term.

So how does FBL5N do it? And is there no 'field' of some sort in DDF which calculates the due date already correctly?

Re: Logical Database DDF

PostPosted: Tue Oct 27, 2015 4:23 am
by Gothmog
It seems to use function module DETERMINE_DUE_DATE for this (for account types KOART = D or K) - you could check if this works for you.

Re: Logical Database DDF

PostPosted: Tue Oct 27, 2015 4:34 am
by rpinxt
Thanks Gothmog I also saw things about this function module but I would not know how to incorporate that in my query...

But I now seem to have found the field in DDF which gives the correct due date.
Field group description says it's a coded field so maybe the coding behind it is the FM you just mentioned.

Only small problem I have is that I also had in the document header text BKPF-BXTXT which gave me the :
"You placed fields from different parallel branches of the hierarchical data source in the same line." error

So need to find a way around that and then I should be good again.

Re: Logical Database DDF

PostPosted: Tue Oct 27, 2015 6:21 am
by rpinxt
Ok found my workaround.
Got header text now directly from BKPF table instead of DDF logical database.
Apparently this way there is no conflict.

Re: Logical Database DDF

PostPosted: Tue Oct 27, 2015 6:34 am
by Gothmog
Yes, the logical database uses this function module to determine the due date.
A solution would be to calculate/get either one of these fields in additional fields instead of the logical database structure.
I'm not sure there is a workaround to fit data from parallel branches of a logical database (i.e. node at the same level, with the same parent node, but no hierarchical link between them) in a single line of a query based on this logical database.