cancel
Showing results for 
Search instead for 
Did you mean: 

C4C Enhancing Quote Product Item with Embeded Component

ognian_kalaydjiev4
Participant
0 Kudos

Hi All,

I am enhancing Sales Quote Product Item with customer BO using EC following the guide Add custom BO to standards screen

provided by Stefan Krauth see below for detailed explanation how I created the BO and EC.

For some reason whenever I change the item it is not triggering the UIID change, from my perspective some initialization is missing but I am not sure how should I do it.

Thanks in advance.

Here is my BODL:


businessobject ProductVariant {

[AlternativeKey][Label("Varinat Identificator")] element variantID:ID;      //NUMC 10"

[AlternativeKey][Label("Quotation Item UUID")] element QuoteItemUUID:UUID;

[Label("Product Id")] element productID:apCommonGDT:ProductInternalID;

association ToMaterial[1,1] to Material;

node Characteristics [0,n]{

                [Label("Internal characteristic")] element atinnInternalCharacteristics:ID; //NUMC  10           

                [Label("Characteristic Name")] element atnamCharacteristicsName:LANGUAGEINDEPENDENT_MEDIUM_Text; //CHAR             30           

                node CharacteristicValues [0,n]{

                                [Label("Internal characteristic")] element atinnInternalCharacteristics:ID; //NUMC 10            

                                [Label("Int counter")] element atzhlInternalCharacteristics:BusinessTransactionDocumentItemScheduleLineID;//NUMC 4

                                [Label("Characteristic Value")] element atwrtCharacteristicsValue:LANGUAGEINDEPENDENT_MEDIUM_Text;//CHAR 30

                                [Label("Characteristic value description")] element atwtbCharacteristicsDescription:MEDIUM_Name;//CHAR 30

                }

}

}              

The screen looks like

Data Model

InPort

Event


I am adding EC to screen : BYD_COD/SalesOnDemand/Quote/COD_QuoteTI.TI.uicomponet:


in the following Container:

Using Binding :

And here is the Test case:


When there is one item everything looks fine

But when they are two : Bind is not working













Accepted Solutions (1)

Accepted Solutions (1)

ognian_kalaydjiev4
Participant
0 Kudos

So here is my solution:

1. You have to check if In port has any value otherwise empty BO is created and you can not save.

2. Use the logic proposed from Stefan .

3. Add additional check if In port and current BO are different if yes create new BO .

see pictures for details.

1)

2) It is only in default when Inport is not initial.

3)Create and assign

I am not sure if empty comparison is needed probably not but it works that way.

Cheers Ognian

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Expert,

Is it possible to create a New Tab with no BO to create an Overview that have the OWL of Ticket, Activities that are ALREADY in the Individual Customer?

Need urgent help on this as customer's requirement and Im out of ideas.

Thanks.

Regards,

Richie

ognian_kalaydjiev4
Participant
0 Kudos

Hi Richie, I do not think that your question is relative with the theme please create a new tread, with your question.

Best regards Ognian

Former Member
0 Kudos

Hi Ognian,

Thanks for your reply.

However, I had open but yet to find a solution to do so.

Im pulling my hair now

Regards,

Richie

stefankrauth
Active Participant
0 Kudos

Hi Richie,

You don't even need PDI for this. You can create a new tab and a section inside using the key user tools (adaption mode). Then you can go to the acitivty and visit facet and use the copy and past functionality to copy the panes you want to the new facet you created.

This is a different object, but here you see the copy icon on the visit pane.

Here you can see the paste button on a new custom section.

This is how it's done. I pasted the visit pane from the Service & Repair facet to the activities facet.

The same is possible to a new custom tab.

Best Regards,

Stefan

stefankrauth
Active Participant
0 Kudos

Hi,

The change of the InPort UUID should trigger the ReadOrCreate and the Read Operation should read the new instance of the new item EC.

However, look at what happens when the new item EC does not exist.

Click on first row:

1. Read -> Read is unsuccessful

2. Condition -> ItemUUID is empty

3. Create

Click on second row:

1. Read -> Read is unsuccessful

2. Condition -> ItemUUID is NOT empty (because UUID from first item is still present)

3. ...nothing happens.

You should be able to change the condition in a way that it does not check for an empty ItemUUID, but for a ItemUUID that is different to the InPort UUID.

Alternatively you can create logic that copies the InPort UUID not only to the bound ItemUUID field but also to another unassigned dummy field. You could then always clear this dummy field as first step in the ReadOrCreate event and point the condition to this field.

Best Regards,
Stefan

ognian_kalaydjiev4
Participant
0 Kudos

Hi Stefan, I am totally agreed with you that there should be comparison against InPortUUID, but I can no see how I can put !=(not equal to) in screen logic . If I understand correctly I should do it. Further more whenever I try to use data operation clear the Pop up says this operation is not supported in run

Best Regards,

Ognian

stefankrauth
Active Participant
0 Kudos

To clear a value, you need to use assignText and assign an empty text.

But be careful with clearing bound fields. I'm not sure if a later save would then save the old instance with the cleared ItemUUID.

ognian_kalaydjiev4
Participant
0 Kudos

Hi Stefan,

I thing I figured out how expression should be put in Condition Expression. And it works without additional variable.

Thank for you help.

Best Regards Ognian

ognian_kalaydjiev4
Participant
0 Kudos

Now it changes the UUID. But I can not save the item . And I see message Save fail. And no any additional info presented. Any Idea how can I trace what is the real issue ?

Best Regards Ognian

ognian_kalaydjiev4
Participant
0 Kudos

One more thing The alternative key for Customer BO is not changed during UUID changes . And probably this is one the reason I can not save.

Cheers Ognian

stefankrauth
Active Participant
0 Kudos

If the ReadOrCreate event is run, a new instance should be created and a new UUID should be assigned.

I can see the UUID is the alternative key, right?The variant identification must also be changed as it is also an alternative key.

Best Regards,
Stefan

ognian_kalaydjiev4
Participant
0 Kudos

Yes you are right, but the variant identification stays the same on the screen. I change it manually

after the UUID is changed, but when I set the other product row the variant identification is not changed . I am probably not assigning something correctly.

Best Regads Ognian,

ognian_kalaydjiev4
Participant
0 Kudos

After a bit of testing != occurs to not working. Unfortunately.

Where I can see expression syntax for conditions in events.

There is only one sentence for conditions in the help.

Best Regards Ognian

ognian_kalaydjiev4
Participant
0 Kudos

Hi Stefan,

Up to now what I figure out is that whenever I Bind first BO for first Item all its data stays in current instance of this BO. So when Port is trigger I first have to clear current BO instance and get new one .

Any clue how I should clear the current BO instance.

Best Regards

Ognian