How to Create Check Box in Dynamic Table
Hi Friends,
I've Created one Dynamic Table there i want to display 2 columns as Check Box.
How to Add this check box as column cell variant.
Looping the columns. In this One method SET_TABLE_CELL_EDITOR is ter. But i'm getting how to use this method. Kindly help in this Issue.
Regards,
jack.
Hi upendra
There are slight changes in the sivas code.Where is the data coming into the table.If its from a Model Node then iterate each element of the source node get that value compare and set the corresponding value in the element of the node binded to table.
Create a boolean attribute "select" in the table node and bind it to checked property of the check box.
for(int i=0;i<wdContext.node<tablenode>()..size();i++)
if(wdContext.node<tablenode>().get<tablenode>ElementAt(i).select())
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(true);
else
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(false);
See the attribute is boolean so pass true or false as a values in setter methods.
Regards
Kalyan
Similar Messages
-
How to create check box in tabular form
Dear Friends
i have craeaed tabular form .Recently all column are default text field but i want to change some column from text field to check box .
i have try it with simple check box but there is no option to pass return value in to table.
How to create check box in tabular from.
select
"CLAIM_ID",
"CLAIM_ID" CLAIM_ID_DISPLAY,
"EMPLOYEE_ID",
"CLAIM_DATE",
"START_FROM",
"END_TO",
"REIMB_NAME",
"REIMB_AMOUNT",
"REMARK",
"ACTIVE_FLAG",
"STATUS",
"APPROVE_NO",
"APPROVE_FLAG"
from "EMP_REIMBURSEMENT_DTL
{code}
i want to change column from text field to Check box
Cplumn Name :
1.ACTIVE_FLAG Return value 'Y'
2.STATUS Return Value "APPROVE"
How to pass it with check box in tabular form.
ThanksVisit this demo app:
http://apex.oracle.com/pls/otn/f?p=31517:1
Section VI has a lot of tabular form stuff with checkbox handling.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
How to create check box in ALV Reports?
how to create check box in ALV Reports?
Hi
check the report BCALV_TEST_GRID_EDITABLE
or
check this report
REPORT ZRFC346_TST.
TABLES:SFLIGHT,RL034.
TYPE-POOLS:SLIS.
INCLUDE:<ICON>,<SYMBOL>.
DATA: G_REPID LIKE SY-REPID,
G_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
G_IT_SORT TYPE SLIS_T_SORTINFO_ALV,
G_LAYOUT TYPE SLIS_LAYOUT_ALV,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME,
G_KEYINFO TYPE SLIS_KEYINFO_ALV,
G_VARIANT LIKE DISVARIANT,
G_EXTAB TYPE SLIS_T_EXTAB,
I_SLIS_EXIT_BY_USER TYPE SLIS_EXIT_BY_USER.
DATA: XEVENT TYPE SLIS_T_EVENT,
AEVENT TYPE SLIS_ALV_EVENT,
VARIANT LIKE DISVARIANT,
LAYOUT TYPE SLIS_LAYOUT_ALV,
ASP_GROUP TYPE SLIS_SP_GROUP_ALV,
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
EXTAB TYPE SLIS_T_EXTAB WITH HEADER LINE,
XFIELD TYPE SLIS_T_FIELDCAT_ALV,
AFIELD TYPE SLIS_FIELDCAT_ALV,
G_SUCOMM LIKE SY-UCOMM,
G_SELFLD TYPE SLIS_SELFIELD.
DATA: SAV_SY_REPID LIKE SY-REPID.
CONSTANTS: CON_SFLIGHT TYPE LVC_FNAME VALUE 'SFLIGHT',
CON_DISPLAY_FULL TYPE I VALUE 3.
Data to be displayed
DATA: BEGIN OF GT_SFLIGHT OCCURS 0.
INCLUDE STRUCTURE SFLIGHT.
DATA:ACTIVATE(1).
DATA: END OF GT_SFLIGHT.
INITIALIZATION.
*........Initialisierung...............................................
PERFORM INITIALIZATION_RL034.
*........Field cata....................................................
PERFORM FIELD_CAT.
*........SPECIAL GROUP.................................................
PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
START-OF-SELECTION.
Selection
SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
*........ALV CALL.......................................................
PERFORM ALV_CALL.
PERFORM USER_COMMAND_LOCAL USING G_SUCOMM G_SELFLD.
FORM USER_COMMAND_LOCAL *
--> G_UCOMM *
--> G_SELFIELD *
FORM USER_COMMAND_LOCAL USING G_UCOMM LIKE SY-UCOMM
G_SELFIELD TYPE SLIS_SELFIELD.
CASE G_UCOMM.
WHEN 'ACT'.
ENDCASE.
ENDFORM.
FORM ALV_CALL *
FORM ALV_CALL.
Call ABAP List Viewer (ALV)
G_LAYOUT-BOX_FIELDNAME = 'ACTIVATE'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_BYPASSING_BUFFER = SPACE
I_BUFFER_ACTIVE = SPACE
I_CALLBACK_PROGRAM = SAV_SY_REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND_LOCAL'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'SFLIGHT'
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = G_LAYOUT
IT_FIELDCAT = XFIELD[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = GT_SP_GROUP[]
IT_SORT =
IT_FILTER =
IS_SEL_HIDE = 'X'
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = XEVENT
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
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = GT_SFLIGHT
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.
FORM status *
--> EXTAB *
FORM STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STAT' EXCLUDING EXTAB.
ENDFORM. " STATUS
*& Form INITIALIZATION_RL034
text
--> p1 text
<-- p2 text
FORM INITIALIZATION_RL034.
SAV_SY_REPID = SY-REPID.
ENDFORM. " INITIALIZATION_RL034
*& Form DEFINE_EVENTS_RL034
text
--> p1 text
<-- p2 text
FORM DEFINE_EVENTS_RL034.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = XEVENT.
exceptions
list_type_wrong = 1
others = 2.
ENDFORM. " DEFINE_EVENTS_RL034
*& Form FIELD_CAT
text
--> p1 text
<-- p2 text
FORM FIELD_CAT.
DATA: LS_FCAT TYPE SLIS_FIELDCAT_ALV,
L_LIN TYPE I.
REFRESH XFIELD.
1. per Default eingeblendete Felder *
*........Ikone/Symbol..................................................
CLEAR AFIELD.
DATA: LS1_FCAT TYPE SLIS_FIELDCAT_ALV,
L_LIN1 TYPE I.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = CON_SFLIGHT
I_BYPASSING_BUFFER = SPACE
I_BUFFER_ACTIVE = SPACE
CHANGING
CT_FIELDCAT = XFIELD
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
DESCRIBE TABLE XFIELD LINES L_LIN1.
ADD 1 TO L_LIN1.
CLEAR LS_FCAT.
LS1_FCAT-FIELDNAME = 'ACTIVATE'.
LS1_FCAT-CHECKBOX = 'X'.
LS1_FCAT-KEY = 'X'.
LS1_FCAT-INPUT = 'X'.
LS1_FCAT-EDIT = 'X'.
LS1_FCAT-INTTYPE = 'C'.
LS1_FCAT-DATATYPE = 'CHAR'.
LS1_FCAT-INTLEN = 1.
LS1_FCAT-COL_POS = L_LIN1.
LS1_FCAT-SELTEXT_S = LS1_FCAT-FIELDNAME.
LS1_FCAT-SELTEXT_M = LS1_FCAT-FIELDNAME.
LS1_FCAT-SELTEXT_L = LS1_FCAT-FIELDNAME.
LS1_FCAT-SP_GROUP = 'A'.
APPEND LS1_FCAT TO XFIELD.
ADD 1 TO L_LIN.
ENDFORM. " FIELD_CAT
FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
CLEAR LS_SP_GROUP.
LS_SP_GROUP-SP_GROUP = 'A'.
LS_SP_GROUP-TEXT = 'SPECIAL'.
APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
ENDFORM.
Regards
Shiva -
How to insert check box value in table?
Hi all
kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
thanx in advanceHi,
There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
(you cannot define boolean as a datatype for a column).
If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
(for the rest if it's Oracle Forms then everything is already said).
Edited by: user11268895 on Aug 17, 2010 10:44 AM -
How to create check boxes dynamically in selection screen
Hi Experts,
I have a requirement of creating dynamic check boxes based on the number of records that are retrieved from a database table.
Can you please suggest me how to achieve it.
Regards
RP.Hey RP,
Try this way.
REPORT ztest_program .
DATA: it_data TYPE TABLE OF t001.
DATA:check TYPE char3.
DATA:sy_index TYPE char2.
DEFINE checkbox.
parameters:&1 as checkbox.
END-OF-DEFINITION.
CHECKbox:c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,
c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,
c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,
c31,c32,c33,c34,c35,c36,c37,c38,c39,c40.
AT SELECTION-SCREEN OUTPUT.
DESCRIBE TABLE it_data LINES sy-tfill.
sy-tfill = 39. "This will be changed based on the itab records. I just hardcoded the value
sy_index = 1.
LOOP AT SCREEN.
CONCATENATE 'C' sy_index INTO check.
IF screen-name = check.
IF sy_index GT sy-tfill.
screen-active = '0'.
MODIFY SCREEN.
sy_index = sy_index + 1.
CONTINUE.
ENDIF.
sy_index = sy_index + 1.
ENDIF.
ENDLOOP.
Thanks
Venkat.O -
BSP: How to create check box in a column of a Table View
Hi All,
I have a table view in Web IC scenario. my requirement is to display check box in one of the column of the table view.. so that i can select multiple lines from the table and do some calculations!.
Anybody have any hint/clue
Thanks in advance,
sudeep v d.Hi,
This can be achieved by using a Table iterator.
Please check the standard examples for this.
Thanks,
Rashmi. -
How to put check box in a table format at the out put ? Urgent issue...
Hi,
I am working an assignment to assign multiple roles for multiplr user.
In selection screen we have to enter mutiple EMPNO from ..to
1) in second screen we will get the empno, First name, last name, Position,
From date, To date, Sap user ID, Email id in the table formate with first
column with Check box.
2) In second screen below the table I have to place the multiple roles just like in
the step loop format and below this one Execute button should be there.
If we select the multiple employees or single employee and place the multiple roles or single roles and if I click the execute button then the multiple roles will be assigned to the multiple employees. The empno and roles will come from table and step loop to internal table and the same will pass to the BDC.
For this requirement I prepered recording for Transaction PFCG. But I can't understand how to design the second screen that table format and the step loop format. Can anybody give any idea or any coding to design the second screen.
and how to meet the requirement. This is urgent issue. Good SDN points will be reworded.
Witing for kind response.
Thanks in advance.
BansidharHi upendra
There are slight changes in the sivas code.Where is the data coming into the table.If its from a Model Node then iterate each element of the source node get that value compare and set the corresponding value in the element of the node binded to table.
Create a boolean attribute "select" in the table node and bind it to checked property of the check box.
for(int i=0;i<wdContext.node<tablenode>()..size();i++)
if(wdContext.node<tablenode>().get<tablenode>ElementAt(i).select())
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(true);
else
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(false);
See the attribute is boolean so pass true or false as a values in setter methods.
Regards
Kalyan -
How to use check box in a table
i have a field in a internal table in which i have to put "X" if the user checks on a check box, for a particular row.
please provideme with the required code .
Thankyou.
UpendraHi upendra
There are slight changes in the sivas code.Where is the data coming into the table.If its from a Model Node then iterate each element of the source node get that value compare and set the corresponding value in the element of the node binded to table.
Create a boolean attribute "select" in the table node and bind it to checked property of the check box.
for(int i=0;i<wdContext.node<tablenode>()..size();i++)
if(wdContext.node<tablenode>().get<tablenode>ElementAt(i).select())
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(true);
else
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(false);
See the attribute is boolean so pass true or false as a values in setter methods.
Regards
Kalyan -
How to Create file link from dynamic table.
Howdy -
I have MySQL database over PHP containing a simple table that lists a group of documents, including their file system address (contained within the site).
I've successfully created a recordset showing this table, and attached that to a dynamic table on a .php page. The display is correct, except I can't get the column contents to link to the document. The column just shows the text (title) of the document.
I've consulted article tn_15364 (http://kb2.adobe.com/cps/153/tn_15364.html), but that doesn't seem to work...
Any thoughts would be appreciated. I'm sure this is pretty simple, but I'm coming up snake eyes.
Charles AndrewsTo clarify:
My site has a folder where uploaded files (.doc, .xls, .pdf, etc.) are stored after having been uploaded by a user. During this upload process, the location of these files is stored, along with other identifying data, in a simple database table.
I have a dynamic table created in Dreamweaver that pulls from this database, listing the document name, etc. I would like the document name shown in a column to automatically link to the actual file so a user could just click on it and open the file.
I hope I'm not making sound more complicated than it is -
Thanks,
CWA -
Create Check Box Programmatically
Hi ALL
Let me know how to Create Check Box Programmatically using table column.
Thanking You
Rehards
LakmalYou can't create Forms widgets dynamically. What you have to do is create them at design time and then hide/unhide them at runtime using things like stacked canvases.
Regards
Grant Ronald -
. How to put Check box in every row in Table
Hi Friends,
I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
Here Select Check Box of particular row then click GetData button. That row data will be displayed in one popup window.
In table suppose 6 rows available in table. Every Row first Check box available.
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
How to put Check box in every row in Table? can you send any examples applications
Regards
VijayHi Friend,
When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
attribute.
So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
Okay...here i am getting one problem. i have got Check boxes .But i am select check box in first row. that time all check boxes will be selected.
i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
i need this can u help me....
Regards
Vijay -
How to create dropdown box, radio button,check box in wad
Hi,
How to create dropdown box, radio button,check box in wad.
Thanks,
cheta.Cheta,
This are all standard Web Items in the WAD. Drag them onto your template and then make the changes you need to them in their Properties.
Regards
Gill -
How to insert check box fields in a htmlb: tableview
Hi,
Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
Thanks in advance,
Aruna.Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
<b>Layout:</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content id = "content"
design = "design2002+design2003"
controlRendering = "SAP"
rtlAutoSwitch = "true"
forceEncode = "ENABLED" >
<htmlb:page title="Test " >
<htmlb:form>
<%
data TV_ITERATOR Type Ref To zcl_itr.
data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
create object tv_iterator exporting appl_cons = application.
iterator = tv_iterator.
%>
<htmlb:tableView id = "fligts"
headerText = "Flight"
width = "100"
headerVisible = "true"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
showNoMatchText = "true"
filter = "server"
sort = "server"
onHeaderClick = "MyEventHeaderClick"
table = "<%= APPLICATION->itab %>"
iterator = "<%= ITERATOR %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>Event Handling:</b>
DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
CASE EVENT_ID1->EVENT_SERVER_NAME.
IF NOT event_id1 IS INITIAL.
if event_id1->server_event+0(9) = 'chkevent'.
SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
endif.
endif.
method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
CLEAR p_column_definitions.
CLEAR p_overwrites.
DATA: tv_column TYPE TABLEVIEWCONTROL.
tv_column-COLUMNNAME = 'FLDATE'.
tv_column-edit = 'X'.
tv_column-sort = 'X'.
tv_column-TITLE = 'Flight Date'.
tv_column-WIDTH = '100'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CONNID'.
tv_column-TITLE = 'Conn.ID'.
tv_column-WIDTH = '70'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CHECKBOX1'.
tv_column-TITLE = 'Check Box'.
tv_column-WIDTH = '30'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
endmethod.
METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
DATA: L_EVENT TYPE STRING.
CASE P_TABLEVIEW_ID.
WHEN 'fligts'.
CASE P_COLUMN_KEY.
WHEN 'CHECKBOX1'.
* CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
ONCLICK = L_EVENT CHECKED = 'false' ).
ENDCASE.
ENDCASE.
ENDMETHOD.
Hope this will solve your problem.
<b><i>* Reward each helpful answer.</i></b>
Raja T
Message was edited by:
Raja T -
How to get check box in alv output
hi gurus
can anyone explian me how to get check box in alv output
it should not be a pop up window
i want to get in output itself
tahnk you
regards
kals.Hi
by using rs_selfield
ty to call dynamic subroutine..
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
read table rs-selfield with key cond = 'X'
endform.
see the below example
REPORT Z_GET_REFRESH no standard page heading.
type-pools : slis.
tables : makt,
mara.
data : i_fieldcat type slis_t_fieldcat_alv.
CONSTANTS :
gc_refresh TYPE syucomm VALUE '&REFRESH'.
data : begin of i_makt occurs 0,
matnr like makt-matnr,
maktx like makt-maktx,
end of i_makt.
data : v_repid like sy-repid,
g_user_command type slis_formname value 'USER_COMMAND',
g_status_set type slis_formname value 'SET_PF_STATUS',
lt_event_exit TYPE slis_t_event_exit,
ls_event_exit TYPE slis_event_exit.
DATA:LC_GLAY TYPE LVC_S_GLAY.
select-options s_matnr for mara-matnr .
start-of-selection.
select matnr maktx from makt into table i_makt
where matnr in s_matnr.
end-of-selection.
Fill the fieldcatlog
perform fill_field.
Call the FM
perform call_fm.
*& Form fill_field
text
--> p1 text
<-- p2 text
FORM fill_field.
data wa_fieldcat type slis_fieldcat_alv.
clear : wa_fieldcat.
wa_fieldcat-tabname = 'I_MAKT'.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-outputlen = '18'.
wa_fieldcat-seltext_l = 'Material #'.
wa_fieldcat-col_pos = '1'.
append wa_fieldcat to i_fieldcat.
clear : wa_fieldcat.
wa_fieldcat-tabname = 'I_MAKT'.
wa_fieldcat-fieldname = 'MAKTX'.
wa_fieldcat-outputlen = '40'.
wa_fieldcat-seltext_l = 'Material Desc'.
wa_fieldcat-col_pos = '2'.
append wa_fieldcat to i_fieldcat.
ENDFORM. " fill_field
*& Form call_fm
text
--> p1 text
<-- p2 text
FORM call_fm.
v_repid = sy-repid.
LC_GLAY-EDT_CLL_CB = 'X'.
CLEAR ls_event_exit.
ls_event_exit-ucomm = gc_refresh. " Refresh
ls_event_exit-after = 'X'.
APPEND ls_event_exit TO lt_event_exit.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = g_status_set
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS = LC_GLAY
IS_LAYOUT =
IT_FIELDCAT = i_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT = lt_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
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_makt
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. " call_fm
FORM USER_COMMAND *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
data i_RSPARAMS like RSPARAMS occurs 0.
CASE R_UCOMM.
WHEN '&IC1'.
read table i_makt index rs_selfield-tabindex.
SET PARAMETER ID 'MAT' FIELD i_makt-matnr.
if not i_makt-matnr is initial.
call transaction 'MM02' and skip first screen.
endif.
when '&REFRESH'.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = v_repid
IMPORTING
SP =
TABLES
SELECTION_TABLE = i_RSPARAMS
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
submit z_get_refresh with selection-table i_RSPARAMS.
rs_selfield-refresh = 'X'.
ENDCASE.
MOVE '&REFRESH' TO r_ucomm.
ENDFORM.
FORM set_pf_status *
FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
DELETE Rt_extab WHERE fcode = gc_refresh.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
EXCLUDING Rt_extab.
*SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.
SET TITLEBAR sy-tcode.
ENDFORM. -
How to create Option Boxes IN A SELECTION SCREEN
How to create Option Boxes IN A SELECTION SCREEN.
Thanks!Hi Rajesh,
The following explanation gives clear picture of what is mean of check box and radio button with coding.....................
<b>CHECK BOX :</b>
AS CHECKBOX [USER-COMMAND fcode]
Effect:
This addition specifies that the input field in the first position of the selection screen is displayed as a checkbox, with the corresponding description next to it on the right. The checkbox is selected if the value of para is "X" or r "x". Otherwise, it is not selected.
The parameter must be created with the type c and length 1. An explicit length len is not permitted. If the addition TYPE is used, this can only be followed by the generic type c or a non-generic data type of type c and length 1.
The addition USER-COMMAND can be used to assign a function code fcode to the parameter. The function code fcode must be directly specified and may have a maximum length of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from the ABAP Dictionary must be declared using the statement TABLES. When the user selects the checkbox on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
Notes
If the TYPE addition is used to make a reference to a data type in the ABAP Dictionary of type CHAR and length 1, and for which t the valid values in the domain are defined as "X" and " ", the parameter is automatically displayed as a checkbox on the selection screen.
If the addition USER-COMMAND is specified without the addition AS CHECKBOX, and the parameter is of type c with length 1, it is also displayed as a checkbox.
The addition USER-COMMAND can, for example, be used for screen modifications with the addition MODIF ID (see example).
<b>Coding :</b>
PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1(10) TYPE c,
p2(10) TYPE c,
p3(10) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p4(10) TYPE c MODIF ID bl2,
p5(10) TYPE c MODIF ID bl2,
p6(10) TYPE c MODIF ID bl2.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF show_all <> 'X' AND
screen-group1 = 'BL2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
<b>RADIO BUTTON COMMAND :</b>
RADIOBUTTON GROUP group [USER-COMMAND fcode]
Effect:
This addition specifies that the input field is displayed as a radio button in the first position on the selection screen, and the output field is displayed next to it on the right. The radio button is selected if the value of para is "X" or "x". Otherwise, it is not selected.
group is used to define the radio button group for the parameter. The name group is entered directly as a character string with a maximum of 4 characters. Within a selection screen, there must be a minimum of two parameters in the same radio button group. There cannot be more than one radio button group with the same name in one program, even if they are defined in different selection screens.
The parameter must be specified with the type c and length 1. Explicit length specification using len is not permitted. If the addition TYPE is used, it can only be followed by the generic type c or a non-generic data type of type c and length 1.
In a radio button group, only one parameter can be defined with the addition DEFAULT, and the specified value must be "X". By default, the first parameter in a radio button group is set to the value "X", and the rest are set to " ".
The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from the ABAP Dictionary must be declared using the statement TABLES. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
Note:
It is recommended to define the radio buttons of a radio button group directly underneath each other. If the selection screen also contains other elements, it is recommended to define each radio button group within a block surrounded by a frame.
<b>CODING :</b>
tables : mkpf,mseg,ekko.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1,
c as checkbox.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND UC1.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
write :/ p_werks,
/ s_ebeln.
AT SELECTION-SCREEN OUTPUT .
LOOP AT SCREEN .
IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.
SCREEN-INPUT = 0.
SCREEN-REQUIRED = 1.
clear s_ebeln[].
clear p_werks.
MODIFY SCREEN.
ENDIF.
IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
SCREEN-INPUT = 0.
SCREEN-REQUIRED = 1.
clear s_ebeln[].
clear p_werks.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Let me knwo if any doubts.
<b>Reward with points if it helpful</b>
Regards,
Vijay
Maybe you are looking for
-
Okay so when I had a ipod touch 4 with ios 6 my apple id got hacked and they spent all my itunes credit bla blah blah. so i made a new apple id which was fine and was working. i recently upgraded to an ipod 5 so did my sister and i got ios 7and she j
-
FR - User defined list not editable
Dear Techies, We are having an issue off-late with respect to editing the User defined list that we created within Financial reports. When we open the FR Studio we are not able to see the list and not able to add new items to the existing user define
-
CS6 Artboard Issue??
Did something change with artboards from CS5 to CS6 in Illustrator? We are running Illustrator CS6 64bit and everything seams to be about as smooth as a babies bottom "EXCEPT" ARTBOARDS... It's making us crazy! In CS5 we used the arboard as a crop be
-
3D Area chart with incremental sum
Hi all, I am quite new to Numbers, but I found it to be extremely powerful in keeping control of my activity, especially if used with iCloud. In this case I have a spreadsheet with all my recorded invoices. This is, roughly, the structure: invoice id
-
In the last version of Firefox, if I hovered my cursor over the right hand end of the toolbar, I could find a button to "show desktop". It is no longer there and I would like that convenience.