on 02-20-2017 4:43 PM
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 !
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lee-Roy,
It is OK, view the Stefan's blog: https://blogs.sap.com/2014/04/02/sap-application-studio-1402-add-ec-with-custom-bo-to-standard-scree...
Thanks a lot.
Benny
Shouldn't you be using the public outportecmaterialRoot
When I need to add tabs i use this video as a reminder. Works every time!
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :
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
Step 5
Thank you for your help and your time.
Lee-Roy
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
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 :
MaterialNewTemplateEditOIF:
MaterialRootDetailedEdit_Out_ICZ:
MaterialRootDetailedEdit_Product:
MateridCAC_Out:
OpenByKeyOut:
ProductModelID:
PublicOtportECMaterialRoot:
SalesKitEdit_Out:
ShowAvailableAvConfArea_Out:
ShowAvailableFinOrg_Out:
ShowAvailableInventorySite_Out:
ShowAvailablePlanningArea_Out:
ShowAvailableSalesOrg_Out:
ShowSalesKitItemList_Out:
ShowTax:
I might be wrong but here I can't see anything that could fit as a binding parameter.
Thank you !
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???
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 !
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?
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: stefankrauth.
Here's a link to a Best Practice about adding EC.
HTH,
. Horst
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.