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: 

I_SALESDOCUMENTITEM subsequentDocument

sebastianbocksh
Newcomer
714

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?

1 REPLY 1

SURYA_ABAP
Participant
0 Kudos
584

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.