Initially Checked a Checkbox in an ALV
Hi experts,
I've this...
FIELDCATALOG-FIELDNAME = 'CHK'.
FIELDCATALOG-SELTEXT_M = 'Genera BI'.
FIELDCATALOG-TABNAME = 'ITAB_DATOS'.
FIELDCATALOG-COL_POS = 1.
FIELDCATALOG-INPUT = 'X'.
FIELDCATALOG-EDIT = 'X'.
FIELDCATALOG-CHECKBOX = 'X'.
FIELDCATALOG-value = 'X'.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
How can I put this checkbox initially checked?
Thanks a lot
Regards,
Rebeca
In your table update the FIeld CHK with the value 'X' for all the records to bring the initial checked checkboxes.
You can use this type of code to set the CHK to 'X' for all the records.
wa_DATOS-CHK = 'X'.
MODIFY ITAB_DATOS FROM WA_DATOS
TRASNSPORTING CHK
WHERE CHK IS INITIAL.
Regards,
Naimesh Patel
Similar Messages
-
Checkbox field in ALV for REUSE_ALV_GRID_DISPLAY
how to handle Checkbox field in ALV for REUSE_ALV_GRID_DISPLAY????
For example Alv has displayed 400 entries if user checks 4 entries and wants to donwload only those 4 entries from ALV using Copy to local file option then how should it be done. please provide some help...REPORT YHRMR_LTC_TAXABLE NO STANDARD PAGE HEADING LINE-SIZE 120.
TYPE-POOLS: SLIS.
Start of Data Declaration *
DATA: G_PLVAR TYPE PLVAR.
DATA: P_MONTH TYPE TFMATAGE.
DATA: TOTAL_NO TYPE I.
DATA: TOTAL_NO_SUM TYPE I.
DATA: COUNT_15 TYPE I.
DATA: COUNT_15_SUM TYPE I.
DATA: COUNT_LTC TYPE I.
DATA: COUNT_LTC_SUM TYPE I.
DATA: COUNT_ERROR_IT15 TYPE I.
DATA: COUNT_ERROR_IT15_SUM TYPE I.
DATA: COUNT_ERROR_LTC TYPE I.
DATA: COUNT_ERROR_LTC_SUM TYPE I.
DATA: COUNT_ENTRY_IT15 TYPE I.
DATA: COUNT_ENTRY_IT15_SUM TYPE I.
--LOCAL TABLE TYPE--
DATA: T_DATA_LTC LIKE YHRMT_LTC OCCURS 0 WITH HEADER LINE.
DATA: T_DATA_LTC_NEW LIKE YHRMT_LTC OCCURS 0 WITH HEADER LINE.
DATA: T_PA0015 LIKE PA0015 OCCURS 0 WITH HEADER LINE.
DATA: T_P0015 LIKE PA0015 OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF T_FINAL OCCURS 0,
CHECK_BOX(1),
MANDT TYPE MANDT,
PERNR TYPE PERSNO,
ABKRS TYPE ABKRS,
PERSK TYPE PERSK,
WAGETYPE TYPE LGART,
LTCSTART TYPE YAJAHR,
LTCEND TYPE YYAJAHR,
FLAG TYPE YCHAR1,
SEQNR TYPE SEQNR,
LEVSTART TYPE URBEG,
LEVEND TYPE BDATU_052R,
PAYDATE TYPE YBEGDA,
AMOUNTPAY TYPE AMUNT,
TAXYR TYPE PHK_TAXYR,
DOCUNO TYPE YCHAR20,
DOCUDATE TYPE YENDDA,
VOUCHNO TYPE YCHAR20,
APDATE TYPE BPS_APPDA,
CANCEL_MOD TYPE YCANCELMOD,
LTC_IND TYPE ATZH1,
APPL_TAG TYPE YAPPTAG,
CANCEL_DATE TYPE AEDTM,
CANCEL_USER TYPE AENAM,
LASTCHANGE TYPE AEDTM,
USERNAME TYPE AENAM,
END OF T_FINAL.
DATA: BEGIN OF T_PA0001 OCCURS 0,
PERNR LIKE PA0001-PERNR,
ABKRS LIKE PA0001-ABKRS,
END OF T_PA0001.
--Message Part Declaration--
DATA: BEGIN OF T_SUCCESS OCCURS 0,
PERNR TYPE PERSNO,
MESSAGE(50) TYPE C,
END OF T_SUCCESS.
DATA: BEGIN OF T_ERROR OCCURS 0,
PERNR TYPE PERSNO,
MESSAGE(50) TYPE C,
END OF T_ERROR.
--TABLE TYPE OF SLIS TYPE-GROUP--
DATA: G_FLD TYPE SLIS_T_FIELDCAT_ALV,
G_EV TYPE SLIS_T_EVENT,
G_SORT TYPE SLIS_T_SORTINFO_ALV,
G_LST TYPE SLIS_T_LISTHEADER.
DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
GD_LAYOUT TYPE SLIS_LAYOUT_ALV,
I_EVENTS TYPE SLIS_T_EVENT,
GD_REPID LIKE SY-REPID.
--STRUCTURE TYPE OF SLIS TYPE-GROUP--
DATA: L_EV TYPE SLIS_ALV_EVENT.
CONSTANTS : C_PF TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET',
C_UCOM TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
*---- Start Change by Bibek/Shankar Dated : 12-03-2008 via cmr no : J/08/03/062/1.
DATA: L_ENDDATE LIKE SY-DATUM.
*---- End Change by Bibek/Shankar Dated : 12-03-2008 via cmr no : J/08/03/062/1.
End of Data Declaration *
Start of Selection screen Parameters *
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-002.
*START CHANGE BY SHAYARI ON 18.02.2008, CMR No.:- J/08/02/323
PARAMETERS:P_ABKRS LIKE PA0001-ABKRS OBLIGATORY.
*END CHANGE BY SHAYARI ON 18.02.2008, CMR No.:- J/08/02/323
*START CHANGE BY BIBEk Dt : 06.03.2008, CMR No.:- J/08/03/062/1
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 1.
SELECTION-SCREEN COMMENT 1(78) TEXT-006 FOR FIELD P_LES.
PARAMETER P_LES RADIOBUTTON GROUP RB1.
SELECTION-SCREEN END OF LINE.
*END CHANGE BY BIBEk Dt : 06.03.2008, CMR No.:- J/08/03/062/1
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 1.
SELECTION-SCREEN COMMENT 1(78) TEXT-003 FOR FIELD P_ONE.
PARAMETER P_ONE RADIOBUTTON GROUP RB1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 1.
SELECTION-SCREEN COMMENT 1(78) TEXT-004 FOR FIELD P_TWO.
PARAMETER P_TWO RADIOBUTTON GROUP RB1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 1.
SELECTION-SCREEN COMMENT 1(78) TEXT-005 FOR FIELD P_MORE.
PARAMETER P_MORE RADIOBUTTON GROUP RB1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK A.
End of Selection screen Parameters *
*Get Plan Version
CALL FUNCTION 'RH_GET_PLVAR'
IMPORTING
PLVAR = G_PLVAR.
PERFORM CLEAR.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
IV_DATE = SY-DATUM
IMPORTING
EV_MONTH_BEGIN_DATE =
EV_MONTH_END_DATE = L_ENDDATE.
SELECT *
FROM YHRMT_LTC
INTO TABLE T_DATA_LTC
WHERE FLAG = '1'
AND WAGETYPE = '1640'
AND LEVEND LE L_ENDDATE
AND PAYDATE GE '20080101'.
If SY-SUBRC <> 0.
MESSAGE I398(00) with 'No Records to display '.
ENDIF.
DELETE T_DATA_LTC WHERE LEVEND = '00000000'.
*START CHANGE BY BIBEk Dt : 06.03.2008, CMR No.:- J/08/03/062/1
*For Less Than One Month from Leave End Date
IF P_LES = 'X'.
LOOP AT T_DATA_LTC.
CLEAR P_MONTH.
CALL FUNCTION 'HR_AUPBS_MONTH_DAY'
EXPORTING
BEG_DA = T_DATA_LTC-LEVEND
END_DA = SY-DATUM
IMPORTING
NO_MONTH = P_MONTH.
IF P_MONTH LT '1'.
T_FINAL-MANDT = T_DATA_LTC-MANDT.
T_FINAL-PERNR = T_DATA_LTC-PERSONNELNO.
T_FINAL-PERSK = T_DATA_LTC-PERSK.
T_FINAL-WAGETYPE = T_DATA_LTC-WAGETYPE.
T_FINAL-LTCSTART = T_DATA_LTC-LTCSTART.
T_FINAL-LTCEND = T_DATA_LTC-LTCEND.
T_FINAL-FLAG = T_DATA_LTC-FLAG.
T_FINAL-SEQNR = T_DATA_LTC-SEQNR.
T_FINAL-LEVSTART = T_DATA_LTC-LEVSTART.
T_FINAL-LEVEND = T_DATA_LTC-LEVEND.
T_FINAL-PAYDATE = T_DATA_LTC-PAYDATE.
T_FINAL-AMOUNTPAY = T_DATA_LTC-AMOUNTPAY.
T_FINAL-TAXYR = T_DATA_LTC-TAXYR.
T_FINAL-DOCUNO = T_DATA_LTC-DOCUNO.
T_FINAL-DOCUDATE = T_DATA_LTC-DOCUDATE.
T_FINAL-VOUCHNO = T_DATA_LTC-VOUCHNO.
T_FINAL-APDATE = T_DATA_LTC-APDATE.
T_FINAL-CANCEL_MOD = T_DATA_LTC-CANCEL_MOD.
T_FINAL-LTC_IND = T_DATA_LTC-LTC_IND.
T_FINAL-APPL_TAG = T_DATA_LTC-APPL_TAG.
T_FINAL-CANCEL_DATE = T_DATA_LTC-CANCEL_DATE.
T_FINAL-CANCEL_USER = T_DATA_LTC-CANCEL_USER.
T_FINAL-LASTCHANGE = T_DATA_LTC-LASTCHANGE.
T_FINAL-USERNAME = T_DATA_LTC-USERNAME.
APPEND T_FINAL.
CLEAR T_FINAL.
ENDIF.
ENDLOOP.
*For One Month from Leave End Date
ELSEIF P_ONE = 'X'.
LOOP AT T_DATA_LTC.
CLEAR P_MONTH.
CALL FUNCTION 'HR_AUPBS_MONTH_DAY'
EXPORTING
BEG_DA = T_DATA_LTC-LEVEND
END_DA = SY-DATUM
IMPORTING
NO_MONTH = P_MONTH.
IF P_MONTH EQ '1' AND P_MONTH LT '2'.
T_FINAL-MANDT = T_DATA_LTC-MANDT.
T_FINAL-PERNR = T_DATA_LTC-PERSONNELNO.
T_FINAL-PERSK = T_DATA_LTC-PERSK.
T_FINAL-WAGETYPE = T_DATA_LTC-WAGETYPE.
T_FINAL-LTCSTART = T_DATA_LTC-LTCSTART.
T_FINAL-LTCEND = T_DATA_LTC-LTCEND.
T_FINAL-FLAG = T_DATA_LTC-FLAG.
T_FINAL-SEQNR = T_DATA_LTC-SEQNR.
T_FINAL-LEVSTART = T_DATA_LTC-LEVSTART.
T_FINAL-LEVEND = T_DATA_LTC-LEVEND.
T_FINAL-PAYDATE = T_DATA_LTC-PAYDATE.
T_FINAL-AMOUNTPAY = T_DATA_LTC-AMOUNTPAY.
T_FINAL-TAXYR = T_DATA_LTC-TAXYR.
T_FINAL-DOCUNO = T_DATA_LTC-DOCUNO.
T_FINAL-DOCUDATE = T_DATA_LTC-DOCUDATE.
T_FINAL-VOUCHNO = T_DATA_LTC-VOUCHNO.
T_FINAL-APDATE = T_DATA_LTC-APDATE.
T_FINAL-CANCEL_MOD = T_DATA_LTC-CANCEL_MOD.
T_FINAL-LTC_IND = T_DATA_LTC-LTC_IND.
T_FINAL-APPL_TAG = T_DATA_LTC-APPL_TAG.
T_FINAL-CANCEL_DATE = T_DATA_LTC-CANCEL_DATE.
T_FINAL-CANCEL_USER = T_DATA_LTC-CANCEL_USER.
T_FINAL-LASTCHANGE = T_DATA_LTC-LASTCHANGE.
T_FINAL-USERNAME = T_DATA_LTC-USERNAME.
APPEND T_FINAL.
CLEAR T_FINAL.
ENDIF.
ENDLOOP.
*For Two Month from Leave End Date
ELSEIF P_TWO = 'X'.
LOOP AT T_DATA_LTC.
CLEAR P_MONTH.
CALL FUNCTION 'HR_AUPBS_MONTH_DAY'
EXPORTING
BEG_DA = T_DATA_LTC-LEVEND
END_DA = SY-DATUM
IMPORTING
NO_MONTH = P_MONTH.
IF P_MONTH EQ '2' AND P_MONTH LT '3'.
T_FINAL-MANDT = T_DATA_LTC-MANDT.
T_FINAL-PERNR = T_DATA_LTC-PERSONNELNO.
T_FINAL-PERSK = T_DATA_LTC-PERSK.
T_FINAL-WAGETYPE = T_DATA_LTC-WAGETYPE.
T_FINAL-LTCSTART = T_DATA_LTC-LTCSTART.
T_FINAL-LTCEND = T_DATA_LTC-LTCEND.
T_FINAL-FLAG = T_DATA_LTC-FLAG.
T_FINAL-SEQNR = T_DATA_LTC-SEQNR.
T_FINAL-LEVSTART = T_DATA_LTC-LEVSTART.
T_FINAL-LEVEND = T_DATA_LTC-LEVEND.
T_FINAL-PAYDATE = T_DATA_LTC-PAYDATE.
T_FINAL-AMOUNTPAY = T_DATA_LTC-AMOUNTPAY.
T_FINAL-TAXYR = T_DATA_LTC-TAXYR.
T_FINAL-DOCUNO = T_DATA_LTC-DOCUNO.
T_FINAL-DOCUDATE = T_DATA_LTC-DOCUDATE.
T_FINAL-VOUCHNO = T_DATA_LTC-VOUCHNO.
T_FINAL-APDATE = T_DATA_LTC-APDATE.
T_FINAL-CANCEL_MOD = T_DATA_LTC-CANCEL_MOD.
T_FINAL-LTC_IND = T_DATA_LTC-LTC_IND.
T_FINAL-APPL_TAG = T_DATA_LTC-APPL_TAG.
T_FINAL-CANCEL_DATE = T_DATA_LTC-CANCEL_DATE.
T_FINAL-CANCEL_USER = T_DATA_LTC-CANCEL_USER.
T_FINAL-LASTCHANGE = T_DATA_LTC-LASTCHANGE.
T_FINAL-USERNAME = T_DATA_LTC-USERNAME.
APPEND T_FINAL.
CLEAR T_FINAL.
ENDIF.
ENDLOOP.
*For More than Two Month from Leave End Date
ELSEIF P_MORE = 'X'.
LOOP AT T_DATA_LTC.
CLEAR P_MONTH.
CALL FUNCTION 'HR_AUPBS_MONTH_DAY'
EXPORTING
BEG_DA = T_DATA_LTC-LEVEND
END_DA = SY-DATUM
IMPORTING
NO_MONTH = P_MONTH.
IF P_MONTH GT '2' .
T_FINAL-MANDT = T_DATA_LTC-MANDT.
T_FINAL-PERNR = T_DATA_LTC-PERSONNELNO.
T_FINAL-PERSK = T_DATA_LTC-PERSK.
T_FINAL-WAGETYPE = T_DATA_LTC-WAGETYPE.
T_FINAL-LTCSTART = T_DATA_LTC-LTCSTART.
T_FINAL-LTCEND = T_DATA_LTC-LTCEND.
T_FINAL-FLAG = T_DATA_LTC-FLAG.
T_FINAL-SEQNR = T_DATA_LTC-SEQNR.
T_FINAL-LEVSTART = T_DATA_LTC-LEVSTART.
T_FINAL-LEVEND = T_DATA_LTC-LEVEND.
T_FINAL-PAYDATE = T_DATA_LTC-PAYDATE.
T_FINAL-AMOUNTPAY = T_DATA_LTC-AMOUNTPAY.
T_FINAL-TAXYR = T_DATA_LTC-TAXYR.
T_FINAL-DOCUNO = T_DATA_LTC-DOCUNO.
T_FINAL-DOCUDATE = T_DATA_LTC-DOCUDATE.
T_FINAL-VOUCHNO = T_DATA_LTC-VOUCHNO.
T_FINAL-APDATE = T_DATA_LTC-APDATE.
T_FINAL-CANCEL_MOD = T_DATA_LTC-CANCEL_MOD.
T_FINAL-LTC_IND = T_DATA_LTC-LTC_IND.
T_FINAL-APPL_TAG = T_DATA_LTC-APPL_TAG.
T_FINAL-CANCEL_DATE = T_DATA_LTC-CANCEL_DATE.
T_FINAL-CANCEL_USER = T_DATA_LTC-CANCEL_USER.
T_FINAL-LASTCHANGE = T_DATA_LTC-LASTCHANGE.
T_FINAL-USERNAME = T_DATA_LTC-USERNAME.
APPEND T_FINAL.
CLEAR T_FINAL.
ENDIF.
ENDLOOP.
ENDIF.
****Payroll Area Put
SELECT PERNR ABKRS FROM PA0001
INTO CORRESPONDING FIELDS OF TABLE T_PA0001
FOR ALL ENTRIES IN T_FINAL
WHERE PERNR = T_FINAL-PERNR
AND ABKRS = P_ABKRS
AND BEGDA LE SY-DATUM
AND ENDDA GE SY-DATUM.
LOOP AT T_FINAL.
READ TABLE T_PA0001 WITH KEY PERNR = T_FINAL-PERNR.
IF SY-SUBRC = 0.
T_FINAL-ABKRS = T_PA0001-ABKRS.
MODIFY T_FINAL.
CLEAR T_FINAL.
ENDIF.
ENDLOOP.
CLEAR T_FINAL.
DELETE T_FINAL WHERE ABKRS = ''.
*Output Form ALV List
PERFORM ALV.
*& Form ALV
FORM ALV .
PERFORM BUILD_FIELDCATALOG.
PERFORM BUILD_EVENT.
PERFORM DISPLAY_DATA.
ENDFORM. " ALV
*& Form BUILD_FIELDCATALOG
FORM BUILD_FIELDCATALOG .
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'PERNR'.
FIELDCATALOG-SELTEXT_M = 'Personnel number'.
FIELDCATALOG-COL_POS = 1.
FIELDCATALOG-OUTPUTLEN = 17.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'ABKRS'.
FIELDCATALOG-SELTEXT_M = 'Payroll Area'.
FIELDCATALOG-COL_POS = 2.
FIELDCATALOG-OUTPUTLEN = 17.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'LTCSTART'.
FIELDCATALOG-SELTEXT_M = 'LTC Start year'.
FIELDCATALOG-COL_POS = 3.
FIELDCATALOG-OUTPUTLEN = 15.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'LTCEND'.
FIELDCATALOG-SELTEXT_M = 'LTC End year'.
FIELDCATALOG-COL_POS = 4.
FIELDCATALOG-OUTPUTLEN = 15.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'LEVSTART'.
FIELDCATALOG-SELTEXT_M = 'Start of leave'.
FIELDCATALOG-COL_POS = 5.
FIELDCATALOG-OUTPUTLEN = 15.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'LEVEND'.
FIELDCATALOG-SELTEXT_M = 'End of leave'.
FIELDCATALOG-COL_POS = 6.
FIELDCATALOG-OUTPUTLEN = 15.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'AMOUNTPAY'.
FIELDCATALOG-SELTEXT_M = 'Amount'.
FIELDCATALOG-DO_SUM = 'X'.
FIELDCATALOG-COL_POS = 7.
FIELDCATALOG-OUTPUTLEN = 13.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'PAYDATE'.
FIELDCATALOG-SELTEXT_M = 'Payment Date'.
FIELDCATALOG-COL_POS = 8.
FIELDCATALOG-OUTPUTLEN = 15.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-TABNAME = 'T_FINAL'.
FIELDCATALOG-FIELDNAME = 'APPL_TAG'.
FIELDCATALOG-SELTEXT_M = 'Application Tag '.
FIELDCATALOG-COL_POS = 9.
FIELDCATALOG-OUTPUTLEN = 15.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
*Check Box Field Add
CLEAR GD_LAYOUT.
GD_LAYOUT-BOX_FIELDNAME = 'CHECK_BOX'.
GD_LAYOUT-BOX_TABNAME = 'T_FINAL'.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_EVENT
FORM BUILD_EVENT .
*Event Handler
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = G_EV
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ELSE.
READ TABLE G_EV INTO L_EV WITH KEY NAME = SLIS_EV_PF_STATUS_SET.
IF SY-SUBRC = 0.
MOVE C_PF TO L_EV-FORM.
MODIFY G_EV FROM L_EV INDEX SY-TABIX TRANSPORTING FORM.
ENDIF.
READ TABLE G_EV INTO L_EV WITH KEY NAME = SLIS_EV_USER_COMMAND.
IF SY-SUBRC = 0.
MOVE C_UCOM TO L_EV-FORM.
MODIFY G_EV FROM L_EV INDEX SY-TABIX TRANSPORTING FORM.
ENDIF.
ENDIF.
ENDFORM. " BUILD_EVENT
*& Form DISPLAY_DATA
FORM DISPLAY_DATA .
GD_REPID = SY-REPID.
CLEAR I_EVENTS. REFRESH I_EVENTS.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = GD_REPID
I_CALLBACK_PF_STATUS_SET = C_PF
I_CALLBACK_USER_COMMAND = C_UCOM
IS_LAYOUT = GD_LAYOUT
IT_FIELDCAT = FIELDCATALOG[]
IT_EVENTS = G_EV
TABLES
T_OUTTAB = T_FINAL.
ENDFORM. " DISPLAY_DATA
FORM PF_STATUS_SET *
FORM PF_STATUS_SET USING RX_TAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'LTC'.
ENDFORM. "PF_STATUS_SET
FORM USER_COMMAND *
FORM USER_COMMAND USING R_UCOM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOM.
WHEN 'POST'.
PERFORM POST_IT15_LTC_TABLE.
ENDCASE.
ENDFORM. "USER_COMMAND
*& Form POST_IT15_LTC_TABLE
FORM POST_IT15_LTC_TABLE .
ENDFORM. " POST_IT15_LTC_TABLE
*& Form clear
FORM CLEAR .
CLEAR T_DATA_LTC.
REFRESH T_DATA_LTC.
CLEAR T_DATA_LTC_NEW.
REFRESH T_DATA_LTC_NEW.
CLEAR T_FINAL.
REFRESH T_FINAL.
CLEAR T_PA0015.
REFRESH T_PA0015.
CLEAR T_SUCCESS.
REFRESH T_SUCCESS.
CLEAR T_ERROR.
REFRESH T_ERROR.
CLEAR G_PLVAR.
CLEAR P_MONTH.
CLEAR COUNT_15.
CLEAR COUNT_15_SUM.
CLEAR COUNT_LTC.
CLEAR COUNT_LTC_SUM.
CLEAR TOTAL_NO.
CLEAR TOTAL_NO_SUM.
CLEAR COUNT_ERROR_IT15.
CLEAR COUNT_ERROR_IT15_SUM.
CLEAR COUNT_ERROR_LTC.
CLEAR COUNT_ERROR_LTC_SUM.
CLEAR COUNT_ENTRY_IT15.
CLEAR COUNT_ENTRY_IT15_SUM.
ENDFORM. " clear -
Multiple checkbox selection in ALV and updating internal table
Dear Expert,
Can anyone tell me how to handle the multiple checkbox selection in ALV Grid report and then updating the internal table.
I tried the option but it works only when i select only 1 row in ALV.
DO L_LINES TIMES.
read table icoas index rs_selfield-tabindex.
if sy-subrc = 0.
ICOAS-NOCHK = 'X'.
modify ICOAS INDEX rs_selfield-tabindex TRANSPORTING NOCHK.
ENDIF.
ENDDO.
Requires help....
Regards & Thanx,
Bhupathi.Hi,
Use this method to capture the check box event. Write this once you create your grid using CREATE OBJECT grid1.
DATA: GRID1 TYPE REF TO CL_GUI_ALV_GRID,
CALL METHOD grid1->register_edit_event
EXPORTING
i_event_id = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
EXCEPTIONS
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.
LOOP AT T_GRIDDETAILS INTO WA_GRIDDETAILS.
IF WA_GRIDDETAILS-CHECKBOX = 'X'.
"Do your operation
ENDIF.
CLEAR WA_GRIDDETAILS.
ENDLOOP. -
Checkbox problem in ALV toolbar
Hello all,
I hv added a checkbox in my alv toolbar using classes.
i.e. MOVE 'NO_DEFECTS' TO ls_toolbar-function.
MOVE 'No Defects' TO ls_toolbar-quickinfo.
MOVE 'No Defects' TO ls_toolbar-text.
MOVE 5 TO ls_toolbar-butn_type.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
Alv is displaying in one subscreen.
My problem is my checkbox is displaying as a button instead of a check box and also i want to know how can i check whether my checkbox is active or not.
I want to disable some buttons in the alv toolbar based on this checkbox.
Thanks in advance.
regards,
LokeshHi,
To disable the buttons in the toolbar, In the ALV events exclude the fcodes of the buttons you want to disable and pass it to the
to the program like the below statement
set pf-status 'STDPOPBX_FULLSCREEN' excluding lt_extab
of program 'SAPLKKBL'.
To use the check box pass the ls_toolbar-ICON as ICON_WD_CHECK_BOX.
Regards,
Kranthi -
Catch Checkbox in Heirachycal ALV
Hi All
I am Displaying my output in Heirachycal ALV. It has checkbox at header and item level. I need a functionality that is user selects checkbox at header, all the line item checkboxes should get selected.
I need a event or something to catch the checkbox selection. Because checkbox selection doesnt fire user command..
Could you please hepl me on this issue.
Thanks.Hello Sachin
The following coding shows how to mark/unmark checkboxes in an ALV tree (<b>CL_GUI_ALV_TREE</b>). The method handles event <b>CHECKBOX_CHANGE</b>.
METHOD handle_checkbox_change .
* define local data
DATA:
lw_child TYPE lvc_nkey,
lt_children TYPE lvc_t_nkey,
l_wa_outtab_line TYPE zfr_calc_marge_detail,
l_wa_item_layout TYPE lvc_s_layi,
lt_item_layout TYPE lvc_t_layi,
l_wa_item_layout_c TYPE lvc_s_laci,
lt_item_layout_c TYPE lvc_t_laci.
" The user marks or unmarks a checkbox on the ALV tree. The status
" (marked / unmarked) is "inherited" to the child nodes.
" Get sub-tree of selected node (i.e. the node where the checkbox was changed)
CALL METHOD sender->get_subtree
EXPORTING
i_node_key = node_key
IMPORTING
et_subtree_nodes = lt_children.
" NOTE: the sender is the ALV tree instance
LOOP AT lt_children INTO lw_child.
REFRESH: lt_item_layout.
CLEAR: l_wa_outtab_line.
* Knoten und Item-Layout lesen
CALL METHOD sender->get_outtab_line
EXPORTING
i_node_key = lw_child
IMPORTING
e_outtab_line = l_wa_outtab_line
* E_NODE_TEXT =
et_item_layout = lt_item_layout
* ES_NODE_LAYOUT =
EXCEPTIONS
node_not_found = 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.
READ TABLE lt_item_layout INTO l_wa_item_layout
WITH KEY fieldname = cl_gui_alv_tree=>c_hierarchy_column_name
class = cl_gui_column_tree=>item_class_checkbox.
IF ( syst-subrc = 0 ).
l_wa_item_layout-chosen = checked. " 'status' of changed checkbox
MODIFY lt_item_layout FROM l_wa_item_layout INDEX syst-tabix.
REFRESH: lt_item_layout_c.
LOOP AT lt_item_layout INTO l_wa_item_layout.
MOVE-CORRESPONDING l_wa_item_layout TO l_wa_item_layout_c.
l_wa_item_layout_c-u_chosen = 'X'. " update CHOSEN field
APPEND l_wa_item_layout_c TO lt_item_layout_c.
ENDLOOP.
CALL METHOD sender->change_node
EXPORTING
i_node_key = lw_child
i_outtab_line = l_wa_outtab_line
* IS_NODE_LAYOUT =
it_item_layout = lt_item_layout_c
* I_NODE_TEXT =
* I_U_NODE_TEXT =
EXCEPTIONS
node_not_found = 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.
ENDIF.
ENDLOOP.
" Sending changes to the frontend
CALL METHOD sender->frontend_update.
ENDMETHOD.
Regards
Uwe -
Personalization: Set Initial Vaule for checkbox
Hi experts,
I try to change the intial value of the check box in iProcument screen but it doesn't work. I try to set checked status in checkbox, the default value of this is unchecked.
I also set FND:OA:Enable Defaults to 'Yes'
Even though i find the checkbox's value which is store in database is 'Y' and I also try input the value to intital value of checkbox like: 'Y', 'Yes', 'True', '1'. But It still doesn't work.
Please help me to resolve this issue.
Thanks in advance.
Regards
HieuHi Hieu,
For Changing Initial Value of a newly created check box (which is yet not stored or retrieved from database), set the property "Initially Checked" to "True".
Default value for checked is "on" and for unchecked its null.
Hence
Even though i find the checkbox's value which is store in database is 'Y' and I also try input the value to intital value of checkbox like: 'Y', 'Yes', 'True', '1'. But It still doesn't work.Please try to set it to "on" in place of 'Y'/'Yes' and let me know if it works for you.
Abdul Wahid. -
How to check a checkbox field value in fw9 PDF form
Hi,
I got a PDF given form IRS (http://www.irs.gov/pub/irs-pdf/fw9.pdf). While creating a widget to this pdf form to sign it, I merged the custum data to those PDF form fields using API setMergeFields.
All the data fields are merged fine except the checkboxes. I tried by passing the values to the merge_fields array as 'On', '1', 'checked', 'checkbox(checked)' but no luck
What is wrong here in checking the chexbox field in this fw9 PDF or How to check a checkbox field in a form?
Thank you,Hi Simon,
I re-added and edited the fields of fw9 form by pdf printer. While doing so, I made fields as ready only so that, the data cannot be edited in the form through the widget but will be merged the data to fields only be the code. Wherein Im using the widget only for signature but not for form filling.
Here, Im able to merge my custom data to all fields while creating widget but not to the fields of checkboxes. The checkboxes fields which are made ready-only are not allowing me to merge the value as checked by the API.
Please help me,
Thanks you, -
[svn] 3275: Initial check in for support for asdoc comments in mxml files.
Revision: 3275
Author: [email protected]
Date: 2008-09-19 15:01:57 -0700 (Fri, 19 Sep 2008)
Log Message:
Initial check in for support for asdoc comments in mxml files.
For adding comments at the class level or to properties defined inside mxml use the syntax
Other tags supported in asdoc should also work. for example @see, @includeExamples etc.
QA: Yes
Doc:
Reviewed By: Paul
Tests: checkintests
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocAPI.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlCompiler.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/Node.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/PropertyDeclaration .java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/UninitializedProper tyDeclaration.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va
flex/sdk/trunk/modules/compiler/src/java/flex2/tools/ASDocConfiguration.java
Added Paths:
flex/sdk/trunk/asdoc/templates/images/AirIcon12x12.gif
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/MxmlCommentUtil.java@John - no luck on the plugin angle. In checking both JDev installs that previously had the problems, they have the default extensions.
@Dave - at the time I can't say we noticed any migration notices, we certainly didn't see the migration dialog though. However the application in SVN was built on the same version of JDev so I don't expect a migration to find any changes anyhow.
However on your second point we always check out into an empty directory, as we're checking out the whole application. As such if as you say the migration utilities is always called, shouldn't that mean we always see the projects modified? We certainly don't, we're on a day by day basis checking out whole applications to different directories and we don't see that behaviour.
In turn reconsidering the modified .jpr file, from what I saw it looks to me that the whole project file is re-set to it's original state. Initially the problem detected was the libraries attached to the project were gone so we couldn't compile, but in close inspection it seems the whole .jpr file has been modified to a rather vanilla setup.
One thing I can say when we originally experienced the problem (and from memory this was true in the dim dark past when it also occurred another time), is it was a check out from a SVN tags directory, not the trunk. In thinking about it, it may be the first check out from the tags directory that we see the issue. However to get around the issue we just revert the project file in the tags directory, we don't actually change the SVN repository code (ie. commit), so the issue should keep occurring. Yet at the moment if we check out the same tags directory, the issue doesn't occur?
Hmmm?
Btw Dave, are you an Oracle employee?
CM. -
ADF Faces: Initially checking (radio) table's first row programatically
How can I initially check table's first row radio button programatically (from the backing bean)?
Setting current row in the iterator to be first row does not help. af:table attribute selectionState is set to bindings.PersonInformationPersonCustomers.collectionModel.selectedRow, however model is tree based - value="#{bindings.PersonInformationPersonCustomers.treeModel}"why don´t you add on SQL Statement of your View Object an clause order by
the first row will show as the first row of you VO can view
but you can know the value of your field or your radio with a binding
open your JSP on Design view
with the right button
click on the component, your radio.
last option, Properties
at the param Binding you choose the BackingBean (or ManegedBean) and defined the name
does that you can use the name to invoke the method getValue() -
Set default value for people picker only when user checks a checkbox (Sharepoint 2010)
The javescript in below link works for me.
http://social.technet.microsoft.com/Forums/sharepoint/en-US/2b130f64-3db2-484a-9a53-ccbe18d2c5de/set-default-value-for-people-picker-in-list-template-current-user?forum=sharepointgenerallegacy
However, I'd like to set default user for people picker only when user checks a checkbox.
I am new to development. Could you please help me on this requirement ?
Thank you very much.Hello,
Use this link to to validate checkbox value, if true then set the person or group value (i.e. as posted in your link).
http://geekswithblogs.net/haniamr/archive/2011/03/10/validate-that-a-checkbox-is-checked-using-javascript.aspx
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Revision: 15795
Revision: 15795
Author: [email protected]
Date: 2010-04-28 14:01:58 -0700 (Wed, 28 Apr 2010)
Log Message:
Initial check-in for removing unused rsls and the include-inheritance-dependencies-only features.
Changes to implement ?\226?\128?\147remove-unused-rsls feature. When the configuration option is true, RSLs associated with RSLs that are not used by the application are not loaded at runtime. The compiler logs the primary RSLs that are required with the number of failovers, if any.
compiler/src/java/flex2/compiler/common/Configuration.java
add ?\226?\128?\147remove-unused-rsls and ?\226?\128?\147include-inheritance-dependencies-only.
compiler/src/java/flex2/compiler/CompilerSwcContext.java
pass rslGroup to getSwcGroup.
compiler/src/java/flex2/compiler/swc/SwcCache.java
Add parameter to getSwcGroup to a group of rsls can be passed in.
compiler/src/java/flex2/compiler/swc/SwcGroup.java
Add a SwcGroup constructor that accepts a SwcGroup of Rsls. Use the RSLs to give preference to scripts that come from RSLs when duplicate scripts are merged.
compiler/src/java/flex2/tools/CompcPreLink.java
compiler/src/java/flex2/tools/PreLink.java
Find the set of SWCs that are contributing code to the application. Use this set to restrict which RSLs are written to the generated root class. Log the RSLs that are required to give the user some feedback.
compiler/src/java/flex2/tools_en.propertiesAh, ok. I was in the assumption the PCI connect had something to do with the video connection. But it seems like Apple wanted to reinvented PCIe...
I'm out of my territory here so feel free to ignore the following.
These are the things I notice in your Xorg.0.log:
[ 19.474] (==) modesetting(G0): Depth 24, (==) framebuffer bpp 32
[ 19.474] (==) modesetting(G0): RGB weight 888
[ 19.474] (==) modesetting(G0): Default visual is TrueColor
[ 19.474] (II) modesetting(G0): ShadowFB: preferred YES, enabled YES
[ 19.500] (II) modesetting(G0): Output VGA-1-0 has no monitor section
[ 19.526] (II) modesetting(G0): EDID for output VGA-1-0
[ 19.526] (II) modesetting(G0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[ 19.526] (==) modesetting(G0): DPI set to (96, 96)
What the hell is modesetting doing there?
And have you tried the nvidia blob? It could be that this is not well supported by nouveau. Maybe check up with their IRC / mailing list. -
Hello,
I am using the interapplication communication API classes from my c# program. I read an previously generated xml and write the data to the live cylce pdf form
I use the below classes and use the IField.value( myField.Value = xmlcolValue;) to write to the form. It works fine for all the text boxes, But is not writting/selecteing/checking the checkboxes.
I have tried using the IFeild.setExportValues(..) but it gives me an error "Security setting prevent me from doing that".Could you please let me know how to solve this issue?
CAcroAVDoc
Thank you
IAFormApp IFields IFieldHello,
Still searching for the same issue. Does anyone have a solution/fix for this?
Thanks -
Check teh checkboxes on click of button
Hi,
I am using mvc bsp application.
I have a button "select all" . upon clicking this button i need to check certain checkboxes.how do i do this using onclientclick and javascript?
Regards,
niky.<af:commandButton partailSubmit="true" id="cb1" actionListener="#{Bean.doAction}">
<af:inputText partialTriggers="cb1" visible="#{Bean.flag}">
in the bean have it like
private boolean flag; //have getter and setter
public void doAction(ActionEvent actionEvent){
flag=true; -
Check a checkbox in a jtable in a panel from another panel
I have a panel-> Panel A
where I have some conditions and on that condition I want to check a checkbox in a jtable in another panel ->PanelB
So Panel B has a jtable with one column as checkbox,I want to check/uncheck this checkbox based on some conditions in some other panel A
I have no idea how to do this.Please help.
Thanks885522 wrote:
How will the change be reflected dynamically if the value changes in some other panel.By code that you write. If you want component X to change based on some changes to component Y, then first you set up a listener which will notify you when changes to component Y take place. In that listener you put code which makes the appropriate changes to component X, based on what happened to component Y. -
How to check whether checkbox is checked or not and to get label if checked
Hi,
I've used checkboxgroup, and i'm populating it dynamically using attribute node & attribute value.. like this
IPrivateTestView.IWelcomNode wNode =wdContext.nodeWelcom();
IPrivateTestView.IWelcomElement wEl,wE2,wE3;
wEl=wNode.createWelcomElement();
wNode.addElement(wEl);
wEl.setWelValue("Welcome Boards");
wE2=wNode.createWelcomElement();
wNode.addElement(wE2);
wE2.setWelValue("Traditional Welcome");
wE3=wNode.createWelcomElement();
wNode.addElement(wE3);
wE3.setWelValue("Photograph");
now i want to check whether checkbox is checked and how many checkbox has been checked and then i want that label values of checked boxes.. so pls help me out. if possible give me some sample coding...CheckBoxGroup.texts -> Welcom.WelValue
In controller method (e.g. action handler):
IWelcomNode node = wdContext.nodeWelcom();
for (int i = 0; i < node.size(); ++i)
IWelcomElement e = node.getWelcomElementAt(i);
if (node.isMultiSelected(i))
String text = e.getWelValue();
/* checkbox #i is selected and variable "text" contains the text */
Armin
Maybe you are looking for
-
i have un-installed and re-istalled and still getting the error
-
Did System Restore w/o backing up files, will songs be recognized from iPod
I am a user of Windows Vista, and I recently did a system restore on my PC. The problem is that I did not back up the files from my iPod before doing so. If I re-install iTunes and hook up my iPod to my PC, will the songs automatically be recognized
-
Some thoughts on the dearth of training materials for the new MCSE certifications
Mostly this is venting... while it would be nice to see some remediation, I have no such expectations. Given that Windows Server 2012 was GA 15 months ago, I'm severely disappointed at the lack of published training guides targeted to the MCSA and MC
-
Why Does Abode Acrobat doesn't support TAMIL OCR ???
The Tamil Characters are not properly extracted to Word as we don't have tamil OCR character recognition in Adops. Is there is any Adobe Tamil OCR plugin available or any idea about best Tamil OCR software to export Tamil Scanned PDFs to Word or Extr
-
Prolblem while replicating datasources in BW, source system tab in modellin
hi friends, I have a problem. we are using SAP NetWeaver 2004s and we are implementing for the first time. The problem is we have activated the datasources of 0FI_AR_4, 0FI_AP_4, 0FI_GL_4 from delivery version RSA5, After activation we checked in RSA