Commit 5e7f8584 authored by ning 宁亚轩's avatar ning 宁亚轩

CBC Environment

parent 8c682a17
<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DATA>
<MASTER_LANGUAGE>1</MASTER_LANGUAGE>
<STARTING_FOLDER>/src/</STARTING_FOLDER>
<FOLDER_LOGIC>FULL</FOLDER_LOGIC>
<IGNORE>
<item>/.gitignore</item>
<item>/LICENSE</item>
<item>/README.md</item>
<item>/package.json</item>
<item>/.travis.yml</item>
<item>/.gitlab-ci.yml</item>
<item>/abaplint.json</item>
<item>/azure-pipelines.yml</item>
</IGNORE>
</DATA>
</asx:values>
</asx:abap>
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DEVC" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DEVC>
<CTEXT>项目管理模块</CTEXT>
</DEVC>
</asx:values>
</asx:abap>
</abapGit>
CLASS zcl_invoice DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_rap_query_provider.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_INVOICE IMPLEMENTATION.
METHOD if_rap_query_provider~select.
TRY.
TRY.
"IF io_request->is_data_requested( ).
"io_request->get_paging( ).
DATA: rt_customer TYPE RANGE OF zdxm,
rt_wbs TYPE RANGE OF char24.
DATA(lo_paging) = io_request->get_paging( ).
DATA(lv_skip) = io_request->get_paging( )->get_offset( ).
DATA(lv_top) = io_request->get_paging( )->get_page_size( ).
DATA(lt_sort_elements) = io_request->get_sort_elements( ) .
DATA(lt_ranges) = io_request->get_filter( )->get_as_ranges( )."Basic search term
DATA(lt_filter_cond) = io_request->get_parameters( ). "setting the filter condition, fetching parameter names from data definition
LOOP AT lt_ranges REFERENCE INTO DATA(lr_range).
CASE lr_range->name.
WHEN 'SoldToParty'.
LOOP AT lr_range->range REFERENCE INTO DATA(lr_range_entry).
INSERT VALUE #( sign = lr_range_entry->sign option = lr_range_entry->option
low = CONV #( lr_range_entry->low ) high = CONV #( lr_range_entry->high ) )
INTO TABLE rt_customer.
ENDLOOP.
WHEN 'WBSElementExternalID'.
LOOP AT lr_range->range REFERENCE INTO lr_range_entry.
INSERT VALUE #( sign = lr_range_entry->sign option = lr_range_entry->option
low = CONV #( lr_range_entry->low ) high = CONV #( lr_range_entry->high ) )
INTO TABLE rt_wbs.
ENDLOOP.
ENDCASE.
ENDLOOP.
DATA:lt_table TYPE STANDARD TABLE OF zcv_xmkp,
lt_table_out TYPE STANDARD TABLE OF zcv_xmkp,
ls_table TYPE zcv_xmkp.
TRY.
"基本数据
SELECT SoldToParty,
WBSElementExternalID,
SUM( Subtotal1Amount ) AS Subtotal1Amount
FROM I_SalesOrderItemCube( P_DisplayCurrency = 'CNY', P_ExchangeRateType = 'M' )
WHERE SalesOrderType EQ 'TA'
AND SoldToParty IN @rt_customer
GROUP BY SoldToParty, WBSElementExternalID
INTO CORRESPONDING FIELDS OF TABLE @lt_table.
IF lt_table IS NOT INITIAL.
"发票相关数量
SELECT Customer,
TransactionCurrency,
SUM( AmountInTransactionCurrency ) AS AmountInTransactionCurrency,
SUM( PaidAmount ) AS PaidAmount,
SUM( OpenAmountInDocumentCurrency ) AS OpenAmountInDocumentCurrency
FROM yy1_nickt01"C_CollectionsInvoiceMemory "I_CollectionsInvoiceMemory
WHERE customer IN @rt_customer
GROUP BY Customer,TransactionCurrency
INTO TABLE @DATA(lt_invoice).
SORT lt_invoice BY customer.
* "项目信息
* SELECT Project AS WBSElementExternalID,
* yy1_zzps001
* FROM I_EnterpriseProject
* FOR ALL ENTRIES IN @lt_table
* WHERE project = @lt_table-I_EnterpriseProject
* INTO TABLE @DATA(lt_ep).
"客户名称
SELECT customer,
customername
FROM I_Customer
WHERE customer IN @rt_customer
INTO TABLE @DATA(lt_customer).
SORT lt_customer BY customer.
* SELECT CostEstimate
* FROM YY1_ZCO001
* INTO TABLE @DATA(lt_invoice1).
"客户名称
ENDIF.
LOOP AT lt_table INTO ls_table.
READ TABLE lt_invoice INTO DATA(ls_invoice) WITH KEY customer = ls_table-SoldToParty BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE-CORRESPONDING ls_invoice TO ls_table.
CLEAR ls_invoice.
ENDIF.
"客户名称
READ TABLE lt_customer INTO DATA(ls_customer) WITH KEY customer = ls_table-SoldToParty BINARY SEARCH.
IF sy-subrc EQ 0.
ls_table-CustomerName = ls_customer-CustomerName.
CLEAR ls_customer.
ENDIF.
MODIFY lt_table FROM ls_table.
CLEAR ls_table.
ENDLOOP.
CATCH cx_sy_dynamic_osql_syntax INTO DATA(lx_data). " exception to catch and manage dynamic query errors . must use this in order to work properly
ENDTRY.
"lo_response->get_business_data( IMPORTING et_business_data = lt_table ).
* DATA lv_lines TYPE int8.
* lv_lines = lines( lt_table ).
DATA(lv_start) = lv_skip + 1.
IF lv_top <= 0.
lv_top = 50.
ENDIF.
DATA(lv_end) = lv_skip + lv_top.
APPEND LINES OF lt_table FROM lv_start TO lv_end TO lt_table_out.
io_response->set_total_number_of_records( lines( lt_table ) ).
io_response->set_data( lt_table_out ).
"io_response->set_total_number_of_records( lines( lt_table ) ).
"ENDIF.
CATCH cx_rap_query_provider INTO DATA(lx_exc).
ENDTRY.
CATCH cx_rfc_dest_provider_error INTO DATA(lx_dest).
ENDTRY.
ENDMETHOD.
ENDCLASS.
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCL_INVOICE</CLSNAME>
<LANGU>1</LANGU>
<DESCRIPT>项目开票回款跟踪表</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>
@EndUserText.label: '项目开票回款跟踪表'
@ObjectModel.query.implementedBy: 'ABAP:ZCL_INVOICE'
define custom entity ZCV_XMKP
{
@Search.defaultSearchElement: true
@UI.lineItem : [ { position: 10,label: '客户编号'} ]
@Consumption.valueHelpDefinition: [{ entity : {name: 'I_Customer_VH', element: 'Customer' } }]
key SoldToParty : zdxm;
@Search : { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
@UI.lineItem : [ { position: 30, label: '合同号'} ]
// @Consumption.valueHelpDefinition: [{ entity : {name: 'I_StdWBSElementVH', element: 'Product' } }]
key WBSElementExternalID : abap.char( 24 );
// @UI.lineItem : [ { position: 40, label: '合同号描述'} ]
// post1 : text40;
@UI.lineItem : [ { position: 20, label: '客户描述'} ]
CustomerName : abap.char( 80 );
@UI.lineItem : [ { label: '销售订单类型'} ]
SalesOrderType : abap.char( 4 );
@UI.lineItem : [ { position: 60, label: '合同总金额'} ]
Subtotal1Amount : abap.dec( 15, 2 );
@UI.lineItem : [ { position: 70, label: '已开票金额'} ]
AmountInTransactionCurrency : abap.dec( 15, 2 );
@UI.lineItem : [ { position: 80, label: '已回款金额'} ]
PaidAmount : abap.dec( 15, 2 );
@UI.lineItem : [ { position: 90, label: '已开票未回款金额'} ]
OpenAmountInDocumentCurrency : abap.dec( 15, 2 );
@UI.lineItem : [ { position: 100, label: '未回款金额'} ]
whkAmount : abap.dec( 15, 2 );
@UI.lineItem : [ { position: 110, label: '未开票金额'} ]
wkpAmount : abap.dec( 15, 2 );
@UI.lineItem : [ { label: '项目标识'} ]
Project : abap.char(12);
@UI.lineItem : [ { position: 120, label: '项目经理'} ]
YY1_ZZPS001 : abap.char(20);
@UI.lineItem : [ { position: 130, label: '显示货币'} ]
TransactionCurrency : waers;
}
{
"BASEINFO":
{
"FROM":
[],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DDLS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DDLS>
<DDLNAME>ZCV_XMKP</DDLNAME>
<DDLANGUAGE>1</DDLANGUAGE>
<DDTEXT>项目开票回款跟踪表</DDTEXT>
<SOURCE_TYPE>Q</SOURCE_TYPE>
</DDLS>
</asx:values>
</asx:abap>
</abapGit>
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_SRVB" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<SRVB>
<METADATA>
<NAME>ZCV_XMKP</NAME>
<TYPE>SRVB/SVB</TYPE>
<DESCRIPTION>项目开票回款跟踪表</DESCRIPTION>
<LANGUAGE>ZH</LANGUAGE>
<LINKS>
<item>
<HREF>versions</HREF>
<REL>http://www.sap.com/adt/relations/versions</REL>
<TITLE>Historic versions</TITLE>
</item>
<item>
<HREF>/sap/bc/adt/businessservices/odatav2/ZCV_XMKP</HREF>
<REL>http://www.sap.com/categories/odatav2</REL>
<TYPE>application/vnd.sap.adt.businessservices.odatav2.v2+xml</TYPE>
<TITLE>ODATAV2</TITLE>
</item>
<item>
<HREF>/sap/bc/adt/businessservices/testclass</HREF>
<REL>http://www.sap.com/categories/testclass</REL>
<TYPE>application/vnd.sap.adt.businessservices.testclass.v1+xml</TYPE>
<TITLE>TESTCLASS</TITLE>
</item>
<item>
<HREF>/sap/bc/adt/businessservices/testclass</HREF>
<REL>http://www.sap.com/categories/testclass</REL>
<TYPE>application/vnd.sap.adt.businessservices.testclassv4.v1+xml</TYPE>
<TITLE>TESTCLASSV4</TITLE>
</item>
<item>
<HREF>/sap/bc/adt/businessservices/semanticversion</HREF>
<REL>http://www.sap.com/categories/semanticversion</REL>
<TYPE>application/vnd.sap.adt.businessservices.semanticversion.v1+xml</TYPE>
<TITLE>SemanticVersion</TITLE>
</item>
</LINKS>
<MASTER_LANGUAGE>ZH</MASTER_LANGUAGE>
<ABAP_LANGU_VERSION>5</ABAP_LANGU_VERSION>
</METADATA>
<CONTENT>
<BIND_TYPE_IMPL>
<NAME>ZCV_XMKP</NAME>
</BIND_TYPE_IMPL>
<BIND_TYPE>ODATA</BIND_TYPE>
<BIND_TYPE_VERSION>V2</BIND_TYPE_VERSION>
<SERVICES>
<item>
<SERVICE_NAME>ZCV_XMKP</SERVICE_NAME>
<SERVICE_CONTENT>
<item>
<SERVICE_VERSION>0001</SERVICE_VERSION>
<RELEASE_STATE>NOT_RELEASED</RELEASE_STATE>
<SRVD_REF>
<URI>/sap/bc/adt/ddic/srvd/sources/zcv_xmkp</URI>
<TYPE>SRVD/SRV</TYPE>
<NAME>ZCV_XMKP</NAME>
</SRVD_REF>
<BIND_TYPE_DATA>
<CONTENT>
<ENCODING>base64</ENCODING>
</CONTENT>
</BIND_TYPE_DATA>
</item>
</SERVICE_CONTENT>
</item>
</SERVICES>
</CONTENT>
<CONTRACT>C1</CONTRACT>
<RELEASE_SUPPORTED>true</RELEASE_SUPPORTED>
<PUBLISHED>true</PUBLISHED>
<BINDING_CREATED>true</BINDING_CREATED>
</SRVB>
</asx:values>
</asx:abap>
</abapGit>
@EndUserText.label: '项目开票回款跟踪表'
define service ZCV_XMKP {
expose ZCV_XMKP as xmkp;
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_SRVD" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<SRVD>
<NAME>ZCV_XMKP</NAME>
<TYPE>SRVD/SRV</TYPE>
<DESCRIPTION>项目开票回款跟踪表</DESCRIPTION>
<LANGUAGE>ZH</LANGUAGE>
<MASTER_LANGUAGE>ZH</MASTER_LANGUAGE>
<SOURCE_URI>./zcv_xmkp/source/main</SOURCE_URI>
<SOURCE_TYPE>ABAP_SOURCE</SOURCE_TYPE>
<SOURCE_ORIGIN_DESCRIPTION>ABAP Development Tools</SOURCE_ORIGIN_DESCRIPTION>
<SRVD_SOURCE_TYPE>S</SRVD_SOURCE_TYPE>
<SRVD_SOURCE_TYPE_DESC>Definition</SRVD_SOURCE_TYPE_DESC>
</SRVD>
</asx:values>
</asx:abap>
</abapGit>
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_SCO2" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<SCO2>
<IBS_ID>ZCV_XMKP_IWSG</IBS_ID>
<IBS_TYPE>IWSG</IBS_TYPE>
<ODATA_SRV_IDENTIFIER>ZCV_XMKP_0001</ODATA_SRV_IDENTIFIER>
<REL_FOR_CUST_CSCN>X</REL_FOR_CUST_CSCN>
<ABAP_LANGUAGE_VERSION>5</ABAP_LANGUAGE_VERSION>
<NAME>ZCV_XMKP_IWSG</NAME>
<ABAP_LANGU_VERSION>5</ABAP_LANGU_VERSION>
</SCO2>
</asx:values>
</asx:abap>
</abapGit>
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_SIA6" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<SIA6>
<MAIN_OBJECT>
<NAME>ZCV_XMKP_IWSG_IBS</NAME>
<TYPE>SIA6</TYPE>
<RESPONSIBLE>CB9980000012</RESPONSIBLE>
<MASTER_LANGUAGE>EN</MASTER_LANGUAGE>
<MASTER_SYSTEM>Z43</MASTER_SYSTEM>
<PACKAGE_REF>
<PACKAGE_NAME>ZZPS</PACKAGE_NAME>
</PACKAGE_REF>
<ABAP_LANGU_VERSION>5</ABAP_LANGU_VERSION>
</MAIN_OBJECT>
<APP_ID>ZCV_XMKP_IWSG_IBS</APP_ID>
<APP_TYPE>IBS</APP_TYPE>
<ABAP_LANGUAGE_VERSION>5</ABAP_LANGUAGE_VERSION>
<SECONDARY_ID>ZCV_XMKP_IWSG</SECONDARY_ID>
<PUBLISH_STATUS>u</PUBLISH_STATUS>
</SIA6>
</asx:values>
</asx:abap>
</abapGit>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment