ALV List: extended field isn't filled
Hi experts,
I've made a alvlist and need one more field, all is working for the ALV-control but the additional field isn't filled with the values from GT_STXL_EXT (in debugger I can see the values)! I already searched in forum and looked into the ALV Grid Control reference but with no success to solve this problem.
TABLES: stxl, stxh.
TYPE-POOLS: slis.
TYPES: BEGIN OF gs_stxl_ext.
INCLUDE STRUCTURE stxl.
TYPES: tdline TYPE stxitfd-tdline,
END OF gs_stxl_ext.
DATA: container01 TYPE REF TO cl_gui_docking_container,
alv_list1 TYPE REF TO cl_gui_alv_grid,
g_repid TYPE sy-repid,
g_find(20) TYPE c,
g_okcode TYPE sy-ucomm
DATA:
gt_stxl_ext TYPE TABLE OF gs_stxl_ext,
wa_stxl_ext TYPE gs_stxl_ext,
gt_text TYPE TABLE OF tline,
wa_text TYPE tline
FIELD-SYMBOLS: <fs_stxl> TYPE stxl,
<fs_stxl_ext> TYPE gs_stxl_ext
DATA: ls_layout TYPE lvc_s_layo
,ls_fcat TYPE lvc_s_fcat
,lt_fieldcatalog TYPE lvc_t_fcat
SELECT tdid tdspras tdname tdobject
FROM stxl
INTO CORRESPONDING FIELDS OF TABLE gt_stxl_ext
WHERE tdobject IN so_tdob
AND tdspras IN so_tdsp
AND tdid IN so_tdid
LOOP AT gt_stxl_ext INTO wa_stxl_ext.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = wa_stxl_ext-tdid
language = wa_stxl_ext-tdspras
name = wa_stxl_ext-tdname
object = wa_stxl_ext-tdobject
TABLES lines = gt_text
IF sy-subrc = 0.
READ TABLE gt_text INTO wa_text INDEX 1.
FIND g_find IN wa_text-tdline IGNORING CASE.
IF sy-subrc = 0.
* <fs_stxl_ext>-tdline = wa_text-tdline.
wa_stxl_ext-tdline = wa_text-tdline.
MODIFY gt_stxl_ext FROM wa_stxl_ext.
ELSE.
* wa_stxl_ext = <fs_stxl_ext>.
DELETE TABLE gt_stxl_ext FROM wa_stxl_ext.
ENDIF.
ENDIF.
ENDLOOP.
g_repid = sy-repid.
IF container01 IS INITIAL.
CREATE OBJECT container01
EXPORTING
parent = cl_gui_container=>screen0
side = cl_gui_docking_container=>dock_at_left
ratio = 90
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = g_repid
txt2 = sy-subrc
txt1 = 'The control could not be created'.
ENDIF.
CALL METHOD container01->set_extension
EXPORTING extension = 99999
EXCEPTIONS CNTL_ERROR = 1
others = 2.
IF sy-subrc <> 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = g_repid
txt2 = sy-subrc
txt1 = 'The extension of container_dock could not be set.'.
ENDIF.
CREATE OBJECT alv_list1 EXPORTING i_parent = container01.
ENDIF.
ls_layout-NO_ROWMARK = ' '.
ls_layout-SEL_MODE = 'A'.
ls_layout-CWIDTH_OPT = 'X'.
ls_layout-ZEBRA = 'X'.
ls_layout-GRID_TITLE = 'the title'.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING i_structure_name = 'STXL'
CHANGING ct_fieldcat = lt_fieldcatalog[]
CLEAR ls_fcat .
ls_fcat-fieldname = 'tdline'.
ls_fcat-ref_table = 'STXITFD'.
* ls_fcat-ref_table = 'GT_stxl_ext'.
* ls_fcat-ref_field = 'tdline'.
* ls_fcat-inttype = 'C'.
* ls_fcat-outputlen = '132' .
ls_fcat-coltext = 'Materiallangtext'.
* ls_fcat-seltext = 'Materiallangtext'.
* ls_fcat-datatype = 'CHAR'.
* ls_fcat-domname = 'TDSTXLLINE'.
ls_fcat-col_pos = '7'.
ls_fcat-tabname = '1'.
APPEND ls_fcat to lt_fieldcatalog.
CALL METHOD alv_list1->set_table_for_first_display
EXPORTING is_layout = ls_layout
CHANGING it_outtab = gt_stxl_ext
it_fieldcatalog = lt_fieldcatalog
CALL METHOD alv_list1->set_toolbar_interactive.
CALL METHOD cl_gui_control=>set_focus EXPORTING control = alv_list1.
try this it may work
ls_fcat-fieldname = 'TDLINE'. " IN CAPS
*ls_fcat-ref_table = 'STXITFD'.
ls_fcat-ref_table = 'GT_stxl_ext'.
ls_fcat-ref_field = 'tdline'.
ls_fcat-inttype = 'C'.
ls_fcat-outputlen = '132' .
ls_fcat-coltext = 'Materiallangtext'.
ls_fcat-seltext = 'Materiallangtext'.
ls_fcat-datatype = 'CHAR'.
ls_fcat-domname = 'TDSTXLLINE'.
ls_fcat-col_pos = '7'.
ls_fcat-tabname = 'GS_STXL_EXT'.
APPEND ls_fcat to lt_fieldcatalog.
Regards
shiba dutta
Similar Messages
-
How do I disable printing of my PDF if a text field isn't filled in?
Hello all I'm currently trying to find a way to make the print button of my pdf not work if say a necessary textfield wasn't filled in?
I take it that the standard validation scripts won't work?
The very helpful fellow from a thread seemed pretty sure it couldn't be done.
In short in order the print button to work the form must have certain textfields populated with content if the combo box next to them has a certain value selected.
Say for example
A text field by the name AIMCode_R1 has no content in it but it's related combobox "Loc_R1" has value 2 currently selected then before printing the pdf must validate that textfield "AIMCode_R1" has content and visversa if "AIMCode_R1" has content then "Loc_R1" must have value 2,3 or 4 selected before the pdf will allow the user to print.In that case all the responses above are incorrect. You can write whatever conditions you want before calling the print command.
Of course, the user will still be able to print the file using the built-in Print command, in which case you can use some of the ideas mentioned above, but the file will still print. One approach I like to use is to reset the form if some required fields are not filled-in, so the printed copy is blank, and then re-fill it afterwards, so the user can complete it. -
Global Address List extended fields from mobile phone
When on an exchange2010 server, search the GAL works fine, however, you don't get to see the entire GAL Object properties.
Only telephone & email fields are visible.
what about address?
Example: find out a colleague had a baby and want to send a gift to the home address. We store it in AD/GAL so we should be able to retrieve it from a mobile device
Have tried from WinMo 6.5, WinPho7, iOS 4/5, Android ICSHi Saimike,
I'm researching the issue and will update it soon. Thanks.
Frank Wang
TechNet Community Support -
Display ALV List in Object Oriented Method
Dear Guru ,
I have encountered an issue which i am trying to resolve
I am using following custom code to display lists of the entries of <F_FS> in ALV GRID FORMAT
For display data in ALV GRID FORMAT i am using class cl_gui_alv_grid.
But the requirment is like this i have to show it in ALV LIST Display Format .
when i searched for class cl_gui_alv_list i found that Object Type CL_GUI_ALV_LIST does not exist
Please show me some guide line how to achieve this .....
DATA : gt_cust TYPE REF TO cl_gui_custom_container. "Custom Container
DATA : cust TYPE scrfname VALUE 'CC_OUTPUT'. "Custom controller
DATA : gt_grid TYPE REF TO cl_gui_alv_grid. "ALV List Viewer
FIELD-SYMBOLS : <f_fs> TYPE table. "FieldSymbol for holding fields
DATA : t_cat TYPE STANDARD TABLE OF lvc_s_fcat INITIAL SIZE 0."To hold Field Catalog
IF gt_cust IS INITIAL.
CREATE OBJECT gt_cust
EXPORTING
container_name = cust.
CREATE OBJECT gt_grid
EXPORTING
i_parent = gt_cust.
**--Display the data in the grid control
CALL METHOD gt_grid->set_table_for_first_display
EXPORTING
i_buffer_active = 'X'
i_bypassing_buffer = ' '
CHANGING
it_outtab = <f_fs>
it_fieldcatalog = t_cat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 .
IF sy-subrc <> 0.
ENDIF.
ENDIF.RECL_SALV_TABLE,
CL_SALV_COLUMNS_TABLE,
CL_SALV_COLUMN_TABLE, -
hi experts
can someone give some samples of alv list about field editable and about event capture such as capture the enter event, capture the data changed event.Hi,
WA_FIELDCAT-COL_POS = 4.
WA_FIELDCAT-TABNAME = 'GT_OUT'.
WA_FIELDCAT-FIELDNAME = 'DATAINS2'.
WA_FIELDCAT-SELTEXT_M = 'POD'.
WA_FIELDCAT-EDIT = 'X'. ( This statement Will edit )
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-EDIT = 'X'.
Thanks
Vikranth
Edited by: Khimavath Vikranth on Jun 16, 2008 10:32 AM -
Hi guru's,
I want to create an ALV list with only a char255 field.
<all_table> contains data of sflight and is of type sflight(dynamically).
I want to show the data as one line.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'TPPARFIL'
fieldname = 'LINE'
TABLES
dfies_tab = it_dfies.
READ TABLE it_dfies INDEX 1.
IF sy-subrc IS INITIAL.
MOVE-CORRESPONDING it_dfies TO wa_fieldcat.
wa_fieldcat-scrtext_s = 'Results:'.
APPEND wa_fieldcat TO gt_fieldcat.
ENDIF.
t_output[] = <all_table>.
CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
EXPORTING
it_fieldcat_lvc = gt_fieldcat
IMPORTING
it_fieldcat_alv = it_fieldcat_alv.
PERFORM fill_alv_layout.
* Show list
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = lv_repid
i_grid_title = sy-title
is_layout = gs_layout
it_fieldcat = it_fieldcat_alv[]
TABLES
t_outtab = t_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
*& Form fill_alv_layout
FORM fill_alv_layout.
CLEAR: gs_layout.
gs_layout-max_linesize = 160.
gs_layout-min_linesize = 160.
gs_layout-detail_initial_lines = 'X'.
gs_layout-zebra = 'X'.
gs_layout-edit_mode = 'A'.
gs_layout-numc_sum = 'X'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-window_titlebar = sy-title.
gs_layout-totals_only = 'X'.
ENDFORM. " fill_alv_layout
When I run this it only gives an empty view of the fields with type char255.
Regards,
Wimhi,
As per your code I think your internal table is empty. Please set debugger after internal table fill and check. If the data is there then please check your field catalog entry.
Regards,
Sachin -
Hi all F4 on field in alv list
hi all
i would like to know how is it possible to give f4 help to a field in alv list. this is field is input enable.
if not in alv list, is it possible in alv grid.
thanx
rockyHI
like this
TYPES : BEGIN OF ST_OBJID_SH,
OTYPE TYPE HRP1000-OTYPE,
OBJID TYPE HRP1000-OBJID,
END OF ST_OBJID_SH.
DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
***********SELECTION SCREEN DESIGN***********************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
**********END OF SELECTION SCREEN DESIGN*****************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
IF S_OBJID IS NOT INITIAL.
SELECT OTYPE OBJID FROM HRP1000
INTO TABLE IT_OBJID_SH
WHERE OTYPE = 'D'.
IF SY-SUBRC EQ 0.
SEARCH HELP FOR QUALIFICATION.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'OBJID'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'S_OBJID'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_OBJID_SH
FIELD_TAB =
RETURN_TAB = RETURN_TAB
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF. -
How to edit particular field in alv list display-urgent
HI ALL,
my requirement is i am displaying output using alv list display. now my rewuirement :
i am displaying out in edit mode only. when user clicks one particular field
for example record is like
runrate a01 maheed -> if user clicks on a01 this field should be editable. i have a following code
w_field-edit = w_edit.
w_field-input = 'X'. -> using this code i can able to display entire colomn in edit mode. this not suits my requirement.anybody can send me the sample code please.
thanks,
maheedhar.tCan you please send me the sample code plz.
i am sending my code below.
type-pools : slis.
tables : zuser_secobjects.
data : t_header1 like zuser_secobjects.
data : begin of it_secobjects occurs 0.
include structure t_header1.
data : checkbox type c value 'X',
action type c,
end of it_secobjects.
data : begin of it_secobjects1 occurs 0.
include structure ZUSER_SECOBJECTS.
data : checkbox type c VALUE 'X',
end of it_secobjects1.
data : wa_ita like line of it_secobjects.
data : i_field type slis_t_fieldcat_alv with header line.
data : w_field like line of i_field.
data : i_sort type slis_t_sortinfo_alv.
data : w_sort like line of i_sort.
data : it_filt1 type slis_t_filter_alv with header line.
data:
i_tabname type tabname,
i_repid like sy-repid,
is_lout type slis_layout_alv.
data : it_filt type slis_t_filter_alv with header line,
it_evts type slis_t_event with header line.
DATA : is_vari type disvariant.
constants : c_default_vari value 'X',
c_save_vari value 'U',
c_checkfield type slis_fieldname value 'ACTION',
c_f2code type sy-ucomm value '&ETA'.
data : chk_box type slis_fieldname.
selection-screen: begin of block b1 with frame title text-t01.
parameters : p_appln type zuser_secobjects-appln.
parameters : p_user type usr02-bname, "zuser_secobjects-appln_user,
p_partnr type zuser_secobjects-appln_partner,
p_ptype type zuser_secobjects-partner_type default '02',
p_upostn type zuser_secobjects-user_position,
p_sdate like likp-erdat default sy-datum,
p_edate(10) default '12/31/9999',
p_revnum type zuser_secobjects-revnum,
p_cted type zuser_secobjects-created_by,
p_cdate type zuser_secobjects-creation_date,
p_ctime type zuser_secobjects-creation_time,
p_chnby type zuser_secobjects-changed_by,
p_cdate1 type zuser_secobjects-changed_date,
p_ctime1 type zuser_secobjects-changed_time.
selection-screen: end of block b1.
form user_command using p_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case p_ucomm.
when 'SELECT_ALL'. " SELALL is the FCODE of ur push button
loop at it_secobjects into wa_ita.
wa_ita-checkbox = 'X'.
modify it_secobjects from wa_ita.
endloop.
rs_selfield-refresh = 'X'. "<- ADD THIS
when 'DESLCT_ALL'.
loop at it_secobjects into wa_ita.
wa_ita-checkbox = ' '.
modify it_secobjects from wa_ita.
endloop.
rs_selfield-refresh = 'X'. "<- ADD THIS
is_lout-f2code = c_f2code.
is_lout-box_fieldname = c_checkfield.
is_lout-get_selinfos = 'X'.
is_lout-detail_popup = 'X'.
is_lout-detail_initial_lines = 'X'.
maheed-start.
*when 'SAVE'.
*LOOP AT IT_SECOBJECTS WHERE CHECKBOX = 'X'.
MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
APPEND IT_SECOBJECTS1.
CLEAR IT_SECOBJECTS1.
DELETE IT_SECOBJECTS.
*ENDLOOP.
*DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
WHEN 'DELETE'.
loop at it_SECOBJECTS where checkbox eq 'X'.
delete it_SECOBJECTS.
endloop.
*RS_SELFIELD-REFRESH = 'X'.
maheed-end.
maheed-start. apr 13
WHEN 'DELETE'.
loop at it_SECOBJECTS where checkbox eq 'X'.
MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
APPEND IT_SECOBJECTS1.
delete it_SECOBJECTS.
endloop.
RS_SELFIELD-REFRESH = 'X'.
when 'SAVE'.
DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
commit work.
refresh :IT_SECOBJECTS1.
maheed-end. apr 13
*when 'SAVE'.
*LOOP AT IT_SECOBJECTS WHERE CHECKBOX = 'X'.
MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
APPEND IT_SECOBJECTS1.
CLEAR IT_SECOBJECTS1.
DELETE IT_SECOBJECTS.
*ENDLOOP.
*DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
ENDCASE.
endform.
*& Form delete
form delete.
data : begin of is_secobjects occurs 0.
include structure zuser_secobjects.
data : checkbox type c.
data : end of is_secobjects.
is_secobjects-checkbox = 'X'.
modify is_secobjects
from it_secobjects
transporting checkbox
where checkbox = 'X'.
endform.
*& Form get_data
form get_data.
select * from zuser_secobjects
into table it_secobjects.
endform. " get_data
*& Form prepare_fieldcatalog
text
--> p1 text
<-- p2 text
form prepare_fieldcatalog." USING w_edit TYPE any.
data : w_edit type c.
clear w_edit.
clear: w_field,i_field.
refresh:i_field.
i_field-key = 'X'.
i_field-col_pos = 1.
i_field-ddictxt = 'S'.
i_field-seltext_s = '@11@'.
i_field-checkbox = 'X'.
i_field-input = 'X'.
i_field-fieldname = 'HEADER'.
i_field-outputlen = 0.
append i_field.
clear i_field.
w_field-fieldname = 'APPLN'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-seltext_l = text-m01.
w_field-outputlen = '10'.
w_field-EDIT = 'X'. "maheed
w_field-col_pos = 1.
append w_field to i_field.
clear w_field.
w_field-fieldname = 'APPLN_USER'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-just = 'C'.
w_field-seltext_l = text-m02.
w_field-outputlen = '7'.
w_field-col_pos = 2.
append w_field to i_field.
clear w_field.
w_field-fieldname = 'APPLN_PARTNER'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-just = 'C'.
w_field-seltext_l = text-m03.
w_field-edit = w_edit.
w_field-input = 'X'.
w_field-outputlen = '7'.
w_field-col_pos = 2.
append w_field to i_field.
clear w_field.
w_field-fieldname = 'INACTIVE'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-just = 'C'.
w_field-seltext_l = text-m02.
w_field-outputlen = '7'.
w_field-col_pos = 3.
append w_field to i_field.
clear w_field.
endform. " prepare_fieldcatalog
*& Form ALV_LIST_DISPLAY
text
--> p1 text
<-- p2 text
form alv_list_display.
DATA : LC_GLAY TYPE LVC_S_GLAY.
LC_GLAY-EDT_CLL_CB = 'X'.
i_repid = sy-repid.
is_lout-box_fieldname = 'CHECKBOX'.
it_filt-fieldname = 'ACTION'.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
is_layout = is_lout
it_fieldcat = i_field[]
it_filter = it_filt[]
it_events = it_evts[]
i_default = c_default_vari
i_save = c_save_vari
is_variant = is_vari
tables
t_outtab = it_secobjects.
endform. " ALV_LIST_DISPLAY
*& Form display
text
-->P_I_OBJECT text
form display using object.
case object.
ENDCASE.
endform. " display
thanks,
maheedhar.t -
Editable field in alv list display
i WANT TO GIVE COLOR FOR EDITABLE FIELD IN ALV LIST DISPLAY.i TRIED WITH EMPHASIZE IN FIELD CATALOGUE ASSIGNING.bUT,IT IS NOT WORKING.HOW TO DO.tHANX IN ADVANCE.........
HI,
Please refer the link below:
http://www.****************/Tutorials/ALV/Edit/demo.htm
http://www.****************/Tutorials/ALV/ColorSALV/Demo.htm
Thanks,
Sriram Ponna. -
HI,
WA_FIELDCAT-COL_POS = 4.
WA_FIELDCAT-TABNAME = 'GT_OUT'.
WA_FIELDCAT-FIELDNAME = 'DATAINS2'.
WA_FIELDCAT-SELTEXT_M = 'POD'.
WA_FIELDCAT-EDIT = 'X'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-EDIT = 'X'.
I USED THIS ONE BUT IAM GETTING SYNERROR WA_FIELDCAT DONT HAVE THIS COMPONENT.Refer to this related thread
Re: how to edit particular field in alv list display-urgent -
Hi all ,
i want to display alv list with time field . if no data exists in that field its showing 00:00:00 , i have to show it blank. if i change time field as type c in my internal table its showing like this 121314, i need to display it 12:13:14 . if no data it should display balnk . can any one help me out to reslove this issue?Hi priya,
do this:
declare in your itab a field like sy-uzeit.
as example.
move sy-uzeit to itab-uzeit.
In fieldcat do this:
MOVE 'X' TO WA_FIELDCAT-NO_ZERO.
Hope it helps.
regards, Dieter -
How to edit particular field in alv list display
hi,
i am displaying output using alv list display. my as follows.
runrate maheed a01.
here if i click a01 it has to show iin edit mode earlier it has to show display mode only. when i select by that time it has to show edit mode there i will change into a02 and i will click save button this is my requirement.
anybody can send me the sample code please.
thanks,
maheedhar.tfollowing is my field cata log
w_field-fieldname = 'APPLN'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-seltext_l = text-m01.
w_field-outputlen = '10'.
w_field-col_pos = 1.
append w_field to i_field.
clear w_field.
now i am writng like this
w_field-fieldname = 'APPLN'.
w_field-tabname = 'IT_SECOBJECTS'.
w_field-seltext_l = text-m01.
w_field-EDIT = 'X'. "maheed
w_field-outputlen = '10'.
w_field-col_pos = 1.
append w_field to i_field.
clear w_field.
eventhough it is not allowing me to edit the field when i click that field in the output.
thanks,
maheedhar.t -
2 Field Catalogues in ALV list
Hi All,
I want to have 2 headers in ALV list. So Can we have 2 field catalogue one after the other in a single ALV List. Where first header(row) gives title like "Previous 5 months " & 2nd header (row) gives sub title like " JAN FEB MAR APR MAY ".
& then the data flows into the columns from the table 't_outtab'.
Thank You ALL.You can do this using ALV list with some extra coding..
But in other cases(Grid etc it is not possible).
cehck this image..
http://img100.imageshack.us/img100/3846/output6ef.th.gif
REPORT ZTEST_ALV message-id zz .
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT type slis_layout_alv,
x_events type slis_alv_event,
it_events type SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
MALE type i,
female type i,
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
x_events-NAME = SLIS_EV_TOP_OF_PAGE.
x_events-FORM = 'TOP_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
L_LAYOUT-NO_COLHEAD = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
it_events = it_events
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 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.
FORM TOP_OF_PAGE.
*-To display the headers for main list
FORMAT COLOR COL_HEADING.
WRITE: / SY-ULINE(103).
WRITE: / SY-VLINE,
(8) ' ' ,
SY-VLINE,
(8) ' ' ,
SY-VLINE,
(19) '***'(015) centered,
sy-vline.
WRITE: / SY-VLINE,
(8) 'VBELN'(013) ,
SY-VLINE,
(8) 'POSNR'(014) ,
SY-VLINE,
(8) 'MALE'(016) ,
sy-vline,
(8) 'FMALE'(017) ,
sy-vline.
FORMAT COLOR OFF.
ENDFORM.
or else go for Hierarchy Report. -
ALV LIST with few checkboxes fields
Hi everyone,
I want to create an ALV with 2 fields that are checkboxes.
I am succeeding to create an ALV with one checkbox field.
How do we do in order to create an ALV with 2 checkboxes fields using ALV LIST ?
I know that we have to specify in the layout of the ALV the name of the field we want it to be checkbox.
For example :
gs_layout-box_fieldname = 'FLAG'.
But, how do we specify a second checkbox field ?
Thanks.
Regards.Slight modification to my earlier post. this is with 2 checkboxes.
REPORT ztest_alv_checkbox.
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
wa_cat LIKE LINE OF it_fcat.
DATA: BEGIN OF it_alv OCCURS 0,
check1(1),
check2(1),
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
END OF it_alv.
DATA:it_events TYPE slis_t_event,
wa_events LIKE LINE OF it_events.
SELECT carrid
connid
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_alv
UP TO 20 ROWS.
wa_cat-fieldname = 'CHECK1'.
wa_cat-input = 'X'.
wa_cat-edit = 'X'.
wa_cat-checkbox = 'X'.
wa_cat-seltext_l = 'Check'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
CLEAR wa_cat.
wa_cat-fieldname = 'CHECK2'.
wa_cat-input = 'X'.
wa_cat-edit = 'X'.
wa_cat-checkbox = 'X'.
wa_cat-seltext_l = 'Check'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
CLEAR wa_cat.
wa_cat-fieldname = 'CARRID'.
wa_cat-seltext_l = 'Carrid'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
CLEAR wa_cat.
wa_cat-fieldname = 'CONNID'.
wa_cat-seltext_l = 'Connid'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
wa_events-name = slis_ev_end_of_list.
wa_events-form = 'MODIFY_LIST'.
APPEND wa_events TO it_events.
CLEAR wa_events.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = it_fcat
it_events = it_events
TABLES
t_outtab = it_alv
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
ENDIF.
"After The list display i am modifying the report output
"using the END_OF_LIST event of ALV
"here conditionally i can make the cell input off
*& Form MODIFY_LIST
* text
FORM modify_list.
DATA: l_lines TYPE i,
l_index TYPE i.
l_lines = l_lines + 3.
"because we have 3 lines extra occupied by lables.
"if we have header,i mean top of page add the no.of lines
"how many ever top of page have + 3 for labels.
DESCRIBE TABLE it_alv LINES l_lines.
l_lines = l_lines + 3.
"understnad this part alone.
DO l_lines TIMES.
IF sy-index GT 3.
l_index = sy-index - 3.
READ TABLE it_alv INDEX l_index.
"this is my condition..
IF sy-subrc = 0 .
IF it_alv-carrid <> 'AA'. "place your condition here.
"accordingly you can disable the checkbox
"use the below logic
READ LINE sy-index INDEX sy-lsind.
IF sy-subrc = 0.
MODIFY LINE sy-index INDEX sy-lsind
FIELD FORMAT it_alv-check1 INPUT OFF
it_alv-check2 INPUT OFF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDDO.
ENDFORM. "MODIFY_LIST -
I cannot dowload all fields from ALV list to Excel - urgent, please help me
I developed a report and displayed in ALV list using FM 'REUSE_ALV_GRID_DISPLAY'.The list contains 200 fields.But when i am trying to download in EXCEL file from ALV list, it is unable to download all the fields from ALV list into EXCEL.
Thanks in advance,
Katta.is your list having packed decimals or any fields which are of large length (around 128 char)?
It can happen so.
Maybe you are looking for
-
I purchased Adobe Premeire Elements and Photoshop Elements 10.0 in 2012. Since then my computer died.I would like to download them on this computer and am unable to do so successfully. Please advise. It was a downoad purchase with no CD
-
Re-Pricing in SALES ORDER using BAPI
Hi all, I modified sales order positions using BAPI_SALESORDER_CHANGE, now I need to force re-price type 'C'... I tried adding LOGIC_SWITCH-PRICING = 'C' and LOGIC_SWITCH-COND_HANDL = 'X' but it doesn't work. I really thank any help. cya, dimas.
-
How can I rotate an image in iAd by clicking on a button?
I wan't to create a iBooks Author Widget with an image (asset, protractor) that will rotate when I click a button (object). The rotation angle must be adjustable by a TextField. Please help me with this, my JavaScripts skills let me a bit down on thi
-
I am developing a shockwave[.dcr] for my web site which will post data to a URL in AES encrypted format using public key which gets decrypted at server side [URL] using the private key. Is it possible to do in Lingo? If yes please let me know somethi
-
IMac Intel Core 2 Duo Airport Latency Issue
I've got a iMac Intel Core 2 Duo 2.5Ghz Model Name: iMac Model Identifier: iMac7,1 Processor Name: Intel Core 2 Duo Processor Speed: 2.4 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 4 MB Memory: 3 GB Bus Speed: 800 MHz Boot ROM Vers