Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
We will describe how to develop and deploy this Sales History and Planned Sales in SAP C4C solution.
In summary, the steps are:
1. Develop a new Work Center in C4C to manage each of the new business objects Sales History
BO and Planned Sales BO
2. Develop a list UI component to display of BO in the Accounts Tab
3. Implement the file input of each BO
4. Configure the file input job in C4C
Since both the Sales History Bo and Planned Sales BOs are quite similar, our guide will focus on the steps
for Sales History BO.
1. Develop a new Work Center for Sales History.
In the SAP Cloud Applications Studio, we started with a new solution, and added a new BO. We
defined the Sales History BO as:
import
import
import
import
AP.Common.GDT as apCommonGDT;
AP.FO.BusinessPartner.Global;
AP.PC.IdentityManagement.Global;
AP.FO.ProductDataMaintenance.Global as apProdGlobal;
message
message
message
message
// action
action DeleteSH ;
}
In the above ABSL code, we have defined the error messages needed for validation, the structure of the
BO, the associations for related data in other master BOs, and an action to handle deletion of a row.
Once this BO is saved and activated, do a right-mouse click on the .BO and select Create Screens (see
below). We are using the automated screen creation to setup a full set of Work Center (WC), OWL, TT,
TI and other screens with navigation fully linked and working.
The screen type we want is the Screen Scenario with Thing-Based Navigation:
Once the screens are created, be sure to activate the entire solution.
The newly created WC will provide the ability to update data in the BO, add rows and delete rows
for administrative use only, especially if incorrect data was imported. The user will not have access
to this WC.
This is a good milepost to test the Sales History WC. You can edit your user id, and add the WC.
2. Develop a list UI component to display of BO in the Accounts Tab
In the Accounts 360 screen, you can add a new facet (aka tab) by using available slots in the
Studio on the Account TI screen object. In this new facet, we can place a custom UI component
called embedded component (EC) that displays a list of the Sales History rows.
Since the Account 360 screen is showing only 1 account, we will need to send current account ID
as a parameter to the EC to retrieve only the Sales history for that account.
First, lets build this EC, which is a list of the Sales history and will accept a parameter.
In the solution, we add a New Item from the Embedded Component type.
Lets map the Column to one of the data elements in the BO.
Click on Data Information->Value->./Column and it brings up the DependentProperty Editor
In the Select BO-Model prompt, select the Sales History BO. Then select the field that this UI
column maps to.
In this case, we will choose the field fiscalper which shows the fiscal period.
To complete this EC, we now need to setup the parameter to show just the Sales History records
for 1 account.
First define the parameter, which needs to be in a structure. In the DataModel tab of this EC,
We define the structure SearchByAccountID, and then the variable:
We set the Results List /Root/DataList, and bind the query QueryByElements. We set the query
using the down arrow to add the parameter which will use the soldto field to parameter defined
above.
We add an Inport, which is like the doorman who will take parameter from the outside caller,
and pass it to the query.
This doorman will also run the query on initialization, so we need to set the behaviors
RequestAutoRefire and RequestFireOnInitialization to true. The event OnFire needs to set to
default EventHandler. These items are on the right side in the Properties tab.
In the Bind setup, on the right you will use the defined outport PublicOutputECCustomerRoot
and the InPort->Parameter and bind them.
This sends the current AccountID in Account 360 to the Inport (aka doorman) of the EC, and it
will load the query showing any records from the Sales History BO for this Account ID.
Click Save and Activate. This EC will now display in a new facet for Account 360. And, thats it
for step 2.
I do not suggest UUID as an import column. Your normal key (SHkeyID) should be enough,
as long as you make it unique.
Most important, click on Mass Processing.
d. In step 4, select By Alternative Key. Choose SHkey.
e. Click Finish
To get the schema file, you will need to exit the Studio and re-log back in. After logging
back into the Studio, the SalesHistory.xsd will be an active link, and you can save the schema
file in a local directory.
f. To use the .XSD file as an template for data, run Microsoft Excel with a new sheet.
g. Click on Developer->Source. Click on XML Maps.
Click on Add button, and add the .XSD from the Studio. See below.
h. Upon clicking OK, you will a list of data nodes in the XML Source.
Scroll down to the node with your BO name, and drag and drop the node to row A2 (not row
1). You should see this resulting sheet:
You can delete all of the superfluous columns that start with schema or SAP_To
i.
Drag and drop the CreationDateTime to cell A1. This will bind the CreateDateTime element
to this cell, so any values entered here will be exported to the XML.
An example of the data for this cell is 2014-03-03T10:11:00.0000000Z
j.
At this point, save this document as your blank template for future data files you will create
for importing into the SalesHistory BO.
b. Enter the Run ID and Description, and use the dropdown to select the Interface. In the example
below, Ive created it for Sales History.