2023 Apr 06 1:27 PM
Hi all,
i am selecting some data from the CDS-View "I_SALESDOCUMENTITEM" and want to add some Information of the Subsequent Document.
The following statement is not responding a result for the Subsequent Document, even when the VBFA table contains the matching data:
select I_SalesDocumentItem~* , \_MaterialText[ Language = @lv_lang ]-MaterialName as Materialtext,
\_TotalDeliveryStatus-TotalDeliveryStatus as TotalDeliveryStatus,
\_Product\_ProductStatus-Status as Materialstatus,
\_SubsequentDocument[ SubsequentDocumentCategory = 'J' ]-SubsequentDocument as Lieferschein,
\_SubsequentDocument[ SubsequentDocumentCategory = 'J' ]-SubsequentDocumentItem as Lieferscheinposition,
\_SubsequentDocument[ SubsequentDocumentCategory = 'M' ]-SubsequentDocument as Faktura,
\_SubsequentDocument[ SubsequentDocumentCategory = 'M' ]-SubsequentDocumentItem as Fakturaposition
from I_SalesDocumentItem where
SalesDocument = @i_salesordernumber
into table @data(lt_salesdocitem).
I know that the associated CDS I_SDDocumentMultiLevelProcFlow has authorization check #priviledged_only , but the I_SALESDOCUMENTITEM has privilegedAssociations to that.
Any Idea why I am getting no result?
2023 Apr 10 4:46 AM
Hi sebastianbockshecker,
From my view not possible from above query. Create few CDS views for each document for header and item category, use it where condition to retrieve data.