Adding check box in selection screen
Hi all,
I have to add a check box to the previous report, I need to fetch the data based on the checkbox. Please tell me how to proceed further with flag set.
Thanx and Regards,
Line.
Hi..
1) do u want this? if checkbox is not checked then no data is read from database and if checked then only data wil be fetched -
tables pa0001.
parameters p_check as checkbox.
data: begin of itab occurs 0.
include structure pa0001.
data end of itab.
start-of-selection.
if p_check = 'X'.
perform read_data.
endif.
if itab[] is not initial.
loop at itab.
write:/ itab-pernr.
endloop.
else.
write: 'No data fetched from database,may be u need to check the Checkbox'.
endif.
*& Form read_data
text
--> p1 text
<-- p2 text
FORM read_data .
select * from pa0001 into table itab up to 20 rows.
ENDFORM. " read_data
2) Adding fields based on Chekbox -
parameters: p_check AS CHECKBOX MODIF ID ABC USER-COMMAND CH.
parameters: p_pernr like pa0001-pernr modif ID ABD,
P_DATE LIKE PA0001-BEGDA MODIF ID ABD.
Check sy-ucomm = 'CH'.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if p_CHECK = 'X'.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ELSE.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Similar Messages
-
Option ( Radio button or check box) on selection - screen , to go to CNR2
<b>Subject - Option ( Radio button or check box) on selection - screen , to go to Tcode CNR2</b>
Hi all,
I have developed a report , which has a selection screen with one select-option , where i enter employee number and two radio buttons , one is for all workcentres and other one for active workcentre. so when i enter employee number and choose either of the radio button i wil get the output properly. the output displays , employee no, employee name , work centre and project of that employee . an employee may have many workcentres and a corresponding project for that work centre.
Now the Problem is , from the same report i need to add a option on the selection -screen , ( plz tell me whether to use radio button or check box and if it is radio button should i use it seperately or group it in the above two buttons.) .
so that when user selects the option , the control should go to transaction code CNR2, from where i can enter workcentre and in the next screen i have HR assigntment tab , after choosing that it will dsplay persons linked to the workcentre and there is a delete icon , from where i can delete the person.
The only thing is now to move / Navigate to the screen or go to transaction code CNR2 from the report or from the selection screen.
Your valuable Inputs are awaited, PLz do lemme know
Thanks in advance ,
regards,
ShujaShuja,
A radio button nor a checkbox should be used for navigation. I would suggest a COMMAND BUTTON.
Something like this:
Report ZZZZZZ.
TABLES: sscrfields.
SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.
selection-screen: PUSHBUTTON /10(20) but1 USER-COMMAND cli1.
SELECTION-SCREEN END OF BLOCK ONE.
initialization.
but1 = 'Button Text Goes Here'.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
call transaction 'CNR2'.
start-of-selection.
Your code here -
F1 help for Check Box on Selection-Screen
Hi Friends,
I want to attach F1 help for a check box on selection-screen. Though I have checked SDN community for this but did not get any relevant answer.
so, please give me correct example if someone has done similar.
Regards
PradeepPradeep,
I think this fucntion module needs to be used DD_SHLP_CALL_FROM_DYNP.If possibe try to screen debug using /H before pressing f1 for a field.
K.Kiran. -
Check box in selection screen !!!
Hi Experts !
In my selection screen I have a check box. When i checked the check box.
It has to display select option. I have showed the coding....
PARAMETER P_POTYPE AS CHECKBOX. "checkbox
SELECT-OPTIONS S_POTYPE FOR EKKO-BSART MODIF ID POT. "checkbox is checked then it has to display this select option.
AT SELECTION-SCREEN OUTPUT.
IF P_POTYPE = 'X'.
loop at screen.
IF SCREEN-NAME EQ 'P_POT'.
CLEAR SCREEN-INVISIBLE.
screen-invisible = 'X'.
SCREEN-ACTIVE = 0.
ENDIF.
endloop.
ENDIF.
If i checked the check box it has to display select option. if it is unchecked. select option is invisible.
Thanks in advance.
Arvind
Edited by: arvind nn on Oct 31, 2009 6:05 AMHi Arvind,
Try this way.
REPORT ztest.
TABLES:ekko.
PARAMETER p_potype AS CHECKBOX USER-COMMAND uc1. "Add USER-COMMAND uc1
SELECT-OPTIONS s_potype FOR ekko-bsart MODIF ID pot.
AT SELECTION-SCREEN OUTPUT.
IF p_potype = 'X'.
LOOP AT SCREEN.
IF screen-group1 EQ 'POT'. "Use screen-group1 instead of screen-name
screen-active = '1'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 EQ 'POT'.
screen-active = '0'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP.
ENDIF.
Thanks
Venkat.O -
Select-Options and check box on Selection Screen
Hi Guru's,
I have to develop a webdynpro report(static). I have a combination of select options and checkboxes on the selection screen. Can you please help me how to design this static selection screen.
Thanks,
PradeepHi Pradeep,
WDP ABAP does not directly provide the selection screen options as in ABAP programming.
You can achieve the selection screen functionality using the WDR_SELECT_OPTIONS component usage. Go through the WDP component WDR_TEST_SELECT_OPTIONS.
Regards
Wenonah -
Hi,
Can any one tell me how to bring checkboxs in a horizontal line????
Pls...
Thx,
ShashiHi ,
Try like this you will get an idea
And made your selection using this..
SELECTION-SCREEN : BEGIN OF BLOCK A WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : P_CHECK1 AS CHECKBOX.
SELECTION-SCREEN POSITION 10.
SELECTION-SCREEN COMMENT 10(35) text-020 FOR FIELD P_CHECK2.
PARAMETER: P_CHECK2 AS CHECKBOX.
SELECTION-SCREEN POSITION 10.
SELECTION-SCREEN COMMENT 10(35) text-020 FOR FIELD P_CHECK2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : END OF BLOCK A.
Thanks,
Sakthi C
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Aug 15, 2008 3:30 PM -
How can I disable a check box in one screen?
Hi,
I need to disable a check box in the screen 1106 on the program of the transaction F110. I can do that with a user exit or what I can use to do that?
Thanks!you have two options :
user exit , check if there is one for this transction
i attach program below .
field exit :
Within the CMOD transaction type PRFB in the transaction window.
PRFB is the ok-code to bring up the field exits.
You can also use Program RSMODPRF to create field exits.
hope its help u .
program for user exut :
*& Report ZUSEREXIT *
report zuserexit no standard page heading .
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen. -
How to create application toolbar in modal dialog box in selection-screen
Hi Experts,
how to create application toolbar in modal dialog box in selection-screen?
Regards,
SwapnikaHi,
Check the following link regarding Model dialog box and appication toolbar
http://help.sap.com/saphelp_nw70/helpdata/en/d1/801b84454211d189710000e8322d00/frameset.htm
It helps in solving your problem.
Thanks.
Ramya. -
Delete the rows if the check box is selected.
Dear all,
i have a block (not database block). i added a check box to the same block. now i want to delete the row against which the check box is selected.
i wrote the following code in when-button-pressed trigger.
IF Checkbox_Checked('CHK_DEL') THEN
delete from fa_01_11
where as_id = :as_id;
END IF;
commit;
but when i select only one check box it delete the all rows from the table if the condition is satisfied.
here is the data in my table
as_id year month
63 2006 4 0 -1183.92 1
63 2006 5 0 -1183.92 1
63 2006 6 0 -1183.92 1
63 2006 7 0 -1183.92 1
63 2006 8 0 -1183.92 1
63 2006 9 0 -1183.92 1
63 2006 10 0 -1183.92 1
63 2006 11 0 -1183.92 1
63 2006 12 0 -1183.92 1
what's the proble?
Regards:
Muhammad Nadeem
Message was edited by:
Muhammad NadeemYou need to run the code for each record and you need to find something which is unique. as_id is not unique.
untested:
declare
last_rec boolean := false;
deleted boolean := false;
begin
first_record;
loop
deleted := false;
last_rec := :system.last_record = 'TRUE';
IF Checkbox_Checked('CHK_DEL') THEN
delete from fa_01_11
where as_id = :as_id
and year = :year
and month = :month;
clear_record;
deleted := true;
END IF;
exit when last_rec;
if not deleted then
next_record;
end if;
end loop;
commit;
end; -
Regarding text box in selection screen
Hi all,
Can i know how we can implement a text with scroll bars so that user can enter a data of about 2000 characters with paragraph indent. also this needs to be done on the selection screen of PNP logical database.
Please let me know if this can be done.
Thanks.
Harshad.Hi Harshad,
[text box in the selection screen|Text box on selection screen]
Thanks! -
Diplay Text in Text Box in selection Screen
Hi Experts i want to display text in text box in selection screen like
Personnal Number
Display in text box and disable................please help me
Edited by: BFawad26 on Jun 21, 2010 9:46 AMHi,
You mean to say parameter in selection screen
Just press F1 on parameter you will get all the option available for the parameter
for defaulting text just give your text in DEFAULT option for the parametr
And for disabling this checkbox you can explore the LOOP AT SCREEN concept
In at selection screen output event you can modify the selection screen.just give one modif id for your
paramete and use this at selection screen output event , loop at screen and modify screen with the screen input = 0
for ur parameter.
Thanx
Edited by: PawanG on Jun 21, 2010 9:51 AM -
How to create list box in selection screen
Hi Experts,
I want to create 2 list boxes, each one is having 5 fields. suggest me the logic.
Thanks.
TonyHi,
Below is the link to help you.
[List Box in Selection Screen;
Or here is the sample code.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = 'scooby1'. APPEND value TO list.
value-key = 'tweety2'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
Hope it will help you. Please revert back in case of any query.
Regards
Natasha Garg
Edited by: Natasha Garg on Jan 8, 2009 6:28 AM -
Parallel text box in selection screen
Hi all,
Can anyone please tell me that how can i create parallel text boxes in selection screen?
Exa : Company code <Input box> Date <Input box>
Pers No. <Input box> Cust No. <Input box>
Regards.hi,
Use COMMENT and POSITION statements in selcection-screen to achieve the same. -
I want to make sure a check box is selected before allowing a form to be closed.
I want to make sure that a check box is selected before allowing the form to be closed in X Std. I have set the field as a required field but want to make sure that whoever fills in the form cannot exit, print or save without first ticking the box. How do I do this?
There is no way to prevent those actions. The best you can do is alert the user just before any of those things happen.
-
How can we use list box on selection screen
hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.
thanks in advance
rajuUse the VRM_SET_VALUES function module.
DATA: list TYPE vrm_values,
value LIKE LINE OF list.
AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
name = 'P_OBJECT'.
CLEAR list.
REFRESH list.
CLEAR value.
value-key = '1'.
value-text = 'Development Class'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'Program'.
APPEND value TO list.
CLEAR value.
value-key = '3'.
value-text = 'Function Module'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'Database Table'.
APPEND value TO list.
CLEAR value.
value-key = '5'.
value-text = 'Structure'.
APPEND value TO list.
CLEAR value.
value-key = '6'.
value-text = 'View'.
APPEND value TO list.
CLEAR value.
value-key = '7'.
value-text = 'Data Element'.
APPEND value TO list.
CLEAR value.
value-key = '8'.
value-text = 'Table Type'.
APPEND value TO list.
CLEAR value.
value-key = '9'.
value-text = 'Class / Interface'.
APPEND value TO list.
CLEAR value.
value-key = '10'.
value-text = 'Type Group'.
APPEND value TO list.
CLEAR value.
value-key = '11'.
value-text = 'Domain'.
APPEND value TO list.
CLEAR value.
value-key = '12'.
value-text = 'Search Help'.
APPEND value TO list.
CLEAR value.
value-key = '13'.
value-text = 'Lock Object'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list
EXCEPTIONS
id_illegal_name = 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.
Maybe you are looking for
-
I have a new laptop. My iPod touch was synced to itunes on my old laptop. Now that I have my new laptop I can't get the music from my Ipod into the new itunes. So, when it wants to sync it wants to delete all of my songs and replace them with what is
-
HOW CAN I PASTE A GOOGLE AD IN MY BROWSER
Can you please help me? I want to post an ad of google in my browser but I can't access the edit option of the source page
-
Constant kernel panics since upgrade to 10.4.4. help!
Well ive just spent the past 3 hours trying to figure out exactly what went wrong with my iBook, but it was Kernel Panicing like crazy. I couldnt even get online long enough to make a post about it. Lets recap. I updated to 10.4.4 Several hours later
-
Problem with flexitems: dot in key field results in JBO-25005
I am using flexitems in my application. I am using version 10.1.3.2.51 My application has a single group with flexitemregion. The underlying VO has one Key attribute of type String (underlying PK column is a varchar2 field). When I create a record wi
-
How to install Photoshop cs3 on my mac?
How to install recent download of Photoshop cs3 on my mac?