Skip to Content
0

Add advanced list pane in a new tab of Material Screen

Feb 20, 2017 at 04:43 PM

704

avatar image
Former Member

Hello everybody,

First of all, sorry if I don't use the good terms to describe my problem, I'm really new to ByDesign. I'll try to be as specific as I can.

I have a problem to implement a functionality, I tried to search some solutions on the forum and on the web, but I'm really lost and I hope someone here could help me, I guess it's very simple for someone who has some experience with ByDesign.

Let me explain what I'm trying to do :

I have some materials which needs a conversion chart depending on the temperature when we do our inventory.

I want to implement a new tab in the screen located here : Product Data => Material => Material Overview => View All

In this new tab, I want to insert a new Embedded Component ( an advanced list pane), to list all the "multiplying factors" depending on the material temperature (for example : -45degrees => 1.012 , -44degrees =>1.009, etc ....)

I want also to have add/remove line buttons for this component so we can add or remove values when needed.

All the values are different for each materials so this component values must be linked to the material itself.

I hope that my explanations are clear.

For now, I have created the embedded component and enhanced the material screen (materialoif.OIF.xuicomponent) but I don't know what fields I have to bind, and how to bind them.

Also I don't know how to have the Add/remove buttons on top of my ListPane.

I'm stuck on this for two days now and I'm completely lost, I hope someone could help me with this.

Thanks in advance for taking time to help me !

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Mar 08, 2017 at 06:11 PM
0

Finally, I succeeded to make this work.

I was following some instructions on a video which weren't working. I finally found a workaround by myself to make this work.

Again thanks for your help because even if you didn't gave me the solution, you gave me place to look to resolve my problem !

thank you

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Lee-Roy,

My objective is the same with you.

Could you tell me the datail step, huangb.mmsh@sinopec.com

Thanks a lot.

Benny

0
0
Horst Schaude
Feb 21, 2017 at 12:08 PM
0

Hello Lee-Roy,

As the Material BO cannot be enhanced with a node you need a "shadow" BO which contains your conversions.
Every insatnce of a Material which needs a conversion should have one instance of the Shadow BO.
So this looks like a good example for your own BO

businessobject MaterialTemperatureConversion {

[AlternativeKey] element ProductID : ProductID; // should correspond to the Material instance
node Conversion [1,n] {
element .... <whatever you need for the conversion>

element .... <whatever you need for the conversion>
...
}
}

This Bo should be read /created when moving to the tab and gets displayed.

Your "Add" and "Remove" buttons will create / delete instances of the node "Conversion".

HTH,
Horst

Show 11 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Horst,

First of all, thank you for your help. I think i started on the right way but somehow, somewhere I think I did something wrong so I will try to explain with screenshots what I did (there are some places where I'm not sure what to do).

Step 1 : I create my Business Object called MaterialConversionChart

Step 2 :

  • I create an Embedded Component, I add an AdvancedListPane
  • I create an bind the structure in the data model tab like this :
  • The root node is binded to MaterialConversionChart, ConversionItems to Item, temperature to temperature (under item), MultiplyingFactor to MultiplyingFactor (under item)

  • then in the designer tab I bind the list to the structure :

  • And the columns like this :

  • I save and activate

Step 4

  • I add my Embedded Component to the centralmaterialqaf.xuicomponent
  • I click on the tabStrip at the bottom of this component
  • I click on Extensibilty Explorer then "Add tab with embedded component"
  • I don't know if I have to bind something here, I don't find anything in the outport which seems relevant to be binded at this point

Step 5

  • I guess there are some stuffs to do with the event handlers after that but I'm stuck here. And if i try to preview the screen of material creation, it throws an error.

Thank you for your help and your time.

Lee-Roy

step2.png (40.5 kB)
step3.png (18.2 kB)
step3bis.png (22.9 kB)
0

Hello Lee-Roy,

You need to tell the EC which instance it has to load. For this you need an InPort which needs to be mapped against an OutPort of the QAF.

Please have a look this blog from Stefan.

HTH,
. Horst

0
Former Member
Horst Schaude

Hi Horst,

Again thank you for trying to help me. I already tried the method explained by Stephan but it seems that on the Material screens (centralmaterialqaf.QA.xuicomponent and materialoif.OIF.xuicompoment), it doesn't seem that they have any outport which I can use to bind to my EC.

For example, here is a list of available outport when I try to add my EC to centralmaterialqaf.QA.xuicomponent :

MaintainPRSLevelPrice :

  • No outport parameter

MaterialNewTemplateEditOIF:

  • No outport parameter

MaterialRootDetailedEdit_Out_ICZ:

  • No outport parameter

MaterialRootDetailedEdit_Product:

  • NodeIdentifier
  • isproduct

MateridCAC_Out:

  • No outport parameter

OpenByKeyOut:

  • No outport parameter

ProductModelID:

  • No outport parameter

PublicOtportECMaterialRoot:

  • Parameter

SalesKitEdit_Out:

  • SalesKitHeaderIndicator

ShowAvailableAvConfArea_Out:

  • NodeID

ShowAvailableFinOrg_Out:

  • NodeID

ShowAvailableInventorySite_Out:

  • NodeID

ShowAvailablePlanningArea_Out:

  • NodeID

ShowAvailableSalesOrg_Out:

  • NodeID

ShowSalesKitItemList_Out:

  • NodeID
  • SalesKitID
  • Description

ShowTax:

  • NodeID

I might be wrong but here I can't see anything that could fit as a binding parameter.

Thank you !

0

Hello Lee-Roy,

As John mentiones below I suggest to use the "PublicOtportECMaterialRoot" which is bound to the UUID of the Root node

Either you re-read the Material from the UUID and determine the ProductID or you enhance your BO to have the UUID itself as AlternativeKey.

HTH,
. Horst

0
Former Member
Horst Schaude

Hello Horst,

Thank you, I'll try to do that.

Sorry for all the questions, I have some difficulties to get familiar with SAP ByDesign.

0
Former Member
Former Member

I'm really starting pulling my hairs off... I tried everything you told me to do (I even followed the video John Meadows sent me) and I still can't figure out what the problem is.

On top of that I'm just getting an "Unexpected error during backen processing" with no relevant information to figure out what the problem is.

I spend almost 50 hours on this and I still can't get something functionnal, I'm really starting to be desperate...

Is what I'm trying to do even possible???

0
Former Member
Former Member

Finally, there are some progress.

I can now add row in my advance list pane and save them, I think it was linked to a cache problem after the modifications. I just tried to recreate a solution from scratch and now it works.

I can see they are persisted in the database by accessing them via a query in the BO explorer.

The only thing is I still have 2 major problems :

- I can't see the saved datas in the list when I try to display them, my list is empty

- Each time I reopen my material page (in edit mode), it seems like the EC try to recreate the instance so the application shows an error to warn me that the instance already exist with the same key.

So my next questions are :

- How do I retrieve my data on the page load?

I thought I only add to bind the fields and data list in the data model, like the screenshot here :

Here is the binding :

Root => MaterialTemperatureConversion

DataList => Conversion

ConversionFactor => ConversionFactor

Degrees => Degrees

- How do I should Implement the following logic on the page load :

If instance already exist, then load it else create a new instance of the BO

Thanks a lot for your precious help !

binding.png (69.9 kB)
0
Former Member
Horst Schaude

There is something really strange in my EC Behavior.

On the EC load I can see that the value in the field ProductID is fed by the inport value (my onchange event on the inport field works well), I can also see that the list is fed by the values I previously saved in the database, but for an obscure reason, instantaneously after the EC has finished to be loaded, my field and my list are emptied...

I can't see any event that are setting the fields and the list to an empty value...

Any Idea where that could come from?

0

Hello Lee-Roy,

After the InPort an EventHandler should be triggered which takes care of loading the data or creating a new instance.

I have found another good source: Former Member.

Here's a link to a Best Practice about adding EC.

HTH,
. Horst

0
Show more comments
avatar image
Former Member Feb 27, 2017 at 01:56 PM
0

Shouldn't you be using the public outportecmaterialRoot

When I need to add tabs i use this video as a reminder. Works every time!

https://youtu.be/fYfkQW564l0

John

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you for the video John, I'll try to do that.

0