Saving web dynpro's dats in a custom db table
Hello I'develop web dynpro component for cproject application. my question is how to save the new dats in a custom database table....where may I find some example?
I'm new to web dynpro technology I need documentation please...
what u need to do is, there must hve been some binding that u mapped with the custom table in the view of the webdynpro component.
Now,say the method ON_AFTER_SAVE gets triggered when u enter the data in the component and prtess save.
so in this method write the logic of the updation of the custom table.
DATA: Node_table type ref to if_wd_context_node,
elem_table type ref to if_wd_context_element.
node_table = wd_context->get_child_node( 'TABLE_DATA_SOURCE' ).
CALL METHOD node_table->get_static_attributes_table( IMPORTING
table = it_table ). " here it_table will be the internal table of the type as the structure that u created in the view.
now, get the data that u enter on the component into this internal table and modify the ztable from this internal table.
the ztable gets updated.
Similar Messages
-
Custom PL/SQL API that inserts the data into a custom interface table.
We are developing a custom Web ADI integrator for importing suppliers into Oracle.
The Web ADI interface is a custom PL/SQL API that inserts the data into a custom interface table. We have defined the content, uploader and an importer. The importer is again a custom PL/SQL API that will process the records inserted into the custom table and updates the STATUS column of the custom interface table. We want to show the status column back on the spreadsheet.
Defined the 'Document Row' import rule and added the rows that would identify the unique record.
Errored row import rule, we are using a SELECT * from custom_table where status<>'Success' and vendor_name=$param$.vendor_name
The source of this parameter is import.vendor_name
We have also defined an Error lookup.
After the above setup is completed, we invoke the create document and click on Oracle->Upload.
The records are getting imported, but the importer program is failing with An error has occurred while running an API import. The ERRORED_ROWS step 20003:ER_500141, parameter number 1 must contain the value BIND in attribute 1.'The same issue.
Need help.
Also checked bne.log, no additional information.
<bne:document xmlns:bne="http://www.oracle.com/bne">
<bne:message bne:type="DATA" bne:text="BNE_VALID_ROW_COUNT" bne:value="11" />
<bne:message bne:type="DATA" bne:text="BNE_INVALID_ROW_COUNT" bne:value="0" />
<bne:message bne:type="ERROR" bne:text="An error has occurred while running an API import"
bne:cause="The ERRORED_ROWS step 20003:ER_500165, parameter number 1 must contain the value BIND in attribute 1."
bne:action="" bne:source="BneAPIImporter" >
<bne:context bne:collection="collection_1" />
</bne:message><bne:message bne:type="STATUS"
bne:text="No rows uploaded" bne:value="" >
<bne:context bne:collection="collection_1" /></bne:message>
<bne:message bne:type="STATUS" bne:text="0 rows were invalid" bne:value="" >
<bne:context bne:collection="collection_1" /></bne:message></bne:document> -
Preventing saved web pages submitting data
Hi,
whilst someone was messing around with a simple site I built
(literally just a guestbook thing using all the DW behaviours) they
found something I hadn't really thought about.
They could save the web page with the form on, to their
desktop. They could then use this saved form to submit data to the
webserver.
This got me thinking. If I was to use hidden form elements to
control the behaviour of the submitted data (for example, <input
name="dataaction" value="add">), in theory someone could save
the page, change the value to 'delete' and I don't really need to
say any more!
So my question is this - what's the best way to make sure
only pages served by the webserver can do anything (to disable
pages being able to be saved and edited)? I guess this can also
apply to URL tampering...
HTTP_REFERRER seems to be a little unreliable!
I'd rather know how to do this using DW behaviours or
something, but if not then any solution will do.
I'm interested in solutions for ASP and PHP.
Thanks in advance.quote:
Originally posted by:
Newsgroup User
New Guy wrote:
> they shouldn't be able to download your whole page- just
the html part.
> Hence- No functionality.
Not true. All that the attacker needs to do is to change the
value of
the action attribute to the URL, and the form data will be
accepted.
Using a hidden field that would permit anyone to change the
SQL query
from from INSERT to DELETE is simply asking for trouble.
Permission to
delete should be restricted to registered users on a
password-protected
part of the site.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
David,
I agree with the permissions thing and I think for the most
part what I'm thinking about is probably redundant.
I guess this is more of an exercise to see if there's a way
to make sure form submissions only come from the "correct" place as
a means of adding extra security.
Thinking about the original example I gave, using hidden form
fields to change the query type is not really an issue as a) all
query types would only execute depending upon user credentials
(login, user level, session, etc), and b) I tend to use different
database connections depending upon the userlevel and query type.
But I do still have an interest in resolving how to make sure
forms only "work" when submitted from a certain place.
Cheers,
- B -
Adobe Interactive Forms - Web Dynpro: itab data not in textfield layout
Hi,
out of a web dynpro application i'm generating a pdf document which is filled with data out of an internal table. This data is displayed with a name and following the itab value. But it looks like the value is displayed in a textfield. I want the value to be displayed like a standard text.
How can I realitze this?
Thanks in advance,
TanHi Tan,
What do you mean by standard text..?
is that mean you want to display the content as a label (static text field..?) if so there are 2 approaches.
1) drag and drop the field from data view onto form and change the visual properties of the field.
2) Have a static text on the form right click in it, select floating field option in context menu, a field is generated do data binding for this field.
if even my understanding of your requirement is wrong provide more info on the UI presentation you are looking for ..
Regards,
Sai Krishna. -
Web Dynpro view data to PDF creation issue
Hi ,
I am passing data from Web Dynpro iView to genrated PDF using url link, pdf generation is done using iText java class.
outputPDFData is the method to which i need to pass the data to but this is where i failed.
Can someone please identify error or suggest how i move from here?
Till now we completed storing test data in a temporary location using ByteArrayOutputStream but to show the data on screen??????
ByteArrayOutputStream os = new ByteArrayOutputStream);
List data = new ArrayList();
data.add("Test Data1");
data.add("Test Data2");
data.add("Test Data3");
PDFTestTemplate PDFTest = new PDFTestTemplate();
PDFTest._outputPDFData_(os,data);
final IWDCachedWebResource resource = WDWebResource.getWebResource(os.toByteArray().toString().getBytes("UTF-8"), WDWebResourceType.PDF);
wdContext.currentContextElement().setPdfURL(resource.getURL());
os.close();
P.S.
I have also referred to this blog by Prakash Singh but wasnt very helpful in my case.
Create a PDF file using JAVAMartin is right,
Any data context node on the next view should also be mapped to the component controller, so when you are changing views you just have to use your material number to invoke the method of the component controller that gets your detailed data, its as easy as this:
before you fire you plug you can use the following:
wd_comp_controller->get_material_details( matnr = lv_matnr ).
Inside your component controller you should have a method called "get_material_details" and an importing parameter called matnr.
once the logic is run to get the details, bind your data to the component controllers Material details context node, this node should also be mapped to the view of the second screen.
So now when the second view opens the data will magically be there
Good luck,
Shaunny B -
Adobe Flash Islands for Web Dynpro ABAP Data Binding problem
I have downloaded the NetWeaver 7.1 Trial (includes Adobe Flash Islands for Web Dynpro ABAP). I try to create a very simple FlashIslands component running within the Web Dynpro Application, everything looks good. However, all binding to the Flex component is not working. Does anyone know why?
Since it's trial version, I login as BCUSER into NSP system. When I load up the build-in sample, such as Chart Demo, the binding to Flex seems working. I suspect if it has anything to do with package? I could only create my Web Dynpro under the $TMP package, as all the build-in sample are defined in SWDP_DEMO.
Please help.
Alanhi,
Check out this link. It will give you an idea how to integrate Aobe island comp with web dynpro.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/307b434f-ff32-2b10-e885-991247270480
Thanx. -
Web Dynpro ABAP: How to do checkboxes in table column?
Hi,
In Web Dynpro for ABAP, I have a table, where one column consists of check boxes, and the user should be able to check some boxes in some lines. In the context of my view, I created a node tied to a DDIC structure, with some attributes. The attribute where I want to see the checkboxes is of type boolean. In the layout I create an element of type table. Then I create the binding to the context node and for the columns I use cell editor of the appropriate type, that is, checkbox. However, when I test my application, there are no checkboxes at all. What am I doing wrong?
Thanks,
Ira>
Jenny Karunakaran wrote:
> Hi Jung,
>
> Thanks for the reply. But I dont know how to assign value set to this attribute(i.e. Context atribute to which filter value property is bound). Can I use a supply function for this ?
>
>
> Regards,
> Jenny
No. A value set and a supply function are two completely different things. You use this Context API to populate the value set for an attribute:
IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET
Value Sets are also how ByKey UI elements (like the DropDownByKey) are built. Here is a help document that discusses value sets - but in the context of the ByKey UI elements. The process is the same for creating the value set however:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm -
Saving web dynpro data into a custom db tabl
Hi experts,
Using editable alv i am editing alv fields , modified alv data is there in my internal table ( lt_contact).
How can i move internal table data to Z-table...
DATA: node_cont_dtls TYPE REF TO if_wd_context_node,
elem_cont_dtls TYPE REF TO if_wd_context_element,
lt_contact TYPE if_main=>elements_cont_dtls.
CHECK r_param->t_error_cells IS INITIAL.
node_cont_dtls = wd_context->get_child_node( name = `CONT_DTLS` ).
get data from context node <NODE_FLIGHTTAB>
node_cont_dtls->get_static_attributes_table(
IMPORTING table = lt_contact ).
Modified data is there in it_contact
modify table ZBAS_CONTACTS from lt_contact TRANSPORTING name1.
Here when i am using above modify statement it show in error
field ZBAS_CONTACTS is unknownHello Rakhi
Use this statement
MODIFY ZBAS_CONTACTS FROM TABLE lt_contact .
Thanks and Regards
Chaitanya.A -
Good day all,
I have create a window with multiple views. On allows me to select a material number and the second is suppose to display the data in a textview.
They are bound with the navigation links. How do I get the second view to only display the information of the number selected?Martin is right,
Any data context node on the next view should also be mapped to the component controller, so when you are changing views you just have to use your material number to invoke the method of the component controller that gets your detailed data, its as easy as this:
before you fire you plug you can use the following:
wd_comp_controller->get_material_details( matnr = lv_matnr ).
Inside your component controller you should have a method called "get_material_details" and an importing parameter called matnr.
once the logic is run to get the details, bind your data to the component controllers Material details context node, this node should also be mapped to the view of the second screen.
So now when the second view opens the data will magically be there
Good luck,
Shaunny B -
Web dynpro Abap : Icons not display in alv table
Hi ,
I want to replace the content of a cell by an icon ,in an alv table.
I know how I should do it, but my icon is never displayed. There is only an "X" as if the icon hasn't been find.
Did anyone encountered the same issue?
Thanks
KarimHi Kraim,
I hope that you have followed the [correct procedure|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9] for displaying your icons within the ALV cells. May be you are passing an invalid icon name. Just try check out the dictionary table ICON to ensure that you are using the correct one.
Regards,
Uday -
Problem: Web Dynpro Java 6.40 FileDownload control in table
Hi guys,
I have the problem to display FileDownload elements in a table. Unfortunately it is NOT NW04s, but it is the old Release 6.40.
Theoretically speaking, this should be possible too. (Performance wont be good according to two SDN articles of Betram Ganz).
Still I have the following problem:
If I want to obtain IWDModifiableBinaryType to save my file inside the context for displaying in the table then I get java.lang.NullPointerException.
My Context is 0..n node "Submissions" where my file is stored as binary attribute "File1".
Code to get the IWDModifiableBinaryType is:
wdContext.getNodeInfo().getAttribute(IPrivateFormManagerAdminSubmissions.ISubmissionsElement.FILE1);
or:
wdContext.nodeSubmissions().getNodeInfo().getAttribute("Submissions.File1");
Both is not working.
Now I have the question if this should theoretically work and if there are any tips/code snippets how to do this?
Whats wrong with the coding above?
Thank you very much guys,
much appreciated.
Christoph
Edited by: Christoph Koch on Jun 22, 2009 9:48 AMwdContext.nodeSubmissions().getNodeInfo().getAttribute(IPrivateFormManagerAdminSubmissions.ISubmissionsElement.FILE1);
if the element its on the node Submissions then you have to especify it to get the node info. I hope it helps -
Question about meta-data of Web Dynpro ABAP / Web Dynpro Java
Hello together,
everywhere I can read, that Web Dynpro meta-data is platform independent.
I´ve read into a book, that the meta-data of Web Dynpro Java is saved as XML and
that Web-Dynpro Java Runtime generates runnable classes and sourcecode out of this...
- What about Web-Dynpro ABAP? Is Meta-code in ABAP is saved in XML too?
- just for theory: is ist possible to take the meta-data of a Web-Dynpro ABAP component and
generate a Web-Dynpro Java Component out of this?
I tried to find it out but i failed... In table WDR_RR_LOAD (is this the right one?) I found only the
field data. But this is a RAWSTRING and I don´t know how to make I "readable".
I must know this for my thesis for my studies, not for work.
Thank you very much !!!!
Greetings,
OliverMe again,
I am not sure if I understood it right...
The meta-data which describes the visual part of a view is saved as XML and
would be rendered i.e. in the webbrowser... Right?
What about the meta-data of the Web Dynpro application?
Is this meta-code into an other structure or XML too?
Thank you very much.
Many Greetings,
Oliver -
NW2004s: Assigning a custom theme to a web dynpro running in the portal
The situation is as follows:
Some web-dynpros (for java) have a custom theme, a theme which is <b>not</b> the default theme of the portal or the default theme for web-dynpros in general.
In NW2004 this worked as follows:
When starting a web-dynpro in the portal it checked if it was started with the right theme. If <b>not</b> the exit plug of the WD interface view was called with an Url of the WD application plus a parameter for the right theme.
This is the famous parameter sap-cssurl.
For that parameter there are some values possible:
1) sap-cssurl=http://<host>:<port>/irj/portalapps/com.sap.portal.design.urdesigndata/themes/portal/mytheme
2) sap-cssurl=http://<host>:<port>/irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal/mytheme
3) sap-cssurl=http://<portal>:<host>/webdynpro/resources/sap.com/tcwddispwda/global/SSR/themes/mytheme
The first 2 are locations of the portal environment, the last one is a location of the WD runtime environment.
As I noticed this must be a full qualified absolute Url including host and port.
This works in NW2004 for web dynpro's running standalone <b>AND</b> in the portal.
Now for NW2004s:
The 3 variants of the parameter sap-cssurl work for web dynpro's running standalone.
But now for web dynpro's which are integrated in the portal:
The exit-plug with an Url is not possible anymore, this leads to the runtime error:
<i>com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!</i>
Okay, as a first workaround I tried the portal navigation,
but somehow the supplied parameter sap-cssurl has no effect.
The code for that in the on-startup plug of the WD component:
WDPortalNavigation.navigateAbsolute(
PCD_ID,
WDPortalNavigationMode.SHOW_INPLACE,
null,
null,
WDPortalNavigationHistoryMode.NO_HISTORY,
null,
null,
"theme_set=X&" + theme,
theme,
false,
true
I used there absolute portal navigation and the parameter (sap-cssurl=...) is part of the <b>launcher parameter</b> and the <b>business parameter</b> in the call to <b>WDPortalNavigation.navigateAbsolute</b>.
But as I wrote above, this has no effect on the theme.
In the I-View the parameter "Supply portal theme" is set to <b>NO</b>, otherwise the parameter "sap-cssurl" is supplied twice (this can be seen in the poroperties of the web-page in Internet Explorer).
What I tried afterwards was setting the parameter sap-cssurl hardcoded in the "Application parameters" of the I-View. This doesn't work either.
My question is: Should this be anyway possible for a NW2004s portal?
Did anyone successfully implement this?
Kind regards,
Erich LindHi Erich,
I am facing the same problem. I am on 04 s and couldnot implement the custom theme to a web dynpro running in the portal. When I run the web dynpro app as stand alone, the custom theme applies fine. But when in portal, it takes the standard theme.
Was wondering if you figured this out.
Thanks -
Creating mobile web dynpro application which customized theme
Hi guys,
I have created a mobile web dynpro application and a theme with Theme Editor. Then I have appended this theme with the sap-cssurl parameter to my application.
<b>my_application? sap-cssurl=http://host:port/webdynpro/resources/sap.com/tcwddispwda/global/SSR/themes/MyTheme</b>
It works well in my first testing on my laptop.
In order to test it on my mobile device I have also appended sap-wd-client parameter to my application. Now my URL looks like
<b>my_application? sap-cssurl=http://host:port/webdynpro/resources/sap.com/tcwddispwda/global/SSR/themes/MyTheme&sap-wd-client=PieClient</b>
It doesnt work. My application layout looks as if I dont use the theme. Did somebody have the same problem and can help me by finding a solution.
Thanks for your answers.
MaritaHi Marita,
Mobile Web Dynpro supports several handheld mobile devices. I guess yours is a Pocket PC. Except the newest Pocket PC 2003, all the other versions don't have CSS support. Therefore the current Pocket PC client "PieClient" of Web Dynpro lacks the ability for customized themes. On the other hand, themes are supported for more advanced devices, such as Nokia Communicator 9500/9300.
Regards,
Wei -
Hi there!
I am using the tree element in web dynpro.
Not the tree in the table.
I need to expand a part of the tree during loading
I do not find an example.
Any help is warmly appreciated.
Thanks in advance, FrankHi,
the "dynamic" tree expansion depends on who you populate the tree content e.g. how you load the data to your tree.
In my application, I have choosen to load the root nodes, first - all over sub-nodes (including items) are loaded "on demand" that means the user clicks on the node. This click will trigger the the action onLoadChildren which pulls the data from a data provider and binds the retrieved data to the corresponding
context node.
This expansion can be perfomed automatically by a recursive method which is called when a user pushes a button called "Expand all"....
I don't have much time to explain the details, but I will provided the source code..., hope it helps!
Darko
Source Code -
Import to the Method:
i_node_ref type IF_WD_CONTEXT_NODE = Reference to the context node
METHOD nav_tree_expand_all.
Data declaration
DATA node_elements TYPE wdr_context_element_set.
DATA node_element LIKE LINE OF node_elements.
DATA child_node TYPE REF TO if_wd_context_node.
DATA ls_tree_attr TYPE zlm_str_tree_gen.
DATA lt_tree TYPE zlm_tty_tree_gen.
Get all node elements
node_elements = i_node_ref->get_elements( ).
Loop over each element
LOOP AT node_elements INTO node_element.
" Get Static attributes
node_element->get_static_attributes( IMPORTING static_attributes = ls_tree_attr ).
" Check if data has already been loaded
IF ls_tree_attr-children_loaded = abap_true.
" now we know that the data has been loaded, only the elements have to be declared as expanded
ls_tree_attr-is_expanded = abap_true.
node_element->set_static_attributes( EXPORTING static_attributes = ls_tree_attr ).
" get possible other nodes recursively
child_node = node_element->get_child_node( 'SUBTREE' ).
me->nav_tree_expand_all( EXPORTING i_node_ref = child_node
i_screen_id = i_screen_id
i_component_id = i_component_id ).
ELSE.
" data has not been loaded yet...
" First load the nodes...
clear lt_tree.
me->get_nav_tree_nodes( .....importing lt_tree.). Custom specific data retrieval
IF lt_tree IS NOT INITIAL.
child_node = node_element->get_child_node( 'SUBTREE' ).
child_node->bind_table( lt_tree ).
" Update Attributes of the node
ls_tree_attr-is_expanded = abap_true.
ls_tree_attr-children_loaded = abap_true.
node_element->set_static_attributes( EXPORTING static_attributes = ls_tree_attr ).
" Call the method again recursively...
me->nav_tree_expand_all( EXPORTING i_node_ref = child_node
i_screen_id = i_screen_id
i_component_id = i_component_id ).
ENDIF.
" ... then load the items
CLEAR lt_tree.
me->get_nav_tree_items( .....importing lt_tree.). Custom specific data retrieval
IF lt_tree IS NOT INITIAL.
" Update Attributes of the node
ls_tree_attr-is_expanded = abap_true.
ls_tree_attr-children_loaded = abap_true.
node_element->set_static_attributes( EXPORTING static_attributes = ls_tree_attr ).
child_node = node_element->get_child_node( 'ITEM' ).
child_node->bind_table( lt_tree ).
ENDIF.
ENDIF.
ENDLOOP.
RETURN.
Edited by: Darko Mocelj on May 7, 2008 8:57 PM
Maybe you are looking for
-
Error while building scrotwm package
Hi, I'm having an issue building the scrotwm package from AUR. After downloading the tarball and PKGBUILD and doing: makepkg I am met with this error: ==> Making package: scrotwm 0.9.30-1 (Fri Jun 17 22:18:24 EDT 2011) ==> Checking runtime dependenci
-
Start Web Logic 5.1 in a separate JVM
Hi All. Is there a way to start Web Logic 5.1 in a separate JVM from within a java class. I am writing a service pack for a Web Logic application. During the service pack uninstall, I have to stop web logic, delete the new files, restore old files an
-
Hello, We need to update 2 columns on a very large table (20000000 records). Every row in the table is to be updated and the client wants to be able to update the records by year. Below the procedure that has been developed DECLARE l_year VARCHAR2 (4
-
How to reduce my query execution time?
Hi Friends, One of my client asked me this question. " My query is taking long time to execute.So how do you reduce this time?" . I replied him saying some performance issues like creating aggregates( offcourse we have to balance the maintenance of i
-
Multithreaded File Copy takes more time 1.5 times than single thread.
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.nio.channels.FileChannel; public class TestMulti implements Runnable { public static Thread Th1; public static Thread Th2; String str = n