Display of check box on screen
i have written this code for check true by default.
ocheckbox1 = (SAPbouiCOM.CheckBox)(oForm.Items.Item("chkmlb").Specific);
ocheckbox1.Checked = true;
but after executing progarm ,on form check box is showing like unchecked how to show checkbox is checked on screen.
Edited by: dns_sap on Jun 22, 2009 1:08 PM
Hi you need to bind your checkbox to a datasource:
oForm.DataSources.UserDataSources.Add("ChSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20);
oItem = oForm.Items.Add("Check1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
oItem.Left = 220;
oItem.Width = 15;
oItem.Top = 20;
oItem.Height = 14;
oCheckBox = ((SAPbouiCOM.CheckBox)(oItem.Specific));
oCheckBox.DataBind.SetBound(true, "", "ChSource");
Hope this helps
Similar Messages
-
Display of check box on the o/p list
Hi,
I need to display 3 check boxes on the final output display.
Can you pls guide me to do this?Hi Nagalakshmi,
Please check this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e6435c111d1829f0000e829fbfe/content.htm
You can output the first character of a field as a checkbox on the output screen by using the following syntax:
Syntax
WRITE <f> AS CHECKBOX.
If the first character of field <f> is an "X", the checkbox is displayed filled. If the first character is SPACE, the checkbox is displayed blank.
In other words, the user can fill or clear them with a mouse click. For information on how you can check if output fields are ready for input or not, see Enabling Fields for Input. Fields that are ready for input are an essential component of interactive lists that allow a dialog with the user (see Interactive Lists.
DATA: flag1(1) TYPE c VALUE ' ',
flag2(1) TYPE c VALUE 'X',
flag3(5) TYPE c VALUE 'Xenon'.
WRITE: / 'Flag 1 ', flag1 AS CHECKBOX,
/ 'Flag 2 ', flag2 AS CHECKBOX,
/ 'Flag 3 ', flag3 AS CHECKBOX.
Best regards,
raam -
Display of check box as the output in the ALV
Hi Experts,
Please guide me with the steps of displaying the check box as the output of an ALV report
thanksHi,
Check this program: BALVSD01.
Check this code:
*& Report ZAK_ALV
REPORT ZAK_ALV line-count 10.
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ck type c,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
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,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'CK'.
fieldcatalog-seltext_m = 'CHECKM BOX'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-CHECKBOX = 'X'.
fieldcatalog-EDIT = 'X'.
fieldcatalog-key = ''.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
fieldcatalog-checkbox = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
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' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 100 rows
from ekpo
into CORRESPONDING FIELDS OF table it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform. -
Complete filter cannot be displayed by check box item - How to solve
Hi,
I have created a web template which has a table, chart and the navigational block.
When i execute the report and further when i want to drill down i use navigational block.
When i filter the value suppose country in the navigational block by clicking on it, i should be able to see the county values, but i get the error "Complete filter cannot be displayed by check box item".
How can i solve the problem by getting the filter values, when i further drill down
Thanks
raniit is a awfull conundrum/and is why I began ONLY using optimum as a web mail/ But Now yes Now even this is becomming a nasty little night mare' I see 2 email windows,simotaniously'
and Then I se FLASHES of words,stuck in address bar..
weeks Later I see LAZSLO '
This lead me to a Univeristy'IMAGINE THIS'
but is it also a company and Optimum has the web mail as well as tec support OUTSOURCED
"THEY CAN N OT HELP YOU PAST dinner time,save your breath!
BUT WHAT IS HAPPENING WITH ALL THESE points for answers APPLE BOYS AND GRILS?
HOW do you all get points to the Happyness to then say TOUCH DOWN?
remarkably fantastic!'for you not me
linda really would LIKE TO KNOW WHos doing your mail latley'
peace -
How to display that Check Box In Down of Tabular Rows .
Dear Friends,
i have created tabular form and one check box Item in that region.
i want to display that checkbox Item after tabular form Rows .
How to display that Check Box In Down of Tabular Rows .
ThanksHi,
From report attributes, you can change column order
http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt.htm#sthref1348
Regards,
Jari -
If i have a report which looks in a table and puts a checkbox for Accept on everyline in the report, but what i want is a checkbox one for "Accept" and one for "Delete" how do i add the extra check box into
select HTMLDB_ITEM.CHECKBOX(1,accid,'CHECKED') "Accept" ,accid,userid,username,authfails,clientid,tncdate,docsource,lastlogin,usertype,dateadded,recert from GFMIS.AUTOBAHNDIRECTACCOUNTS where recert = '0'
And then on the process do i need to add in another loop for the "delete" checkbox
FOR i in 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
UPDATE GFMIS.AUTOBAHNDIRECTACCOUNTS SET recert = '1', RECERTBY = :APP_USER, RECERT_ACTION = 'keep' WHERE ACCID = HTMLDB_APPLICATION.G_F01(i);
END LOOP;Okay i think is got the radio groups to display, but it seems that each line table is part of the same radio group so i can't selected a y or no for each line. How do i make it that
each line enables me to put a Y|N radio group for that line.
select HTMLDB_ITEM.RADIOGROUP(1,accid,'Y') "Accept",HTMLDB_ITEM.RADIOGROUP(1,userid,'N') "Delete" ,accid,userid,username,authfails,clientid,tncdate,docsource,lastlogin,usertype,dateadded,recert from GFMIS.AUTOBAHNDIRECTACCOUNTS where recert = '0' -
Authorization object to display BSP check boxes
Hello,
I'm trying to find the authorization object so as to display the BSP check boxes. Because I can display BSP properly (I've BSP_APPL) but not the BSP check boxes. The user having all the autorizations, can see the cheks boxes ok.
Please, can you help me?
Thank youI'ts not a authorization object, just portal authorization. I'm going to open a new thread.
-
Problem with display of check boxes in 10.1.7
We create PDF versions of our infopath documents for users to download. Several users who have upgraded to 10.1.7 report that any checkboxes or radio buttons come out flat and blank. They display fine in 10.1.6 and older and version 11. Only 10.1.7 seems to be affected. Any one else seen this issue?
We can change a setting on our tool to add the fonts to the file and then they start working again but file size doubles.
5.16 Select PDF Standard (PDF/A, PDF/X, PDF/SiqQ) By default the converter can generate PDF documents in conformance with PDF 1.4 standard. This standard is accepted by Adobe Reader 5.0 and the later versions of the Adobe Reader. Using the PdfConverter.PdfStandardSubset property the converter can be instructed to generate PDF documents in conformance with PDF/A, PDF/X and PDF/SiqQ and standards. These standards impose additional restrictions to the generate document. The PDF/A-1b standard (ISO 19005-1), used for long-term archiving of PDF documents, requires that all the true type fonts used by the document to be embedded in the document, the http links are disabled, the document does not use transparent objects, the document information properties are disabled. PDF/X-1a:2003 standard (ISO 15930-4), used to facilitate graphics exchange, requires that all the true type fonts used by the document to be embedded in the document, the http links are disabled, all the graphics are in CMYK color space, the document does not use transparent objects. PDF/SiqQ is a standard used by Adobe to ensure that a digitally signed document does not contain items that could alter its appearance when viewed in different environments. A PDF/SiqQ compliant document requires that all the true type fonts used by the document to be embedded in the document and the http links to be disabled. -
How to print check box in ALV list display and how to pick selected ones
Hi
i am displaying one ALV list dispaly. for that im adding one check box fields by filling the fieldcat as below:
wa_fldcat-checkbox = 'X'.
wa_fldcat-edit = 'X'.
but the check box is showing disable mode only. i want to display that check box and if i select that check box i want pick that records. for ALV grid i found one FM to pick records of selectedones as below.
DATA ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF ref_grid IS NOT INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
but how can i do for list display to pick those selected one records.
Can any one sugget regarding this.
Thanks in advance.
Rahul.Hi,
Thanks. now it's enabled. but how can we pick the records from that list whichever i selected through that check box.
i found this one for ALV grid:
DATA ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF ref_grid IS NOT INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
but how for ALV normal list display.
Thanks.
rahul -
Check box in ALV selection screen
Hi to all
I like to know how to create a checkbox in the input screen of an ALV.What do you mean by ALV check box selection screen?
ALV and selection screen check box( you are mixing two cases in your Question).
You need use the Function moduel in the user command to get the updated data.
in fieldcatalog you have to use INPUT = 'X' and EDIT = 'X' for the columns which ever you want edit.
GET_GLOBALS_FROM_SLVC_FULLSCR
follow the sample code.
REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT TYPE SLIS_LAYOUT_ALV,
X_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
CHK(1),
color(4),
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'CHK'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
X_FIELDCAT-INPUT = 'X'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-CHECKBOX = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-HOTSPOT = 'X'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_LAYOUT-info_fieldname = 'COLOR'.
*L_LAYOUT-ZEBRA = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
I_CALLBACK_PF_STATUS_SET = 'STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form STATUS
text
-->P_EXTAB text
FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
Pf status
SET PF-STATUS 'STATUS'.
ENDFORM. " STATUS
*& Form USER_COMMAND
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
DATA: GD_REPID LIKE SY-REPID, "Exists
REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
IF REF_GRID IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF_GRID.
ENDIF.
IF NOT REF_GRID IS INITIAL.
CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
ENDIF.
loop at itab where chk = 'X'.
itab-color = 'C300'.
modify itab index sy-tabix transporting color.
endloop.
RS_SELFIELD-refresh = 'X'.
break-point.
ENDFORM. "USER_COMMAND
Regards
Vijay Babu Dudla -
Problem with check box in ALV Grid Display
I am Displaying Material Master Data in ALV Grid Display with Check Box for each record and if i checked check box then i am processing Update operation in Database, my question is after perform update operation check box should be clear.
Kindly help me!!!!Hello Raj
Given the fact that you do not tell us the most important piece of information (namely whether you are using OO-based ALV or not) I assume you are using fm-based ALV lists.
In this case you probably have defined a USER_COMMAND routine as described in the documentation of the fm.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* define local data
DATA: ls_outtab LIKE LINE OF gt_outtab,
ld_idx TYPE i.
LOOP AT gt_outtab INTO ls_outtab
WHERE ( chkbox = 'X' ).
ld_idx = syst-tabix.
" Call your update function / method / perform
ls_outtab-chkbox = space.
MODIFY gt_outtab FROM ls_outtab INDEX ld_Idx
TRANSPORTING chkbox.
ENDLOOP.
" And now trigger refresh of the ALV display:
rs_selfield-refresh = 'X'. " <<< !!!
ENDFORM.
Regards
Uwe -
Captute the check box and display
hi,
In a report program se38, with the output I've displayed the check boxes before every line item, I need to keep a check box in the header row and if I check this one all the check boxes of the line items must be checked and I need to capture the particular line items if checked manually and randomly.
i did not use grid display its a simple display with write statements.
(in short if the first(header) check box is checked need to check remaining and need to process the check box itmes if checked as above and manually)
thanks and regards with rewards later onHi,
Check this sample code...
DATA: t_lineitem TYPE TABLE OF char1.
DATA: s_lineitem LIKE LINE OF t_lineitem.
DATA: v_header,
v_index TYPE syindex.
START-OF-SELECTION.
WRITE: / 'Header check box', v_header AS CHECKBOX.
SKIP 2.
DO 10 TIMES.
s_lineitem = sy-index.
WRITE: / 'Line item-', sy-index , s_lineitem AS CHECKBOX.
APPEND sy-index TO t_lineitem.
ENDDO.
AT LINE-SELECTION.
READ LINE 1 FIELD VALUE v_header.
DO .
v_index = sy-index + 2.
READ LINE v_index FIELD VALUE s_lineitem.
IF sy-subrc <> 0.
EXIT.
ENDIF.
s_lineitem = v_header.
MODIFY CURRENT LINE FIELD VALUE s_lineitem.
ENDDO.
Thanks
Naren -
Hi,
I have 4 records in itab.When iam displaying itab, i want to display 4 check boxes.Can any one tell me how to do that?
reward guaranteed
cheers
kakiHi suresh,
Iam passing value like this.Iam not gettng.
<b> DATA: chk(1) TYPE C value 'x'.</b>
loop at t_ins.
write:/0(6) space,
<b>WRITE chk AS CHECKBOX.</b>
write:6(15) t_ins-xblnr,
22(10) t_ins-ebeln,
33(18) t_ins-matnr,
52(20) t_ins-maktx,
71(10) t_ins-menge,
81(14) t_ins-PRUEFLOS,
96(10) t_ins-aufnr,
107(8) t_ins-meins,
114(12) t_ins-cpudt,
126(12) t_ins-mblnr,
139(20) t_ins-name1,
160(15) t_ins-lifnr,
176(10) t_ins-zeile,
187(10) 'QI doc',
198(8) 'QI date',
207(8) 'QI day',
216(35) t_ins-Reason.
WRITE : 1 SY-VLINE, 5 SY-VLINE, 21 SY-VLINE, 32 SY-VLINE,
51 SY-VLINE, 70 SY-VLINE, 80 SY-VLINE, 95 SY-VLINE,
106 SY-VLINE,112 SY-VLINE,125 SY-VLINE,138 SY-VLINE,
159 SY-VLINE,175 SY-VLINE,186 SY-VLINE,197 SY-VLINE,
206 SY-VLINE,215 SY-VLINE,250 SY-VLINE.
uline.
endloop. -
Select all check box in interactve report
Hi,
I am writing an interactive report. The second screen will display the check box for thye user to select the items.
Now the requrement is to create an option like select all means it should select all the check boxes.
How can I create this option of select all.
Thanks.Hi,
Please check this example.
<
REPORT Z_TEST NO STANDARD PAGE HEADING.
DATA: t_flag TYPE STANDARD TABLE OF xfeld,
s_flag TYPE xfeld.
START-OF-SELECTION.
DO 10 TIMES.
WRITE:/ s_flag AS CHECKBOX,
sy-index.
APPEND s_flag TO t_flag.
HIDE s_flag.
ENDDO.
AT LINE-SELECTION.
LOOP AT t_flag INTO s_flag.
s_flag = 'X'.
MODIFY LINE sy-tabix LINE VALUE FROM s_flag.
ENDLOOP.
Thanks
Naren -
Hi,
I am using ALV gid with FM 'REUSE_ALV_GRID_DISPLAY_LVC'. I am displaying a check box on the screen. I have to know how many check box were selected.
Any idea how to get that.
I have used lay-box_fnname = checkbox and looped the itab in user command. But I am not getting the desired result. Please lte me know how its managed.
KK.REPORT ZALV_DISPLAY_CHANGE.
TABLES :T247.
TYPE-POOLS SLIS. "Type definitions for alv report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
WA_FIELDCAT TYPE LVC_S_FCAT.
DATA: WA_LAYOUT TYPE LVC_S_LAYO.
DATA : BEGIN OF IT_FINAL OCCURS 0,
CHECK(1),
CELLTAB TYPE LVC_T_STYL, " Switch between display/change
MNR LIKE T247-MNR,
LTX LIKE T247-LTX,
END OF IT_FINAL.
DATA : WA_FINAL LIKE IT_FINAL.
DATA : W_REPID LIKE SY-REPID.
W_REPID = SY-REPID.
REFRESH IT_FINAL.
SELECT MNR LTX
FROM T247
INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
WHERE SPRAS EQ 'E'.
WA_FIELDCAT-FIELDNAME = 'CHECK'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-CHECKBOX = 'X'.
WA_FIELDCAT-EDIT = 'X'..
WA_FIELDCAT-OUTPUTLEN = '3'.
WA_FIELDCAT-COL_POS = '1'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MNR'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-OUTPUTLEN = '8'.
WA_FIELDCAT-COL_POS = '2'.
WA_FIELDCAT-REPTEXT = 'Month'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'LTX'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-OUTPUTLEN = '20'.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-REPTEXT = 'Month Desc'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
DATA: WA_CELLTAB TYPE LVC_S_STYL,
IT_CELLTAB TYPE LVC_T_STYL,
L_INDEX TYPE I.
CLEAR : WA_CELLTAB,WA_FINAL,IT_CELLTAB.
REFRESH IT_CELLTAB.
*Initialize the celltab table
LOOP AT IT_FINAL INTO WA_FINAL.
L_INDEX = SY-TABIX.
WA_CELLTAB-FIELDNAME = 'CHECK'.
WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
INSERT WA_CELLTAB INTO TABLE IT_CELLTAB.
INSERT LINES OF IT_CELLTAB INTO TABLE WA_FINAL-CELLTAB.
MODIFY IT_FINAL FROM WA_FINAL INDEX L_INDEX.
ENDLOOP.
*Make the first five 5 rows as disabled
CLEAR L_INDEX.
LOOP AT IT_FINAL INTO WA_FINAL.
L_INDEX = SY-TABIX.
IF SY-TABIX LE 5.
LOOP AT WA_FINAL-CELLTAB INTO WA_CELLTAB.
IF WA_CELLTAB-FIELDNAME EQ 'CHECK' .
WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
MODIFY WA_FINAL-CELLTAB FROM WA_CELLTAB.
MODIFY IT_FINAL INDEX L_INDEX FROM WA_FINAL TRANSPORTING CELLTAB.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
WA_LAYOUT-BOX_FNAME = 'CHECK'.
WA_LAYOUT-NO_ROWMARK = 'X'.
WA_LAYOUT-STYLEFNAME = 'CELLTAB'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
I_GRID_TITLE = 'GRID DISPLAY'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT_LVC = WA_LAYOUT
IT_FIELDCAT_LVC = IT_FIELDCAT
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data
CASE P_UCOMM.
WHEN 'DELETE'.
loop at it_final where check eq 'X'.
count = count + 1. " Counts the no of checked records
endloop.
ENDCASE.
ENDFORM.
Maybe you are looking for
-
This may come off as a very generic request, but can anyone point me in the direction of somewhere to research the amount of transactional data created by Enterprises (across any/all industries)? I am looking for information that helps to breakdown
-
Sale order plant change not possible
dear sir, we have set valuation level is a plant in OX14. we have two production plants 1010 and 1020 we are using variant configuraion also. we are unable to change the plant from one plant (1010) to (1020) other in sale order VA02 if we have 1) Pr
-
Hi, I am working on a porting project. I am porting code compiled earlier under gcc2.95 to Sun Workshop 6. We are using stl libraries in our code. I had made chages in code like using std::sort; using std::istream; using std::ostream; using std::vect
-
MPEG Streamclip not working on Mac Os X - downloading videos and converting for FCP X
Hello, I had used MPEG Streamclip (square 5) before but its not loading the url and not finding the files... any ideas? I need to download short free archive clips for this project. I would appreciate your help and suggestions. _M in Sydney
-
Anyone having Youtube problems?
YouTube on my iPhone is not working? I am on my wifi and can surf safari but YouTube is not working??