Table control data in color
Hi Experts,
My table control having 3 materils as below .
MATNR MTART WERKS
222 AA 1000
333 BB 1108
444 CC 1200
Client requirement is to display material-333 in red font color, is it possible in table control?.
Thanks in advance
mahe
Hi,
in PBO
" Go to Screen Painter attributes and set BRIGHT attribute but I am not sure this would give you BLUE color
module status_100.
loop at itab with control tc.
endloop
in Program
module status_100.
loop at screen.
if screen-name = 'ITAB-MATNR'.
SCREEN-COLOR = 1. " In Screen Table Control you only get Red Color not any other to the best of my knowledge
MODIFY SCREEN.
ENDIF.
endloop
endmodule
Cheerz
Similar Messages
-
How to modify changes of table control data in PAI
I have a table control where the columns are brought by dict fields.I am able to bring data into table control through an itab.
Now what i want is whenever user edits data in table control and clicks on save button the corresponding changes should be made in database.
For this according to my understanding we need to (in PAI) modify the changes in itab from the table control and then in SY-UCOMM of SAVE button we need to update in database table using itab.
For this , I am not able to write code for modifying the changes in itab from table control. Here is my code below.Please tell me how to do this.
PROCESS BEFORE OUTPUT.
MODULE FILL_DATA.
LOOP AT ITAB INTO ZEMPLOYEE_MASTER WITH CONTROL EMPTABLE CURSOR
EMPTABLE-CURRENT_LINE.
ENDLOOP.
MODULE STATUS_0001.
PROCESS AFTER INPUT.
LOOP AT ITAB.
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001.
REPORT ZDATA_FORM1.
TABLES: ZEMPLOYEE_MASTER.
CONTROLS EMPTABLE TYPE TABLEVIEW USING SCREEN 0001.
data: begin of itab occurs 0,
emp_no like zemployee_master-emp_no,
name like zemployee_master-name,
city like zemployee_master-city,
end of itab,
rowno TYPE I VALUE 1.
*& Module STATUS_0001 OUTPUT
* text
MODULE STATUS_0001 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0001 OUTPUT
*& Module USER_COMMAND_0001 INPUT
* text
MODULE USER_COMMAND_0001 INPUT.
MESSAGE 'Inside INPUT' TYPE 'I'.
CASE SY-UCOMM.
WHEN 'SAVE'.
UPDATE zemployee_master.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0001 INPUT
*& Module fill_data OUTPUT
* text
MODULE fill_data OUTPUT.
select emp_no name city from zemployee_master into TABLE itab ORDER BY emp_no.
Describe table itab lines EMPTABLE-LINES.
ENDMODULE. " fill_data OUTPUT
*& Module modify_itab INPUT
* text
MODULE modify_itab INPUT.
* MODIFY itab from zemployee_master index
* MESSAGE 'Inside modify_itab' TYPE 'I'.
ENDMODULE. " modify_itab INPUTHi
In the following module of your code
MODULE modify_itab INPUT.
MODIFY itab from zemployee_master index tc-current_line " Where TC is the name of the Table control on the Screen
ENDMODULE.
Table control data gets refreshed on *enter*
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/2165e990-0201-0010-5cbb-b5c2ad436140
Cheerz
Ramchander Rao.K -
How to fetch the Table Control data to Customer Table(Z-Table) ?
How to fetch the Table Control data to Customer Table(Z-Table) ?
Hi Krishna,
Check this sample programs
http://www.planetsap.com/online_pgm_main_page.htm
http://sap.niraj.tripod.com/id29.html
http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm
Have a look at below links. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
Thanks,
Reward If helpful. -
How is table control data handled in Session Method?
Hi Friends,
Can any1 plz tell me how is table control data handled in Session Method.
In Call tran we do it by count. But how in Session Method?
Thank you.
Regards,
Varun.Hi,
u can do it by both methods. u can check out this program. u need to comment the performs of table control fields and write ur own perform statements.And u have to declare the table control fields as separate internal tables.
report zcustomer_change_bict
no standard page heading line-size 255.
include bdcrecx1.
data: begin of it_record occurs 0,
kunnr like rf02d-kunnr,
d0360 like rf02d-d0360,
anred(30) type c,
name1(35) type c,
namev(35) type c,
telf1(35) type c,
abtnr(10) type c,
end of it_record.
data: begin of it_knvk1 occurs 0,
anred like knvk-anred,
end of it_knvk1.
data: begin of it_knvk2 occurs 0,
name1 like knvk-name1,
end of it_knvk2.
data: begin of it_knvk3 occurs 0,
namev like knvk-namev,
end of it_knvk3.
data: begin of it_knvk4 occurs 0,
telf1 like knvk-telf1,
end of it_knvk4.
data: begin of it_knvk5 occurs 0,
abtnr like knvk-abtnr,
end of it_knvk5.
data : fld(20) type c,
cnt(2) type n.
start-of-selection.
call function 'GUI_UPLOAD'
exporting
filename = 'C:\CUSTCH.TXT'
filetype = 'ASC'
has_field_separator = 'X'
tables
data_tab = it_record
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
perform open_group.
loop at it_record.
refresh bdcdata.
refresh: it_knvk1,it_knvk2,it_knvk3,it_knvk4,it_knvk5.
split it_record-anred at ',' into table it_knvk1.
split it_record-name1 at ',' into table it_knvk2.
split it_record-namev at ',' into table it_knvk3.
split it_record-telf1 at ',' into table it_knvk4.
split it_record-abtnr at ',' into table it_knvk5.
screen 101
perform bdc_dynpro using 'SAPMF02D' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-D0360'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
it_record-kunnr.
perform bdc_field using 'RF02D-D0360'
it_record-d0360.
screen 360
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-ABTNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
*perform bdc_field using 'KNVK-ANRED(01)'
record-ANRED_01_003.
*perform bdc_field using 'KNVK-NAMEV(01)'
record-NAMEV_01_004.
*perform bdc_field using 'KNVK-NAME1(01)'
record-NAME1_01_005.
*perform bdc_field using 'KNVK-TELF1(01)'
record-TELF1_01_006.
*perform bdc_field using 'KNVK-ABTNR(01)'
record-ABTNR_01_007.
move 1 to cnt.
loop at it_knvk1 .
concatenate 'knvk-anred( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk1-anred.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk2 .
concatenate 'knvk-name1( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk2-name1.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk3 .
concatenate 'knvk-namev( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk3-namev.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk4 .
concatenate 'knvk-telf1( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk4-telf1.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk5 .
concatenate 'knvk-abtnr( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk5-abtnr.
cnt = cnt + 1.
endloop.
screen 360
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_transaction using 'XD02'.
endloop.
perform close_group. -
Downloading table control data in excel sheet
Hi experts,
I have written a module pool pgm which fetches the data from a table and filled in a table control. Now my requirement is to download this (table control data) in an excel sheet like we download the ALV report data in an excel sheet.
Can the same downloading option be provided in module pool pgm also?
Pls tell me how it is possible to download the table control data in an excel sheet in module pool?
Regards,
ShanthiHi Shanthi,
As you can display data in Table Control means data is available in Internal Table
Give Download Button
case ok_code.
when 'DOWN'.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = path1.
CALL FUNCTION 'GUI_DOWNLOAD' " Go through FM Documentatin for more Info
EXPORTING
filename = path1
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = ist_final
fieldnames = ist_fc_download " You can provide the Column Heading
EXCEPTIONS
OTHERS = 22.
endcase.
Cheerz
Ram
Edited by: Rob Burbank on Mar 20, 2010 5:04 PM -
Module Pool - Table Control - Data not getting displayed in Control
Hi,
I have a table contol in my module pool program. In my processing I am filling an internal table & then in my PBO I am linking the internal table to table control. The issue is that even though the internal table is getting filled correctly (found through debugging), the data is not getting populated in table control. Nothing is populated on screen. I am writing part of code below
Declaration:
Types: begin of ty_control,
SELECTED TYPE C,
TEXT TYPE DPR_CAUSE_T-TEXT,
end of ty_control.
CONTROLS : TBL_CONT TYPE TABLEVIEW USING SCREEN '9001'.
DATA: lt_table_cont type TABLE OF ty_control with header line.
Fields in TBL_CONT:
TBL_CONT-SELECTED
TBL_CONT-TEXT
PBO Flow Logic:
MODULE STATUS_9001.
MODULE fill_data.
LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
ENDLOOP.
PAI Flow Logic:
Loop at lt_table_cont.
MODULE UPDATE_DATA.
endloop.
MODULE USER_COMMAND_9001.
PLZ let me know what might be the problem. I have been trying to figure out but cant.
Thanks.Hi Sonali,
When ever you need to do anything with the table control, i mean if u want to display data in table control or you want to validate the data entered in table control Should be done within Loop and Endloop.(PBO or PAI's which ever is appropriate)
Here the data is not bieng displayed in ur table control because you have not used the MODULE fill_data between
LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
ENDLOOP.
so do it like this
LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
MODULE fill_data
ENDLOOP.
this will solve your problem.
Regards,
Syed -
How to add new field to table control data not displayed
hi
I have added some nwe fields to already existing table control added three new fields...
though the recoreds are inserted in teh table properly with the three new fields user id data and time fields
but on display only the data is not shown in these three columns though the data is coming in internal table...but not to the screen output
pls suggest where the problme may be
nishantFirst try the small button Configuration on top right of the table control, as displayed when you run the program. Hit 'Administrator' and see if the fields are checked as invisible. Uncheck them, activate and save.
If the fields are not in that list at all, then check if the table control is initialized for the screen you use. For example
CONTROLS: tc_ent_lines TYPE TABLEVIEW USING SCREEN '0100'.
but you copied your screen and use the same table control in the new screen 0200. Then all you have to do is
REFRESH CONTROL 'TC_ENT_LINES' FROM SCREEN '0200'.
before you show the screen. -
Adobe Forms - Table control data Saved in Database table through Web Dynpro
Hello Friends,
I Am facing a Problem in Adobe Forms through Web Dynpro.
i Want to Make Interactive online Adobe Forms - In Table Control user enter the multiple entry in the table control and after that Click on SAVE button , entry will saved in Database table.
Please guide me.
Thanks in advance.
Gaurav.Hi Gaurabh,
For interactive form you have to check the property DisplayType = native and PdfSource should be a Context Attribute of type 'Xstring'.
For data retrieval, create a NODE and have all the required attributes within that node of AOBE form.
Fetch the data in WDDOINIT.
Also check, that the offline senario for this form is working.
Hope it helps you. -
Table control data to databse table
Hi Experts,
I have created Table control on screen . After entering no of rows of data manually in Table control and after clicking on save button, entered data should be get saved into the corresponding table.
Please help me on this issue.
Thanks & Regards,
Nagaraju C.program znmodpl2.
tables : zntable.
data : it_table type table of zntable with header line.
controls : tabcntrl type tableview using screen 100.
data : ok_code type sy-ucomm.
*& Module STATUS_0100 OUTPUT
text
module status_0100 output.
set pf-status '0100'.
set titlebar '100'.
move-corresponding it_table to zntable.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module user_command_0100 input.
case ok_code.
when 'INS'.
it_table-carrier = zntable-carrier .
it_table-personnelno = zntable-personnelno.
it_table-flightname = zntable-flightname.
it_table-flightdate = zntable-flightdate.
it_table-f_name = zntable-f_name.
it_table-l_name = zntable-l_name.
it_table-rol_emp = zntable-rol_emp.
it_table-telephone = zntable-telephone.
it_table-city_dept = zntable-city_dept.
it_table-city_arrv = zntable-city_arrv.
append it_table.
insert into zntable values it_table.
message 'SUCCESSFUL INSERTION OF DATA' type 'S' .
when 'EXIT'.
leave program.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
The Flow Logic will be :
process before output.
loop at it_table with control tabcntrl.
module status_0100.
endloop.
process after input.
loop at it_table .
module user_command_0100.
endloop.
thank & regards,
Nilay Sarkar. -
Table control data update with LED status progress
Hi Friends,
I've a requirement for my project....
But i am not clear of how to implement that.
The main.vi will extract the data from an Excel sheet using all excel.llb and show the data in table control.
At the back end i'll be keep on reading data from the worksheet 1 of the excel sheet.
so my intention is something like this
whenever it reads the 1st row of data the LED should blink at the first row and it proceed down as per the for loop
And should continue up to the end.
If anybody have worked out with the Table control and Excel sheet VI's please help.
Your help would be appreciated.
Will attach the VI on request.
Cheers,
Suneel.VHi Mike,
Thanks for your prompt response.
Attached are the VI's.
The main VI is Excel_Tablecontrol.vi and the sub vi is excel_read.vi
In the main VI select any excel sheet from your PC and it will extract the first sheet data in it.
But in my real project i will be reading line by line.
Could you please make me clear how should i put an indicator whcih would go line by line.
Cheers,
Suneel.V
Attachments:
Excel_TableControl.vi 11 KB
Excel_Read_Write_V1.0.vi 48 KB -
How to show data through table control
Hi Experts,
I have created an table control through wizard using table EKKO.
I have to populate one internal table( type ekko ), and then show it in output through table control.
Please advise, how to do that and in where i have to write the codes.
I will reward points for every suggestion
Thanks in advance.
regardshi saubrab,
This is kiran kumar.G.I am sending some sample code to populate data into table control check it once.
i will give input in 100 screen. and display table control in 200 screen.check it once once ..ok....
SE38 :(CODE)
*& Module pool YMODULEPOOL_TABLECONTROL1 *
*& DEVELOPER : KIRAN KUMAR.G *
*& PURPOSE : TABLE CONTROL DEMO *
*& CREATION DT : 17/12/2007 *
*& T.CODE : YMODTABLECONTROL1 *
*& REQUEST : ERPK900035 *
PROGRAM ymodulepool_tablecontrol1.
Tables
TABLES: yvbap, "Sales Document: Item Data
vbak. "Sales Document: Header Data
Controls
CONTROLS: my_table TYPE TABLEVIEW USING SCREEN 200.
Global Variables
DATA: gv_lines TYPE i,
gv_lines1 type i,
gv_temp type i,
gv_flag(20) TYPE c VALUE 'DISP',
gv_mode1 TYPE c,
gv_mode TYPE c VALUE 'C'. " C: Change, D :Display
Internal Table
DATA: BEGIN OF gt_item OCCURS 0,
vbeln LIKE vbap-vbeln, "Sales Document Number
posnr LIKE vbap-posnr, "Sales Document Item
matnr LIKE vbap-matnr, "Material Number
matkl LIKE vbap-matkl, "Material Group
arktx LIKE vbap-arktx, "Short Text for Sales Order Item
cflag, "Deletion Indicator
END OF gt_item.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'ZTABLECONTROL' OF PROGRAM 'YMODULEPOOL_TABLECONTROL'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'DISP'.
SELECT single vbeln
erdat
angdt
bnddt
FROM vbak
INTO (vbak-vbeln,vbak-erdat,
vbak-angdt,vbak-bnddt)
WHERE vbeln = vbak-vbeln.
IF sy-subrc EQ 0.
*Fetch the table control data and place them in Internal Table
SELECT vbeln
posnr
matnr
matkl
arktx
FROM yvbap
INTO TABLE gt_item
WHERE vbeln = vbak-vbeln.
IF sy-subrc EQ 0.
*NO OF line in the Internal Table
DESCRIBE TABLE gt_item LINES gv_lines.
my_table-lines = gv_lines + 20.
ENDIF.
ENDIF.
*Call Screen 200.
SET SCREEN 200.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
*Exit from the Program
CALL TRANSACTION 'SESSION_MANAGER'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
module STATUS_0200 output.
SET PF-STATUS 'ZTABLECONTROL1'.
endmodule. " STATUS_0200 OUTPU
*& Module copy_data OUTPUT
text
module copy_data output.
*Fetch the current line data from the Table control
read table gt_item index my_table-current_line.
if sy-subrc eq 0.
*Populating data into screen fields
gt_item-vbeln = gt_item-vbeln.
gt_item-posnr = gt_item-posnr.
gt_item-matnr = gt_item-matnr.
gt_item-matkl = gt_item-matkl.
gt_item-arktx = gt_item-arktx.
endif.
SE51:CODE (SCREEN 100)
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
SE51 :CODE (SCREEN 200)
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
loop at gt_item with control my_table cursor my_table-current_line.
module copy_data.
endloop.
PROCESS AFTER INPUT.
loop at gt_item.
MODULE USER_COMMAND_0200.
endloop.
HAVE A NICE DAY..
Award points if helpful,kiran kumar.G -
Data not seen in Table Control --Print Preview
Hi
I am creating one Standard Transaction Iview for CATS .
While doing print preview(Portal Side) in IE 6 , I am not able to see data in Table control(Data Entry Area ).
Can you please provide me the solution for how I can see the data in Table Control
Regards
RuturajGo to SE11 and search for setup and look for the specific data source and see the content, if the content is actually zero, then there is nothing in the setup table.
thanks.
Wond -
Hi All,
I have a requirement to show alternate rows of table control with alternate colors.
Please help on this.
Thanks in advance.
Surihi suresh,
Welcome to SDN forum
check these links
Re: Cell color
Smartforms: Background Color in tables
ALV : color one cell
Reward with points if it is helpful
Cheers
Alfred -
Getting data from table control to the report program.
Hi,
I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
Please help me finding out which variable will hold the data entered in table control(dynamically).hi,
in your table control you give some name to that table control say it_cntrl.
this only serves as the internal table to process the table control data.
like u can write like this.
loop at it_cntrl into wa_cntrl. "wa_cntrl is work area of type it_cntrl table type
......... "do your functining
end loop.
any clarification get in touch
thnks -
Regarding PAI event display of data in table control
Hi all,
I have a drop down list in my module pool screen and based on my selection the value in not getting captured as i have to display table control data (or item level data ) based on the delivery that is selected from the drop down.
The first level of items are getting displayed in the table control for the first time but after i select the delivery for the next time no delivery is getting captured in the screen field and so on no items are getting changed in the table control.
Pls let me know how to capture the delivery number selected from the drop down list box and so on i can write the code for displaying the new set of items in the table control for the new delivery number selected.
Thankyou for your help.
Amar.Hi All,
I have solved my problum of getting the values in the drop down list using the function module vrm_set_values.
Earlier it dint capture the values in the list because i am not aware of the key field its having apart from the text field.
I have passed some numberic value to the key field earlier and the actual text to be displayed in the TEXT field.
Anyways i came to know that we need to pass the same field values in both key field and text field only then the values wud be captured. So my problum is solved.
I have another question on the same now
My requirement is on selecting a value in the dropdown list the delivery items shud come in the dropdown list which is coming.
I have another drop down in the item level so i wrote the vrm set values in the item level for one field based on that value the other fields in the table control needs to get data.
I have provided the drop down item level field also but the problum is let us say we have 3 items and in the table control has 15 items that can be displayed. The dropdown for that field shud come only upto 3 records but it is coming for the entire column as the screen field name is same for the entire column.
example
f1 f2 f3 are the fields
and the table control can accomodate 10 records
Let us say we have 3 line items
now the drop down is appearing for all the 15 records for field f2 where it shud appear for only 3 records.
pls let me know if there any option in such a way that we can restrict upto 3 records.
Thanks in advance.
Amar.
Maybe you are looking for
-
"Use Cellular Data For" is always on. I cant off this...
I am continuosly using the iPhone. Suddenly i cant restrict few applications from internet in the "Use Cellular Data For". But I cant access few app which has On flag in "Use Cellular Data For". If i disable this, its getting enabling after few secon
-
Update Acrobat 9 Pro in Yosemite
Can Adobe Acrobat Pro 9 be updated in OS 10.10.2?
-
Script to play itunes playlist on start?
I have just done the software upgrade to SL and now my old script doesnt work to auto play an itunes playlist on startup. I found the following script as a replacement but it doesnt seem to run automatically on start up. tell application "iTunes" a
-
In.ftpd as 64 binary for solaris 10
Where can I find the source code for in.ftpd . The in.ftpd binary that comes with solaris 10 is only 32 bit. We are looking for better performance from our sun v240 sol 10 machines I would like to recompile it an make it 64 bit for sun4u. Our current
-
Cant see sequence content in CS6 Premiere. Hardware issues?
Bill Hunt told me to try you guy's in this forum. Hope someone here have an ace up their sleves.... Read the thread here: http://forums.adobe.com/message/4925266#4925266 Post here or in that thread if anyone have suggestions! Thanks!!