Web dynpro welcome example edit context mapping problem
hi,
i tried to build a web dynpro like the welcome example from web dynpro.
so i created the views etc, created an atrribute matnr in the context of the component.
then i connected the other views with the component. for this i used the required controllers.
so, now i created a attribute nr in the context of the other view and wanted to connect it with matnr from beginning with edit context mapping.
but in the shown context is not the attribute matnr. there is no attribute.
any idea what went wrong or is there something that i missed?
thank you
Hi Marcus,
Do one thing Create Value Attribute under Context like(matnr). Next Right Click on Webdynpro Component Click on Open Data Modular that time it will open data modular View. Here we are doing Context Mapping to Component Controller to View Controller that time Same Value Attribute will be created in View Controller also.
In context mapping, the actual context data is saved only once in the original node. All other context nodes that are mapped to this original node reference the same contents, without having to save it again, for example using copies. In this way, inconsistent context contents are avoided.
Please look at this simple WDJ Application. http://help.sap.com/saphelp_nw04/helpdata/en/bc/e4d61774174344a4b126ad07e8c230/content.htm
I hope this is help full for you,
Regards
Vijay
Similar Messages
-
External context mapping problem
Hi,
I am trying to create a sample application for external context mapping
1. I created a webdynpro project.
2. In that project i created 2 web dynpro components PrComp and ChComp.
3. In the ChComp Interface controller context created a node MappedNode with attribute text.The node property isInputElement is set to true and also the carinality to 0..1
4. Added the ChComp as Used Component for PrComp.
5. Mapped the context of the ChComp Interface controller to ChComp Component controller and PrComp component Controller.
6. In the ChComp Component controller, i initialize the node atribute text with some value.
public void wdDoInit()
//@@begin wdDoInit()
wdContext.currentMappednodeElement().setMappedText("Mapped Attribute");
//@@end
7. In the PrComp component controller i create the ChComp and try to retrieve the value of the node attribute text.
public void wdDoInit()
//@@begin wdDoInit()
wdThis.wdGetChildCompComponentUsage().createComponent();
String text = wdContext.currentMappednodeElement().getMappedText();
wdComponentAPI.getMessageManager().reportSuccess("mapped value "+text);
//@@end
When i deploy and run the application i get the following error
java.lang.NullPointerException
at com.sap.tc.ram.sample.external.context.mapping.ChComp.wdDoInit(ChComp.java:98)
I am creating this app as a sample for external context mapping.please tell me if i am doing the rigth thing.Shiram,
Your code will not work until you remove any node access from wdDoInit in ChComp (step 6).
Think about the actual execution sequence:
1. PrComp creates usage of child (ChComp) via createComponent
2. ChComp get initialized internally by WD framework, as part of process ChComp.wdDoInit is invoked
3. Context mapping is applied parent(source) <->child(target)
So step [2] happens always before [3], you didn't alter this behavior via cardinality as suggested by other readers.
What you can to do?
1. Do not use wdDoInit of ChComp to populate / access data. Populate data from PrComp instead.
2. Do you really need isInputElement? Think about it. If you remove isInputElement setting in child, then create mapped node in parent, then node in child will be source of data and you may safely populate it ChComp.wdDoInit.
And, as other pointed out, cardinality still can cause error -- you are using 0..* but not creating element manually. Either set cardinality to 1..* or create element in wdDoInit of "source" controller (PrComp for [1], ChComp for [2])
Valery Silaev
SaM Solutions
http://www.sam-solutions.net -
Context mapping problem in FPM
Hi all,
here is a samll example where i am going to display the Attributes from the SELECT perspective to the REVIEW perspective. where the Values from the SELECT View is To be Displayed in the Review view.
my Compnents are like..
cctest
FcTest
Vcfirst
VcNext
VcNavi
everything is working fine i am able to get RoadMap.
i have done mapping b/w the components as...
|ComponentController| -- | interFace Controller
CcTest -
FcTest -
FcTest IC
Vcfirst FcNavigation IC,FctestIC Vcfirst IC
VcNext FcNavigation IC,FctestIC VcNext IC
VcNavi -
FcNavi
i have one attribute in VcFirst Perspective ... i am not able to get that value in the VcNext perspective ...Hallo Bunny,
are you sure that both of your visual UI components VcNext and VcNavi point to the same instance of faceless component FcNavigation at runtime?
Read more on the reason in this forum thread: Re: Why Context Mapping is always null for my embeded view?
Regards, Bertram -
Enterprise JavaBean Model context mapping problem with dates from CAF BO
Hi Experts,
using CAF BO inside WD Java is a little bit problematic!
The CAF core Datatype "Date" is exposed as "javax.xml.datatype.XMLGregorianCalendar".
This datatype is not bindable to context attributes, cause wd is only supporting native java types.
in this case, a java.sql.date is needed.
What is the best practise to use JavaBean Models (CAF BOs) with attributes of type "Date"?
The normal Adaptive RFC Model imports ABAP Dates as java.sql.dates!
Using CAF external services, all ABAP Dates are exposed also as XMLGregorianCalendar.
How can i use/bind such models with less programming effort?
Best wishes,
HolgerHi Roelof,
CAF automatically decides which datatypes are used. It is not possible to change the used datatype
for imported external RFCs, so all ABAP Date Attributes will be typed as XMLGregorianCalendar.
This is different from the Web Dynpro Adaptive RFC Model, where ABAP Date Attributes are
converted as java.sql.date.
Best wishes,
Holger -
Re: Web Dynpro ABAP Theme Editing
Dear Programmers,
I'm a beginner with WebDynpro for ABAP ,too.
and my question is:
Is it posible to edit the color and design from UI-Elements like buttons, fields and tables
to make it conform to an internel styleguide?
Best regards,
Henrik.First of all, please do not ask new questions in an existing forum thread. I have forked your question into its own thread.
Web Dynpro ABAP automatically inherits the theme of the NetWeaver Portal.
http://help.sap.com/saphelp_nw70/helpdata/EN/42/cbf9fabaa86babe10000000a1553f6/frameset.htm
Therefore when you customize the theme of the portal, you are also adjusting the Web Dynpro ABAP theme.
Here is the help link for working with the Portal Theme:
http://help.sap.com/saphelp_nw70/helpdata/EN/1a/d7c1617dd29e4d85064b467636fada/frameset.htm -
ABAP Web Dynpro: Application Configuration vs Admin Personalization problem
Hi,
I created an application configuration for the application MT_ORDER_APP with a component configuration on RPLM_MT_ORDER_COMP. I changed several Labels and UI Element visibility... and saved.
When I test this application config for viewing an order of type ZX99, I don't see my changes. If I right-click on the page, I see that the configuration Id used is MT_ORDER_ZX99.
Why my Z config is overrided by this one???
By testing in Admin mode, I discovered that I can personalize this MT_ORDER_ZX99 Config.... But then, the changes are visible to all users viewing ZX99 type orders.
How to manage to make my Application Config highest in priority?Hi,
how did you open in administrative mode?
to open in adminstrative mode do as follows:
In se80 ,i.e in the menu bar:
Web Dynpro Application->Test->Test in Administation mode.
i hope u can see the option "Settings for surrent config" .
you can refer the thread.
[Re: ABAP Web Dynpro Application changes in Administation mode]
Priya. -
BAPI Web Service Context Mapping Problem
Hello all,
I am developing a process consisting of an automated activity.
This automated activity uses a logical destination for a web service call to an ECC BAPI.
The BAPI name is 'BAPI_INQUIRY_CREATEFROMDATA2'
Now the problem is the Output mapping in the automated activity which calls the web service for the above BAPI has the response name as 'BAPI_INQUIRY_CREATEFROMDATA2.Response'
So when i try to map the nodes it gives me an error, 'Error at Line 2, Column 29, Found '.' after BAPI_INQUIRY_CREATEFROMDATA2'.
Since there is no mapping i do not get the process working
If i remove the '.' from the wsdl file source, mapping is done. But the backend service call gives an error.
How can i solve this problem?
Any inputs will be very helpful.Hello Martin,
thnks a ton for your replies.
The '.' is a standard thing.
Its the part of the WSDL file which is a standard WSDL file for a service offered for a standard SAP BAPI. So i haven't changed anything.
Its what is standardly available. So i cant anything on that.
And the response element is not below the bapi node.
The name of the root node of the BAPI return context is
"BAPI_INQUIRY_CREATEFROMDATA2.Response"
This is what is causing the problem.
Please note here that '.' is not responsible for any hierarchy. Its the name of one single root node element. -
Context Mapping Problem from IDoc to EDI
Hi,
I'm trying to map an IDoc to an EDI and I get this problem.
In my IDoc, I have segment E1ADRM1 (1:N)
My mapping condition is if E1ADRM-PARTNER_Q = OSP then copy E1ADRM-REGION into x (EDI field)
So here is my problem:
In my IDoc test, the segment E1ADRM1 is repeated 6 times and the field REGION is not populated in all iterations so the wrong
REGION is being copied to my EDI field.
If I do a display queue on E1ADRM-PARTNER_Q, the value OSP is at the 5th position
AG
SP
VE
WE
OSP ***
OSO
If I do a display queue on E1ADRM-REGION, since only 5 segment E1ADRM have the field REGION populated, I get
KS
VA
KS
ON
VA
**(E1ADRM-PARTNER_Q = SP do not have the RIGION populated so not showing in the IDoc)
So now, since E1ADRM-PARTNER_Q = OSP is at the 5th position, it is copying the 5th E1ADRM-REGION from the list but it should be the 4th.
How can I do that?
Rgds,
YvesHi,
For the mapping to work as you are expecting the queue should look like this(<b>CC</b> denotes context change)..
KS
<b>CC</b>
<b>CC</b>
VA
<b>CC</b>
KS
<b>CC</b>
ON
<b>CC</b>
VA
If you are not having the context changes, check at what level is field REGION at, right click on REGION in graphical mapping and choose menu item context, the 1st entry should have the tick mark(same should be for the PARTNER_Q field also).
Thanks,
Renjith. -
Webdynpro Context mapping problem
I have created a Webdynpro component(A) in which i am getting details from the BAPI(model) and I have exposed this component as a public part and I am using this component in another webdynpro component(B).
In the second webdynpro component(B) I have an iview and i have made context binding with above Component(Used Webdynpro component). and in my iview there was an table.
when i am doing the context binding in the layout its giving error ""Error for UI Element with Label _____" Select an attribute of type String."
I am using NWDS 2.0.14. Has anybody facing this problem?Hi,
It seems to be a corruption in the metadata for the views.
Or else you might have missed some bindings
If possible, Go to the Problems view and find the details of the error. Double on that to fix it.
Regards
Ayyapparaj -
Hi experts,
Can anyone enlighten on the following:
I have a component controller and i created a value node with following properties:
cardinality: 0..n
selection:0..1
singleton: true
Then i have 2 views (view A and view B).
The 2 views context are both mapped to the value node of the component controller and both view displays the values of the attributes in a textfield.
When i change an attribute value in view A, it is also reflected in view B but when when i change in view B, it doesn't get reflected in view A. View A still holds the old value.
Any explanation ?
Thanks.
Rgds,
Danielhi
try to even check the view property , set it to Frame_Controlled , if it is set to when_visible.
with respect to your requirement , you have created the value node in the component controller
and when you try to change an attribute value in view A or View B ,
for the moment , and the try checking with printing the values of the
context attributes , and see whethere you are able to set the values to context properly ,
and if possible please provide the code code you have written
Thanks -
Hi,
Steps which I underwent for context mapping is:
1. Opened view designer for start view .
2. Choose the context tab.
3. Opened the context menu for the root node context n choosed the option New->Value attribute.
4. entered the name for the attribute such as name n choosed finish.
5. From the context menu for the attribute Name choose Edit Context Mapping.
Problem is in my case "edit context mapping" is disable.
RegardsHi
u have to add the Component Controller In the required Controllers List of the view
thwn u fill find the it enabled.
Suppose u want to map the value Attribute in the view to that of the Attribte in the Component Controller then add that ComponentContolle Name in the required Controllers of the view
ur Component controler shuld also have the Value Attribute of same data type.
u can go properties of the View there u have required Controllers and Add Button click on that and add ur controller Name -
Interactive problem in Web Dynpro for Java and Flex
Hi, all:
Now I'm can use the FlashIsland to embed a flash developed by flex builder 3 in a Web Dynpro View, I have made the data transfer between Web Dynpro View and the flash, also have I got events of the flash in Web Dynpro View. But now the problem is that in the flex flash, how can I get the actions such as button action from the Web Dynpro View?
Is there anybody that has the experience to deal with such a problem ? Can you give me some help ?
Thank you all !Hi
Are you sure it asked for JDK 1.9
Please let me know from where you downloaded JDK 1.9
Regards
Nikhil -
Web Dynpro for editing Change request
Hi guys,
I am looking for web dynpro applications for editing or displaying Change request created, i found the one for creation which is "AGS_CHANGE_REQUEST_CREATE" .
AtulHello,
Have you tried the Change Management Work Center ? It should be possible to operate with change requests from there.
Best regards,
Miguel Ariñ -
Create image of XSTRING data and display it in Web Dynpro
Hello,
I am trying to dynamically display an image in a Web Dynpro ABAP Image-Control. The problem is that the data is stored in the DB as XSTRING and I can't find a Method for example to create a new object in the MIME-Repository of the data which is read out of the DB at runtime.
I have already converted the XSTRING into w3mime-Format with the function module RSFO_XSTRING_TO_MIME, but the Control needs a string of a url to display the image (for example to a MIME-Object of the component or a link to a file on the ITS).
Is there somehow a possibility to do this?
Thanks for your help,
Kolja
Solved this way: See /people/brian.mckellar/blog/2003/09/30/bsp-in-depth-writing-an-http-handler
Message was edited by: Kolja EweringHi you may go through the below post to find what could be a better way to do that.
http://forum.java.sun.com/thread.jspa?threadID=5163829
REGARDS,
RaHuL -
CAF DB Update for CAF Entity Service from Web Dynpro
Hi all,
I have created an entity service in CAF called Contacts which contains the following attributes.
phoneNo
cellNo
emailID.
Another entity service called "Person" is created. This contains the following attributes.
personId
personName
personAddr
contactsRef. (Cardinality -> 0..n , Relational Type -> Composition)
That means Contacts entity service is used within Person entity service. Now it is working fine within CAF service browser. Now the Web Dynpro DC of CAF application is used within another custom Web Dynpro DC project. I want to store data from Web Dynpro.
Within the context of component controller of Web Dynpro the structure is like
APerson
|_ personId
|_ personName
|_ personAddr
|_ contactsRef
|_ phoneNo (Under contactsRef)
|_ cellNo (Under contactsRef)
|_ emailID (Under contactsRef)
So I have written the following code within web dynpro custom method.
APerson person = PersonServiceProxy.create();
java.util.List ls = new ArrayList();
for(int i=0; i<4;i++)
AContacts contact = ContactsServiceProxy.create();
contact.setCellNo("9092130156");
contact.setEmailID("[email protected]");
contact.setPhoneNo("432258");
contact.getAspect().sendChanges();
ls.add(contact);
person.setRelatedModelObjects("contactsRef",ls);
person.setPersonID("9999");
person.setPersonName("xyz");
person.setPersonAddr("ABC, KOL");
wdContext.nodeAPerson().bind(person);
person.getAspect().sendChanges();
CAFServiceFactory.getServiceFacade(idendityDefinition.class);
After saving the data from Web Dynpro I am trying to test it from CAF service browser. But I am getting only the parent row. I mean only the value of personId, personName and personAddr fields which I have stored from Web Dynpro. But no value is coming within the table for Contacts entity service for composition relation.
Could anybody help me how can I solve my problem?
Thanks & Regards
Chandan
Message was edited by:
Chandan JashHi Chandan,
Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
I am not sure the code is actually adding the contact model object to person.
Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
award points if info is helpful
Regards,
Anish
Maybe you are looking for
-
IBOOK freezes! Please help!
I was talking to my friend one day and I was saying sorry..my apple froze. He told me he was suprised because apples don't freeze. I have been having this occasional problem for a while now. I had my ibook for about 2 years now..perfect condition..bu
-
Using imageio to convert .gif to .jpg gives bad image
Hi, I'm looking at the 1.4 javax.imageio API, and wrote a naive program to convert images from one format to another. It will read .gif, .jpg or .png and correctly write .gif and .png images, but when I try to write a .jpg from a .gif or .png the res
-
Why won't my computer burn music onto blank CDs
I am trying to burn music onto my blank CD but a notification will pop up saying "The attempt to burn a disc failed. The device failed to calibrate the lazer power level fo this media." Sometimes it is able to burn music onto the CD though. Any ideas
-
PDF export - problem with embedded font
Dear all, I refer to a problem which was already discussed [here|Export to PDF wrong font;. I was asked to start a new thread and provide further information. Here we are... The issue is nearly the same: - We have a solution which both has a WinForms
-
Executable jar that can extract some archive nested in it and do more
Can anyone tell me how i can extract sfx(self -extracted) archive using executable jar if this archive is included into this jar. And how to include it. For example: i have jar witch prints hello world to screen but also contains sfx archive in it wi