Using check Box in a Tree Region style
I want to display some data in a hierarchical manner and use a checkbox for the user to select the node for which he wants to see a report.
I need to fetch the node value where the user has ticked in the check box.
I went through the documentation but it does not mention about using a checkbox.
Can any one please let me know if we can use checkbox to tree nodes and to capture the user checked nodes do we have to make the VO based on an EO or even with a read only VO I can know which node the user has selected.
Regards
Hawker
Don't cross post: http://forum.java.sun.com/thread.jspa?threadID=5130358&messageID=9467688#9467688
Search google:
http://www.google.com/search?q=jtree+checkbox
This is one of the examples you can find:
http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm
Similar Messages
-
Hi,
In my project i need to use Check box in <af:tree> so that i can select some tree nodes .Has anyone tried it before?. any pointers regarding this would be helpful for me.
thanks in advance,
harshaHi,
Maybe you need to set a partialTriggers in af:selectBooleanCheckbox, referencing to clear button.
Anyway, see this Andrejus' article, perhaps you can on it a better way to achieve that: http://andrejusb.blogspot.com.es/2011/12/adf-tree-how-to-autoselectdeselect.html
AP -
How to use check box & dropdownlist in smart forms
can anybdy explain(any examples) how i can use check box or drop down list in smart forms.is ther any provision like that
Hi Ranjith,
To use Check box in smartform do the following:
Change the editor to 'PC Editor' and take the menu.
in text editor of TEXT ELEMENTS..
Insert -> Characters -> SAP Symbols
in print preview u can't see these changes..
for more details check this link..
How to create checkbox in smartforms??
Ashven -
How to use check box in flash 8?
How to use check box in flash 8?
If you want it to happen when someone clicks the checkbox, then you need to add a listener for that event.
var cbListener:Object = new Object();
cbListener.click = function (evt:Object) {
if (cb.selected) {
gotoAndStop(2);
cb.addEventListener("click", cbListener);
(Note: "cb" and "cbListener" are names that were made up for this example. They could be anything you want to name them) -
Using check boxes appear as a "tick" and I want a "X"
Hi guys - new user to Adobe Forms (MAC Adobe Acrobat XI) - I have used check boxes in my first form however when I check them they appear as a "tick" and I want a "X" - I went to the properties section and tried all the options (circle, etc) but it always came back as a tick - any suggestions?
Thanks George - whilst I've used Dropbox for a couple of years now this is the first time I have shared a file (which you should have received directly to your email - I'm sorry to say I wasn't sure how to post the link in this forum! (once again a bit clueless on my part)
Interesting however since I tested the process by sending to my work PC (WIN7) and the boxs have crosses in them! so the problem appears to be with my set up on my home mac (OSX 10.9.4). Really I should have thought to do this first before asking!
Any thoughts?
Cheers -
H ow we use check boxes in report
how we use check boxes in report(alv,intrective)
Hi,
In the basic list we will display the Check box, once the check box is clicked then the recrod information should be displayed in the secondary list. so we will give the Check box for every reocrd then what ever we select the checkboxes. then we shoild provide the info of those records
Reports with checkbox
Regards
Sudheer -
Use check box for report and form
Hi Expert,
I try to use check box to select multiple rows in a report and then click on a button to go to a form on another page to choose some values from the form and then do a mass update for records selected in reports.
I read the "How to Work with Check Boxes" in 2 Day Developer guide, it works fine to select mutiple rows in report and do update with process in that report page.
However, if I click on a button to go to another page which contains a form, seems the values stored in the package array are cleared and not passed to that page.
Do you know how I could make this work?
Thanks a lot,
JessieHello Sakti,
I am also in ECC6.0 & if i see the definition of the BAdI BADI_TAX1_XTXIT_SET, "Multiple Use" checkbox is checked! What are you trying to do - trying to create an implementation?
@Prabhu: Although the BAdI is "multiple-use", but there is not filter applied to it. Next time do your checks properly before replying
BR,
Suhas -
How to display another window by using Check box
Hi Friends,
I have one doubt in Webdynpro with java. How to display another window by using Check box?
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 Second View. So in Second View I will taken Table that data will displayed in rows. each and every row first check box is available.
Here Select Check Box of particular row then click Edit button. That row data will be displayed in one popup window.
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
Suppose I have to select check box in First Row Click on EDIT button That row data will be displayed in another popup window here customer will change details depending up requirement click on SAVE Button that update data will saved in ECC System.
How to display another window by using Check box?
Regards
VijayHi Vijay
Your question is not clear enough to give an answer. Do you have some difficulties with the code for opening a popup-window? There are many-many examples in the forum how to open/close a popup.
Or you do not know how to bind the popup opening with clicking a check box? Just put the code in the onSelect event handler of the check box.
BR, Siarhei
Edited by: Siarhei Pisarenka on Mar 11, 2010 10:55 AM -
Unable to check multiple use check box for BADI
Hi,
In ECC 6.0, when I am trying to activate the multiple use check box ( For multiple implementation of BADI ) , it is not allowed me the same.
Throwing the error as - interface IF_EX_TAX1_XTXIT_SET can not be used.
BADI name - BADI_TAX1_XTXIT_SET
Can anyone pls help me how to do this.
Thanks,
ShaktiHello Sakti,
I am also in ECC6.0 & if i see the definition of the BAdI BADI_TAX1_XTXIT_SET, "Multiple Use" checkbox is checked! What are you trying to do - trying to create an implementation?
@Prabhu: Although the BAdI is "multiple-use", but there is not filter applied to it. Next time do your checks properly before replying
BR,
Suhas -
Validating forms using check boxs
hi i am trying to validate a form using check boxs where all of the elements have the same name. Using the code below it enables validation when only one check box is available, however with muliple check-boxs it goes into and eternal loop and never executes the code! Any help on this matter would be most appreciated.
<SCRIPT language="javaScript">
function validate()
if (!document.myform.pkey.checked)
alert("Please Select a Questionnaire to delete!!");
return false;
</SCRIPT>Hi,
When you have multiple checkboxes with same name, it will form an array of check boxes. So you have to validate them as below.
flag=0;
if(chkcntr>1)
for(i=0;i<frm.ch.length;i++)
if(frm.ch.checked)
flag=1;
break;
else
if(frm.ch.checked)
flag=1;
if(flag==1)
//checkbox selected,can give any action
else
// checkbox not selected,give alert -
How to use check box in SQL Query
Hi
I have a reagion with check boxes. Now I am creating another region which is
PL/SQL function/block returning query.
here' the block. When I save it give me error
Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00900: invalid SQL statement
Here is the code
DECLARE
p_str VARCHAR2(2000);
p_col_name varchar2(100);
p_flg char(1);
BEGIN
p_flg := 'N';
for i in 1 .. htmldb_application.g_f01.count
LOOP
p_flg := 'Y';
p_col_name := htmldb_application.g_f01(i);
IF i = 1
THEN
p_str := 'SELECT ' || p_col_name;
ELSE
p_str := p_str || ', ' || p_col_name;
END IF;
END LOOP;
p_str := p_str || ' FROM UALDBA_V';
RETURN p_str;
END;
Please advice
SunilSunil - The htmldb_application.g_fxx arrays are empty during page rendering. A query cannot be generated using them.
Scott -
Problem Using Check Box in a Report
Hi all,
I have a simple SQL report with a check box.The problem is when paginating forward and backward in the report(Next and Previous),The report region is refreshed and all the check boxes is reset to unchecked.
P.S: I'm using APEX 4.0.
Any Help will be appreciated,
OlaOla,
If you search the forum, you will find lot of discussions on this issue..
In nutshell, solution is -
Case 1: If you have enabled partial refresh for your report ( pagination works through AJAX)
Then
a. onClick of any check-box, call JS function, lets say fnSaveState(this);
b. In JS function, update/store all the checked check-boxes info in JS variable or array.
c. Bind a JS function, lets say fnSetState() - which will set the check boxes to either checked or un-checked based on JS variable/array value(s) to pagination onClick event.
Case 2: If you have not enabled partial refresh for your report
Then
a. onClick of any check-box, call JS function, lets say fnSaveState(this);
b. In JS function, store the check-box status in any hidden_item and insert its value into session with dummy AJAX call.
c. On page load call JS function, lets say fnSetState() - which will set the check boxes to either checked or un-checked based on hidden item value(s) .
Hope it helps.
Regards,
Hari -
Update database using check boxes
I have a query region that produces a checkbox and an associated line with the checkbox. The data in the database that is a "Y", produces a checked box.
select check_box_seq,
htmldb_item.checkbox(1,is_it_checked,decode(is_it_checked,'Y','CHECKED')) D,
check_box_text R
from check_box_tbl
What I need to happen is to change one or more check boxes. I have a MultiRow Update process, with a process point of On Submit - After Computations and Validations with a PL/SQL conditional processing of:
FOR I in 1.. HTMLDB_APPLICATION.F_F01.COUNT LOOP
update table check_box_tbl set is_it_checked = Y
where check_box_seq = htmldb_item.application.g_f01(i);
END LOOP;
But the data in the database does not change. I have read numerous discussion on this thread but I have not found exactly what I need or can not recognize it.
How can I get the data in the database to change when I either change a checked box or after I have changed all boxes and then press the SUBMIT.I am having a similar problem that I cannot find the answer to. (See my process below). I don't think that the process is "grabbing" the checked values in the SDN column. It is using NULL, so therefore no rows are being inserted in the table. Shg_id and SDN are both primary keys in this table, so I need to insert both. Shg_id has an assigned value already.
My process is this:
DECLARE
l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
BEGIN
l_selected := HTMLDB_UTIL.STRING_TO_TABLE(:P312_SDN);
FOR i IN 1..l_selected.count
LOOP
INSERT INTO shgm (Shg_id, SDN)
VALUES (:P312_Shg_id, l_selected (i));
END LOOP;
END; -
Check box symbol in Tree control
Hi,
I have built a code for using checkbox symbol in tree function and stuck to get the selected check box item.
Actually my requirement is to to use tree with check box and do the multiple selection and get the selected item list. I have completed till the Check box selection but not able to get the all selected item list.
I have attached the code for your reference.
Please let me know hot to do this, If any one knows .
Thanks in advance
Sorry I didn't get here sooner, here is some example code I made a while ago that supports listboxes, MCLB, and Tree selections. It also supports nested levels to the tree, select all or select none, and selecting deselecting parent items, and partial selection of parents if children selection are mixed. Oh and it supports disabling items so the user can't change the selected state.
https://decibel.ni.com/content/docs/DOC-42155 -
Selection using check box in std ALV grid!
Hi all,
I have written a custom report to show the O/p in ALV grid.
This is my code:
TABLES :zpo_loi.
TYPE-POOLS : slis.
TYPE-POOLS: icon.
TABLES : sscrfields.
DATA : ls_composer TYPE ssfcompop,
ls_control TYPE ssfctrlop.
DATA : wa_return TYPE TABLE OF bapiret2 ,
wa_address TYPE bapiaddr3.
DATA : wa_crmd_orderadm_h TYPE zpo_loi,
it_po TYPE TABLE OF crmd_orderadm_h,
wa_po TYPE bbp_pds_header.
DATA : it_tab TYPE TABLE OF zpo_loi.
DATA : it_data TYPE TABLE OF crmd_orderadm_h,
wa_data TYPE bbp_pds_header,
et_data TYPE bbps_sf_po_output.
DATA : w_formname TYPE tdsfname ,
w_sfname TYPE rs38l_fnam.
DATA :it_po_no TYPE TABLE OF select_be_obj_id,
wa_it_po_no LIKE LINE OF it_po_no.
DATA :r_itab TYPE ddshretval OCCURS 0.
DATA : it_output LIKE TABLE OF zloi,
wa_output TYPE zloi.
DATA : w_answer TYPE c.
DATA : g_repid LIKE sy-repid,
g_title TYPE lvc_title,
g_set_pf_stat TYPE slis_formname VALUE 'SET_PF_STATUS',
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
g_layout TYPE slis_layout_alv,
g_print_alv TYPE slis_print_alv,
g_variant LIKE disvariant,
c_char_a(1) VALUE 'A',
c_char_x(1) VALUE 'X',
itab_alv_sort TYPE slis_t_sortinfo_alv,
itab_alv_fcat TYPE slis_t_fieldcat_alv.
* Internal tables Begin with IT_ *
DATA : it_fcat TYPE slis_t_fieldcat_alv, "---ALV
it_disp TYPE TABLE OF zloi.
* Work Area for Internal tables Begin with WA_ *
DATA : wa_fcat TYPE slis_fieldcat_alv , "---ALV
wa_layout TYPE lvc_s_layo, "---ALV
wa_it_disp LIKE LINE OF it_disp.
DATA : it_sf_po TYPE TABLE OF crmd_orderadm_h,
wa_sf_po TYPE bbp_pds_header.
*SELECTION-SCREEN:
* BEGIN OF SCREEN 500 AS WINDOW TITLE title,
* END OF SCREEN 500.
*DATA : functxt TYPE smp_dyntxt.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS sel_po FOR zpo_loi-zobject_id.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : pr_loi RADIOBUTTON GROUP grp1 USER-COMMAND ucom,
pr_fondo RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK b2.
* At selection-screen output *
AT SELECTION-SCREEN OUTPUT.
IF pr_fondo = 'X'.
REFRESH sel_po.
LOOP AT SCREEN.
IF screen-name = text-003 OR screen-name = text-004.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF pr_loi = 'X'.
LOOP AT SCREEN.
IF screen-name = text-003 OR screen-name = text-004.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
* At selection-screen on radiobutton *
AT SELECTION-SCREEN ON RADIOBUTTON GROUP grp1.
IF pr_fondo = 'X'.
REFRESH sel_po.
LOOP AT SCREEN.
IF screen-name = text-003 OR screen-name = text-004.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF pr_loi = 'X'.
LOOP AT SCREEN.
IF screen-name = text-003 OR screen-name = text-004.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_po-low.
PERFORM populate_table.
PERFORM f4_help.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_po-high.
PERFORM populate_table.
PERFORM f4_help.
* At selection-screen *
AT SELECTION-SCREEN.
*---CHECKING THE INPUT >>>
IF sy-ucomm = 'ONLI'.
PERFORM f002-check_input.
PERFORM f001-check.
ENDIF.
*& Form POPULATE_TABLE
* text
* --> p1 text
* <-- p2 text
FORM populate_table .
SELECT zobject_id
description
FROM zpo_loi
INTO CORRESPONDING FIELDS OF TABLE it_tab.
SORT it_tab BY zobject_id ASCENDING.
ENDFORM. " POPULATE_TABLE
*& Form F4_HELP
* text
* --> p1 text
* <-- p2 text
FORM f4_help .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = ' '
retfield = 'ZOBJECT_ID'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'A'
value_org = 'S'
TABLES
value_tab = it_tab
return_tab = r_itab.
ENDFORM. " F4_HELP
*& Form F001-CHECK
* text
* --> p1 text
* <-- p2 text
FORM f001-check .
IF pr_fondo = 'X'.
PERFORM display_expiring_fondos.
ELSEIF pr_loi = 'X'.
PERFORM fetch_po_det.
PERFORM build_fcat.
PERFORM alv_display.
ENDIF.
ENDFORM. " F001-CHECK
*& Form F002-CHECK_INPUT
* text
* --> p1 text
* <-- p2 text
FORM f002-check_input .
IF pr_loi = 'X'.
REFRESH it_po.
IF sel_po-low IS NOT INITIAL.
SELECT object_id
FROM crmd_orderadm_h
INTO CORRESPONDING FIELDS OF TABLE it_po
WHERE object_type = 'BUS2201'
AND object_id = sel_po-low.
IF sy-subrc NE 0.
IF sel_po-high IS NOT INITIAL.
SELECT object_id
FROM crmd_orderadm_h
INTO CORRESPONDING FIELDS OF TABLE it_po
WHERE object_type = 'BUS2201'
AND object_id = sel_po-high.
IF sy-subrc NE 0.
MESSAGE e009(zsrm).
ENDIF.
ENDIF.
MESSAGE e007(zsrm).
ENDIF.
ELSE.
MESSAGE e010(zsrm).
ENDIF.
IF sel_po-high IS NOT INITIAL.
SELECT object_id
FROM crmd_orderadm_h
INTO CORRESPONDING FIELDS OF TABLE it_po
WHERE object_type = 'BUS2201'
AND object_id = sel_po-high.
IF sy-subrc NE 0.
MESSAGE e008(zsrm).
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " F002-CHECK_INPUT
*& Form FETCH_PO_DET
* text
* --> p1 text
* <-- p2 text
FORM fetch_po_det .
REFRESH it_po.
it_po_no[] = sel_po[].
DATA : w_count TYPE i,
w_lines TYPE c,
wa_header TYPE bbp_pds_po_header_d.
REFRESH : it_po,it_output.
IF sel_po-high IS NOT INITIAL.
SELECT object_id
description
posting_date
created_by
FROM crmd_orderadm_h
INTO CORRESPONDING FIELDS OF TABLE it_po
WHERE object_type = 'BUS2201'
AND object_id BETWEEN sel_po-low AND sel_po-high.
ELSE.
SELECT object_id
description
posting_date
created_by
FROM crmd_orderadm_h
INTO CORRESPONDING FIELDS OF TABLE it_po
WHERE object_type = 'BUS2201'
AND object_id = sel_po-low.
ENDIF.
w_lines = sy-dbcnt.
w_count = 1.
DO.
IF w_count LE w_lines.
READ TABLE it_po INTO wa_po INDEX w_count.
MOVE wa_po-object_id TO wa_output-zzpono.
MOVE wa_po-description TO wa_output-zzpodesc.
MOVE wa_po-posting_date TO wa_output-zzpodate.
MOVE wa_po-created_by TO wa_output-zzpocreator.
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
EXPORTING
i_object_id = wa_output-zzpono
IMPORTING
e_header = wa_header.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = wa_output-zzpocreator
IMPORTING
address = wa_address
TABLES
return = wa_return.
CLEAR wa_output-zzpocreator.
CONCATENATE wa_address-firstname ' ' wa_address-lastname INTO wa_output-zzpocreator .
MOVE wa_header-total_value TO wa_output-zzpoval.
MOVE wa_header-currency TO wa_output-zzpocur.
APPEND wa_output TO it_output.
w_count = w_count + 1.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDFORM. " FETCH_PO_DET
*& Form BUILD_FCAT
* text
* --> p1 text
* <-- p2 text
FORM build_fcat .
g_repid = sy-repid.
g_title = 'Print LOI details'.
g_print_alv-no_print_listinfos = 'X'.
g_variant-report = sy-repid.
g_variant-variant = sy-title.
CLEAR g_layout.
g_layout-f2code = ' '.
wa_layout-zebra = 'X'.
g_layout-flexible_key = 'X'.
g_layout-colwidth_optimize = 'X'.
g_layout-detail_initial_lines = 'X'.
g_layout-box_fieldname = 'ZZCHECK'.
REFRESH it_fcat.
*Po no
CLEAR wa_fcat.
wa_fcat-fieldname = 'ZZPONO' .
wa_fcat-tabname = 'IT_DISP'.
wa_fcat-seltext_m = 'Purchase Order'.
*wa_fcat-seltext_s = 'Purchase Order.
wa_fcat-icon = 'X'.
wa_fcat-col_pos = '2'.
wa_fcat-outputlen = 10.
APPEND wa_fcat TO it_fcat.
*Description
CLEAR wa_fcat.
wa_fcat-fieldname = 'ZZPODESC' .
wa_fcat-tabname = 'IT_DISP'.
*wa_fcat-seltext_l = 'Description'.
wa_fcat-seltext_m = 'Description'.
*wa_fcat-seltext_s = 'Description'.
wa_fcat-col_pos = '3'.
wa_fcat-outputlen = 10.
APPEND wa_fcat TO it_fcat.
*Posting date
CLEAR wa_fcat.
wa_fcat-fieldname = 'ZZPODATE' .
wa_fcat-tabname = 'IT_DISP'.
wa_fcat-seltext_l = 'Posting Date'.
wa_fcat-seltext_m = 'Posting Date'.
*wa_fcat-seltext_s = 'Posting Date'.
wa_fcat-col_pos = '4'.
wa_fcat-outputlen = 8.
APPEND wa_fcat TO it_fcat.
*value
CLEAR wa_fcat.
wa_fcat-fieldname = 'ZZPOVAL' .
wa_fcat-tabname = 'IT_DISP'.
*wa_fcat-seltext_l = 'PO value'.
wa_fcat-seltext_m = 'PO value'.
*wa_fcat-seltext_s = 'PO value'.
wa_fcat-col_pos = '5'.
wa_fcat-outputlen = 15.
wa_fcat-no_zero = 'X'.
APPEND wa_fcat TO it_fcat.
*Currency
CLEAR wa_fcat.
wa_fcat-fieldname = 'ZZPOCUR' .
wa_fcat-tabname = 'IT_DISP'.
*wa_fcat-seltext_l = 'PO Currency'.
wa_fcat-seltext_m = 'PO Currency'.
*wa_fcat-seltext_s = 'PO Currency'.
wa_fcat-col_pos = '6'.
wa_fcat-outputlen = 5.
APPEND wa_fcat TO it_fcat.
*Creator
CLEAR wa_fcat.
wa_fcat-fieldname = 'ZZPOCREATOR' .
wa_fcat-tabname = 'IT_DISP'.
*wa_fcat-seltext_l = 'Buyer'.
wa_fcat-seltext_m = 'Buyer'.
*wa_fcat-seltext_s = 'Buyer'.
wa_fcat-col_pos = '7'.
wa_fcat-outputlen = 12.
APPEND wa_fcat TO it_fcat.
ENDFORM. " BUILD_FCAT
*& Form ALV_DISPLAY
* text
* --> p1 text
* <-- p2 text
FORM alv_display .
SORT it_output BY zzpono.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_pf_status_set = g_set_pf_stat
i_callback_user_command = g_user_command
i_grid_title = g_title
is_layout = g_layout
it_fieldcat = it_fcat[]
is_variant = g_variant
is_print = g_print_alv
TABLES
t_outtab = it_output[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " ALV_DISPLAY
*& Form user_command
* text
* -->R_UCOMM text
* -->RS_SELFIELD text
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
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.
rs_selfield-refresh = 'X'.
CASE r_ucomm.
WHEN 'PRINTLOI'.
PERFORM call_sf.
WHEN 'BACK'.
CALL SELECTION-SCREEN 1000.
WHEN 'CANCEL'.
CALL SELECTION-SCREEN 1000.
WHEN 'EXIT'.
CALL SELECTION-SCREEN 1000.
ENDCASE.
ENDFORM. "user_command
*& Form set_pf_status
* text
* -->RT_EXTAB text
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZALV' EXCLUDING rt_extab.
SET TITLEBAR 'ZALV'.
ENDFORM. "set_pf_status
*& Form CALL_SF
* text
* --> p1 text
* <-- p2 text
FORM call_sf .
REFRESH it_sf_po.
LOOP AT it_output INTO wa_output WHERE zzcheck = 'X'.
wa_sf_po-object_id = wa_output-zzpono.
APPEND wa_sf_po TO it_sf_po.
ENDLOOP.
w_formname = 'ZSR_EBP_DOCU_LETTEROFINTENT1'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_formname
IMPORTING
fm_name = w_sfname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ls_composer-tdnewid = 'X'.
ls_control-no_dialog = 'X'.
LOOP AT it_sf_po INTO wa_sf_po.
CALL FUNCTION w_sfname
EXPORTING
control_parameters = ls_control
output_options = ls_composer
wa_object = wa_sf_po
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.
ENDLOOP.
ENDFORM. " CALL_SF
*& Form DISPLAY_EXPIRING_FONDOS
* text
* --> p1 text
* <-- p2 text
FORM display_expiring_fondos .
SET PF-STATUS 'ZLOI'.
SET TITLEBAR 'ZLOI'.
TYPES : BEGIN OF ty_output1,
guid TYPE bbp_guid,
object_id TYPE crmt_object_id_db,
description TYPE crmt_process_description,
posting_date TYPE crmt_posting_date,
zzfondo_dat TYPE zfondo_dat,
created_by TYPE crmt_created_by,
END OF ty_output1.
DATA : it_output1 TYPE TABLE OF ty_output1,
wa_output1 TYPE ty_output1,
w_lines,
w_count,
it_fondo TYPE TABLE OF zsr_fondo,
it_temp_fondo TYPE TABLE OF zsr_fondo,
wa_temp_fondo TYPE zsr_fondo,
wa_fondo TYPE zsr_fondo,
w_diff TYPE p,
wa_header1 TYPE bbp_pds_po_header_d.
CONSTANTS : c_otype(8) VALUE 'BUS2201'.
REFRESH : it_output1,it_temp_fondo,it_fondo.
SELECT b~zzfondo_dat
a~guid
a~object_id
a~description
a~posting_date
a~created_by
INTO CORRESPONDING FIELDS OF TABLE it_output1
FROM bbp_pdhsc AS b
LEFT OUTER JOIN crmd_orderadm_h AS a ON b~guid = a~guid
AND a~object_type = c_otype.
LOOP AT it_output1 INTO wa_output1.
CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
EXPORTING
date1 = sy-datum
date2 = wa_output1-zzfondo_dat
IMPORTING
datediff = w_diff
EXCEPTIONS
invalid_datetime = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
IF w_diff <= '7'.
wa_temp_fondo-zzpono = wa_output1-object_id.
APPEND wa_temp_fondo TO it_temp_fondo.
ENDIF.
ENDLOOP.
*select the final entries for PO whose FONDO is expiring
DESCRIBE TABLE it_temp_fondo LINES w_lines.
w_count = 1.
DO.
IF w_count LE w_lines.
READ TABLE it_temp_fondo INTO wa_temp_fondo INDEX w_count.
IF sy-subrc = 0.
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
EXPORTING
i_object_id = wa_temp_fondo-zzpono
IMPORTING
e_header = wa_header1.
wa_fondo-zzpono = wa_temp_fondo-zzpono.
wa_fondo-zzpodesc = wa_header1-description.
wa_fondo-zzpodate = wa_header1-posting_date.
wa_fondo-zzexpdate = wa_header1-zzfondo_dat.
wa_fondo-zzpoval = wa_header1-total_value.
wa_fondo-zzpocur = wa_header1-currency.
wa_fondo-zzpocreator = wa_header1-created_by.
CLEAR : wa_address.
REFRESH wa_return.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = wa_header1-created_by
IMPORTING
address = wa_address
TABLES
return = wa_return.
CLEAR wa_fondo-zzpocreator.
CONCATENATE wa_address-firstname ' ' wa_address-lastname INTO wa_fondo-zzpocreator .
w_count = w_count + 1.
APPEND wa_fondo TO it_fondo.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_structure_name = 'ZSR_FONDO'
i_grid_title = 'EXPIRING FONDOS'
TABLES
t_outtab = it_fondo[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " DISPLAY_EXPIRING_FONDOS
Now in my ALV grid o/p i can see the check box but if i select one row and then try to select another the first one gets deselected.
Can anybody tell me what is missing?Hi,
Try like changing this
insted of
g_layout-f2code = ' '.
use this
g_layout-f2code = 'DISP'. " Sets fcode for when double
and
g_layout-f2code = '&ETA'. " it will display POPUP screen
Best Regards
Ranga
Edited by: Ranga Swamy on Nov 1, 2008 11:07 PM
Edited by: Ranga Swamy on Nov 1, 2008 11:17 PM
Maybe you are looking for
-
Creating additional input areas as required
Good Day; I have been asked to design a form using Livecycle that will replace an existing MS Word form. The form will be used to grant access to a total of 42 information systems. At first glance this did not seem to be a problem until I stated to d
-
Acrobat Pro 9 Trial Ended Prematurely
I installed the trial version two days ago. Now the program has told me my trial has expired. It was supposed to be a 30-day trial. I see this problem has been posted with other Adobe programs. Talked and chatted with Adobe Tech to no avail. Is th
-
Can I get music off of my Apple TV?
can I get music off of my Apple TV?
-
Auto PO at GR ( POs getting created with Acc *** Cat. "U")
Hi SAP Gurus, I'm trying to set up my auto PO at the time of GR. I make all necessary config changes for creating Auto PO at the time of GR and I was successfull in getting the Auto PO created with these config changes THowever,the Auto PO are gettin
-
Went to login this morning and computer would not accept any passwords. Once I typed in the 'correct' password, the screen would revert to the startup screen and the login panel would appear again. After several attempts, I tried to shut down and the