How to create an editable table in webdynpro for ABAP? Help!
Hi Experts,
I have a requirement where I have to create a webdynpro for ABAP table for new row/rows entry, delete row/rows and update row/rows data. This is something like table control in normal ABAP.
how can I achieve this? Is there any such feature in ALV component?
Any code sample will be really helpfull.
Please help!
Thanks
Gopal
Hi,
yes, the ALV is integrated into WDA, have a look at this: http://help.sap.com/saphelp_nw2004s/helpdata/en/74/fd4142646ab46be10000000a155106/frameset.htm
Regards, Heidi
PS: look at the WDA Knowledge Center under https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943, there you can find several ALV tutorials
Message was edited by: Heidi von Geisau
Similar Messages
-
How to make cell editable alv in WebDynpro for ABAP?
I make Column editable ALV.(See under source code)
But I can't make Cell editable ALV.
How to make Cell editable ALV in WebDynpro for ABAP?
and..how to get changed data?
DATA: l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
* { EDITABLE
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
lr_column TYPE REF TO cl_salv_wd_column.
lr_column_settings ?= l_value.
lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = 'TOTAL_COUNT'.
lr_column->set_cell_editor( lr_input_field ).
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).the code seems to be correct....but where are you writing it?
put the code in the wddoinit method and it should work.
have a look at this article..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1 -
How to create a long text in webdynpro for abap?
Hi Experts,
I am new to Web Dynpro for ABAP, I have a requirement for Grievance workflow. For this we have developed a Webdynpro application which appears in portal. Here my issue is user wants to enter a long text on the screen and I have to save this text as standard text. Is it possible to create a text box which we can insert number of lines?
If so can anybody please suggest me how to resolve this issue.
Thank You.
Ranganadh.hi ,
u can use the TEXT EDIT UI element , procced like this :
1 Right click on Root Element UI container , insert elemnt TEXT EDIT
2 create a context attribute of type string or string_table
3 bind value property of ur UI to this attribute
4 u can get the values entered in the text UI by user , by get_attribute method
press CNTRL + F7 , select the radio button read context node/attribute , select the corresponding attribute
The attribute to be bound can be of type STRING or STRING_TABLE. With STRING_TABLE rows from TextEdit are stored as table rows. A line break is always stored as a line feed in a STRING (CL_ABAP_CHAR_UTILITIES=>NEWLINE, ASCII decimal 10). The Web Dynpro framework carries out the conversion for the client platform.
Note that a string to be displayed in TextEdit, must only use a line feed as a line break.
refer this online help :
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/06/45ee412e5e6324e10000000a1550b0/content.htm
regards,
amit -
How can i read local excel file into internal table in webdynpro for abap a
Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
thank u for your replyDeep,
File manuplations...............................
1. At the presentation level:
->GUI_UPLOAD
->GUI_DOWNLOAD
->CL_GUI_FRONTEND
2. At the application server level:
->OPEN DATASET : open a file in the application server for reading or writing.
->READ DATASET : used to read from a file on the application server that has been opened for reading
-> TRANSFER DATASET : writing data to a file.
-> CLOSE DATASET : closes the file
-> DELETE DATASET : delete file
If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
call function 'GUI_UPLOAD'
exporting
filename = p_file
filetype = 'ASC'
has_field_separator = '#'
tables
data_tab = t_data
p_file : excel file path.
t_data : internal table
<b>reward points if useful.</b>
regards,
Vinod Samuel. -
How to create an editable table in ADF 10g??
Hi,
I want to create a editable table using the Jdev 10g.. so that i can do read and write on the table. Can anyone tell me how i can create it...
thanks in advanceHi,
using ADF BC and ADF, one of the options when dragging a ViewObject from the data control palette is ADF Table. This creates an updateable table
Frank -
How to create an xml structure in webdynpro for java using NWDS?
Hi Experts,
I need to call an webservice by passing an xml structure to the webservice.I have the input values loaded on the context,which are basically tied to an Form UI element.Is there anyway in webdynpro to build an xml structure. ,
or do i need to use any open source like JAAS or DOM parser in the webdynpro project.?
Thanks
Aravindhi,
I was working on exporting table data from wd to Excel sheet. There, i had to create an XML representaion of the context.
Please refer to link, and go through page, 10 and 11 and see id you find anything useful.
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/exporting%20context%20data%20into%20excel%20using%20the%20web%20dynpro%20binary%20cache.pdf] -
Insert,update and delete data in a table using webdynpro for abap
Dear All,
I have a requirement to create a table allowing the user to add rows in it and update a row as well as delete a row from that table.To do this I guess I have to make use of ALV.But using ALV I am not able to enter data to a table where as I can make a column editable delete a row etc. please guide me to perform these operations(insert,update and delete) on table.
Thanks,
Reddy.Hi Sridhar,
By using ALV you can do all insert delete etc things. if you want to edit i mean you can yenter data in ALV.
Check this...
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
Editing alv in web dynpro
editing rows in alv reports
Re: editing rows and columns in alv reports in webdynpro abap
Cheers,
Kris. -
Error creating dynamic context node in Webdynpro for ABAP. Plesae help!
Hi
I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
Note
The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
My code is like the following:
TYPES: BEGIN OF t_type,
CARRID TYPE sflight-carrid,
CONNID TYPE sflight-connid,
END OF t_type.
Data: i_struc type table of t_type,
dyn_node type ref to if_wd_context_node,
rootnode_info type ref to if_wd_context_node_info,
i_node_att type wdr_context_attr_info_map,
wa_node_att type line of wdr_context_attr_info_map.
wa_node_att-name = 'CARRID'.
wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
insert wa_node_att into table i_node_att.
wa_node_att-name = 'CONNID'.
wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
insert wa_node_att into table i_node_att.
clear i_struc. refresh i_struc.
select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
rootnode_info = wd_context->get_node_info( ).
rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
attributes = i_node_att
is_multiple = abap_true ).
dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
dyn_node->bind_table( i_struc ).
l_ref_interfacecontroller->set_data( dyn_node ).
I am trying to create a new node. That is
CONTEXT
- DYNFLIGHT
CARRID
CONNID
As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
Also I cannot define the structure in the ABAP dictionary because it changes based on conditionOk, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
FOO_NODE (1-1)
Widget (1-N)
-Widget_info (1-1)
*Name
*Sku
*Description
-Widget_plant (1-M)
*Plant_Code
*Plant_State
*Plant_City
-Widget_pic (1-1)
*Picture -
How to call a BSP Application inside Webdynpro for ABAP
Is there any way to call a BSP application inside the webdynpro ABAP application..
The Input screen will be the BSP page and when the user click the action it have to trigger some data in BSP and in turn it have to collaborate the manipulated data in webdynpro and shows the output in webdynpro or in BSP..pls refer to http://help.sap.com/saphelp_nw70/helpdata/EN/30/1b62799d786445a72ad85acb4fd55b/content.htm
and check if it helps u -
How To convert XSTRING To LRAW in Webdynpro For ABAP
Hi,
In my application , I want to convert XSTRING TO LRAW.
Please Suggest me how to achieve this.
Thanks,
PratibhaWhat do you mean convert? XSTRING and LRAW are the same thing - an unlimited byte sequence. LRAW is generally used to describe an XSTRING based database column. You can insert XSTRING directly into a LRAW column using SQL. No conversion or special processing is necessary.
Also I don't see how this question is related to Web Dynpro ABAP. This seems like a general ABAP language question. -
How to create interactive forms using Webdynpro for ABAP
Hi All,
I have worked on Webdynpro for ABAP, and now I want to start creating adobe interactive forms using Webdynpro for ABAP. Please provide me with basic examples to start.
Also Please provide me introduction as how interactive forms are related to ISR senarios.
Thanks in Advance.
PhaniHi Varun!,
Can you please send me also the above said step by step tutorial on [email protected]
and can you please also guide me any configurations to be done on Sneak Preview SP12 before developing the interactive forms.
Thank you in advance.
regards
Ravi -
How can we Access RFC of R/3 in WEBDYNPRO FOR ABAP?
Hi all,
i wnat to access a Function Module(RFC) which has created in R/3 in WEBDYNPRO FOR ABAP.Can i access it through SERVICE CALL.or if any other process there.?And how can i map their context & how can i execute?
Edited by: ravi k on Mar 27, 2008 1:07 PMHi,
you can find a [pdf document|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600] here.
grtz,
Koen -
Interactive Forms by WebDynpro for ABAP
Hello,
I'd like to create Adobe Interactive Forms by "WebDynpro for ABAP".
Our business requirements are
- to download offline PDF forms.
- to upload PDF forms and display Forms online.
Please let me know how to do this and the document or blogs.
Best regards,
KojiHi,
Downloading a form is as simple as when u enduser opens a form online, he just saves a copy of it, fills it up and uploading is just the next step.
If u want to upload an offline PDF form:
Here's the link that'll give a fair idea about this:
/people/shruti.rathour/blog/2008/02/07/uploading-sap-interactive-form-on-the-abap-webdynpro-view
If still not clear ask me..
It's just that u've created a view in webdynpro ABAP and uploading an offline form from that.
regards
Amita -
Webdynpro for ABAP - Popup apearing for userid and pwd
Hi Experts,
We have implemented ESS and gone live. Now we have created one custom application in webdynpro for ABAP and attached with portal.
Initially there was a problem, the application was not getting executed because of system configuration, then I have configured the host name, port number correctly. Then the iView is getting loaded in the portal.
The problem is, when I am trying to access the iView, the popup apearing for the user id and password. This is happening only the webdynpro abap application, this is not happening for all sap standard iViews.
Could anyone help me with this issue?
Thanks
JayHi Jayanthi,
as you had mentioned this is not happening for sap standard iViews(do you mean simple transaction iViews for which you have used a system alias, which was the same you had used for ABAP web dynpro iview)?
Of courese ESS iViews works with their own JCOs which is no way helpful or connected with wd ABAP.
So I believe if your SAP id and Portal id are different(or if they are same but SAP Logon ticket is not configured properly) then only it woudl ask for the authentication again- for Wd ABAP to work fine, only the connector property and WAS to tbe configured in the system object(aka system alias) used for ABAP iview. Now once you enter the login credentials, it is working fine right, then could you please test the user mapping under the user you are logged in, select the alias that you had used while creating the abap wd iView and provide userid/password here, then run the wd ABAP application, it definitely would work.
N.B: if you had provided the credentials once, then it woud be stored in the browser cache, so if you perform the user mapping in user admin, log off from portal, close all your browser windows, then clear cache,(cookies etc). then login to portal, run the wdABAP application, I am sure this would work(it worked for me!!!).
Thanks,
Jakes. -
ADF Faces - How to create an editable rich table at runtime
Hi,
JDeveloper version - 11.1.1.4.0
I have been trying to create an editable table (wherein the user can enter text into the input text boxes contained in the columns added at runtime). The values thus entered are to be captured in the backing bean for further processing.
Below are my attempts to achieve this in various ways but without success.
Attempt 1 : Created a Read-Only Dynamic table by dropping the view object instance from the Data Control. Here, the default being output text components, I used input text components and programatically make it updatable in the backing bean, which however, shows as an output text component.
1) UI - .jspx file
<af:table rows="#{bindings.TestViewObject1.rangeSize}"
fetchSize="#{bindings.TestViewObject1.rangeSize}"
emptyText="#{bindings.TestViewObject1.viewable ? 'No data to display.' : 'Access Denied.'}"
var="row" rowBandingInterval="0"
value="#{bindings.TestViewObject1.collectionModel}"
selectedRowKeys="#{bindings.TestViewObject1.collectionModel.selectedRow}"
selectionListener="#{bindings.TestViewObject1.collectionModel.makeCurrent}"
rowSelection="single"
id="t1"
partialTriggers="::cb1 ::cb2"
binding="#{TestDynamicTable.t1}">
<af:forEach items="#{TestDynamicTable.attributeDefns}"
var="def">
<af:column headerText="#{def.name}"
sortable="true" sortProperty="#{def.name}" id="c1">
<af:inputText value="#{row[def.name]}" id="it1"
label="Label 1"
autoSubmit="true" />
</af:column>
</af:forEach>
</af:table>2) Backing bean -
public void listenMeForAction(ActionEvent ae) {
//adding attribute dynamically
ViewAttributeDefImpl def = (ViewAttributeDefImpl)vo.addDynamicAttribute("testDynamicAttr"+columnCount);
def.setUpdateableFlag(def.UPDATEABLE);
byte b = def.UPDATEABLE;
def.setEditable(true);
//def.setProperty(def.ATTRIBUTE_CTL_TYPE,);
//def.getUIHelper().HINT_NAME_UPDATEABLE
def.setProperty(def.ATTRIBUTE_DISPLAY_HINT_DISPLAY, def.HINT_NAME_UPDATEABLE);
columnCount ++ ;
AdfFacesContext.getCurrentInstance().addPartialTarget(this.t1);
Attempt 2 : Created a ADF table by dropping the view object instance from the Data Control. Here, the columns and its cells are added programatically in the backing bean. However
1) UI - .jspx file
<af:table value="#{bindings.Test5ViewObj1.collectionModel}" var="row"
rows="#{bindings.Test5ViewObj1.rangeSize}"
emptyText="#{bindings.Test5ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.Test5ViewObj1.rangeSize}"
rowBandingInterval="0"
id="richDynamicTable"
binding="#{TestDynamicTable.richDynamicTable}">
</af:table>2) Backing bean - When the buildRichTable method is invoked from the constructor, the table shows the input text boxes as required, but the entered values is not getting retrieved (). Tried adding a valuchangelistener to the added cell, but this does not fire as well.
Below code however, creates a new instance of RichTable. Also, if an overloaded method is invoked on an ActionEvent, the columns added are not displayed.
//called from costructor
public void buildRichTable() {
dynamicVO.clearCache();
//create this table
richDynamicTable = new RichTable();
int noOfCols = 2;
for(int i=0; i<noOfCols; i++) {
//create new column for the table
richDynamicCol = new RichColumn();
richDynamicCol.setHeaderText("ColTest"+i);
// richDynamicCol.isVisible()
// richDynamicCol.setVisible(arg0);
richDynamicCol.setParent(richDynamicTable);
richDynamicTable.getChildren().add(richDynamicCol);
richDynamicTable.getChildCount();
richDynamicTable.getRowCount();
richDynamicCell = new RichInputText();
richDynamicCell.setLabel("aCell"+i);
// richDynamicCell.isVisible()
MethodExpression methodExpression = FacesContext.getCurrentInstance().getApplication().
getExpressionFactory().createMethodExpression(
FacesContext.getCurrentInstance().getELContext(),
"#{TestDynamicTable.inputBoxValueChangeListener}",
null,
new Class[] {ValueChangeEvent.class});
//this does not work too - on adding some text and tabbing out
richDynamicCell.addValueChangeListener(new MethodExpressionValueChangeListener(methodExpression));
richDynamicCell.setParent(richDynamicCol);
richDynamicCell.setValue("#{row.ColTest"+i+"}");
richDynamicCol.getChildCount();
richDynamicCol.getChildren().add(richDynamicCell);
dynamicVO.addDynamicAttribute("ColTest"+i);
//dynamicVO.insertRow(dynamicVO.createRow());
dynamicVO.getRowCount();
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicTable());
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCol());
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCell());
buildTable = false;
this.setDynamicVO(dynamicVO);
//captures the input data
public void captureRichTableData(ActionEvent ae) {
//gives null below
this.getDynamicVO().getCurrentRow().getAttribute("ColTest0");
this.getDynamicVO().getCurrentRow().getAttribute("ColTest1");
//again null
List<UIComponent> listCols = richDynamicTable.getChildren();
for(UIComponent aColComp : listCols) {
RichColumn aCol = (RichColumn)aColComp;
List<UIComponent> listCells = aCol.getChildren();
for(UIComponent aCellComp : listCells) {
RichInputText anInputText = (RichInputText)aCellComp;
anInputText.getValue();
}Not sure what I must be missing. May be I need to add bindings to the text boxes added but cant figure how to go about it. I found some posts on dynamically adding columns pointing to displaying contained data. Any help would be highly appreciated.
Thanks for your time.
DinuHi,
Not too sure if I am heading the right way, but tried adding the bindings and value expression at runtime for the added columns. The values added at the screen is again found null at the VO and RichInputText child / cell. The updated method is as below -
buildRichTable() {
//adding binding for the added cell
DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
if(bc.findCtrlBinding("ColTest"+i) == null) {
bc.addControlBinding("ColTest"+i, new JUCtrlAttrsBinding(null,
bc.findIteratorBinding("Test5ViewObj1Iterator"),
new String[]{"ColTest"+i}));
//the expression to be set in value attribute for richInputText component
String theExpression = "#{row.bindings."+"ColTest"+i+".inputValue}";
//setting the expression
richDynamicCell.setValueExpression("ColTest"+i, getValueExpression(theExpression));
richDynamicCell.setAutoSubmit(true);
richDynamicCol.getChildCount();
richDynamicCol.getChildren().add(richDynamicCell);
dynamicVO.addDynamicAttribute("ColTest"+i);
dynamicVO.insertRow(dynamicVO.createRow());
dynamicVO.getRowCount();
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicTable());
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCol());
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCell());
buildTable = false;
this.setDynamicVO(dynamicVO);
private ValueExpression getValueExpression(String theExpression) {
FacesContext fc = FacesContext.getCurrentInstance();
Application app = fc.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = fc.getELContext();
return elFactory.createValueExpression(elContext, theExpression, Object.class);
}It would be great help to have any leads.
Thanks,
Dinu
Maybe you are looking for
-
Unchecking automatic updates from App Store
Hi Having heard the problems with 10.1.3, and tho it's too late, it's not too late for the next updates: How do I uncheck automatic updates from App Store? I've looked and don't see where or how. best elmer
-
Price Variation in System -- Inventory Posting
Hello, I wanted to know if anyone has encountered this issue before or knows of a solution or reason why it may of occurred. One of our clients noticed that their inventory posting for an item, the price is different from the all the related documen
-
Access reports in SharePoint 2010.
Dear All, I have SharePoint 2010 list. I have took this list in access database. I have save as the access database on physical location. After I have created on report in access. It's run fine in access. Now I want to show(run) this report in ShareP
-
How to Determine If Printer is Offline from Terminal?
My printer is connected via USB, but the device it powered off. In System Preferences -> Printers & Scanners, the printer has a red dot with "Offline" as its status. How can I obtain a printer's "online/offline" status from Terminal? lpstat -s report
-
Give me some advice about the big message
Whether JMS provider provide the function to deal with big message? i haven't found.Whether should I split the message myself? but if i split myself,the message as a whole will be difficult to ensure whole.I can only receive message one by one.If i o