P_IN_CUSTOMERGSTHEALTHCHECK

DDL: P_IN_CUSTOMERGSTHEALTHCHECK Type: view_entity COMPOSITE

P_IN_CUSTOMERGSTHEALTHCHECK is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_IN_CustomerGSTHlthChkList, I_Customer, I_CustomerCompany) and exposes 13 fields with key fields CompanyCode, Customer, IN_GSTHlthChkCategory, IN_GSTHealthCheck.

Data Sources (3)

SourceAliasJoin Type
I_IN_CustomerGSTHlthChkList CustMasterCheckList cross
I_Customer I_Customer inner
I_CustomerCompany I_CustomerCompany from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_CustomerCompany CompanyCode Receiver Company Code
KEY Customer I_CustomerCompany Customer Sold-to Party
KEY IN_GSTHlthChkCategory I_IN_CustomerGSTHlthChkList IN_GSTHlthChkCategory
KEY IN_GSTHealthCheck I_IN_CustomerGSTHlthChkList IN_GSTHealthCheck
CompanyCodeName
CustomerFullName I_Customer CustomerFullName Customer Name
BusinessPartner
IN_GSTHlthChkCatFldName I_IN_CustomerGSTHlthChkList IN_GSTHlthChkCatFldName
IN_GSTHealthCheckCatDesc I_IN_CustomerGSTHlthChkList IN_GSTHealthCheckCatDesc
TaxNumber3
charendasIN_CustHasGSTHlthChkErr
char100endasIN_GSTHlthChkCatFldVal
IN_GSTHlthChkCrrtnStp I_IN_CustomerGSTHlthChkList IN_GSTHlthChkCrrtnStp

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_IN_CUSTOMERGSTHEALTHCHECK.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW P_IN_CUSTOMERGSTHEALTHCHECK AS
SELECT
  I_CustomerCompany.CompanyCode AS CompanyCode,
  I_CustomerCompany.Customer AS Customer,
  CustMasterCheckList.IN_GSTHlthChkCategory AS IN_GSTHlthChkCategory,
  CustMasterCheckList.IN_GSTHealthCheck AS IN_GSTHealthCheck,
  I_CustomerCompany._CompanyCode.CompanyCodeName AS CompanyCodeName,
  I_Customer.CustomerFullName AS CustomerFullName,
  I_Customer._CustomerToBusinessPartner._BusinessPartner.BusinessPartner AS BusinessPartner,
  CustMasterCheckList.IN_GSTHlthChkCatFldName AS IN_GSTHlthChkCatFldName,
  CustMasterCheckList.IN_GSTHealthCheckCatDesc AS IN_GSTHealthCheckCatDesc,
  replace_regexpr( pcre => abap.sstring'[A-Za-z0-9]', value => CustomerTaxNumber.TaxNumber3, with => abap.char'Z', result_length => abap.int1'15' ) AS TaxNumber3,
  case when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'001' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00001' and IN_UndefinedCustomerSalesTax.CustomerTaxCategory is null and CustomerTaxNumber.TaxNumber3 is initial then abap.char'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'001' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00002' and IN_UndefinedCustomerSalesTax.CustomerTaxCategory is null and CustomerTaxNumber.TaxNumber3 is not initial and CustomerTaxNumber.IN_GSTLegalStateCode is not initial and substring(CustomerTaxNumber.TaxNumber3, 1, 2 ) <> CustomerTaxNumber.IN_GSTLegalStateCode then abap.char'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'001' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00003' and IN_UndefinedCustomerSalesTax.CustomerTaxCategory is null and CustomerTaxNumber.TaxNumber3 is not initial and length(CustomerTaxNumber.TaxNumber3) <> abap.int1'15' then abap.char'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'001' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00004' and IN_UndefinedCustomerSalesTax.CustomerTaxCategory is null and I_Customer.TaxNumber3 is not initial and length(CustomerTaxNumber.TaxNumber3) = abap.int1'15' and TaxNumber3 <> abap.char'ZZZZZZZZZZZZZZZ' then 'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'002' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00001' and CustomerTaxNumber.IN_GSTLegalStateCode is null then abap.char'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'003' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00001' and I_Customer.OrganizationBPName1 is initial then abap.char'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'004' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00001' and IN_UndefinedCustomerSalesTax.CustomerTaxCategory is not initial and IN_UndefinedCustomerSalesTax.CustomerTaxClassification is initial then abap.char'X' when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'005' and CustMasterCheckList.IN_GSTHealthCheck = abap.char'00001' and IN_UndefinedCustAddrSalesTax.CustomerTaxCategory is not initial and IN_UndefinedCustAddrSalesTax.CustomerTaxClassification = abap.char'' then abap.char'X' else abap.char'' end as IN_CustHasGSTHlthChkErr AS charendasIN_CustHasGSTHlthChkErr,
  case when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'001' then cast( CustomerTaxNumber.TaxNumber3 as abap.char (100) ) when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'002' then cast( CustomerTaxNumber.IN_GSTLegalStateCode as abap.char (100) ) when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'003' then cast( I_Customer.OrganizationBPName1 as abap.char (100) ) when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'004' then cast( IN_UndefinedCustomerSalesTax.CustomerTaxClassification as abap.char (100) ) when CustMasterCheckList.IN_GSTHlthChkCategory = abap.char'005' then cast( IN_UndefinedCustAddrSalesTax.CustomerTaxClassification as abap.char (100) ) else cast( abap.char'' as abap.char (100) ) end as IN_GSTHlthChkCatFldVal AS char100endasIN_GSTHlthChkCatFldVal,
  CustMasterCheckList.IN_GSTHlthChkCrrtnStp AS IN_GSTHlthChkCrrtnStp
FROM I_CustomerCompany
INNER JOIN I_Customer ON /* join condition not captured in parsed metadata */
CROSS JOIN I_IN_CustomerGSTHlthChkList AS CustMasterCheckList
;