cancel
Showing results for 
Search instead for 
Did you mean: 

ISA 50 - B2C Open orders search, extending generic-searchbackend-config.xml

Former Member
0 Kudos

Hello Experts,

I have several B2C sites and webshops, and B2C self-created accounts are common to all sites. The problem is that all open orders and completed orders (from all sites) appear in the open orders / completed orders in My Account. I'd like to separate the display of orders for each site.

Each of my site corresponds to a sales organisation in CRM / R3. In the GenericSearchDynamicContent class, which is used in the standard generic-searchbackend-config.xml to generate dynamic values in filters, I found a method addSalesOrg(). I tried to add this in the customer/generic-searchbackend-config.xml :

<configs isa:extends="../configs[@id='crmdefault']">

<config id="javabasket_javatemplate_forCRM">

<property-group name="SearchCriteria_B2C_Sales">

<property name="SALES_ORG"

entityType="CL_CRM_REPORT_SET_ORGMAN"

tokenType="RAN"

type="dark">

<allowedValue content="dynamic"

contentCreateClass="com.sap.isa.isacore.GenericSearchDynamicContent"

contentCreateMethod="addSalesOrg" />

</property>

</property-group>

</config>

</configs>

But it doesn't work, all orders are displayed. If I don't set the entityType and RAN, ABAP returns an error and doesn't take in account the property SALES_ORG, but I don't know if these are the good values (I found these values by debbuging abap ...)

I haven't found any documentation on the parameters I could add and the corresponding types etc., the Dev and Ext guide (and tuts) shows an example on how to add a search parameter in the selection screen and add a column in the result screen, but no detailed list of fields we could add...

Please let me know if you have a solution to add sales organisation to the search parameters, and links to documentation.

Thank you by advance

Julien

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I am not very sure, if I understand your question. But you cannot populate a field from there. you can only manipulate those fields. You may way want to do it from ABAP. As soon as you add a property it goes to the Function Module and tries to get the value. But if it couldn't find it will have a null value or it will contain the consequent field value.

Thanks

Gaurav Sahai

Former Member
0 Kudos

Hello and thank you for your answer

I finally found the solution by myself :

  • in crmtcweb~appbase/WEB-INF/xcm/customer/modification/generic-searchbackend-config.xml :

<configs isa:extends="../configs[@id='crmdefault']">

<config id="javabasket_javatemplate_forCRM">

<property-group name="SearchCriteria_B2C_Sales">

<property name="SALES_ORG"

entityType="CL_CRM_REPORT_SET_ORGMAN"

tokenType="RAN"

type="dark">

<allowedValue content="dynamic"

contentCreateClass="com.sap.isa.isacore.Z_GenericSearchDynamicContent"

contentCreateMethod="addSalesOrg" />

</property>

</property-group>

</config>

</configs>

  • in Z_GenericSearchDynamicContent :

public void addSalesOrg() {

selOpt.addSelectOptionLine(

new GenericSearchSelectOptionLine(

handle,

pty.getName(),

pty.getEntityType(),

"",

"",

pty.getTokenType(),

"I",

"EQ",

bom.getShop().getSalesOrganisation(),

""));

And it works Now only the orders with the same salesOrg as the webshop are displayed.

Hope this could help somewone else.

Julien

Former Member
0 Kudos

Hello Julien,

Thanks much for posting the answer / solution in the forum. You deserve full marks for this. Anyway, thanks again.

Easwar Ram

http://www.parxlns.com