How to get a check box on the selection screen
Hi all
can any body tell me how to get a check box on the selection screen
parameter: pa_check as checkbox.
To define the input field of a parameter as a checkbox, you use the following syntax:
PARAMETERS <p> ...... AS CHECKBOX ......
Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
REPORT DEMO.
PARAMETERS: A AS CHECKBOX,
B AS CHECKBOX DEFAULT 'X'.
Similar Messages
-
Handling Check Boxes in the selection screen
Hi All,
I have defined 3 Check Boxes in the selection screen and one box will be ticked as 'X" by default.
I need to put restriction so that only any one should be selected as 'X' whenever user wish to select.
Hence any time, when user selects a box, other two should be unchecked.
How to put this kind of control?
Regards
PavanI think you should go for 'Radiobutton'
But if U want check box then
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF cb_option1 = 'X'.
CLEAR cb_option2.
MODIFY SCREEN.
ELSEIF cb_option2 = 'X'.
CLEAR cb_option1.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
To add a check box in the login screen
Hi,
I need to put a check box in the login screen of CRM below the LOGON button with a message :'I agree with the terms and condition of the System'.
Please help.See: Improve PDFs: Create interactive PDF checklists
-
How to create the list box in the selection screen.
hai friends..
i want to create the list box for the selection screen input boxes.
thanks,
velu.hi..
1. There are two important things :
a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
b) Fm VRM_SET_VALUES
2. just copy paste
3.
REPORT abc.
TYPE-POOLS : vrm.
DATA : v TYPE vrm_values.
DATA : vw LIKE LINE OF v.
PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
vw-key = '1'.
vw-text = 'Jan'.
APPEND vw TO v.
vw-key = '2'.
vw-text = 'Feb'.
APPEND vw TO v.
vw-key = '3'.
vw-text = 'Mar'.
APPEND vw TO v.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'A'
values = v
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
regards,
veeresh -
Check Box On Standrad Selection-screen
Hi Friends
I am working on HR ABAP .I added 4 check boxes On Standrad Selection-screen. Its working on Development but its not working on production.can anyone suggest how its happend.Hello,
A few questions.
- what exactly is not working in production?
- do the check boxes appear at all?
- did the changes get recorded on a change request and transported?
- was the transport successful?
- do the checkboxes 'work' in the QA envirionment?
Regards
Greg Kern -
How to Create a DropDown Box in a Selection Screen.
Hi,
I have a question. i.e, How to create a dropdown box in a Selection Screen. Could you please assist me.
Thanks & Regards
Sathish Kumarhi satish,
The following can assist u to create a drop down ....
Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
In screen painter to create a input/output field into list box we use
'L" as a value for dropdown attribute for the i/o field.
In screen painter to determine the type of method that will be used to fill the value
list we use the attribute value list.
If it is blank the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
or
The value can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
If a function code is attached to the list box the selection of a value triggers a PAI
otherwise PAI will not trigger.
Example
Dropdown list boxes
REPORT DEMO_DYNPRO_DROPDOWN_LISTBOX.
TYPE-POOLS VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
DATA: WA_SPFLI TYPE SPFLI,
OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE SY-UCOMM.
TABLES DEMOF4HELP.
NAME = 'DEMOF4HELP-CONNID'.
CALL SCREEN 100.
MODULE CANCEL INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE INIT_LISTBOX OUTPUT.
CLEAR DEMOF4HELP-CONNID.
SELECT CONNID CITYFROM CITYTO DEPTIME
FROM SPFLI
INTO CORRESPONDING FIELDS OF WA_SPFLI
WHERE CARRID = DEMOF4HELP-CARRIER2.
VALUE-KEY = WA_SPFLI-CONNID.
WRITE WA_SPFLI-DEPTIME TO VALUE-TEXT
USING EDIT MASK '__:__:__'.
CONCATENATE VALUE-TEXT
WA_SPFLI-CITYFROM
WA_SPFLI-CITYTO
INTO VALUE-TEXT SEPARATED BY SPACE.
APPEND VALUE TO LIST.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
ENDMODULE.
MODULE USER_COMMAND_100.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
IF SAVE_OK = 'CARRIER'
AND NOT DEMOF4HELP-CARRIER2 IS INITIAL.
LEAVE TO SCREEN 200.
ELSE.
SET SCREEN 100.
ENDIF.
ENDMODULE.
MODULE USER_COMMAND_200.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
IF SAVE_OK = 'SELECTED'.
MESSAGE I888(BCTRAIN) WITH TEXT-001 DEMOF4HELP-CARRIER2
DEMOF4HELP-CONNID.
ENDIF.
ENDMODULE.
Reward if useful.
Thank you,
Regards. -
How to create Drop down menu in the selection screen
Hi all,
How to create Drop down menu in the selection screen.
Fast answer will be highly rewarded
Regards
Bikashi ,
TYPE-POOLS : vrm.
TABLES:vbak,vbap.
DATA : v(80) TYPE c.
DATA: wa_vbak TYPE vbak,
it_vbak TYPE vbak OCCURS 0 WITH HEADER LINE,
wa_vbap TYPE vbap,
it_vbap TYPE vbap OCCURS 0 WITH HEADER LINE.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values ,
v_count TYPE i,
l_value LIKE LINE OF li_list.
PARAMETERS: p_test(20) AS LISTBOX VISIBLE LENGTH 60 MODIF ID DAT.
INITIALIZATION.
AT SELECTION-SCREEN OUTPUT.
PERFORM get_data.
LOOP AT it_vbak.
l_value-key = it_vbak-vbeln .
l_value-text = it_vbak-vbeln .
APPEND l_value TO li_list.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_TEST'
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
AT SELECTION-SCREEN ON P_TEST.
clear : li_list , li_list[].
SELECT vbeln
matnr
meins
FROM vbap
INTO CORRESPONDING FIELDS OF TABLE it_vbap
WHERE vbeln = p_test.
START-OF-SELECTION.
SELECT vbeln
matnr
meins
FROM vbap
INTO CORRESPONDING FIELDS OF TABLE it_vbap
WHERE vbeln = p_test.
LOOP AT it_vbap.
WRITE :/ it_vbap-vbeln, it_vbap-matnr,it_vbap-meins.
ENDLOOP.
*& Form get_Data
text
--> p1 text
<-- p2 text
FORM get_data .
SELECT vbeln
FROM vbak
INTO CORRESPONDING FIELDS OF TABLE it_vbak.
ENDFORM. " get_Data
regards,
venkat. -
How to enable a check box using the table LVC_S_FCAT
hi,
I am working on reports. I have to have a check box and i am using the table LVC_S_FCAT to get the check box, i am getting the check box. how to enable it.Hi Preethi,
try to set default the check-box with the
value '0', '1', '-', ' ' and 'X' (0/1 -> only display,
'-' field is not shown, ' ' and 'X' is normal)
and see the differences.
Hope it helps.
Regards, Dieter
Sorry, i thought you meen enable not editable.
Message was edited by: Dieter Gröhn -
How to Add a new fields in the selection screen of LDB.
Hi All,
I want to add a new fields in the selection screen of LDB & then i need to select the data for that fields.
So could you please tell me for that where i need to add the code for selecting the data.
Thanks
RoliHi
welcome to SDN forum
If you are designing your own LDB with your own tables you can define tree structure and then the selection screen for the tables
if you wants to modify the std LDB of SAp means take the access key and to modify that code
if you add the extra field you have to modify the where conditions in the code also
see the doc
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
Regards
anji -
Problem in PRD to display check box parameter on selection screen
hi ,
i had one problem, i created one report which will show customer advances, for this report i created one selection screen, i transport req to QAS and PRD it shows fine. after that i need to add one more check box to that report selection screen. i transport reqt to QAS and PRD, in QAS it is woking fine but in PRD i am not able to see the check box which i was enterd. transport was perfect. i am saw the report coding in PRD that has the Check box statement. but it not comming,
1, why the selection screen is not showing that check box parameter ?
2, i had 19 selection fields is their any restriction to display the selection screen ?
please try to solve it for me,
thanq,
rajesh.kHello Rajesh,
First check the Log of your TR. whether it is transported properly without any error or with error.
again delete your Checkbox statement and write code again then try to transport again.
there is no any limitation to provide option on selection screen. you can give as per your requirement.
Regards,
Sujeet -
How do we validate input fields on the selection screen
How do we validate input fields on the selection screen
hi balram,
u can validate input fields using <b>AT SELECTION-SCREEN</b> Event.
PARAMETERS : p_werks TYPE marc-werks.
AT SELECTION-SCREEN ON p_werks.
SELECT SINGLE *
FROM t001w
WHERE werks = p_werks.
IF sy-subrc <> 0.
MESSAGE 'Invalid Plant' TYPE 'I'.
ENDIF.
Like this, we can validate user input for plant.
check this link:
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
Reware me if useful......
Harimanjesh AN -
How to use MM/YYYY Format in the selection Screen?
There is this program RMCB0300 where the date format in the selection screen has MM/YYYY Format.
I am working on a report which requires it "Period" Field in the selection screen to be in the same format.
However, i am trying to give the select option as " SL_SPMON FOR S031-SPMON MODIF ID PER." and declaring S031 table in the declaration part.
But still, its not been able to provide me F4 help in the inpur screen.
Can someone please provide me some guidance in this regard?Hi,
the following works for me..
*& Report ZPMONAT *
report zpmonat .
tables: s031.
selection-screen begin of block abc.
select-options: sl_spmon for s031-spmon.
selection-screen end of block abc.
at selection-screen on value-request for sl_spmon-low.
perform monat_f4.
at selection-screen on value-request for sl_spmon-high.
perform monat_f4.
start-of-selection.
end-of-selection.
*& Form monat_f4
* text
* --> p1 text
* <-- p2 text
form monat_f4 .
data: begin of mf_dynpfields occurs 1.
include structure dynpread.
data: end of mf_dynpfields.
data: mf_returncode like sy-subrc,
mf_monat like isellist-month,
mf_hlp_repid like sy-repid.
field-symbols: <mf_feld>.
* Wert von Dynpro lesen
get cursor field mf_dynpfields-fieldname.
append mf_dynpfields.
mf_hlp_repid = sy-repid.
do 2 times.
call function 'DYNP_VALUES_READ'
exporting
dyname = mf_hlp_repid
dynumb = sy-dynnr
tables
dynpfields = mf_dynpfields
exceptions
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
if sy-subrc = 3.
* Aktuelles Dynpro ist Wertemengenbild
mf_hlp_repid = 'SAPLALDB'.
else.
read table mf_dynpfields index 1.
* Unterstriche durch Blanks ersetzen
translate mf_dynpfields-fieldvalue using '_ '.
exit.
endif.
enddo.
if sy-subrc = 0.
* Konvertierung ins interne Format
call function 'CONVERSION_EXIT_PERI_INPUT'
exporting
input = mf_dynpfields-fieldvalue
importing
output = mf_monat
exceptions
error_message = 1.
if mf_monat is initial.
* Monat ist initial => Vorschlagswert aus akt. Datum ableiten
mf_monat = sy-datlo(6).
endif.
call function 'POPUP_TO_SELECT_MONTH'
exporting
actual_month = mf_monat
importing
selected_month = mf_monat
return_code = mf_returncode
exceptions
factory_calendar_not_found = 01
holiday_calendar_not_found = 02
month_not_found = 03.
if sy-subrc = 0 and mf_returncode = 0.
* ASSIGN (MF_DYNPFIELDS-FIELDNAME) TO <MF_FELD>. " ==>> note 148804
* <MF_FELD> = MF_MONAT.
call function 'CONVERSION_EXIT_PERI_OUTPUT'
exporting
input = mf_monat
importing
output = mf_dynpfields-fieldvalue.
collect mf_dynpfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = mf_hlp_repid
dynumb = sy-dynnr
tables
dynpfields = mf_dynpfields
exceptions
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07. "<<== note 148804
endif.
endif.
endform. " monat_f4
Regards,
Suresh Datti -
How to gray out certain fields on the selection screen based on the radio b
HI All,
I have an ALV report. On the selection screen I have 2 radio buttons ..for eg..A and B.
When radio button A(its on by default) is on..certain fields not relevant to this should be grayed out. Similarly when radio button B is on, certain fields should be grayed out.
I did the AT SELECTION SCREEN OUTPUT and also did the
LOOP AT SCREEN....ENDLOOP logic. The logic works but when I click the radio button B...the screen fields automatically does not gray out. I have to press ENTER and then its grays out.
I know a USER_COMMAND needs to be attached.
Can anyone give me a step by step details of how to do this. I truly appreciate it. if a screen painter thing is required..please give me the tcode and step by step detail to do this.
ThanksTry this one too:
REPORT ztest.
TABLES: mara,
bkpf.
CONSTANTS:
c_pos(3) TYPE c VALUE 'POS',
c_acc(3) TYPE c VALUE 'ACC',
c_all(3) TYPE c VALUE 'ALL',
c_x TYPE c VALUE 'X'.
The Selection Screen Definition
SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-000.
SELECT-OPTIONS: s_mara FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b_0.
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-037.
PARAMETER: rb_all RADIOBUTTON GROUP rb1 USER-COMMAND rad default 'X',
rb_acc RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF BLOCK b_1.
SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-011. "Acct
SELECT-OPTIONS: s_blrtc1 FOR bkpf-blart MODIF ID acc,
s_blrti1 FOR bkpf-blart MODIF ID acc.
SELECTION-SCREEN END OF BLOCK b_2.
SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-011. "Acct
SELECT-OPTIONS: s_blrtc2 FOR bkpf-blart MODIF ID all,
s_blrti2 FOR bkpf-blart MODIF ID all,
s_blrtv2 FOR bkpf-blart MODIF ID all.
SELECTION-SCREEN END OF BLOCK b_3.
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
PERFORM f0200_screenfield_hide_logic.
initialization.
PERFORM f0200_screenfield_hide_logic.
FORM f0200_screenfield_hide_logic *
FORM f0200_screenfield_hide_logic.
LOOP AT SCREEN.
IF rb_acc = c_x.
IF screen-group1 = c_all.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
IF rb_all = c_x.
IF screen-group1 = c_acc.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " F0200_SCREENFIELD_HIDE_LOGIC -
Drop down box for the selection screen field of the classical report
Hi all.
i want to have the drop down list to choose from, for the region(table:zbwcntry-field:zregion1) on the selection screen.
what is to be added to the code for this requirement.Also,please note that this is the classical report.
thanks for this answered.hi,
data : gv_name TYPE vrm_id, " used for vrm id
gv_repid TYPE sy-repid, " used to hold program name
work area to provide drop down list
DATA : gs_value TYPE vrm_value,
Internal table to provide drop down list
DATA : gt_values TYPE vrm_values,
PARAMETER : p_run(12) TYPE c AS LISTBOX VISIBLE LENGTH 12
DEFAULT 'DEFAULT' OBLIGATORY,
CONSTANTS : gc_run(5) TYPE c VALUE 'P_RUN', "constant for run mode
gv_name = gc_run.
gs_value-key = gc_v1.
gs_value-text = text-010.
APPEND gs_value TO gt_values.
gs_value-key = gc_v2.
gs_value-text = text-011.
APPEND gs_value TO gt_values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = gv_name
values = gt_values
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.
Hope this is helpful.
Rgds.,
subash -
How to get dynamic check box value in NW Mobile 7.1
Hi,
i have 5 rows it contains dropdown and checkbox in a row.when i click update button i need the values of checkbox.How to get?
Regards,
Kanagaraj.Hi Vidyadhar,
I have dropdown in first page.based ondropdown value selected navigating to next page.In that i am using row repeater it has label,checkbox and dropdown.here i need to know whether the check box is checked or not while clicking update button.
Drow down value also not able to get.
How to get Checkbox and dropdown values?
can u provide some sample codes??
Regards,
Kanagaraj.
Maybe you are looking for
-
Having trouble with Dynamic-to-static
Having an issue with traffic passing over a dynamic-to-static VPN. Phase 1 and Phase 2 both complete. sh cry ips sa on the ASA shows 0 #pkts encaps. From the 861 it shows 0 #pkts decaps I know its a lot to look at but hopefully someone will see so
-
IOS 8.1 - after update how can I get my lost calendar data back?
Hi, after the update to iOS 8.1 is my calendar empy. All my appointements are gone and there is no way to safe new appointments in it. I tried to use the backup of the data, but it did not work. Any clou how can I get my lost calendar data back? And
-
Format bold text in field and putting some text on new line - Help!
I am lost. I found the rich text formating item to click. But after that, I don't know what to do next. I want to bold some characters and I want some reponses on separate lines as I asked previously. As to spans and the commands - I have no prog
-
Best external DVD writer for iMac
What is the Best external DVD writer for iMac
-
Can't import from Sony XDCAM memory card to FCP 6
I can't import from Sony XDCAM memory card to FCP 6.01 HD. Am using Macbook Pro, 2 gig of RAM. This is my first time NOT using tape. I can copy the files off the memory card onto an external drive (to free up the card for pro crew's next day's shoot)