cancel
Showing results for 
Search instead for 
Did you mean: 

Passing values to custom OVS dynamically

ambuja_prabhudessai
Participant
0 Kudos

Hi,

I am trying to select the Address from a list of addresses available for an Account while creating Visit for that account.

In Visit QC, I populate the Account field using the standard Account OVS. After this, I want to show the list of Addresses available for this selected account in my custom Address OVS.

Currently I have configured my OVS to Customer XBO. In this, I am passing Account ID as the parameter to the query and I am displaying the Account ID and the Addresses for that account.

But this OVS displays all the Account IDs and only 1 address for all the available Accounts.

As can be seen from the below screenshot, I have selected Account= ‘Lowes’ in Visit QC. But when I click on Addresses OVS, it displays me entire list of Accounts.

Is there a way in which I can dynamically pass the Account ID of the account selected in the Visit QC to my custom OVS? I also need to display all the Addresses available for this AccountID.

Please suggest how this can be achieved.

Thanks,

Ambuja

Accepted Solutions (0)

Answers (2)

Answers (2)

ambuja_prabhudessai
Participant
0 Kudos

Hi,

With the 1411 release, /BYD_COD/SalesOnDemand/Reuse/COD_Address_OVS.OVS.uicomponent has been allowed for reuse to Partners.

Hence, now I can get a list of only those addresses which are linked to the Account selected.

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi,

     1. Can you show your custom BO definition?

     2. Can you show your ValueHelpQuery and inport in Controller  tap in UI designer?

    

Regards,

Fred

ambuja_prabhudessai
Participant
0 Kudos

Hi,

By Custom OVS what I mean is, I have created an OVS based on standard Customer object. I am not using the public OVS. I have not defined any Custom BO. Do I need to define a custom BO for this?

I am using Customer XBO to show the list of Addresses as shown in below screenshot.

ValueHelpQuery is bound to InternalID of Customer.

I have not configured any Inport or Outport. Actually I am implementing the OVS for the first time. Could you please guide me on what needs to be configured in the Inport. I referred the PDF documentation for configuring OVS but did not find much info on configuring Inport and other event hanldlers.

Thanks,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi,

     1. In the OVS,you have to create add a parameter to the already existing inport and bind it with Root/SearchParameter/UUID.

     2. In the source form, when you configure your OVS, you will see your newly added parameter in the inport of your custom OVS. Add that parameter  and bind with the AccountUUID from Customer BO.

ambuja_prabhudessai
Participant
0 Kudos

Hey Fred,

Thanks for that info. Now I am facing another issue. I want my OVS on Vistit QC and hence while I configure it on the QC, in my inport it returns me the Activity UUID. Activity UUID for this visit does not exist until QC is saved.

I have to populate my custom OVS based on the Account that I have selected on Visit QC.

How can I achieve this? Any help will be appreciated.

Thanks,

Ambuja

former_member221072
Participant
0 Kudos

Hi Ambuja,

Please check the below attached link for reference purpose.

http://scn.sap.com/thread/3519446

In your case you don't need to have the activity UUID. You need to bind the account UUID to your custom OVS inport.

Best Regards,

Mani

former_member200567
Active Contributor
0 Kudos

Hi,

     Why do you need Activity UUID??

     As for your requirements, you should add an extension field to Visit BO.

     In the aftermodify of VisitBO, assign your extended field with AccountUUID.

     And in the configuration of OVS in the Visit QC, add a parameter and bind with that extended field.

Hope this helps,

Fred.

ambuja_prabhudessai
Participant
0 Kudos

Hi Fred,

I followed the steps as you have mentioned and my AccountUUID is now getting copied to the extension field. I checked this through debugging of AfterModify. But I am still not able to display the addresses maintained for this Account. I get the following exception when I click on my Custom OVS in Visit QC.

Please find my binding below to display the addresses in the OVS. Am I making some mistake while binding?

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi,

     1. What did you bind your Item datalist with?? It must bind with Customer if your ValueHelpQuery is bound with QueryByElements or other Query directly to Customer.

     2. You have to make sure that both ObjectId and ObjectName has the same multiplicity.

     3. Add add ObjectId and ObjectName to the inport too.

     4. And please delete the extension field from the UI first and then add again and configure again.

   

Hope this helps.

Fred.

ambuja_prabhudessai
Participant
0 Kudos

Hi Fred,

I bound my Items list to Customer now and removed the extension fields and added again. The exception is not thrown anymore. But the results are not as expected.

I am entering an account which has 2 addresses. But when I open my Address OVS, it shows only 1 address. When I query this account using the Repository explorer, I can clearly see 2 addresses present for the Account.

In Customer -> AddressInformation, I can see 2 Address UUIDs. But when I bind OVS ObjectId to AddressInformation -> UUID it shows only 1 UUID  and the associated address in the OVS list.

former_member200567
Active Contributor
0 Kudos

Hi,

     I got your requirement.

     AddressInformation NODE  is 0..* meaning one Account has 0 or more Address.

     Your data list ITEM must contains data fields that have the same multiplicity.

     Your datalist ITEM can't contain both InternalID(AccountID) and AddressInformation fields. Because AddressInformation is the child of the Customer Root NODE.

     1.Unbind the Item.

     2.Bind ObjectId with any field from the AddressInformation NODE.

     3.Bind ObjectName with any field from the AddressInformation NODE.

     4.Bind Item with AddressInformation NODE.

     5.Bind Root with Customer.

Hope this helps,

Fred.

ambuja_prabhudessai
Participant
0 Kudos

Hi,

I have tried this before a couple of times. If I bind root to Customer and Items list to AddressInformation or any other association node of Customer I get the following exception

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi,    

     Ambuja

     If you don' t mind can you please show me how you bound your ITEM data list again ?

     And the Query??

Regards,

Fred.

ambuja_prabhudessai
Participant
0 Kudos

Hi Fred,

Find the below screenshots for list binding, valueHelp query and OVS cinfiguration on Vist QC

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

HI,

     First, FormatedAddress's multiplicity is 0 to many. And UUID's is one.

   

     And just to remind you again,the UUID in the SearchParameter must be the one from Customer.

     If it still gives errors.

     1. Add a new field to the Root.

     2. In Query, bind UUID with that new field.

     3. In the inport, add that field.

     4. And also add ObjectId and ObjectName.

Hope this helps.

Fred.

ambuja_prabhudessai
Participant
0 Kudos

Hi,

This does not seem to be working. I have explained the exact use case below. Please tell me how this can be achieved.

For Customer ID=1000497, there are 2 UUIDs in AddressInformation association. Both these UUIDs correspond to 2 addresses. I can get the Address descriptions from FormattedAddress association. The whole structure looks as shown below:

Customer BO (0 to 1) -> AddressInformation asssociation (0 to n) -> UUID field, Address association (1 to 1) -> FormattedAddress association (0 to 1) -> FormattedPostalAddressDescription field

For the given Customer ID, I need to display both the addresses in my OVS.

Where do i need to bind the root, Items list, objectId and objectName of OVS? I am confused.

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi,

     Yeap, the problem is you can only bind your Data List to the Customer.

     (I have just tested it too).

     I was wrong about that the data list must contain same multiplicity fields.

     The data list can contain fields with different multiplicities.

     But only the first instance of the Child node can be shown.

     That's why you are seeing only one row for one account. I think.

     To be honest, I have done this kind of OVS with my own custom BO with a node structure.

     I created a custom query for the node  and I got the exact same solution that you are looking for now. This is interesting.

   

Need professional help here.   

ambuja_prabhudessai
Participant
0 Kudos

Hi,

Thanks for your reply.

May be I should also try creating a custom BO and using my OVS for it.

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi, Ambuja

     If you create a custom BO and a custom OVS, it works perfectly.

  

Regards,

Fred.

ambuja_prabhudessai
Participant
0 Kudos

Hi Fred,

This weekend our demo tenant was upgraded to 1408 after which I am unable to browse for Custom OVS and enhance the QC in extensibility explorer. Browse button is disabled.

When I click on Change ID field configuration, it does not allow me to do any changes to the extension field of type ID. Also, i am not able to select any OVS from publicOVS as it says 'Component which you are trying to edit comes from lower layer'. Can you please check at your end and confirm if the same issue occurs?

Regards,

Ambuja

former_member200567
Active Contributor
0 Kudos

Hi, Ambuja

     Mine is still in 1405. And everything is still working fine.

     I am sorry I can't help you this time.

Regards,

Fred.

Former Member
0 Kudos

Hallo Ambuja,

our tenant is not updated to the 1408 yet, but I have got the same problem on 1405 after I've installed the latest studio build (build date 12. August). I already created an incident on this issue (25.08.2014, priority "High"), but SAP didn't proposed any solution for this yet.

Regards,

Leonid Granatstein