Values in table control getting deleted on vertical scrolling
I have a table control which is associated with an internal table.Whenever I scroll down the values in the table control gets deleted.
I tried solving the issue of scrolling by keeping another internal table as reference and syncing the values to my internal table; but after doing that whatever changes I make after scrolling is not reflected in the internal table.I'm using a db structure with abt 130 fields for my table control and there are no fields defined as primary keys.I tried using the modify statement but it's giving sy-subrc = 4 everytime.
Could anyone suggest a solution?
Debugging will solve your problem.
The solution for this question is /h -> hit scroll button
Similar Messages
-
Deleting the values from table control
HI,
I need to remove the selected line from the Table control on my screen.
The point is that the Internal table does not have any records,.
for example in the Customer Create screen,
while entering the bank details we will enter it in a tbale contraol.
but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
please guide me.
please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
regardsHi..
The solution to your problem - deleting values from table control.
Here: it_wizard is the internal table which is holding the value of table control.
wa_wizard is the work are of the internal table it_wizard.
it_delete is the internal table which holds the deleted record of table control.
wa_delete is the work area of the internal table it_delete
Also here the field ZSEL is the character field which is used to select the entire record in the table control.
LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
MOVE-CORRESPONDING wa_wizard TO wa_delete.
APPEND wa_delete TO it_delete.
delete table it_wizard from wa_wizard.
DELETE FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
ENDLOOP
if sy-subrc eq 0.
Message 'Delete Successful' type 'S'.
endif.
The above code will delete the record from both the table control.internal table and the database table.
I think this will help you to great extent.
Ward regards,
Bhuvaneswari
Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM -
Retrieving values from table control using DYNP_VALUES_READ
Hi all,
I am trying to retrieve the values from the table control using the FM DYNP_VALUES_READ. I have a situation where user enter values in table control in T.code FB60 in Withholding tab for validation purpose. There i'll have to check based on some entries maintained in SET.
I am unable to get the values when i scroll to the next page in the table control. FM raising an exception invalid_dynprofield.
Expecting reply...You have to populate the dynpfields internal table before calling the function,
data: repid like sy-repid.
dynpfields-fieldname = 'PNAME'.
append dynpfields.
repid = sy-repid.
call function 'DYNP_VALUES_READ'
exporting
dyname = repid
dynumb = sy-dynnr
tables
dynpfields = dynpfields
exceptions
others.
read table dynpfields index 1.
pname = dynpfields-fieldvalue.
Now you will have the field value in pname
Hope this helps
Vinodh Balakrishnan -
Dynamically changing the value in table control
Hello Every one,
In MD61 transaction table control am trying to change value dynamicaly i.e am trying to change value in table control automaticaly tht value to be captured and i need to show in status bar...
Ex table control field is number: am giving 10,20,30 tht should show in status bar by adding if u enter 10 at status bar it show 10 then when u enter 20 it should add with 10 and give 30 ..
in this way when ever u enter value in filed it should add with the status bar value.Hi!
For conversion you can use the function module
data : w_amt TYPE cms_dte_original_amt,
" Amount
w_conv_amt TYPE cms_dte_conv_amt,
" Converted amount
w_kmein TYPE cms_dte_original_curr,
CALL FUNCTION 'CMS_API_CURR_CONV'
EXPORTING
i_original_curr = w_kmein
i_original_amt = w_amt
i_result_curr = 'INR'
i_rate_type = 'M'
i_conv_date = sy-datum
IMPORTING
e_conv_amt = w_conv_amt.
now accordingly you can move the currency and amount that is changed....
here as you were saying that on f4 after selecting you want the other field to get the value on that currency.....
this work can be done as here....
in this the next field gets populated as the first field gets the value......
refer to it.....
https://wiki.sdn.sap.com/wiki/display/ABAP/GettingainputfieldpopulatedonenteringthevalueinoneInputfield
Regards. -
How to insert values in table control & how to place listbox in table ctrl
Dear all,
I have created table control in Module pool program. My requirement is first
1)How to place list box in table control
2)Based on listbox selection i have to enter values in table control row..
With Regards,
BaskaranHi Baskaran,
For displaing list box, use FM: VRM_SET_VALUES.
Code like that:
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 15.
Instead of parameter for module pool , you declare data:
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = '3500000002'.
value-text = '3500000002'.
APPEND value TO list.
value-key = '3500000003'.
value-text = '3500000003'.
APPEND value TO list.
name = 'PS_PARM'.
value-key = '3500000004'.
value-text = '3500000004'.
APPEND value TO list.
name = 'PS_PARM'.
value-key = '3000000007'.
value-text = '3000000007'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
make the necesary change for module pool.
Hope this can solve your problems.
Regards,
Tutun -
Hi Guys,
FYI, im having a table control with field Plant and Material. I have defaulted the <b>std search help</b> to field <u>Material</u> at the screen painter. Meaning system will call up the search help for Material once i press F4.
Since the search help for field Material is a collective search help, and there is a <u>Plant</u> field available for Material filtering. Thus i may need to get the Plant's value from of same row of the table control to Populate into the Material's search help.
I have already tried to create a new module under the LOOP...ENDLOOP at PAI's flow logic. And try to use parameter id to set the value for plant, purpose is to populate it to Material's search help when i click F4 on material field. The problem is the new module that i coded under LOOP...ENDLOOP will never trigger when i click F4. Because there is NO event to trigger my module.
Other than the above, i tried to code it under POV. But it doesn't work as well, because there is more than 1 record under table control and i can not determine the during runtime which row of F4 for material being click.
Please comment on this above on how to solve the problem.
Thanks in advance.Hi,
You can call standard collective search help [say for Eg:<b>MAT1</b>] through Process on value-request event and set the paramenter id of Plant field before calling the funtion module <b>'HELP_START'</b>.Then we can get the materials specific to the PLANT in the corresponding row of the TABLE CONTROL.
To get which row of the table control is clicked use <b>Get Cursor Line</b> Statement as i mentioned below.
Flow logic:
PROCESS ON VALUE-REQUEST.
FIELD x_marc-matnr MODULE mat_shelp.
Module definition:
MODULE mat_shelp INPUT.
DATA:v_help_info LIKE help_info,n TYPE i,
it_dyselect LIKE TABLE OF dselc WITH HEADER LINE,
it_dyvaltab LIKE TABLE OF dval WITH HEADER LINE.
REFRESH it_dyselect.
it_dyselect-fldname = 'MANDT'.
it_dyselect-dyfldname = 'SY-MANDT'.
APPEND it_dyselect.
it_dyselect-fldname = 'MATNR'.
it_dyselect-dyfldname = 'X_MARC-MATNR'.
APPEND it_dyselect.
v_help_info-call = 'M'.
v_help_info-object = 'F'.
v_help_info-program = sy-repid. "'ZVIG_MOD_TABLE_CONTROL_1'.
v_help_info-dynpro = sy-dynnr. "'9001'.
v_help_info-tabname = 'MARC'.
v_help_info-fieldname = 'MATNR'.
v_help_info-fieldtype = 'CHAR'.
v_help_info-keyword = 'MATNR'.
v_help_info-fieldlng = 18.
v_help_info-fldvalue = ''.
v_help_info-mcobj = 'MAT1'.
v_help_info-spras = 'E'.
v_help_info-menufunct = 'HC'.
v_help_info-title = 'SAP'.
v_help_info-dynprofld = 'X_MARC-MATNR'. <b>----
> Give ur screen field name</b>
v_help_info-tcode = sy-tcode. "'ZTC1'.
v_help_info-pfkey = 'MEN'.
v_help_info-docuid = 'FE'.
v_help_info-pov = 'N'.
v_help_info-curow = '2'.
v_help_info-cucol = '1'.
v_help_info-dynpprog = sy-repid. " ZVIG_MOD_TABLE_CONTROL_1
v_help_info-stepl = '1'.
v_help_info-selectart = 'A'.
GET CURSOR LINE n.
READ TABLE it_marc INTO x_marc INDEX n.
SET PARAMETER ID 'WRK' FIELD X_MARC-WERKS .
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = v_help_info
TABLES
dynpselect = it_dyselect
dynpvaluetab = it_dyvaltab .
ENDMODULE. " mat_shelp INPUT -
How to read the field value from Table Control
Hello Experts,
I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
When Clicked on 'SAVE' the data (MATNR) from a previous screen (101) and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
Internal table t_data has 3 fields.
MATNR
A_QTY
B_QTY.
Table Control TC_RACK was declared like this:
controls tc_rack type tableview using screen 0102.
I/0 Fields:
A_QTY type ZQTY.
B_QTY type ZQTY.
The screen Flow Logic:
process before output.
module status_0102.
loop at t_data into w_data with control tc_rack.
endloop.
process after input.
module exit_0102 at exit-command.
loop at tc_rack.
endloop.
module user_command_0102.
module status_0102output.
set pf-status 'STATUS_102'.
set titlebar 'TITLE_102'.
describe table t_rack lines tc_rack-lines.
endmodule. "status_0102 output
process after input.
module user_command_0615 input.
case ok_code.
when 'SAVE_RK'.
when others.
endcase.
endmodule. "user_command_0102 input
Now for eg, when the users enter values for A_QTY and B_QTY like this:
A_QTY B_QTY
1000 2000
3000 4000
How can I read these values and pass them to T_DATA so that I can save it into Z-table?
I greatly appreciate your help.
I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
Thanks a lot.
Could you please let me know
Edited by: dev a on Jan 13, 2010 2:46 PMHi dev a
You should use
DATA: lv_name(30) TYPE c.
FIELD-SYMBOLS: <QTY> type ZQTY.
GET CURSOR FIELD lv_name. "Get the field name in table control
check sy-subrc = 0.
assign (lv_name) to <QTY>. "Here you get the value in <QTY>
check sy-subrc = 0.
Also use <your table control>-current_line to get the table index uo're currently on.
Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
Good luck
Dean Q.
Edited by: Dean Q on Jan 13, 2010 11:11 PM -
How to compare values in table control
Hi Experts,
How to compare two values of a field in table control. Like the frist row of feld1 with the second row of field1.
because when ever two values are same i need to display error message that we are entring duplicate entry.
i have been tring for a very log time but not getting any solution for this.
Thanks and Regards,
Ashwin.you need to write in code for this..
A possible solution is given below..
Suppose your internal table fields are col1 and col2.
in the loop .....endloop of yout internal table in your PAI..there will be following(if your table control is made using wizard. otherwise you might have to add it..
loop at itab.
chain.
field col1.
field col2.
"some module
endchain.
endloop.
now make changes as shown to the above code..
loop at itab.
chain.
field wa-col1.
field wa-col2.
module table_modify on chain-request.
endchain.
now in your program add module table modify.
module table_modify input.
read table itab with key col1(which shud be unique) = wa-col1 transporting no-fields.
if sy-subrc = 0. " there exists another record with the same value
message e001(your message class).
endif.
endmodule.
i guess that shud work. get back if it dosnt.
regards
Suzie -
How to find dynamic value(screen value) in table control for current row .
hi to all,
i used table control in my screen. for column no 2 field i was used serrch help. and for column number 3 i used a dynamic help.
in change mode you can change any row for table control.
when i was using search help for a row which was already entered in column no 3 i cannot get any value.
how i can get value of row no 3 and column no 2 value.
thanksTry using like index for the serarch the TC-current_line
-
Default value to Table Control?
DearAll,
How to assign a default value to any field of Table Control at runtime?
Regards,
Dharmeshhi vyas,
you can do thru interface workarea TABLES.
say for eg you have defined your table control structure with ref to KNA1 table then in the PBO of the screen you can move the values to the structure,say
KNA1-KUNNR = 'VYAS'.This way you can assign default values..
Cheers,
Abdul -
Initial value in table control is displayed as space for currency field
Hi Experts,
I have a problem with table control in module pool. Below is the code for populating the table control:
loop at GT_NEW_ABAN
into GT_NEW_ABAN_WA
with control TAB_FAC_ABAND
cursor TAB_FAC_ABAND-current_line.
module TAB_FAC_ABAND_get_lines.
*&spwizard: module TAB_FAC_ABAND_change_field_attr
endloop.
The internal table GT_NEW_ABAN and the work area GT_NEW_ABAN_WA are declared as below:
DATA: GT_NEW_ABAN LIKE ZTABANDON OCCURS 0 WITH HEADER LINE,
GT_NEW_ABAN_WA LIKE ZTABANDON ,
while debugging the value of a field in GT_NEW_ABAN_WA is coming as 0.00, but in the screen display it is coming as space.
In the structure ZTABANDON the data type of the particular field is CURR, and in the layout it is DEC.
How can I fetch the same value 0.00 as coming in the work area to the screen display? How to change the space to 0.00?
Regards,
Soumya.Hi,
In the screen painter double click on the fieldname. It will show the properties. There make the type of the field as Currency(CURR I think).
Regards,
Renjith Michael.
Edited by: Renjith Michael on Jan 12, 2008 4:18 PM -
How to get rid of vertical scroll bar in ABAP webdynpro table
Hello,
I have created a dynamic WD table using cl_wd_dynamic_tool=>create_table_from_node and then I restricted the number of lines to 1 by setting the 'Set_Row_Count' and 'Set_Visible_Row_Count' = 1. But still when I run the application I see a vertical scroll bar which looks very awkward for only 1 line. How do I get rid of this vertical scroll bar ?
Thanks and Regards,
SandhyaHi,
Is your table under any transparent container. have you set any scroll mode for this.
One more thing, have you used SER SCROLLABLE COL COUNT property.Also is this property set firstVisibleScrollableCol.
Regards,
Lekha.
Edited by: Lekha on Oct 28, 2009 11:18 AM -
Listbox displaying dynamic values in table control
Hi Experts,
The requirement that I have is that there are two columns in an internal table out of which second one is a listbox.
There is a need of displaying dynamic values in a row in a listbox according to value entered in first column of the same row, not affecting the listbox values in other rows.
I am using VRM_SET_VALUES for populating listbox, but it results in populating the listbox in all other rows also.
Please help.
Thanks,
GarimaHi Thanks for the link..
But my problem is something else.
I want the same listbox of a column in a table control to show me different values in different rows on the basis of value in another column .
Regards,
Garima -
In BDC we need to read screen value of table control
Dear All,
I was doing a feasibility analysis. One BDC is there where we will have to insert records in table control based on some records of 1st column of table control already populated. We are unable to find a way for reading table control. The BDC is generating batch input session. Can you please suggest on this?
Best wishes,
AtanuHi Atanu,
with BDC, the only possibility is to do as Klaus suggested: you must replicate the SAP's logic in your program, you must know in advance how SAP fills this field. This is a very well known drawback of BDC. You may use the SQL trace to help you to know which tables are read. Ask functional people to help you.
You may also use SAP GUI scripting, that's another technology (slower I think, and it can only work in dialog). It allows to do different actions between 2 screens. You must program it using OLE, or using external software (VBA for example).
Sandra -
Can't get rid of vertical scroll bar for full page iviews
Hello all,
We 've got a number of areas of our portal where we are using iViews with a full page (e.g. web dynpro apps, collaboration directory). However with all of these iViews, a vertical scroll bar appears on the right hand side. This bar has hardly any "play" in it (it doesn't move very far), and it doesn't reveal anything extra.
The funny thing is, it only happens when our desktop (theme and framework) is applied. Does anyone have any idea what might affect this?
The iView tray height is set to full_page. In some cases it sits within a page, others it is added directly to the workset.
Using EP6SP14
Thanks,
ChrisHi Christopher,
whenever a page is displayed in portal, a javascript resizes your inner page iView dynamically. The value used depends on the resolution of your browser (height) minus some pixel reserverd for your mast head, TLN and other page header iViews.
If you use a theme or masthead iView that is higher than an original one, the javascript calculates an iView height that is too high. Maybe you should try decreasing the height of your portal header.
At least, that's what I think. Maybe I'm wrong.
HTH,
Carsten
Maybe you are looking for
-
I want to create an applescript/automator tool to launch the "Add to library" command in iTunes with a specific path. I need to know what process is run under the hood to create such a script. To put you in context, I have an NFS mount point with all
-
Reg. IDoc errors in Mat Mas conversion using ALE/IDocs & reduced msg type
Hi Friends, Am facing a strange situation while converting the Material Master data from 4.6b to ECC using BD10 transaction with reduced custom message type. I have reduced the standard msg type MATMAS03 using BD53 for the required field mapping both
-
Hello everybody, I programmed some dynpros, where I used date-textfields. Everytime you click in one of those fields, a little calendar opens, where you can choose the date. So my question is: is there any possibilty to use this calendar without its
-
Itunest not recognizing my ipod touch
how can i downgrade my ipod my itunes is not recognizing my ipod touch
-
Hi, I am trying to schedule a workbook which has been shared to my username, but the schedule option in File-> Schedule has been grayed out. what are the steps to grant privileges for scheduling a workbook ? -Suresh