Push button column in table control
Hi,
I have to add a few push button columns into table control. This columns has to be placed between fields of DDic table. How to do this? Shall I create new DDic structure with all the needed fields from DDic table and add also fields for push button columns? Which data element shal I use in this case for push button field? Or is the better solution to add DDic table fields one by one and then using drag and drop technique to add push button column behind it?
Thanks.
Hi ,
Your Last option is better first add columns into DDIC table then Drag and
Drop it on table control .
That will better definitely.................................
if useful rewards the point..............
Thanks .
Nilesh Jain
Similar Messages
-
Push button in one of the columns of Table Control
Hi,
I have a requirement, where i have to display a push button in one of the columns of table control for long text. When user clicks on the control, a pop up has to be appeared in which user should be able to enter some meaning ful description and save it. please suggest me how to do this requirement.
Best Regards,
Phani Kumar. SHai,
You can drag n drop a button to the required column in the table control and give the required parameters like ok_code , name etc.
You can now place a text field as the heading of the column.
Now when the user clicks the the button in a row, read the corresponding line in which he has clicked.For that u can use
get cursor lines wrk_line.
now u'll get the data in that row using
Read table it_tab into wa_tab index wrk_line.
now u can call the text editor (using FM's READ_TEXT ,EDIT_TEXT and CREATE_TEXT in which the user can enter the meaningful description and save it.
When u save the text entered save it with a key part of the row that was read earlier(keep it as the text name).
So now if u need to get the description which was entered earlier u can easily read the text (using READ_TEXT ).
I hope this will be helpful for u .
Thanks
Neeraj -
How to Enable and Disable column in Table Control.
Hi all,
I want to make certain column of Table control as Enable or Disable on Button action.
Enable means ready for input and Disable means not ready for input.
Please send me sample code.
Thanks in advance.Hi Vipin,
You have to loop through the table columns to set the properties in the PBO of your screen.
Here is the sample solution.
delcare a workarea for the columns in the table control in your top include.
Table Control .
CONTROLS: TAB1 TYPE TABLEVIEW USING SCREEN '0100'.
DATA: WA_COLS LIKE LINE OF TAB1-COLS.
in your screen
PROCESS BEFORE OUTPUT.
MODULE INTIALISE_100.
*& Module 0100_INTIALISE OUTPUT
MODULE INTIALISE_100 OUTPUT.
LOOP AT TAB1-COLS INTO WA_COLS.
WA_COLS-SCREEN-INPUT = 1.
MODIFY TAB1-COLS FROM WA_COLS TRANSPORTING SCREEN-INPUT.
ENDLOOP.
ENDMODULE. " 0100_INTIALISE OUTPUT
modify the screen-input property as required for the table control columns.
Please provide points if helpfull.....
Thanks,
Karthik
Message was edited by: Karthik
Karthikeyan K -
Reg:How to delete the column in table control also from database table.
Hi Experts,
Once again thank u all for giving the responses.
one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
With Regards,
Saroja.P.Hi,
If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
"This portion of code inside the LOOP...ENDLOOP.
IF sy-ucomm eq 'F_DELETE'.
gt_itab2-check = mark. " Store the MARK field status into your internal table's correspoding field 'check'
MODIFY gt_itab INDEX tabcontrol-current_line.
ENDIF.
iF sy-ucomm eq 'DELETE1'.
DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
ENDIF.
Now you can modify your database table using the MODIFY statement.
MODIFY ZDB FROM TABLE gt_itab. -
How to add column in table control for transaction APPCREATE
Hi All,
How can i add the additional column in table control for transaction APPCREATE.
There is structure PT1045_EXT present behind table control. But not found any customer exit or badi to display on screen.
Please help...You can add new columns
If you add new columns in tr. PHAP_CATALOG -
How to find out the selected column in Table Control
Hi all,
How to find out the selected column in Table Control?
Thanks & Regards,
YJRHi,
Let your table control name in Screen painter be TC1.
READ TABLE TC1-COLS INTO WA_COLS (some wok area)
WITH KEY SELECTED = 'X'.
IF SY-SUBRC = 0.
CLEAR: W_DUMMY, W_COL_NAME.
SPLIT WA_COLS-SCREEN-NAME AT '-' INTO W_DUMMY
W_COL_NAME.
endif.
W_COL_NAME gives you the column name.
Hope it helps.
cheers
sharmistha -
How to add a column in table control
Hi ,
Can any one tell me how to add a column in table control? My requirement is to add two columns ( custom fields ) into table control ( It is a standard program). I have added the column in the table and also in the table control. But when I am running the standard program, The newly added column is not there. But I have added in the perticular screen. Change is not reflected.
Can anyone help me on this please.
Thanks in advance.
Regards,
Lakshmi.Hi,
Ensure the following :
1. After adjusting the database, you`ll have to use the database utility and activate the table.
2. If you have changed the standard screen, in tcode se80 -- right click on the program and click activate all. This activates all objects related to that program.
Now execute the program.
Reward if helpful.
Regards -
How to get sum of quantity column in table control
Hi, expert ,
Someone can guide me how to get som of qty column in table control ?
I created a screen with a table control and has a qty quantity field .
I want to show total of qty in a field .
my code like this ...
PROCESS AFTER INPUT.
LOOP AT I_tab.
CHAIN.
FIELD I_tab-COUNTQTY MODULE caculate_total_qty .
endchain.
MODULE UPDATE_TOTAL_QTY .
ENDLOOP.
but, when I Back to the previous screen
It's caculate again so I always get wrong Total quantity .
anyone can help me ...Hi , Dhina
I have another question .
I use internal table data in table control to update database table .
The data in the db will be change ,
but each record I want to delete in table control , it's still exist in database .
my code is
WHEN 'SAVE'
MODIFY YDSGBT53 FROM TABLE I_YDSGBT53 .
COMMIT WORK .
END CASE
How to fix my code and let it can change and delete data in database ?
or
when I delete record in table control I must to delete data in the database too .
Edited by: TitusFang on Jun 16, 2011 3:21 AM -
Disable some columns in table control?
Hi
How to disable some columns in table control.
For Ex: Table contains 8 columns.
In first row i want to disable first 4 columns.
in second row i want to disable last 4 columns.
In third row i want to disable first 2 and last 2 columns. How can we achieve this?
Cheers,
Venkys.HI
Create three attribute in the node which is bound to the table as data source.
say pro1, pro2, and pro3 of type wdy_boolean.
now bind the enabled property of first four column editors to pro1, last 4 to pro2, and pro3 to first 2 and last 2.
then go to the eventhandler of the dropdown 's on select event and write the code to update the values of these attribute
according to the selected value.
here is the sample code.
DATA lo_nd TYPE REF TO if_wd_context_node.
DATA lo_el TYPE REF TO if_wd_context_element.
DATA lv_VAL LIKE ls_dealer1-name.
lo_nd = wd_context->get_child_node( name = 'DEALER1').
lo_el = lo_nd->get_element( ).
lo_el->get_attribute(
EXPORTING
name = `NAME`
IMPORTING
value = lv_VAL ).
DATA PR1 TYPE WDY_BOOLEAN.
DATA PR2 TYPE WDY_BOOLEAN.
DATA PR3 TYPE WDY_BOOLEAN.
PR1 = ABAP_TRUE.
PR2 = ABAP_TRUE.
PR3 = ABAP_TRUE.
IF LV_VAL EQ 'A'.
PR1 = ABAP_FALSE.
PR2 = ABAP_TRUE.
PR3 = ABAP_TRUE.
ELSEIF LV_VAL EQ 'B'.
PR1 = ABAP_TRUE.
PR2 = ABAP_FALSE.
PR3 = ABAP_TRUE.
ELSEIF LV_VAL EQ 'C'.
PR1 = ABAP_TRUE.
PR2 = ABAP_TRUE.
PR3 = ABAP_FALSE.
ENDIF.
LO_EL->SET_ATTRIBUTE(
NAME = 'PRO1'
VALUE = PR1
LO_EL->SET_ATTRIBUTE(
NAME = 'PRO2'
VALUE = PR2
LO_EL->SET_ATTRIBUTE(
NAME = 'PRO3'
VALUE = PR3
thanks
sarbjeet singh -
Hiding columns in table control
Hi Experts,
I have requirement to hide certain columns in table control. I have tried my best to use SCREEN structure with ACTIVE, INVISIBLE, INPUT, OUTPUT options, but not working properly.
The table control has nearly 10 columns with DATE as the first one. Once the screen appears after executing program, the second and third columns should be hidden and when double clicked on any date value from the basic list, the hidden columns should be visible with its values in the next level.
I am not able to hide columns in table control. By the way, suggest me options for double clicking in table control too.
Thanks.Hi,
The value of sy-ucomm when user double clicks is /CS
To get the details of field name and value use:-
GET CURSOR FIELD g_cs_field VALUE g_cs_value.
Now you can code in PAI to display those two columns initially hidden by the user:-
CASE sy-ucomm.
WHEN '/CS'.
IF g_cs_field = '<field1_name>'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-invisible = 0. "display control
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDCASE.
Remember that in PBO of screen you have written a code to hide these same columns initially, so make sure that the code is not executed when user double clicks to display those columns.
Try this code for hidding the columns in table control initially.
MODULE status_8001.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-invisible = 1. "hide control
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.
Hope this helps you.
Regards,
Tarun -
SHDO - add column in table control in CRMD_ORDER
Hi,
is it possible to add a EEWB generated column to table control (on the first screen)
in TCODE CRMD_ORDER ?
did anyone ever do that ?
thank you,
Regards,
michalhehe
it would be great to get feedback on everything here but I'd better obey the forum rules
too many opened forums and I sometimes get a little lost
Regards,
michal -
Default value for a column in Table Control
Hi friends, can i set dinamcally a default value for a column in table control?, this column is check type. This default value must appear in empty rows,
thanksADD A MODULE AS Module yyyy In ur PAI.
as
In PAI.
LOOP at itab.
Module YYYY
ENDLOOP.
Module YYYY.
LOOP AT SCREEN.
IF SCREEN-NAME = 'ITAB-VAL.
ITAB-VAL = 'XXXXXXXX' "(DEFAULT VALUE)
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
End module.
*note
make this event work only if the previous column is filled okay.
the display will be in display mode on the screen as screen-input = 0.
see that in the table control u can get the table field for all the rows even though you are processing on some fields .
so what u do is make that particular filed masked(no i/p field and populate the field that will be better instead of populating all the columns okay.
hope this helps you out ,
regards,
vijay. -
Not setting selected value in column of table control
Hi,
I have MATNR field in table control.
In PAI code is as follow.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE VALIDATE.
LOOP WITH CONTROL TC_FORMV.
FIELD /SISLEMCU/CNVADTL-MATNR SELECT *
FROM /SISLEMCU/CNVA01
WHERE WERKS = TXT_PLANT
AND CHARG =
/SISLEMCU/CNVADTL-CHARG.
INTO /SISLEMCU/CNVADTL.
MODULE read_table_control.
ENDLOOP.
MODULE USER_COMMAND_0500.
When i take the help in MATNR column the above query works fine but when i select the entry from help MATNR is not gets set in column in table control.
Plz help me regarding this.
Thankx in adv.
Regards,
Deepak.When you select a value, PBO as well as PAI gets triggered. When PAI gets triggered, your query gets executed which gives sy-subrc <> 0 and due to this it might not filling the data selected..
-
Disabling push button column cell on alv grid control (OOABAP)
Hello All,
I have a requirement where I need to add one column as pushbutton in alv grid display. I have done that and it's triggering button_click event also. The problem here is that I want the few <b>push button cells</b> of that column to be disbaled (depending on my requirement). I tried using a internal table lvc_t_styl and adding a field of same lvc_t_styl in my main internal table. This works for all other fields (e.g disbaling checkbox in alv grid and other editable fields) but not for push buttons. My exact requirement is that I want some of the <b>cells of pushbutton column to be grayed out (made inactive)</b>. Can anyone tell me how to do that. Thanks.
Note:Helpful answers will be duly rewarded.
nullHi,
I had the same problem.
what I did I just added the cl_gui_alv_grid=>mc_style_button at each row of the data table instead of adding it at the field catalog level.
Hope this solve your problem.
Thanks,
Harish -
Disable columns in table control based on condition
Hello Gurus,
I am having a table control in my module pool program.Out of 25 columns , I am having 12 columns on months wise like (jan, feb, march....).Now my concern is based on current month I want to enable the column of month rest all months will be in disable mode.So that the user can enter his/her time of work.Could you please tell me any way.I tired to read tc-cols and stored in col with index but its not working I wrote this code for first month without any condition
READ TABLE tC-COLS INTO col INDEX 22.
col-SCREEN-INPUT = 0.
MODIFY tC-COLS FROM col INDEX 22.
but its not working.I wrote this code in PBO as well as i tried in PAI as wellstill my columns is in enable mode.Also when user clicks on button then only the table control required fields should start working like months enable/disable process.for eg. I am having 2 button one is Create and other is Search on both these buttons after click the condition for enable/disable months should work.
Thanks
GauravHi,
In my scenario, I have used months as radio buttons. A month is selected and "enable" button must be clicked so that only the corresponding column of the month turns into an editable mode.
I have attached the output.
The field can be disabled or enabled by using the line type of <table_control_name>-cols.
It contains the screen elements. For disabling / enabling, use active element in screen.
This must be written in PBO event of the corresponding screen containing the table control.
Coding:
* Type-Pools
TYPE-POOLS: abap.
* Types
TYPES: BEGIN OF ty_month_emp,
jan TYPE char30,
feb TYPE char30,
mar TYPE char30,
apr TYPE char30,
may TYPE char30,
jun TYPE char30,
jul TYPE char30,
aug TYPE char30,
sep TYPE char30,
oct TYPE char30,
nov TYPE char30,
dec TYPE char30,
id TYPE char10,
name TYPE char10,
age TYPE char10,
END OF ty_month_emp,
ty_t_month_emp TYPE STANDARD TABLE OF ty_month_emp.
* Data
DATA: gs_month_emp TYPE ty_month_emp,
gt_month_emp TYPE ty_t_month_emp,
ok_code TYPE sy-ucomm,
r1 TYPE char1 VALUE abap_true,
r2 TYPE char1,
r3 TYPE char1,
r4 TYPE char1,
r5 TYPE char1,
r6 TYPE char1,
r7 TYPE char1,
r8 TYPE char1,
r9 TYPE char1,
r10 TYPE char1,
r11 TYPE char1,
r12 TYPE char1.
* Table Controls
CONTROLS: tc TYPE TABLEVIEW USING SCREEN 9000.
* Field-Symbols
FIELD-SYMBOLS: <fs_cols> LIKE LINE OF tc-cols.
* Initialization
INITIALIZATION.
CALL SCREEN 9000.
*& Module ENABLE_COLUMN OUTPUT
* text
MODULE enable_column OUTPUT.
LOOP AT tc-cols ASSIGNING <fs_cols>.
PERFORM enable_col USING: r1 'GS_MONTH_EMP-JAN' CHANGING <fs_cols>,
r2 'GS_MONTH_EMP-FEB' CHANGING <fs_cols>,
r3 'GS_MONTH_EMP-MAR' CHANGING <fs_cols>,
r4 'GS_MONTH_EMP-APR' CHANGING <fs_cols>,
r5 'GS_MONTH_EMP-MAY' CHANGING <fs_cols>,
r6 'GS_MONTH_EMP-JUN' CHANGING <fs_cols>,
r7 'GS_MONTH_EMP-JUL' CHANGING <fs_cols>,
r8 'GS_MONTH_EMP-AUG' CHANGING <fs_cols>,
r9 'GS_MONTH_EMP-SEP' CHANGING <fs_cols>,
r10 'GS_MONTH_EMP-OCT' CHANGING <fs_cols>,
r11 'GS_MONTH_EMP-NOV' CHANGING <fs_cols>,
r12 'GS_MONTH_EMP-DEC' CHANGING <fs_cols>.
ENDLOOP.
* LOOP AT tc-cols INTO ls_cols.
* IF r1 = 'X'.
* ls_cols-screen-active = 1.
* else.
* ls_cols-screen-active = 0.
* ENDIF.
* modify tc-cols FROM ls_cols INDEX sy-tabix.
* ENDLOOP.
ENDMODULE. " ENABLE_COLUMN OUTPUT
*& Form ENABLE_COL
* text
* -->P_0170 text
* -->P_0171 text
* <--P_<FS_COLS> text
FORM enable_col USING p_radio TYPE c
value(p_screen_name) LIKE screen-name
CHANGING pa_cols LIKE LINE OF tc-cols.
IF p_radio = abap_true.
IF pa_cols-screen-name = p_screen_name.
pa_cols-screen-active = 1.
ELSE.
pa_cols-screen-active = 0.
ENDIF.
ENDIF.
ENDFORM. " ENABLE_COL
Thanks & Regards,
T. Prasanna Kumar
Maybe you are looking for
-
Can only text one person at a time??
I can't believe Apple designed the iPhone so you can only text one person at a time. Major blunder on their part. I really hope they correct this with a software update very soon........ What does everyone else think?
-
ITunes store won't allow me to purchase cart
I'm trying to purchase items in my Shopping Cart from iTunes 7.5 (Windows), on the computer that I always use. I get an error message telling me that either prices have changed since adding the items to the cart or items were added/removed from anoth
-
MP/WebEx 8.0 - How to View Meetings Scheduled in the Future
I have a newly deployed MeetingPlace/WebEx 8.0 on-prem node solution with primary/backup configuration, with the WebEx productivty tools. After an upgrade, I want to verify that any meetings scheduled before the upgrade, are still there- that those e
-
N97 FM Radio Application - Lost
I had to reinstall the firmware of my Nokia N97 and restore the factory settings of the phone. After reinstalling the firmware ( note this is not the newest firmware because it is not yet available in the Philippines ) and restoring the factory setti
-
Having trouble with Getting on Firefox when I click on it a message comes up that "Firefox is already running" or nothing happens at all.