Rows not updating table in OOPs alv
Hi All,
Hope all are doing fine!!!
I have a created an alv report in OOPS ,,,when for the first time i change/edit the rows and press save ,,the records/rows are updating in db table ,.BUT next time if i change/edit the rows and press save button again its not updating the rows..
am using object of type cl_alv_changed_data_protocol to get the changed data ,,,,its working fine for the first time but next time its empty its not having any value for changed data.
pls kindly let me know how to fix it..
Thanks
Jack
Hi JAck,
As soon as you hit the save button, in debug see if the work area has the changed data, to make sure that it is not getting cleared, once that is done, you can check step by step where the data is getting lost...
Thanks,
Srini.
Similar Messages
-
How to make a row as selected in output internal table in oops ALV
Hi All,
I have ALV grid output using oops ALV concept, in my output i have a checkbox as first column when i select this checkbox and press a push button 'Print' which is there above ALV grid that particular line in output table should get selected and i need to code some logic for printing selected row.
how to make the particluar row in the output internal table to be selected and where to write the logic for print once it is pressed?
Thanks in advance
Srilakshmi.but the checkbox is not getting set in internal table when i select some checkboxes.
can anybody explain y the checkbox in internal table not set?
Hi Srilakshmi,
As explained by Uwe, when we change a field ( say check box ) in ALV grid, the view (frontend) changes (showing the tick mark) but the changed data ( normally ) is not transfered to the backend.
We can initiate this data transfer by just registering the cl_gui_alv_grid=>mc_evt_modified edit event
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ). " This does the trick
Now as soon as we check a checkbox, the data_changed event is triggered.
This initiates data transfer to the backend and the checkbox field in internal table is updated.
check the below code for example.
DATA: go_cont TYPE REF TO cl_gui_custom_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fieldcat TYPE lvc_t_fcat,
gv_language TYPE spras VALUE 'E',
gt_outtab TYPE TABLE OF bus_loca_demo WITH HEADER LINE.
START-OF-SELECTION.
CALL SCREEN 100.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
SET TITLEBAR '001'.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'PRINT'.
BREAK-POINT.
ENDCASE.
ENDMODULE. "pai INPUT
FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
pt_fieldcat TYPE lvc_t_fcat.
CHECK go_cont IS NOT BOUND.
CREATE OBJECT go_cont
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_cont.
PERFORM build_display_table.
PERFORM build_fieldcat CHANGING pt_fieldcat.
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ). " This does the trick
ENDFORM. "CREATE_AND_INIT_ALV
FORM build_display_table.
FREE gt_outtab.
DO 10 TIMES.
gt_outtab-creation_partner = sy-index.
gt_outtab-date_field = sy-datum.
APPEND gt_outtab.
ENDDO.
ENDFORM. "build_display_table
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'BUS_LOCA_DEMO'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'CHECKBOX'.
ls_fcat-checkbox = 'X'.
ls_fcat-edit = abap_true.
MODIFY pt_fieldcat FROM ls_fcat.
WHEN 'ENTER_FIELD' OR 'DBLCLICK_FIELD'.
ls_fcat-no_out = abap_true.
MODIFY pt_fieldcat FROM ls_fcat.
ENDCASE.
ENDLOOP.
ENDFORM. "build_fieldcat
Cheers,
Jose. -
How to set a selected checkbox in output internal table of oops ALV grid
Hi All,
i have a checkbox as first column in my ALV grid output using oops alv, when i select some checkbox, that rows have to be selected and i need to process only selected rows in user command.
i have given the below code also in fieldcatolg.
f_fldcat-fieldname = 'checkbox'.
f_fldcat-tabname ='gi_output'
f_fldcat-checkbox = 'X'.
f_fldcat-edit = 'X'.
but the checkbox is not getting set in internal table when i select some checkboxes.
can anybody explain y the checkbox in internal table not getting set?
Thanks,
Srilakshmi.Hi,
i tried already whatever u said, but still not resolved.Pasted my code below..can u please look into it.
MODULE pbo OUTPUT.
PERFORM init_container.
PERFORM prepare_field_catalog.
PERFORM prepare_layout.
PERFORM display_output.
ENDMODULE. " PBO OUTPUT
*& Module PAI INPUT
text
MODULE pai INPUT.
DATA: lt_rows TYPE lvc_t_row.
CASE gv_okcode.
WHEN gc_exit OR gc_back OR gc_canc. " Finish program
LEAVE PROGRAM.
when 'PRINT'.
CALL METHOD gv_grid->get_selected_rows
IMPORTING et_index_rows = lt_rows.
CALL METHOD cl_gui_cfw=>flush.
ENDCASE.
ENDMODULE. " PAI INPUT
*& Form INIT_CONTAINER
text
FORM init_container .
CREATE OBJECT gv_custom_container
EXPORTING
container_name = gc_container.
CREATE OBJECT gv_grid
EXPORTING
i_parent = gv_custom_container.
CREATE OBJECT gv_document
EXPORTING
style = 'ALV_GRID'.
*& Form PREPARE_FIELD_CATALOG
text
FORM prepare_field_catalog .
PERFORM fill_catalog USING:
'Table Name' 'Field Name' 'NoZero' 'sel-text'
'GI_OUTPUT' 'CHECKBOX' ' ' text-013 'X',
'GI_OUTPUT' 'KUNNR' 'X' text-003 ' ',
'GI_OUTPUT' 'NAME1' ' ' text-004 ' ',
'GI_OUTPUT' 'BELNR' 'X' text-005 ' ',
'GI_OUTPUT' 'BLART' ' ' text-006 ' ',
'GI_OUTPUT' 'BUDAT' ' ' text-007 ' ',
'GI_OUTPUT' 'BLDAT' ' ' text-008 ' ',
'GI_OUTPUT' 'DMBTR' ' ' text-009 ' ',
'GI_OUTPUT' 'WAERS' ' ' text-010 ' '.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form FILL_CATALOG
text
FORM fill_catalog USING fv_tabname
fv_fldname
fv_nozero
fv_seltxt
fv_checkbox.
DATA f_fldcat TYPE lvc_s_fcat.
f_fldcat-fieldname = fv_fldname.
f_fldcat-tabname = fv_tabname.
f_fldcat-no_zero = fv_nozero.
f_fldcat-coltext = fv_seltxt.
f_fldcat-checkbox = fv_checkbox.
IF fv_checkbox = gc_x.
f_fldcat-edit = gc_x.
ENDIF.
APPEND f_fldcat TO gi_fieldcat.
ENDFORM. " FILL_CATALOG
*& Form PREPARE_LAYOUT
text
FORM prepare_layout .
gs_layout-info_fname = 'COL'.
gs_layout-cwidth_opt = gc_x.
gs_layout-zebra = gc_x.
gs_layout-no_toolbar = gc_x.
gs_layout-no_rowmark = '1'.
gs_layout-sel_mode = 'A'.
ENDFORM. " PREPARE_LAYOUT
*& Form DISPLAY_OUTPUT
text
FORM display_output .
CALL METHOD gv_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_outtab = gi_output
it_fieldcatalog = gi_fieldcat.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_user_command FOR gv_grid.
CALL METHOD cl_gui_control=>set_focus EXPORTING control = gv_grid.
ENDFORM. " DISPLAY_OUTPUT -
Bug in PL/SQL - Does not update Table if table name & variable name same in
Dear All,
If tabale name & vairable name is same in a Stored Procedure, UPDATE to table does not take place.
For example run following 2 procedures. First procedure does the insert properly to table but second procedure does not update the table.
create or replace procedure BugDemo1
as
LAST_NAME VARCHAR2(30);
FIRST_NAME VARCHAR2(30);
Begin
LAST_NAME := 'Prasad';
FIRST_NAME := 'Raghnandan';
Insert into com_people (id,Roles, LAST_NAME, FIRST_NAME) values (77777,'Patient', LAST_NAME, FIRST_NAME);
end;
create or replace procedure BugDemo2
as
LAST_NAME VARCHAR2(30);
FIRST_NAME VARCHAR2(30);
Begin
LAST_NAME := 'Pra';
FIRST_NAME := 'Raghu';
Update com_people set
LAST_NAME = LAST_NAME,
FIRST_NAME = FIRST_NAME
where id = 77777 ;
end;
------------------------------------------Hi,
It is not a bug. Oracle is updating the records. Here Oracle is treating the variable name as COLUMN_NAME. Since priority is higher for a COLUMN on variable so each column is getting updated by itself resulting no change in data.
SQL> CREATE TABLE com_people
2 (
3 id NUMBER (5),
4 Roles VARCHAR2(20),
5 LAST_NAME VARCHAR2(20),
6 FIRST_NAME VARCHAR2(20)
7 )
8 ;
Table created
SQL> Insert into com_people (id,Roles, LAST_NAME, FIRST_NAME) values (77777,'Patient', 'LAST_NAME', 'FIRST_NAME');
1 row inserted
SQL> COMMIT;
Commit complete
SQL>
SQL> create or replace procedure BugDemo2
2 as
3 LAST_NAME VARCHAR2(20);
4 FIRST_NAME VARCHAR2(20);
5 Begin
6 LAST_NAME := 'Pra';
7 FIRST_NAME := 'Raghu';
8
9 Update com_people set
10 LAST_NAME = LAST_NAME,
11 FIRST_NAME = FIRST_NAME
12 where id = 77777 ;
13
14 DBMS_OUTPUT.PUT_LINE('UPDATED ROWS ='||SQL%ROWCOUNT);
15 end;
16 /
Procedure created
SQL> set serveroutput on
SQL> execute BugDemo2;
UPDATED ROWS =1
PL/SQL procedure successfully completed
SQL> Regards -
Displaying dynamic table in OOPS ALV
Hi,
I am creating a dynamic internal table which consists of some fields which are being filled dynamically and some fields which are being filled from a static internal table. I am facing two issues in the development:-
1. The static fields are being populated into the dynamic work area successfully but I am not able to modify the dynamic in ternal table using the work area.
PFB my code:
READ TABLE I_LEVEL1 WITH KEY KSCHL = WA_T681-KSCHL
KOTABNR = WA_T681-KOTABNR.
IF SY-SUBRC EQ 0.
<WA_DYN_TABLE1>-UDATE = I_LEVEL1-UDATE.
<WA_DYN_TABLE1>-UTIME = I_LEVEL1-UTIME.
MOVE-CORRESPONDING <WA_DYN_TABLE1> TO <WA_DYN_TABLE>.
MODIFY <I_DYN_TABLE> FROM <WA_DYN_TABLE> TRANSPORTING UDATE
UTIME.
The dynamic filds of <I_DYN_TABLE> are being populated successfully but the MODIFY statement gives an error.
The specified type has no structure and therefore no component called UDATE.
2. The other problem I am facing is that while displaying output for the same ALV, no column names are being displayed.
I am using OOPS ALV.
PFB my code for the same:
CL_SALV_TABLE=>FACTORY( IMPORTING R_SALV_TABLE = O_TABLE
CHANGING T_TABLE = <I_DYN_TABLE> ).
O_FUNCTIONS = O_TABLE->GET_FUNCTIONS( ).
O_FUNCTIONS->SET_ALL( ABAP_TRUE ).
O_COLUMNS = O_TABLE->GET_COLUMNS( ).
O_COLUMNS->SET_OPTIMIZE( 'X' ).
Please help me regarding the issues.
Thanks.
Edited by: Suhas Saha on Jan 18, 2012 3:11 PMHi Suhas,
Thank you for the reply. The modify problem has been solved.
Regarding the heading issue:
Here is the code for populating the table:-
LOOP AT I_TY_FIELD INTO WA_TY_FIELD.
WA_DYN_IT-FIELDNAME = WA_TY_FIELD-FIELDNAME.
WA_DYN_IT-TABNAME = WA_TY_FIELD-TABNAME.
WA_DYN_IT-DATATYPE = WA_TY_FIELD-DATATYPE.
WA_DYN_IT-INTTYPE = WA_TY_FIELD-INTTYPE.
WA_DYN_IT-INTLEN = WA_TY_FIELD-INTLEN.
WA_DYN_IT-SCRTEXT_M = WA_TY_FIELD-FIELDDESC.
APPEND WA_DYN_IT TO I_DYN_IT.
CLEAR: WA_DYN_IT.
ENDLOOP.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = I_DYN_IT
IMPORTING
EP_TABLE = I_DY_TABLE.
ASSIGN I_DY_TABLE->* TO <I_DYN_TABLE>.
ASSIGN <I_DYN_TABLE> TO <FS_2>.
Create dynamic work area and assign to FS
CREATE DATA I_DY_LINE LIKE LINE OF <I_DYN_TABLE>.
ASSIGN I_DY_LINE->* TO <WA_DYN_TABLE>.
I_TY_FIELD contains all static and dynamic fields.
Is there any field of I_DYN_IT i need to fill I have missed which fills up the column header data? -
Bapi : BAPI_ALM_ORDER_MAINTAIN not updating table AFVU-USR08
Hi,
I have a requirement to update table AFVU-USR08.I am actualy dealing with tcode IW32/IW33 where in we need to update operation-->enhancement tab.I am using BAPI : BAPI_ALM_ORDER_MAINTAIN to do this.I am testing the BAPI directly( Not called in any program ),I can see a message like so and so order saved under notification,But there is no entry in table AFVU-USR08.
If any one have come across this prob. and got the sol. Pl. share it with me.
Your solution will be more helpful.
Thanks,
Bharani.Hi Ferry,
1. I have also tried ur given code before BAPI_TRANSACTION_COMMIT.
l_fname = 'SOBKZ'.
l_fvalue = 'U'.
CALL FUNCTION 'CO_BH_MOD_SINGLE_FIELDS'
EXPORTING
aufnr_imp = wa_meth-objectkey(12)
field1 = l_fname
value1 = l_fvalue.
but this program is giving dump for only this particular Value saying that This is PROTECTED field.
Can anyone help me out on How to Update Special Stock Indicator on Components Tab of Maintenance Order (IW32).
If anyone has faced such type of problem & solved it then please let me also.
2. Which BADI to use for Updating Special Stock Indicator when we press enter on Components tab in Transaction IW32 ?..
Thanks in advance,
Hope to get the solution soon from all SAP gurus.
and help will be appriciated .
Gaurav. -
Cell wise and row wise check box in oops alv
Normally column wise check box are possible in oops alv but how to possible check box in first row only in oops alv and Cell wise check box in oops alv?
Hi,
Try like changing this
insted of
g_layout-f2code = ' '.
use this
g_layout-f2code = 'DISP'. " Sets fcode for when double
and
g_layout-f2code = '&ETA'. " it will display POPUP screen
Best Regards
Ranga
Edited by: Ranga Swamy on Nov 1, 2008 11:07 PM
Edited by: Ranga Swamy on Nov 1, 2008 11:17 PM -
Front Row not updating playlist
I posted this exact problem back in June, and it was never resolved, yet somehow it was tagged as answered and then archived. Notwithstanding, I still hav the problem.
I moved my iTunes music library to an external HD by consolidating to the external HD, and since doing so, my Front Row playlist is still visible, but nothing is updating.
Additionally, my movies folder (in iTunes) is not updating in Front Row. It still shows deleted movies and does not show new additions. However, If I try and play a movie which is existing, it plays ok.
My iTunes Library Data files remain on my iMac HD as does my .xml file (as instructed).
The problem is obviously that the list from which Front row is taking its information is not updating, but where is that list, and how do I get it to update ? I had no problems prior to migrating my iTunes directory to an external drive, so the problem is related.
Any help with this would be appreciated, as effectively I am currently no longer able to use Front Row to play my Music or Movies directly on my iMac. I have Front Row 1.x installed.
Thanks in anticipation.Good new people, I found the answer to my problem after I posted here. I found it either here or Macosx.com or Macosxhints.com (sorry I can't give proper credit, I opened dozens of tabs and I lost count).
Anyway, this method works for me and hopefully it'll work for others as well. In iTunes, create a Smart Playlist with the name of the phantom file as the criterion. If it's hiding anywhere in your iTunes, it'll show up. Option-delete it and it won't show up in Front Row anymore. -
Get Multiple Rows into internal Table using Webdynpro Alv Display ..
Hi guys ,
I need to find out the logic for getting all the selected rows into the internal table.
When i display the ALV Output on webdypro screen .
USer Selects multiple rows for further processing ..
Ineed to get all the rows selected by user into an internal table .
Please let me know how to achive this ...
Thanks in advance for quick reply
Regards
Saurabh GoelHi,
You need to use the method GET_SELECTED of IF_WD_CONTEXT_NODE to get the rows selected. Also ccheck for the paramters of that method, this retruns the element set.
This meets your requirement.
Regards,
Lekha. -
When executing the code it gives an error that
3110 3111 mack7 is not contained in the physical inventory document
where mack7 is matnr .
3110 is plant
while actuaaly it is present.
report Z_PHYSICAL
no standard page heading line-size 255.
TYPE-POOLS: truxs.
tables : ikpf.
TYPES: BEGIN OF t_datatab,
col1(30) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
COL4(30) TYPE C,
col5(30) type c,
END OF t_datatab.
data: x type i.
data : iblnr1 like IKPF-IBLNR.
data : gjhar like IKPF-GJAHR.
data : v_wait like bapita-wait value 'X'.
data : count_dat like IIKPF-ZLDAT.
data : items like BAPI_PHYSINV_COUNT_ITEMS occurs 0 with header line.
data : return like BAPIRET2 occurs 0 with header line.
DATA: it_datatab type standard table of t_datatab,
wa_datatab type t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
PARAMETERS: p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
start-of-selection.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = ''
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = it_datatab[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
loop at it_datatab into wa_datatab.
on change of wa_datatab-col1.
iblnr1 = wa_datatab-col1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = iblnr1
IMPORTING
OUTPUT = iblnr1
gjhar = wa_datatab-col2.
count_dat = wa_datatab-col3.
clear x.
endon.
x = x + 1.
items-material = wa_datatab-col4.
*unpack items-material to items-material.
items-ENTRY_QNT = wa_datatab-col5.
*CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = items-material
*IMPORTING
OUTPUT = items-material
items-batch = ''.
items-item = x.
append items.
CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
EXPORTING
physinventory = iblnr1
fiscalyear = gjhar
PERCENTAGE_VARIANCE =
COUNT_DATE = count_dat
tables
items = items
return = return
SERIALNUMBERS =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = v_wait
IMPORTING
RETURN = return
if sy-subrc eq 0.
endif.
clear items . refresh items.
endloop.Hi Chaitanya,
See if the user Customer-Exit EXIT_SAPMM07M_001 is implemented. (Customer Function Exit: Set Segment Text in Material Document).
Enhancement SMOD: MBCF0002
Regards
Bruno Xavier. -
File to rfc...database tables not updating
Hi friends..
in file to bapi ..
created ZRFC and in that rfc i given standard bapi and commit work..
i tested in sap ..the table is updating..
thru XI..the table is not updating...
it showing likw this..in receiver rfc adpater monitering...
<i>Receiver channel 'CC_IN_SAP_WorkOrderCompletion' for party '', service 'SAP_ERP_DEV' (internal name 'RfcClient[CC_IN_SAP_WorkOrderCompletion]')
Client data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=400, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=aar, jco.client.sysnr=10, jco.client.ashost=53.249.196.86}
Repository data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=400, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=aar, jco.client.sysnr=10, jco.client.ashost=53.249.196.86}
Current pool size: 1, maximum pool size : 1
Channel History
- OK: 2006-12-19 11:12:58 CET: Message processed for interface ZBAPI_ALM_CONF_CREATE</i>
and in messagemonitering audit log..
2006-12-19 11:12:58 Success Message successfully received by messaging system. Profile: XI URL: http://dcexi0602.aaaa.com:50000/MessagingSystem/receive/AFW/XI Credential (User): XIISUSERDGX
2006-12-19 11:12:58 Success Using connection AFW. Trying to put the message into the receive queue.
2006-12-19 11:12:58 Success Message successfully put into the queue.
2006-12-19 11:12:58 Success The message was successfully retrieved from the receive queue.
2006-12-19 11:12:58 Success The message status set to DLNG.
2006-12-19 11:12:58 Success Delivering to channel: CC_IN_SAP_WorkOrderCompletion
2006-12-19 11:12:58 Success RFC adapter received an asynchronous message. Attempting to send tRFC for ZBAPI_ALM_CONF_CREATE with TID XIVqvZy8z94TkgWVR9u01m0m
2006-12-19 11:12:58 Success The message was successfully delivered to the application using connection AFW.
2006-12-19 11:12:58 Success The message status set to DLVD.
please help me..
regards
ramHi Sravya..
yes i given commit work after bapi in ZRFC..
in SAP..i tested ..its updating...but thru XI..
it is showing success..
but its not updating tables...
thanks for your response
regards
ram -
Update table with data from dialog
Hello,
I need the problem.
I'm not update table with inputtext field where data change from dialog.
This metod is update table.
public void returnHandlerGoods(ReturnEvent returnEvent) {
// Add event code here...
ArrayList<PricatGoods> data = (ArrayList<PricatGoods>) returnEvent.getReturnValue();
BindingContainer bc = getBindings();
DCIteratorBinding dcIterBinding;
// сохранить изменения detail
dcIterBinding = (DCIteratorBinding) bindings.get("findVMIOrderDetailsIter");
RowSetIterator s = dcIterBinding.getRowSetIterator();
System.out.println("Получено товаров " + data.size());
for (int i =0; i < data.size(); i++){
Row detailRow = (RowImpl)s.createRow();
detailRow.setNewRowState(Row.STATUS_INITIALIZED);
s.insertRow(detailRow);
s.setCurrentRow(detailRow);
// detailRow.setAttribute("lineNum",createLineNum(i));
detailRow.setAttribute("gtin",((PricatGoods)data.get(i)).getGtin());
detailRow.setAttribute("goodId",((PricatGoods)data.get(i)).getGoodId());
detailRow.setAttribute("goodName",((PricatGoods)data.get(i)).getGoodName());
detailRow.setAttribute("sellerarticle",((PricatGoods)data.get(i)).getGoodCode());
detailRow.setAttribute("buyerarticle",((PricatGoods)data.get(i)).getBuyerArticle());
detailRow.setAttribute("unit",((PricatGoods)data.get(i)).getUnit());
detailRow.setAttribute("totalQuantity",0);
detailRow.setAttribute("acceptedQuantity",0);
detailRow.setAttribute("taxRate",((PricatGoods)data.get(i)).getVatPercent());
detailRow.setAttribute("price",((PricatGoods)data.get(i)).getCost());
detailRow.setAttribute("priceWithoutTax",((PricatGoods)data.get(i)).getCostWithoutVat());
detailRow.setAttribute("sumWithoutTax",0.0);
detailRow.setAttribute("totalSum",0.0);
detailRow.setAttribute("currency",((PricatGoods)data.get(i)).getCurrency());
System.out.println("Добавление товара \" "+((PricatGoods)data.get(i)).getGoodName()+ "\" с goodCode " +((PricatGoods)data.get(i)).getGoodCode());
s.closeRowSetIterator();
AdfFacesContext.getCurrentInstance().addPartialTarget(table2);
Fields are update good where inputText.readOnly = true.
Fields are not update good where inputText.readOnly = false. Old data duplicate in new row.
I have found some posts, but in them is not told accurately as I can solve the given problem.
How to update a adf table??
Re: ADF Dialog FrameWork-Table Update Problem
Whether it is possible to solve the given problem?
Thx,
DemaIf I use outputText that all job's a good. But I don't change these fields. I should have field with change for users.
Code jspx page for table ===>
<af:table value="#{bindings.findVMIOrderDetails1.collectionModel}"
var="row"
rows="#{bindings.findVMIOrderDetails1.rangeSize}"
first="#{bindings.findVMIOrderDetails1.rangeStart}"
emptyText="#{bindings.findVMIOrderDetails1.viewable ? 'Товаров пока нет.' : 'Access Denied.'}"
selectionState="#{bindings.findVMIOrderDetails1.collectionModel.selectedRow}"
selectionListener="#{bindings.findVMIOrderDetails1.collectionModel.makeCurrent}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.table2}"
id="table2" styleClass="baseTable">
<af:column sortProperty="lineNum" sortable="false"
headerText="№"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column19}"
id="column19">
<af:inputText value="#{row.lineNum}" simple="false"
required="true"
columns="4"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText4}"
id="inputText4" readOnly="false"
requiredMessageDetail='Поле "№" обязательно для заполнения'/>
</af:column>
<af:column sortProperty="gtin" sortable="false"
headerText="GTIN"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column20}"
id="column20">
<af:inputText value="#{row.gtin}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.gtin.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.gtin.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText26}"
id="inputText26" readOnly="true"/>
</af:column>
<af:column sortProperty="sellerarticle" sortable="false"
headerText="Код товара у поставщика"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column21}"
id="column21">
<af:inputText value="#{row.sellerarticle}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.sellerarticle.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.sellerarticle.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText27}"
id="inputText27" readOnly="true"/>
</af:column>
<af:column sortProperty="buyerarticle" sortable="false"
headerText="Код товара у покупателя"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column22}"
id="column22">
<af:inputText value="#{row.buyerarticle}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.buyerarticle.mandatory}"
columns="10"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText28}"
id="inputText28" readOnly="true"
disabled="false"/>
</af:column>
<af:column sortProperty="goodName" sortable="false"
headerText="Наименование"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column23}"
id="column23">
<af:inputText value="#{row.goodName}" simple="true"
required="true"
columns="11"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText29}"
id="inputText29"
requiredMessageDetail="Поле обязательно для заполнения"
readOnly="true"/>
</af:column>
<af:column sortProperty="itemDesc" sortable="false"
headerText="Описание"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column24}"
id="column24" rendered="false">
<af:inputText value="#{row.itemDesc}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.itemDesc.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.itemDesc.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText30}"
id="inputText30"/>
</af:column>
<af:column sortProperty="unit" sortable="false"
headerText="Ед. изм."
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column25}"
id="column25">
<af:inputText value="#{row.unit}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.unit.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.unit.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText31}"
id="inputText31" readOnly="true"/>
</af:column>
<af:column sortProperty="currency" sortable="false"
headerText="Валюта"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column26}"
id="column26" rendered="false">
<af:inputText value="#{row.currency}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.currency.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.currency.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText32}"
id="inputText32"/>
</af:column>
<af:column sortProperty="totalQuantity" sortable="false"
headerText="Общее кол-во"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column27}"
id="column27">
<af:inputText value="#{row.totalQuantity}"
required="#{bindings.findVMIOrderDetails1.attrDefs.totalQuantity.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.totalQuantity.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText36}"
id="inputText36" readOnly="true">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.totalQuantity}"/>
</af:inputText>
</af:column>
<af:column sortProperty="acceptedQuantity" sortable="false"
headerText="Кол-во поставки"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column28}"
id="column28">
<af:inputText value="#{row.acceptedQuantity}"
required="true"
columns="7"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText37}"
id="inputText37"
requiredMessageDetail='Поле "Подтвержденное количество "обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.validatorQuantity}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.acceptedQuantity}"/>
</af:inputText>
</af:column>
<af:column sortProperty="taxRate" sortable="false"
headerText="НДС, %"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column29}"
id="column29">
<af:inputText value="#{row.taxRate}"
required="true"
columns="4"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText38}"
id="inputText38"
requiredMessageDetail='Поле "НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorNDS}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.taxRate}"/>
</af:inputText>
</af:column>
<af:column sortable="false" headerText="Цена"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column34}"
id="column34">
<af:column sortProperty="priceWithoutTax" sortable="false"
headerText="Без НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column31}"
id="column31">
<af:inputText value="#{row.priceWithoutTax}"
required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText40}"
id="inputText40"
requiredMessageDetail='Поле "Цена без НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPriceWithoutTax}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.priceWithoutTax}"/>
</af:inputText>
</af:column>
<af:column sortProperty="price" sortable="false"
headerText="С НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column30}"
id="column30">
<af:inputText value="#{row.price}"
required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText39}"
id="inputText39"
requiredMessageDetail='Поле "Цена с НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPrice}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.price}"/>
</af:inputText>
</af:column>
</af:column>
<af:column sortable="false" headerText="Сумма"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column35}"
id="column35">
<af:column sortProperty="sumWithoutTax" sortable="false"
headerText="Без НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column32}"
id="column32">
<af:inputText value="#{row.sumWithoutTax}"
required="true" columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText41}"
id="inputText41"
requiredMessageDetail='Поле "Сумма без НДС" обязательно для заполнения'
autoSubmit="true"
valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.sumWithoutTax}"/>
</af:inputText>
</af:column>
<af:column sortProperty="totalSum" sortable="false"
headerText="С НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column33}"
id="column33">
<af:inputText value="#{row.totalSum}" required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText42}"
id="inputText42"
requiredMessageDetail='Поле "Сумма с НДС" обязательно для заполнения'
autoSubmit="true"
valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorTotalSum}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.totalSum}"/>
</af:inputText>
</af:column>
</af:column>
<f:facet name="selection">
<af:tableSelectOne text="Select and"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.tableSelectOne2}"
id="tableSelectOne2">
<af:commandLink text="Удалить"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink5}"
id="commandLink5"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.deleteRow}"
styleClass="tableControlButton"
immediate="false"/>
</af:tableSelectOne>
</f:facet>
<f:facet name="actions">
<h:panelGroup binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.panelGroup2}"
id="panelGroup2">
<af:commandLink text="Добавить"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink6}"
id="commandLink6"
styleClass="tableControlButton"
immediate="false"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.addRows}"
useWindow="true" windowHeight="500"
windowWidth="600"
returnListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.returnHandlerGoods}"
rendered="#{bindings.JdDoctype02rspType.inputValue == 9&&bindings.JdDoctype02orderrspId.inputValue==null}"/>
<af:commandLink text="Пересчитать" id="commandLink31"
styleClass="tableControlButton"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink31}"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.calc}"
useWindow="true" immediate="false">
<af:setActionListener from="#{row.rowKeyStr}"
to="#{processScope.mainRowKeyStr}"/>
</af:commandLink>
</h:panelGroup>
</f:facet>
</af:table> -
ALV grid oo delete rows and update to table
Hi all
How can I delete one row and update to the db table?
thanksHi,
Refer:-
The ALV Grid has events data_changed and data_changed_finished. The former method is
triggered just after the change at an editable field is perceived. Here you can make checks for
the input. And the second event is triggered after the change is committed.
You can select the way how the control perceives data changes by using the method
register_edit_event. You have two choices:
1. After return key is pressed: To select this way, to the parameter i_event_id pass cl_gui_alv_grid=>mc_evt_enter.
2. After the field is modified and the cursor is moved to another field: For this, pass cl_gui_alv_grid=>mc_evt_modifies to the same parameter.
To make events controlling data changes be triggered, you must select either way by
calling this method. Otherwise, these events will not be triggered.
To control field data changes, ALV Grid uses an instance of the class
CL_ALV_CHANGED_DATA_PROTOCOL and passes this via the event data_changed.
Using methods of this class, you can get and modify cell values and produce error messages.
Hope this helps you.
Regards,
Tarun -
Cell(Row) Selection not display in OOPS ALV
Hi all,
I am not able to get the cell(row) selection in the oops ALV when i called it second time.
I am displaying some information using oops alv in 100 screen. After user action on 100 screen i am calling 200 screen with different information which is also display in oops alv. When i displaying information in second time the cell(row) selection is not getting displayed.
For both ALV the fieldcatelog is different.
Initially i tried using same container but i face same problem, so i am trying to call second alv in new screen.
But problem remain same.
Can anyone help me to solve this problem ?
Regards
Nileshhi,
can u send ur report so dat i can look furhter to it.and help u out -
Update Row into Run Table Task is not executing in correct sequence in DAC
Update Row into Run Table Task is not executing in correct sequence in DAC.
The task phase for this task is "Post Lost" . The depth in the execution plan is 19 but this task is running some times in Depth 12, some times in 14 and some time in Depth 16. Would like to know is this sequence of execution is correct order or not? In the out of the Box this task is executed at the end of the entire load. No Errors were reported in DAC log.
Please let me know if any documents that would highlight this issue
rmUpdate into Run table is a task thats required to update a table called W_ETL_RUN_S. The whole intention of this table is to keep the poor mans run history on the warehouse itself. The actual run history is stored in the DAC runtime tables, however the DAC repository could be on some other database/schema other than warehouse. Its mostly a legacy table, thats being carried around. If one were to pay close attention to this task, it has phase dependencies defined that dictate when this task should run.
Apologies in advance for a lengthy post.... But sure might help understanding how DAC behaves! And is going to be essential for you to find issues at hand.
The dependency generation in DAC follows the following rules of thumb!
- Considers the Source table target table definitions of the tasks. With this information the tasks that write to a table take precedence over the tasks that reads from a table.
- Considers the phase information. With this information, it will be able to resolve some of the conflicts. Should multiple tasks write to the same table, the phase is used to appropriately stagger them.
- Considers the truncate table option. Should there be multiple tasks that write to the same table with the same phase information, the task that truncates the table takes precedence.
- When more than one task that needs to write to the table that have similar properties, DAC would stagger them. However if one feels that either they can all go in parallel, or a common truncate is desired prior to any of the tasks execution, one could use a task group.
- Task group is also handy when you suspect the application logic dictates cyclical reads and writes. For example, Task 1 reads from A and writes to B. Task 2 reads from B and writes back to A. If these two tasks were to have different phases, DAC would be able to figure that out and order them accordingly. If not, for example those tasks need to be of the same phase for some reason, one could create a task group as well.
Now that I described the behavior of how the dependency generation works, there may be some tasks that have no relevance to other tasks either as source tables or target tables. The update into run history is a classic example. The purpose of this task is to update the run information in the W_ETL_RUN_S with status 'Completed' with an end time stamp. Because this needs to run at the end, it has phase dependency defined on it. With this information DAC will be able to stagger the position of execution either before (Block) or after (Wait) all the tasks belonging to a particular phase is completed.
Now a description about depth. While Depth gives an indication to the order of execution, its only an indication of how the tasks may be executed. Its a reflection of how the dependencies have been discovered. Let me explain with an example. The tasks that have no dependency will have a depth of 0. The tasks that depend on one or more or all of depth 0 get a depth of 1. The tasks that depend on one or more or all of depth 1 get a depth of 2. It also means implicitly a task of depth 2 will indirectly depend on a task of depth 0 through other tasks in depth 1. In essence the dependencies translate to an execution graph, and is different from the batch structures one usually thinks of when it comes to ETL execution.
Because DAC does runtime optimization in the order in which tasks are executed, it may pick a task thats of order 1 over something else with an order of 0. The factors considered for picking the next best task to run depend on
- The number of dependent tasks. For example, a task which has 10 dependents gets more priorty than the one whose dependents is 1.
- If all else equal, it considers the number of source tables. For example a task having 10 source tables gets more priority than the one that has only two source tables.
- If all else equal, it considers the average time taken by each of the tasks. The longer running ones will get more preference than the quick running ones
- and many other factors!
And of course the dependencies are honored through the execution. Unless all the predecessors of a task are in completed state a task does not get picked for execution.
Another way to think of this depth concept : If one were to execute one task at a time, probably this is the order in which the tasks will be executed.
The depth can change depending on the number of tasks identified for the execution plan.
The immediate predecessors and successor can be a very valuable information to look at and should be used to validate the design. All predecessors and successors provide information to corroborate it even further. This can be accessed through clicking on any task and choosing the detail button. You will see all these information over there. As an alternate method, you could also use the 'All/immediate Predecessors' and 'All/immediate Successor' tabs that provide a flat view of the dependencies. Note that these tabs may have to retrieve a large amount of data, and hence will open in a query mode.
SUMMARY: Irrespective of the depth, validate
- if this task has 'Phase dependencies' that span all the ETL phases and has a 'Wait' option.
- click on the particular task and verify if the task does not have any successors. And the predecessors include all the tasks from all the phases its supposed to wait for!
Once you have inspected the above two you should be good to go, no matter what the depth says!
Hope this helps!
Maybe you are looking for
-
Can I use Lightroom presets in Photoshop CS4
HI, There are a lot of beautiful Lightroom presets out there, I do not have Lightroom but PS CS4, Is it possible to use Lightroom presets in Photoshop CS4? If so how do I import them ..ie: do I need to change the extension to a filter, action, and l
-
How to delete several spaces between clips on timeline
I have hundreds of clip selects in my timeline pulled on a particular track. However, they have spaces between all of them. How do I delete all of the spaces, so that I can view the clips back to back. I don't want to have to click on each space &
-
I currently use on average 13GB a month through an iPad, smart tv, two iPhones and the kids watching YouTube- light to medium usage? I currently have an average download speed if 11MB/S. Will the increased Infinity speeds have an effect on my monthly
-
Hi, When i try to start the application Server it shows the below error pls Help. ......Starting Oracle HTTP Server..... ADMN-100999 ......Started Oracle HTTP Server..... ......Started OC4J instance..... ADMN-100999 ......Started OC4J instance..... .
-
I tried to install Acrobat Pro XI on my laptop; but it failed to install because I have Vista operating system. Am I dead in the water, or is there a way to install an earlier version on my machine?