ALV and Checkbox : retrieving what we select
Hi everyone,
I created checkoxes in an ALV.
I am trying to retrieve what lines I selected from the ALV.
Thanks in advance.
Hi everyone,
The scenario is :
I added a button (refresh) in the ALV. When I click on it I want to know which lines I selected via the checkboxes.
I am using normal ALV (no classes).
If I click on my refresh button my internal table has no flag = 'X'.
But if I click on a row (after selecting the checkbox) I do see the flag='X'.
So it works when I click on the row of the ALV but does not work if I click on the refresh button that I added.
Here is the code.
REPORT ztestdfalv1 .
*Data Declaration
DATA: BEGIN OF t_ekko,
select(1),
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF t_ekko.
DATA: BEGIN OF it_ekko OCCURS 0.
INCLUDE STRUCTURE t_ekko.
DATA: END OF it_ekko.
*ALV data declarations
TYPE-POOLS: slis. "ALV Declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form build_fieldcatalog
* text
FORM build_fieldcatalog.
REFRESH fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'SELECT'.
fieldcatalog-seltext_m = 'Select please'.
fieldcatalog-checkbox = 'X'.
fieldcatalog-edit = 'X'.
fieldcatalog-input = 'X'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-hotspot = 'X'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
"Permet d'ajuster les colonnes au text
* gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
* gd_layout-box_fieldname = 'SELECT'.
* gd_layout-box_tabname = 'IT_EKKO'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
* i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = 'My Title'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE:/ sy-subrc.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* FORM SET_PF_STATUS *
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD_FULLSCREEN1'.
ENDFORM. "set_pf_status
*& Form user_command
* text
* -->R_UCOMM text
* -->RS_SELFIELDtext
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
CHECK rs_selfield-tabindex > 0.
IF rs_selfield-value EQ '6000000001'.
CALL TRANSACTION 'ZDF2'.
ENDIF.
WHEN 'REFRESH'.
LOOP AT it_ekko WHERE select = 'X'.
ENDLOOP.
PERFORM data_retrieval.
rs_selfield-refresh = 'X'.
ENDCASE.
ENDFORM. "user_command
Thanks.
Message was edited by: David Fryda
Similar Messages
-
Guys,
Ive a problem with a ALV and checkboxs. i have one with column type checkbox, i need mark rows and take them afterward using a button (in ALV) but rows arent marked when i use button. i have seen that it only happend when i use double click in grid (alv).
How could i use only button after marked my rows ?????
Thankswa_fieldcat-edit = 'X'.
modify i_fieldcat from wa_fieldcat index sy-tabix.
* Form f_alv_edit_oruser *
* Form for display alv *
form f_alv_edit_oruser.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = i_fieldcat[]
is_layout = pt_grplayout2
i_callback_program = 'YSCCU0007'
i_callback_html_top_of_page = p_header
i_callback_user_command = v_user_command1
it_events = i_events[]
tables
t_outtab = i_yscchdr.
endform. " F_alv_edit_oruser
* Form f_user_command1 *
* This form will handle the user command from fm REUSE *
form f_user_command1 using p_ucomm type sy-ucomm
rs_selfield type slis_selfield.
data p_ref1 type ref to cl_gui_alv_grid. "<<<
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' "<<<
importing "<<<
e_grid = p_ref1. "<<
call method p_ref1->check_changed_data. " <<<<
case p_ucomm.
when '&DATA_SAVE'.
endcase.
rs_selfield-refresh = c_x. " Grid refresh
endform. " F_user_command1 -
Why cant I highlight part of a document and print only what is selected in safari?
Why is it not possible to highlight and print the selection in Safari, thought the imac was supposed to do everything, WRONG.
I also have I.pad 2 and because it does not support adobe flash, I cannot open a magazine that I have each week, I have to do this on the imac, so when away from home it again doesnt do what I want it to. Does everything people say. WRONG AGAIN.
Should have stuck with the laptop, it actually does do these things mentioned above.I purchased the iPad first and waited a year HOPING Apple would fix this problem OR at the least provide something comparable to WINDOWS!
WRONG....and yes it is hard to believe for how ADVANCED Apple is.....that they don't have a simple easy program that allows you to HIGHLIGHT and PRINT ONLY what you highlight!
But....they are making leaps and bounds.....at least you can now cut & paste....thats a good thing!?
HOPEFULLY.......in the VERY,VERY NEAR FUTURE Apple will supply us with the simple software to do these simple time saving chores!
(highlight and print ONLY what you highlight)
Until then we have to cut and paste to several different apps or programs....hoping it will allow you to print ONLY WHAT THE USER WANTS TO PRINT! -
Hi everyone,
I created checkboxes in my ALV.
The problem is when I double click on a checkbox, I get a dump.
Here is the code.
REPORT ztestdfalv1 .
*Data Declaration
DATA: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF t_ekko.
DATA: BEGIN OF it_ekko OCCURS 0.
INCLUDE STRUCTURE t_ekko.
DATA: END OF it_ekko.
*ALV data declarations
TYPE-POOLS: slis. "ALV Declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form build_fieldcatalog
* text
FORM build_fieldcatalog.
REFRESH fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'Select'.
fieldcatalog-seltext_m = 'Select please'.
fieldcatalog-checkbox = 'X'.
fieldcatalog-edit = 'X'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-hotspot = 'X'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
"Permet d'ajuster les colonnes au text
* gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
* i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = 'My Title'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE:/ sy-subrc.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* FORM SET_PF_STATUS *
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD_FULLSCREEN1'.
ENDFORM. "set_pf_status
*& Form user_command
* text
* -->R_UCOMM text
* -->RS_SELFIELDtext
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
CHECK rs_selfield-tabindex > 0.
IF rs_selfield-value EQ '6000000001'.
CALL TRANSACTION 'ZDF2'.
ENDIF.
WHEN 'REFRESH'.
PERFORM data_retrieval.
rs_selfield-refresh = 'X'.
ENDCASE.
ENDFORM. "user_command
Here is the Dum.
This error may occur for any of the following reasons:
- You address a typed field symbol before it is set using ASSIGN
- You address a field symbol that points to a line in an internal table
that has been deleted
- You address a field symbol that had previously been reset using
UNASSIGN, or that pointed to a local field that no longer exists
- You address a global function interface parameter, even
though the relevant function module is not active,
that is it is not in the list of active calls. You can get the list
of active calls from the this short dump.
Thanks for the help !
Best Regards.Hi David,
First of all you need to have the field "SELECT" as part of the internal table that you pass to the fm REUSE_ALV_GRID_DISPLAY.
Here,
DATA: BEGIN OF t_ekko,
<b> select,</b>
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF t_ekko.
And then in your field catalog prepare logic, give the field name in BOLD,
FORM build_fieldcatalog.
REFRESH fieldcatalog.
CLEAR fieldcatalog.
<b> fieldcatalog-fieldname = 'SELECT'.</b>
fieldcatalog-seltext_m = 'Select please'.
Hope this helps..
Sri -
hi all, i have a few problems here.
Firstly, i need to display records in an ALV from an internal table.
Secondly, i need to include checkboxes beside each and every records for the user to choose which records he wants to see.
Thirdly, after the user has checked the fieldss that he wants, i need to display the details of all the records based on the ticked checkboxes in another screen.
please help me if anyone knows.
thx!Hi Meei,
Thats very simple ....
1 . In the internal table where you are displaying declare some thing like below.
Data : begin of i_department occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Docu No
deprt like ztmsh-deprt, "Department
meala like ztmsd-meala, "Meal Allowance
sitea like ztmsd-sitea, "Site Allowance($)
CHECKBOX(1) TYPE C,declare some thing here for creating check box
end of i_department.
2. Build a field catlog for the check box something like below..
i_temp-fieldname = 'CHECKBOX'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-col_pos = 1.
i_temp-CHECKBOX = 'X'.
i_temp-outputlen = 4.
i_temp-seltext_l = 'Flag'.
i_temp-input = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
3. Now u can see the checkbox in the output once you select it will automatically flag in your internal table.and using the USer-command u can play around.
I have pasted a entire coding here pls check the flow.
REPORT Z_TIME_SHEET_REPT.
TABLES
Tables : ztmsh, "Time Sheet Header
ztmsd, "Time Sheet Data
zempy. "Employee
Data Definations
Internal Table for Employee input data
Data : begin of i_employee occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
empid like zempy-empid, "Employee ID
empnam(50) type c , "Employee Name
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
meala like ztmsd-meala, "Meal Allowance
sitea like ztmsd-sitea, "Site Allowance($)
end of i_employee.
Internal Table For Department Input Data
Data : begin of i_department occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
hlftm like ztmsd-hlftm, "1.5 Time
dbltm like ztmsd-dbltm, "Double Time
meala like ztmsd-meala, "Meal Allowance
sitea like ztmsd-sitea, "Site Allowance($)
CHECKBOX(1) TYPE C,
end of i_department.
Temp Internal tablee for holding department values
Data : begin of i_t_dept occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
end of i_t_dept.
internal table for detailed data
data : begin of i_detail occurs 0 ,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
cadsv like ztmsh-cadsv, "CAD Services
stsvy like ztmsh-stsvy, "SiteSurvey
cstdw like ztmsh-cstdw, "Construction Drawing
sppln like ztmsh-sppln, "Space Planning
dsndw like ztmsh-dsndw, "Design Drawings
drw3d like ztmsh-drw3d, "3D Drawings
dwplt like ztmsh-dwplt, "Drawing Plots
otamt like ztmsh-otamt, "Others
inact like ztmsh-inact, "In store Activity type
ictnq like ztmsh-ictnq, "In store Activity Quantity
inctn like ztmsh-inctn, "In store Activity Loading
mitim like ztmsh-mitim, "Movement Volume in Type
mivlm like ztmsh-mivlm, "Movement Volume in Loading
motim like ztmsh-motim, "Movement Volume Out Type
movlm like ztmsh-movlm, "Movement Volume Out Loading
outtm like ztmsh-outtm, "Out of Store Activity Type
outact like ztmsh-outact, "Out of Store Activity Loading
frklft like ztmsh-frklft, "Forklift
strpt like ztmsh-strpt, "Storage Protection
rbbsh like ztmsh-rbbsh, "Rubbish
crtes like ztmsh-crtes, "Crates
vhlhr like ztmsh-vhlhr, "Vechile
toll like ztmsh-toll, "Toll
park like ztmsh-park, "Parking
hrdwr like ztmsh-hrdwr, "Hardware
trlly like ztmsh-trlly, "# of Trollys
dolly like ztmsh-dolly, "# of Dollies
oepno like ztmsh-oepno, "# of Other Equipment
oteqp like ztmsh-oteqp, "Other Eqipment
end of i_detail.
ALV Field Catlog declaration
TYPE-POOLS : slis.
data : i_depart TYPE slis_t_fieldcat_alv,
i_emp TYPE slis_t_fieldcat_alv,
i_design TYPE slis_t_fieldcat_alv,
i_warehouse TYPE slis_t_fieldcat_alv,
i_transport TYPE slis_t_fieldcat_alv,
i_install TYPE slis_t_fieldcat_alv,
i_temp TYPE slis_fieldcat_alv,
l_layout TYPE slis_layout_alv.
Events
DATA: v_events TYPE slis_t_event,
wa_event TYPE slis_alv_event.
Tempary Variables
data: wa_nmltm type p decimals 2,
wa_ovrtm type p decimals 2,
wa_meala type p decimals 2,
wa_sitea type p decimals 2,
wa_HLFTM type p decimals 2,
wa_DBLTM type p decimals 2,
w_nmltm(5) type c,
w_ovrtm(5) type c,
w_meala(5) type c,
w_sitea(5) type c,
wa_first(25) type c,
wa_last(25) type c.
data : repid type sy-repid.
Selection Screen
*Select options
selection-screen begin of block blk1.
select-options : s_vbeln for ztmsh-vbeln,
s_tmsdt for ztmsh-tmsdt.
selection-screen end of block blk1.
Radio Buttons
selection-screen begin of block blk2 WITH FRAME TITLE TLT1.
Parameters: dept radiobutton GROUP SX,
emp radiobutton GROUP SX.
selection-screen end of block blk2.
Intialization
INITIALIZATION.
TLT1 = 'Time Sheet Summary Report'.
repid = sy-repid.
s_tmsdt-low = sy-datum.
s_tmsdt-high = sy-datum.
append s_tmsdt.
START-OF-SELECTION.
START-OF-SELECTION.
if dept = 'X'.
perform 100_time_sheet.
perform 200_build_field_catlog.
perform 400_ALV_Display.
elseif emp = 'X'.
perform 100_time_sheet.
perform 500_build_field_catlog.
Perform 600_ALV_display.
endif.
*& Form 100_time_sheet
text
FORM 100_time_sheet.
select * from ztmsh
where vbeln in s_vbeln
and tmsdt in s_tmsdt.
if ztmsh-vbeln ne space.
perform empl_calcuation .
if emp = 'X'.
clear i_employee.
elseif dept = 'X'.
clear i_department.
endif.
ENDIF.
endselect.
ENDFORM. " 100_time_sheet
*& Form 200_build_field_catlog
Department Wise Summary Report
FORM 200_build_field_catlog .
refresh i_depart.
i_temp-fieldname = 'CHECKBOX'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-col_pos = 1.
i_temp-fix_column = 'X'.
i_temp-CHECKBOX = 'X'.
i_temp-outputlen = 4.
i_temp-seltext_l = 'Flag'.
i_temp-input = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'VBELN'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'VBELN'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Work Order No'.
i_temp-col_pos = 2.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'DEPRT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'DEPRT'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Department'.
i_temp-col_pos = 3.
i_temp-outputlen = 15.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'TMSDT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'TMSDT'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Time Sheet Date'.
i_temp-col_pos = 4.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'JBCPL'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'JBCPL'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Time Sheet Status'.
i_temp-col_pos = 5.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'NMLTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'NMLTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total NH'.
i_temp-col_pos = 6.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'OVRTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'OVRTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total AH'.
i_temp-col_pos = 7.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'HLFTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'HLFTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total 1.5 Time'.
i_temp-col_pos = 8.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'DBLTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'DBLTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total 2.0 Time'.
i_temp-col_pos = 9.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'MEALA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'MEALA'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Tot Meal Allowence'.
i_temp-col_pos = 10.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'SITEA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'SITEA'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Tot Site Allowence($)'.
i_temp-col_pos = 11.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
ENDFORM. " 200_build_field_catlog
*& Form 300_populate_events
Top Of Page Events for Warehouse Report
FORM 300_populate_events .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = v_events.
READ TABLE v_events
INTO wa_event
WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc EQ 0.
wa_event-form = 'TOP_OF_PAGE'.
MODIFY v_events
FROM wa_event TRANSPORTING form
WHERE name = wa_event-form.
endif.
ENDFORM. " 300_populate_events
*& Form 400_ALV_Display
Department ALV Display
FORM 400_ALV_Display .
sort i_department by vbeln deprt tmsdt.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = 'PO_STATUS '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME = 'i_department'
IS_LAYOUT = l_layout
IT_FIELDCAT = i_depart
IT_EVENTS = v_events
TABLES
T_OUTTAB = i_department
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.
ENDFORM. " 400_ALV_Display
*& Form 500_build_field_catlog
Employee wise Summary Report
FORM 500_build_field_catlog .
refresh i_depart.
i_temp-ref_fieldname = 'VBELN'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'VBELN'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Work Order No'.
i_temp-col_pos = 1.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'DEPRT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'DEPRT'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Department'.
i_temp-col_pos = 2.
i_temp-outputlen = 15.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'TMSDT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'TMSDT'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Time Sheet Date'.
i_temp-col_pos = 3.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'JBCPL'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'JBCPL'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Time Sheet Status'.
i_temp-col_pos = 4.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'EMPID'.
i_temp-ref_tabname = 'ZEMPY'.
i_temp-fieldname = 'EMPID'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Employee ID'.
i_temp-col_pos = 5.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'JBCPL'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'EMPNAM'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Employee Name'.
i_temp-col_pos = 6.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'NMLTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'NMLTM'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Total NH'.
i_temp-col_pos = 7.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'OVRTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'OVRTM'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Total AH'.
i_temp-col_pos = 8.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'MEALA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'MEALA'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Tot Meal Allowence'.
i_temp-col_pos = 9.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'SITEA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'SITEA'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Tot Site Allowence($)'.
i_temp-col_pos = 10.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
ENDFORM. " 500_build_field_catlog
*& Form 600_ALV_display
Employee Wise ALV Display
FORM 600_ALV_display .
sort i_employee by vbeln deprt tmsdt.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = 'PO_STATUS '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME = 'i_employee'
IS_LAYOUT = l_layout
IT_FIELDCAT = i_emp
IT_EVENTS = v_events
TABLES
T_OUTTAB = i_employee
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.
ENDFORM. " 600_ALV_display
*& Form Po-Status.
FORM po_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZBUTTON' EXCLUDING rt_extab.
ENDFORM. "po_status
*& Form User_command.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
data : valid type i,
cnt like ztmsh-deprt.
clear i_department.
loop at i_department where CHECKBOX = 'X'.
on change of i_department-deprt.
if cnt ne space.
if valid ne 0.
message 'Please select same department' type 'I'.
valid = 2.
exit.
cnt = i_department-deprt.
endif.
endon.
valid = 1.
endloop.
if valid = 1.
case ucomm.
when 'DESIGN' .
perform transfer_table.
perform design_report.
perform des_build_field_catlog.
Perform design_ALV_display.
when 'WAREHOUSE'.
perform transfer_table.
perform design_report.
perform war_build_field_catlog.
perform 300_populate_events.
perform warehouse_ALV_display.
when 'TRANSPORT'.
perform transfer_table.
perform design_report.
perform tran_build_field_catlog.
perform top_of_page.
perform Transport_ALV_display.
when 'INSTALLAT'.
perform transfer_table.
perform design_report.
perform inst_build_field_catlog.
perform Install_ALV_display.
endcase.
elseif valid = 0.
message 'Please select a department' type 'I' .
endif.
endform. "user_command
*& Form empl_calcuation
Employee total hours calculation
FORM empl_calcuation .
data : w_hours(3) type C,
w_min(3) type c,
w_hours1(3) type c,
w_min1(3) type c,
w_hours2(3) type c,
w_min2(3) type c,
w_hours3(3) type c,
w_min3(3) type c,
w_hours4(3) type c,
w_min4(3) type c,
t_nmltm(5) type c,
t_ovrtm(5) type c,
t_meala(5) type c,
t_sitea(5) type c,
t_HLFTM(5) type c,
t_DBLTM(5) type c,
temp type i.
clear :wa_nmltm,
wa_ovrtm,
wa_meala,
wa_sitea,
wa_HLFTM,
wa_DBLTM.
To convert into Minutes
select * from ztmsd
where vbeln = ztmsh-vbeln
and tmsdt = ztmsh-tmsdt
and deprt = ztmsh-deprt.
*uncommenting the below code between the select and endselect will work
*for normal time scenario (eg: 2.55+3.55 =6.50) *
Normal Time
t_nmltm = ztmsd-nmltm.
SPLIT t_nmltm at '.' into w_hours w_min.
temp = w_hours.
w_hours = temp.
w_hours = w_hours * 60.
wa_nmltm = wa_nmltm + t_nmltm.
Over Time
t_ovrtm = ztmsd-ovrtm.
SPLIT t_ovrtm at '.' into w_hours1 w_min1.
temp = w_hours1.
w_hours1 = temp.
w_hours1 = w_hours1 * 60.
wa_ovrtm = wa_ovrtm + t_ovrtm.
Meal Allowence
t_meala = ztmsd-meala.
SPLIT t_meala at '.' into w_hours2 w_min2.
temp = w_hours2.
w_hours2 = temp.
w_hours2 = w_hours2 * 60.
wa_meala = wa_meala + t_meala .
Site Allowence
t_sitea = ztmsd-sitea.
wa_sitea = wa_sitea + t_sitea.
if dept = 'X'.
1.5 Time
t_HLFTM = ztmsd-HLFTM.
SPLIT t_HLFTM at '.' into w_hours3 w_min3.
temp = w_hours3.
w_hours3 = temp.
w_hours3 = w_hours3 * 60.
wa_HLFTM = wa_HLFTM + t_hlftm.
Double Time
t_DBLTM = ztmsd-DBLTM.
SPLIT t_DBLTM at '.' into w_hours4 w_min4.
temp = w_hours4.
w_hours4 = temp.
w_hours4 = w_hours4 * 60.
wa_DBLTM = wa_DBLTM + t_dbltm.
endif.
endselect.
if sy-subrc = 0.
uncommenting the below will work for normal time scenario
(eg: 2.55+3.55 =6.50)
and change in the appending coloum wa_ to t_
to convert into Hours
perform min_to_hrs_nmltm using wa_nmltm changing t_nmltm.
perform min_to_hrs_ovrtm using wa_ovrtm changing t_ovrtm.
perform min_to_hrs_meala using wa_meala changing t_meala.
perform min_to_hrs_sitea using wa_sitea changing t_sitea.
if emp = 'X'. "Report By Employee
Employee Id
select single empid deprt into ztmsd
from ztmsd
where vbeln = ztmsh-vbeln.
if sy-subrc = 0.
Employee Name
select single empye_f empye_l
into (wa_first,wa_last )
from zempy
where empid = ztmsd-empid.
if sy-subrc = 0 .
concatenate wa_first
wa_last
into i_employee-empnam.
Appending To internal Table
i_employee-empid = ztmsd-empid.
i_employee-deprt = ztmsh-deprt.
i_employee-nmltm = wa_nmltm.
i_employee-ovrtm = wa_ovrtm.
i_employee-meala = wa_meala.
i_employee-sitea = wa_sitea.
i_employee-vbeln = ztmsh-vbeln.
i_employee-tmsdt = ztmsh-tmsdt.
i_employee-jbcpl = ztmsh-jbcpl.
APPEND i_employee.
endif.
endif.
elseif dept = 'X'. "Report By Department
uncommenting the below will work for normal time scenario
(eg: 2.55+3.55 =6.50)
and change in the appending coloum wa_ to t_
perform min_to_hrs_HLFTM using wa_HLFTM changing t_HLFTM.
perform min_to_hrs_DBLTM using wa_DBLTM changing t_DBLTM.
Appending To internal Table
i_department-deprt = ztmsh-deprt.
i_department-nmltm = wa_nmltm.
i_department-ovrtm = wa_ovrtm.
i_department-meala = wa_meala.
i_department-sitea = wa_sitea.
i_department-vbeln = ztmsh-vbeln.
i_department-tmsdt = ztmsh-tmsdt.
i_department-jbcpl = ztmsh-jbcpl.
i_department-hlftm = t_hlftm.
i_department-dbltm = t_dbltm.
APPEND i_department.
endif.
endif.
ENDFORM. " empl_calcuation
*& Form min_to_hrs_nmltm
text
-->P_WA_NMLTM text
FORM min_to_hrs_nmltm USING P_WA_NMLTM
CHANGING P_T_nmltm.
data : hours(2) type c,
minutes_n(2) type c,
nmltm(10) type c.
if p_wa_nmltm >= 60.
hours = P_WA_NMLTM / 60.
endif.
minutes_n = P_WA_NMLTM MOD 60.
concatenate hours
minutes_n
into P_T_nmltm.
ENDFORM. " min_to_hrs_nmltm
*& Form min_to_hrs_ovrtm
text
FORM min_to_hrs_ovrtm USING P_WA_OVRTM
CHANGING P_T_OVRTM.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_ovrtm >= 60.
hours = P_WA_OVRTM / 60.
endif.
minutes_n = P_WA_OVRTM MOD 60.
concatenate hours
minutes_n
into P_T_OVRTM.
ENDFORM. " min_to_hrs_ovrtm
*& Form min_to_hrs_meala
FORM min_to_hrs_meala USING P_WA_meala
CHANGING P_T_MEALA.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_meala >= 60.
hours = P_WA_meala / 60.
endif.
minutes_n = P_WA_meala MOD 60.
concatenate hours
minutes_n
into P_T_meala.
ENDFORM. " min_to_hrs_meala
*& Form min_to_hrs_sitea
FORM min_to_hrs_sitea USING P_WA_sitea
CHANGING P_T_SITEA.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_sitea >= 60.
hours = P_WA_sitea / 60.
endif.
minutes_n = P_WA_sitea MOD 60.
concatenate hours
minutes_n
into P_T_sitea.
ENDFORM. " min_to_hrs_sitea
*& Form min_to_hrs_HLFTM
FORM min_to_hrs_HLFTM USING P_WA_HLFTM
CHANGING P_T_HLFTM.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_hlftm >= 60.
hours = P_WA_HLFTM / 60.
endif.
minutes_n = P_WA_HLFTM MOD 60.
concatenate hours
minutes_n
into P_T_HLFTM.
ENDFORM. " min_to_hrs_HLFTM
*& Form min_to_hrs_DBLTM
FORM min_to_hrs_DBLTM USING P_WA_DBLTM
CHANGING P_T_DBLTM.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_dbltm >= 60.
hours = P_WA_DBLTM / 60.
endif.
minutes_n = P_WA_DBLTM MOD 60.
concatenate hours
minutes_n
into P_T_DBLTM.
ENDFORM. " min_to_hrs_DBLTM
*& Form design_report
FORM design_report .
select * into corresponding fields of table i_detail
from ztmsh for all entries in i_t_dept
where vbeln = i_t_dept-vbeln
and deprt = i_t_dept-deprt
and tmsdt = i_t_dept-tmsdt .
loop at i_detail.
read table i_t_dept with key vbeln = i_detail-vbeln
deprt = i_detail-deprt
tmsdt = i_detail-tmsdt .
if sy-subrc = 0.
i_detail-nmltm = i_t_dept-nmltm.
i_detail-ovrtm = i_t_dept-ovrtm.
modify i_detail.
endif.
endloop.
ENDFORM. " design_report
*& Form transfer_table
Doin some operation using the checkbox
FORM transfer_table .
clear i_t_dept[].
loop at i_department where checkbox = 'X'.
move-corresponding : i_department to i_t_dept.
append i_t_dept.
endloop.
ENDFORM. " transfer_table
Regards,
karthik.
Edited by: karthikeyan sukumar on Jan 3, 2008 9:46 AM -
Hi
In the previous version of photoshop I was able to superimpose images of brightfield and darkfield insitu hybridization. I would adjust both images to same size and resolution. The darkfield image I would change the hue saturation to red so that now all the brighspots appeared red. Then I would open a new photoshop image and then drag the brightfield first into the new panel and then drag the red darkfield image on the brightfield. So now you can only see the red dark field layer on the top, THen using range I would select the bright red spots on the dark field and press delete. This would keep all the dark red spots on the brightfield image and all the other dark spots from the dark filed would disappear. This way I would superimpose all the brightest red spots from the dark field image on the brightfield image and this way I would get red signals on the bluish brightfiled image. I am unable to do this using photoshop on CS6. I am pasting the darkfiled image on the brightfield image (rather than dragging them) . Then using range when I choose the color range and then hit delete button I am unable to clear the unwanted dark field sections. Can anybody tell me what I should do on the new Adobe photoshop 6 (64 bits).
ThanksThat question may be better answered with a goolge search. It not something most Photoshop users would be doing. More science then normal image processing.
-
Is it possible to have sorting by group and checkboxes in the same ALV
Hi there,
Does anyone know whether it is possible to have sorting and group on one field in ALV and checkboxes set on another field in ALV?
eg.
Fieldname
===========
Name----
Text
Allowance----
Numeric -> Sort & Group
Verified----
Checkbox
How do I code it if it is possible to have grouping and check box all in one ALV. Meaning I want some data that are the same to merge using sort, while still having the checkbox available for my other field (Verified).
Thanks in advance.
Lawrencehi,
GROUP BY clause is used on database tables with select statement.
sort is used on internal tables.
can u clearly explain y u need group by and sort on the same field.
if u are extracting from dbtable using grou by clause on a field, then no need to sort it again.
if u want sort u can do it by giveing "sort itab by field". thats not a problem.
now coming to check box.instead of using SLIS type field catalog, u use LVC type.
in LVC_S_LAYO, u can fine box_fname.
while defining layout, u declare a variable of type LVC_S_LAYO
AND GIVE BOX_FNAME = internal table field name -
What are the function modules used in interactive ALV and parameters?
what are the function modules used in interactive ALV and parameters?
hi sunil
check these links,
About ALV:
http://www.geocities.com/mpioud/Abap_programs.html
ALV Group Heading
http://www.sap-img.com/fu037.htm
and few more,
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
also run the folowing code and see
check this sample code.you will be well versed with all the events of a interactive alv report.mark points if useful.
*& Report ZALV4_INTERACTIVE *
*& interactive alvs *
REPORT ZALV4_INTERACTIVE NO STANDARD PAGE HEADING
MESSAGE-ID ZMSG
LINE-COUNT 37(3)
LINE-SIZE 134.
TYPE-POOLS : SLIS.
TABLES DECLARATION ********************
TABLES : VBRK, " BILLING MASTERS TABLE
VBRP. " BILLING ITEM TABLE
TYPES DECLARATION ********************
TYPES : BEGIN OF TY_VBRK, " types for billing masters table
VBELN TYPE VBRK-VBELN, " billing document
WAERK TYPE VBRK-WAERK, " document currency
VKORG TYPE VBRK-VKORG, " sales organization
FKDAT TYPE VBRK-FKDAT, " billing date
BUKRS TYPE VBRK-BUKRS, " company code
BUTXT TYPE T001-BUTXT, " company name
NETWR TYPE VBRK-NETWR, " net currency value
LINE_COLOR(4) TYPE C,
END OF TY_VBRK.
TYPES : BEGIN OF TY_VBRP, " types for billing document item data
POSNR TYPE VBRP-POSNR, " billing item
FKIMG TYPE VBRP-FKIMG, " actual invoiced quantitty
VRKME TYPE VBRP-VRKME, " sales unit
NETWR TYPE VBRP-NETWR, " net currency value
MATNR TYPE VBRP-MATNR, " material number
ARKTX TYPE VBRP-ARKTX, " short text for sales order item
END OF TY_VBRP.
FIELD CATALOG ********************
DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
LAYOUT DECLARATION ********************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV.
EVENTS DECLARATION ********************
DATA : TY_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_EVENT.
PF STATUS ********************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
USER COMMAND ********************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
INTERNAL TABLES ********************
DATA : IT_VBRK TYPE TABLE OF TY_VBRK, "internal table for billing master
IT_VBRP TYPE TABLE OF TY_VBRP, "internal table for billing item
*internal table for field catalog
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
WORK AREA ********************
DATA : WA_VBRK LIKE LINE OF IT_VBRK, "work area for billing master
WA_VBRP LIKE LINE OF IT_VBRP. "work area for billing item
VARIABLE DECLARATION ********************
DATA : V_DATE TYPE SY-DATUM, " variable to store date values
V_VBELN TYPE VBRK-VBELN, " variable for billing document
V_FKDAT TYPE VBRK-FKDAT, " variable for billing date
V_FLAG(1). " variable for flag
SELECTION SCREEN ********************
SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN , " Billing document
S_FKDAT FOR VBRK-FKDAT, " Billing date
S_MATNR FOR VBRP-MATNR. " Material number
PARAMETERS : R1 RADIOBUTTON GROUP G1, "whole item details
R2 RADIOBUTTON GROUP G1. "selected item details
INITIALIZATION ********************
INITIALIZATION.
V_FLAG = 'X'.
V_DATE = SY-DATUM - 20.
S_FKDAT-SIGN = 'I'.
S_FKDAT-OPTION = 'EQ'.
S_FKDAT-LOW = V_DATE.
S_FKDAT-HIGH = SY-DATUM.
APPEND S_FKDAT.
SELECTION SCREEN VALIDATION ********************
AT SELECTION-SCREEN.
PERFORM CONVERSION. " performs data conversion for input
PERFORM VBELN_VALIDATE. " validating the billing document
PERFORM FKDAT_VALIDATE. " validating the billing date
START OF SELECTION ********************
START-OF-SELECTION.
SET TITLEBAR 'AAAA'.
PERFORM VBRK_POPULATE. " populating the billing master detais
PERFORM FIELDCATALOG. " designing the field catalog
PERFORM EVENTS. " performing the events for top of page
PERFORM DISP_BASICLIST." displaying the basic list
*& Form VBELN_VALIDATE
text validating the billing document
--> p1 text
<-- p2 text
FORM VBELN_VALIDATE .
IF S_VBELN IS INITIAL.
MESSAGE E000 WITH 'Make entries in all required fields'.
ELSE.
SELECT SINGLE VBELN
FROM VBRK
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH 'BILLING DOCUMENT DOESNT EXIST'.
ENDIF.
ENDIF.
ENDFORM. " VBELN_VALIDATE
*& Form FKDAT_VALIDATE
text validating the billing date
--> p1 text
<-- p2 text
FORM FKDAT_VALIDATE .
SELECT SINGLE FKDAT
FROM VBRK
INTO V_FKDAT
WHERE FKDAT IN S_FKDAT.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH 'BILLING DATE DOESNT EXIST'.
ENDIF.
ENDFORM. " FKDAT_VALIDATE
*& Form VBRK_POPULATE
text populating the billing master details
--> p1 text
<-- p2 text
FORM VBRK_POPULATE .
DATA : LD_COLOR(1) TYPE C.
LD_COLOR = 5.
SELECT VBRK~VBELN
VBRK~WAERK
VBRK~VKORG
VBRK~FKDAT
VBRK~BUKRS
VBRK~NETWR
T001~BUTXT
FROM VBRK INNER JOIN T001
ON VBRKBUKRS = T001BUKRS
INTO CORRESPONDING FIELDS OF TABLE IT_VBRK
WHERE VBRK~VBELN IN S_VBELN AND
VBRK~FKDAT IN S_FKDAT.
LOOP AT IT_VBRK INTO WA_VBRK.
LD_COLOR = LD_COLOR + 1.
IF LD_COLOR = 8.
LD_COLOR = 1.
ENDIF.
CONCATENATE 'C' LD_COLOR '10' INTO WA_VBRK-LINE_COLOR.
MODIFY IT_VBRK FROM WA_VBRK.
ENDLOOP.
ENDFORM. " VBRK_POPULATE
*& Form CONVERSION
text data conversion to take leading zeroes into account
--> p1 text
<-- p2 text
FORM CONVERSION .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = S_VBELN
IMPORTING
OUTPUT = S_VBELN.
ENDFORM. " CONVERSION
*& Form DISP_BASICLIST
text displaying the basic list
--> p1 text
<-- p2 text
FORM DISP_BASICLIST .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT =
IT_EVENTS = IT_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBRK
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.
ENDFORM. " DISP_BASICLIST
*& Form FIELDCATALOG
text designing the field catalog
--> p1 text
<-- p2 text
FORM FIELDCATALOG .
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-SELTEXT_L = 'BILLING DOCUMENT'.
WA_FIELDCAT-COL_POS = 1.
WA_FIELDCAT-EMPHASIZE = 'C610'.
WA_FIELDCAT-KEY = 'X'.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'WAERK'.
WA_FIELDCAT-SELTEXT_L = 'DOCUMENT CURRENCY'.
WA_FIELDCAT-COL_POS = 2.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'VKORG'.
WA_FIELDCAT-SELTEXT_L = 'SALES ORGANIZATION'.
WA_FIELDCAT-EMPHASIZE = 'C610'.
WA_FIELDCAT-COL_POS = 3.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'FKDAT'.
WA_FIELDCAT-SELTEXT_L = 'BILLING DATE'.
WA_FIELDCAT-COL_POS = 4.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_L = 'COMPANY CODE'.
WA_FIELDCAT-COL_POS = 5.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'BUTXT'.
WA_FIELDCAT-SELTEXT_L = 'COMPANY NAME'.
WA_FIELDCAT-COL_POS = 6.
WA_FIELDCAT-OUTPUTLEN = 25.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'NETWR'.
WA_FIELDCAT-SELTEXT_L = 'NET CURRENCY VALUE'.
WA_FIELDCAT-COL_POS = 7.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
ENDFORM. " FIELDCATALOG
*& Form SET_PF_STATUS
text set the pf status
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'Z50658_PFSTATUS' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text set the user command
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'CLICK'.
IF R1 = 'X'.
IF NOT IT_VBRK IS INITIAL.
SELECT POSNR
FKIMG
VRKME
NETWR
MATNR
ARKTX
FROM VBRP
INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
FOR ALL ENTRIES IN IT_VBRK
WHERE VBELN = IT_VBRK-VBELN.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH ' NO BILLING DETAILS FOUND'.
ELSE.
IF V_FLAG = 'X'.
PERFORM DET_FIELDCATALOG.
V_FLAG = ''.
ENDIF.
PERFORM DET_LISTDISPLAY.
ENDIF.
ENDIF.
ENDIF.
IF R2 = 'X'.
READ TABLE IT_VBRK INTO WA_VBRK INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE POSNR
FKIMG
VRKME
NETWR
MATNR
ARKTX
FROM VBRP
INTO CORRESPONDING FIELDS OF WA_VBRP
WHERE VBELN = WA_VBRK-VBELN.
ENDIF.
APPEND WA_VBRP TO IT_VBRP.
ENDIF.
IF V_FLAG = 'X'.
PERFORM DET_FIELDCATALOG. "designing the field catalog for items
V_FLAG = ''.
ENDIF.
PERFORM DET_LISTDISPLAY. "displaying the secondary list
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'UP'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL'.
CALL TRANSACTION 'SE38'.
ENDCASE.
ENDFORM. "SET_USER_COMMAND
*& Form DET_FIELDCATALOG
text designing the field catalog for item details
--> p1 text
<-- p2 text
FORM DET_FIELDCATALOG .
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'POSNR'.
WA_FIELDCAT1-SELTEXT_L = 'BILLING ITEM'.
WA_FIELDCAT1-COL_POS = 1.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'FKIMG'.
WA_FIELDCAT1-SELTEXT_L = 'INVOICE QUANTITY'.
WA_FIELDCAT1-COL_POS = 2.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'VRKME'.
WA_FIELDCAT1-SELTEXT_L = 'SALES UNIT'.
WA_FIELDCAT1-COL_POS = 3.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'NETWR'.
WA_FIELDCAT1-SELTEXT_L = 'NET CURRENCY VALUE'.
WA_FIELDCAT1-COL_POS = 4.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'MATNR'.
WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUMBER'.
WA_FIELDCAT1-COL_POS = 5.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'ARKTX'.
WA_FIELDCAT1-SELTEXT_L = 'SALES ORDER ITEM'.
WA_FIELDCAT1-COL_POS = 6.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_LAYOUT1-ZEBRA = 'X'.
ENDFORM. " DET_FIELDCATALOG
*& Form DET_LISTDISPLAY
text displaying the secondary list
--> p1 text
<-- p2 text
FORM DET_LISTDISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT1
IT_FIELDCAT = IT_FIELDCAT1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = IT_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBRP
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.
CLEAR IT_VBRP[].
ENDFORM. " DET_LISTDISPLAY
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR TY_EVENTS.
TY_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
TY_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND TY_EVENTS TO IT_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
SKIP.
ULINE.
WRITE :/2 ' DATE :', SY-DATUM,
45 'INTELLIGROUP ASIA PVT LTD',
110 'TIME :', SY-UZEIT.
WRITE : /3 'USER :', SY-UNAME,
45 'TITLE :', SY-TITLE,
110 'PAGE :', SY-PAGNO.
ULINE.
SKIP.
ENDFORM. "TOP_OF_PAGE
Cheers
navjot
Reward with points if it is helpful
Message was edited by:
navjot sharma -
Question on Dynamic Select Lists and Checkboxes
Hello,
I am new to APEX, and this is my first posting, I have a question about how to implement dynamic checkboxes from a select list.
Basically I would have a select list, and based on what item is selected a set of checkboxes would appear.
I was originally using the Select and Submit property on the select box, which works fine, all of the checkboxes appear appropriately. But the thing is, APEX refreshes the page each time, and since this select box is lower in the page, the user would have to scroll all the way down to where they were before.
The main requirement is so that the user won't have to scroll down the that position where the select box is each time they select a new option.
So a work around attempt is to create a javascript that will automatically scroll down to that position on page load ...
i.e.
function pageScroll() {
window.scrollBy(0,50);
But that didn't work, because for some reason the javascript wasn't appearing.
Is there a way to either:
1. Have a dynamic checkbox appear using ajax? -or-
2. Have the javascript scrolling effect
Sorry if this is a confusing question, I was wondering if anyone else came across this issue.
Thanks in advance!!Since this Select List plays such an important role on the page, why not create a side-region and put that select list there so you don't have to overwhelm the user and his 'persistence of vision ' with a page that scrolls all by itself to the 1000th line to, then , change the options ?
just an idea. -
How to make checkbox to be pre-selected in ALV
Hi all!
I`m creating ALV report and I want to create checkbox in the first column of the row. So I have a field SEL(1) in my structure and I`ve made the fieldcat:
gs_fcat-col_pos = 5.
gs_fcat-coltext = 'Check'.
gs_fcat-fieldname = 'SEL'.
gs_fcat-tabname = 'GT_TREE9001'.
gs_fcat-outputlen = 10.
gs_fcat-checkbox = 'X'.
gs_fcat-edit = 'X'.
That works, checkbox is displayed.
But now I need to make all the checkboxes to be checked for the first start of my program.
I mean when user executes my report all the checkboxes must be checked by default.
I have tried to do following:
loop at gt_tree9001.
gs_tree9001-sel = 'X'.
modify gt_tree9001 from gs_tree9001.
endloop.
But it doesnt work, I now see checkbox and mark 'X' near but not the checked ckeckbox.
Any help appreciated!Solved.
My final code:
data: lv_tree_size TYPE i,
ls_layout_item TYPE lvc_s_laci,
lt_layout_item TYPE lvc_t_laci,
lv_ind TYPE LVC_INDEX.
CLEAR ls_layout_item.
ls_layout_item-fieldname = 'SEL'.
ls_layout_item-class = cl_gui_column_tree=>item_class_checkbox.
ls_layout_item-editable = 'X'.
ls_layout_item-u_class = 'X'.
ls_layout_item-u_editable = 'X'.
ls_layout_item-u_chosen = 'X'.
ls_layout_item-chosen = 'X'.
append ls_layout_item to lt_layout_item.
call method g_tree9001->set_table_for_first_display
EXPORTING
i_save = 'A'
is_variant = ls_variant
CHANGING
it_sort = gt_sort9001
it_outtab = gt_tree9001
it_fieldcatalog = gt_treefcat9001.
DESCRIBE TABLE gt_tree9001 LINES lv_tree_size.
DO lv_tree_size TIMES.
CALL METHOD G_TREE9001->CHANGE_LAYOUT
EXPORTING
I_OUTTAB_INDEX = sy-index
IT_ITEM_LAYOUT = lt_layout_item .
ENDDO.
The main trick is in u_class, u_editable, u_chosen. These params say that layout should be changed. Only this way it will work.
And some helpful links:
ALV tree get selected checkbox
Checkbox ALV Tree CL_GUI_ALV_TREE
ALV TREE-Checkbox
CL_GUI_ALV_TREE and Checkboxes
Report BCALV_TREE_ITEMLAYOUT is also very helpful. -
Methods used in cl_gui_custom_container for ALV and for what purpose
Methods used in cl_gui_custom_container for ALV and for what purpose and i want the exact senario for the usage of those method?
2. What events are used in ALV?
I anyone help me please,
Points will be awarded.
Thank you & Regards,
Jagrut BharatKumar Shuklahey,
look at this sample code....
TABLES: SFLIGHT.
G L O B A L I N T E R N A L T A B L E S
DATA: GI_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT.
G L O B A L D A T A
DATA: OKCODE LIKE SY-UCOMM,
G_WA_SFLIGHT LIKE SFLIGHT.
Declare reference variables to the ALV grid and the container
DATA:
GO_GRID TYPE REF TO CL_GUI_ALV_GRID,
GO_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
SET SCREEN '0100'.
*& Module USER_COMMAND_0100 INPUT
MODULE USER_COMMAND_0100 INPUT.
CASE OKCODE.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
MODULE STATUS_0100 OUTPUT.
Create objects
IF GO_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT GO_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = 'ALV_CONTAINER'.
CREATE OBJECT GO_GRID
EXPORTING
I_PARENT = GO_CUSTOM_CONTAINER.
PERFORM LOAD_DATA_INTO_GRID.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Form load_data_into_grid
FORM LOAD_DATA_INTO_GRID.
Read data from table SFLIGHT
SELECT *
FROM SFLIGHT
INTO TABLE GI_SFLIGHT.
Load data into the grid and display them
CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
CHANGING
IT_OUTTAB = GI_SFLIGHT.
ENDFORM. " load_data_into_grid
<b>* the Events are</b>
ITEM_DATA_EXPAND, REPREP_SEL_MODIFY, CALLER_EXIT, USER_COMMAND, TOP_OF_PAGE, DATA_CHANGED, TOP_OF_COVERPAGE, END_OF_COVERPAGE, FOREIGN_TOP_OF_PAGE, FOREIGN_END_OF_PAGE, PF_STATUS_SET, LIST_MODIFY, TOP_OF_LIST, END_OF_PAGE, END_OF_LIST,AFTER_LINE_OUTPUT, BEFORE_LINE_OUTPUT, SUBTOTAL_TEXT, CONTEXT_MENU.
<b>the methods used with the class CL_GUI_CUSTOM_CONTAINER are as follows......</b>
IF_CACHED_PROPGET_NEXT_PROP, IF_CACHED_PROPSEEK_FIRST_PROP, IF_CACHED_PROP~SET_PROP, IS_VALID, FREE, GET_PROPERTY, SET_PROPERTY, CALL_METHOD, ASSIGN_PROPERTY, CALL_METHOD_RESULT_GUI_OBJECT, GET_PROPERTY_GUI_OBJECT, IS_CACHED_PROP, ADD_CACHE_PROP, REMOVE_CACHE_PROP, GET_CACHE_PROP, SET_CACHE_PROP, IS_CACHE_VALID, INVALIDATE_CACHE, GET_FOCUS, SET_FOCUS, SET_NAME, GET_NAME, GET_ENABLE, SET_ENABLE, DISPATCH, FINALIZE, GET_ADJUST_DESIGN, GET_GRID_HANDLE, GET_GRID_STEP, GET_HEIGHT, GET_LEFT, GET_METRIC, GET_MODE, GET_REGISTERED_EVENTS, GET_TOP, GET_VISIBLE, GET_WIDTH, IS_ALIVE, REG_EVENT_LEFT_CLICK_DESIGN, REG_EVENT_LEFT_CLICK_RUN_MODE, REG_EVENT_MOVE_CONTROL, REG_EVENT_RIGHT_CLICK, REG_EVENT_SIZE_CONTROL, SET_ADJUST_DESIGN, SET_ALIGNMENT, SET_GRID_HANDLE, SET_GRID_STEP, SET_HEIGHT, SET_LEFT, SET_METRIC, SET_MODE, SET_POSITION, SET_REGISTERED_EVENTS, SET_TOP, SET_VISIBLE, SET_WIDTH, GET_PATH, CONTROL_REGISTER_EVENT, CONTROL_UNREGISTER_EVENT, GET_EVENT_PARAMETER, GET_REGISTERED_EVENTS_EX, GET_WINDOW_PROPERTY, INIT_CONTROL, INIT_CONTROL_WITH_HWND, REGISTER_CACHED_PROPERTY, REGISTER_CACHED_W_PROPERTY, SET_REGISTERED_EVENTS_EX, SET_WINDOW_PROPERTY, UNREGISTER_CACHED_PROPERTY, UNREGISTER_CACHED_W_PROPERTY, GET_CONTAINER_TYPE, RESIZE, GET_INNER_WIDTH, LINK, GET_LINK_INFO, GET_INNER_HEIGHT, SET_MODE_FOR_ALL, GET_DYNPRO_CONTAINER, GET_FRAME_CONTAINER, GET_CHILD, ADD_CHILD, REMOVE_CHILD, REMOVE_ALL_CHILDREN, CONSTRUCTOR. -
What are function modules used in alv,and its explanation
what are function modules used in alv,and its explanation
hi..
The important function modules are
Reuse_alv_fieldcatalog_merge
Reuse_alv_list_display
Reuse_alv_events_get
Reuse_alv_grid_display
Reuse_alv_commentary_write.
<b>REUSE_ALV_FIELDCATALOG_MERGE</b>
This function module is used to populate a field catalog which is essential to display the data in ALV.
If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter (I_structure_name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
Note : Fieldcatalog can be filled manually also by filling up all the required details into the internal table
The important parameters are:
1. Export:
a. I_program_name : report id
b. I_internal_tabname : the internal output table
c. I_inclname : include or the report name where all
the dynamic forms are handled.
2. Changing
ct_fieldcat : an internal table with the type
SLIS_T_FIELDCAT_ALV which is declared in the
type pool SLIS.
<b>REUSE_ALV_LIST_DISPLAY</b>
This is the function module which prints the data.
The important parameters are:
1. Export:
I_callback_program : report id
I_bypassing_buffer : X
I_buffer_active :
I_callback_pf_status_set : routine where a user can set
his own pf status or change the
functionality of the existing pf status.
I_callback_user_command : routine where the function codes are
handled.
I_structure name : name of the dictionary table
Is_Layout : structure to set the layout of the report
It_fieldcat : internal table with the list of all fields and their
attributes which are to be printed (this table
can be populated automatically by the function
REUSE_ALV_FIELDCATALOG_MERGE
It_events : internal table with a list of all possible events
of ALV and their corresponding form names.
2. Tables:
a. t_outtab : internal table with the data to be output
<b>REUSE_ALV_EVENTS_GET: </b>
Returns table of possible events for a a list type
1. Import:
Et_Events :
The event table is returned with all possible CALLBACK events for the specified list type (column NAME). For events to be processed by the Callback, their FORM field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field FORM filled and the entry modified using constants from the type pool SLIS.
2. Export:
I_list_type:
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchical-sequential list
REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
<b>REUSE_ALV_GRID_DISPLAY</b>
A new function from 4.6 version, to display the results in grid rather than a
preview.
Parameters : same as reuse_alv_list_display
<b>REUSE_ALV_COMMENTARY_WRITE</b>
This is used in the Top-of-page event to print the headings and other
comments for the list.
It_list_commentary : Internal table with the headings of the type
slis_t_listheader.
This internal table has three fields:
Typ : H - header, S - selection, A - action
Key : only when typ is S.
Info : the text to be printed
<b>plz reward pts if helpful.</b>
regards
vijay. -
I just watched the tutorial and did exactly what it was telling me to do, and I still can't get it done. Once I have selected the file, I get a box that pops up that says "Subscribe now to convert unlimited number of files to PDFs. Subscribe Now. I already have done this! I am a subscriber! Arrrrhhhgggg!
Hello Kathie,
Please let me know what exactly are you trying to do using Adobe online service.
You might try accessing the same service for some other PDFs and check.
Have you signed up correctly at "https://cloud.acrobat.com/" using your Adobe ID credentials.
If the same message pops up, then please visit Contact Customer Care as they could let you know if there is any problem with your account.
Hope to get your response.
regards,
Anubha -
My iPod touch 4G 8GB, lets me download apps on iTunes, but when I go to my iPod, and then apps, the entire selection is grey and won't let me click my new apps to add to my iPod. Usually I just restore my ipod and re-download everything, but thats time consuming, and after I unplug my ipod from the cord connected to my computer, I can replug it right after and this will pop up again. I'm getting tired of doing this.
Like I said, it will let me download the apps off iTune, just when I come to my apps page on my ipod, it won't let me add it to my iPod. I can't download it straight from my ipod either, but iTunes doesn't work on my ipod, and when I update my apps, when they're in waiting they never move. What can I do?I would say that you are not connected to the iTunes library you last synced with. You can only sync with one iTunes library. If you connect the iPod to another computer/another iTunes library then you get what you see.
You can only manually manage music and videos among different libraries, not apps. -
I downloaded Yosemite OS X and when I try to select my HD (the disk) where I want to install it, the hard drive doesn't have enough space. I have a MacBook Pro bought in 2008. What can I do and still have all my files? I haven't backed up...
Freeing Up Space on The Hard Drive
1. See Lion/Mountain Lion/Mavericks' Storage Display.
2. You can remove data from your Home folder except for the /Home/Library/ folder.
3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
4. Also see Freeing space on your Mac OS X startup disk.
5. See Where did my Disk Space go?.
6. See The Storage Display.
You must Empty the Trash in order to recover the space they occupied on the hard drive.
You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.
I recommend that you also make a backup before proceeding. Just quit the installer.
Maybe you are looking for
-
Planning Locale: en_US ,unable to load dimension.
Hi, When i load meta data by command prompt,after enter password.I faced following issue. Any help will be appreciated. Planning locale: en_US using java.library.path: C:\Oracle\Middleware\EPMSystem11R1/products/Planning/li b64 EPM_ORACLE_HOME (C:\Or
-
*Hi Experts,* *This is kalyan and i am facing a issue in BI 7.20 VER from past 1 week am not able to solve.* *this issue is process chain scheduled daily basis and process chain getting failed failed from 01-01-2011 to till date* *but records availab
-
How to get current datetime in KQL
I need to create the following KQL query: {SearchBoxQuery} ManagedProperty1 > DateTime.Now What should I write instead of DateTime.Now? I had searched a lot for an answer in Bing and here before I posted this question. Any Idea?
-
How to maximise the length of the Parameter text on Selection screen
Hello, I am putting the text in the selection screen for a Parameter. Its text is long and it is not letting me to put the whole text in Text Symbol. In the report When I click on GOto--> Text Elements --> Selection Texts I am sure there is a way w
-
IWork '09 - no update in App Store for me
On the first upon Mavericks installation launch of Pages, Keynote and Numbers (iWork '09) I got the pop-up message that new versions are available. After clicking on Update button the App Store started but showed no updates available. What gives? I'm