How to create the selection screen dynamically
Hi,
I have a requirement to create the selection screen Dynamically. All the fields that should appear on the selection screen will be available in a custom table. So, based on the entries available in the Z tables, the selection screen should be built. Eg. If there are 10 records available in the Z table, the selection screen should consist of 10 fields. If there are 100 entries, the Selection screen should contain 100 fields. and the logic to build this selection screen should be carried out dynamically in the program.
Could anyone of you please share the valuable inputs on this. If anyone has the sample code to do this, please share.
Thanks in advance.
Regards,
Paddu.
Hi,
Kindly go through this sample program below:
DEMO_LIST_FORMAT_INPUT *and
check this function module:
FREE_SELECTIONS_DIALOG *.
Hope it helps
Regards
Mansi
Similar Messages
-
How to create the select option in the screen
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMTry RANGES.
The RANGES has same structure as that of select-options. -
How to create the select option for the Plant in screen (Module pool)
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Cross post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMSteps to get SELECT-OPTIONS in module pool programs.
1.Start one dialog program with SAPMZ_001.
Place the below code in the TOP include of the dialog program.
TABLES marc.
SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
SELECT-OPTIONS: werks FOR marc-werks.
SELECTION-SCREEN END OF SCREEN 3200.
2 .Create one screen 3000.
Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN l_subscreen.
Activate all.
Create Transaction code for the dialog program .
Execute the transaction code. You will see the select-option for werks how we see on Selection-screen. -
How to Modify the Selection Screen in Report Painter
Hi All,
I am working on Report painter and writer,
can any body helpme how to change the selection screen i.e i want add some more select options to the exisiting roport .
how can i add more select options to the exisiting one
please let me know the Procedure and provide some relevent documents .
Thanks and Best regards.
umaHello...
In the program ...we can find the following chunk of code..
selection-screen:begin of block B1 with frame title text-001.
Parameters : ....
select-options:.....
selection-screen:end of block b1.
if we need to add any more user inputs we can write the code inside the existing
selection screen....end of block .
or create a new block ..just the block name should be different...
if we are using select options...we need to declare the table name using the key word for the field on which we are giving select options ....
Tables : BSIK.
Please see the following code:
Imagine :- we have the current selection screen..
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSIK-BUKRS DEFAULT SPACE.
SELECT-OPTIONS: S_LIFNR FOR BSIK-LIFNR.
SELECTION-SCREEN END OF BLOCK B1.
we need to add 2 more fields on the selection screen ..this we can do as the following
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSIK-BUKRS DEFAULT SPACE.
SELECT-OPTIONS: S_LIFNR FOR BSIK-LIFNR,
S_HKONT FOR BSIK-HKONT.
PARAMETER: P_DATE LIKE BSIK-BUDAT OBLIGATORY DEFAULT
SY-DATUM.
SELECTION-SCREEN END OF BLOCK B1.
OR...create a new block...
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: S_HKONT FOR BSIK-HKONT.
PARAMETER: P_DATE LIKE RFPDO-ALLGSTID OBLIGATORY DEFAULT
SY-DATUM.
SELECTION-SCREEN END OF BLOCK B2.
there are many options available in selection screens..like creating check box,radio button etc..
for more info press F1 help on the Selection screen in the ABAP editor
Revert back if not clear and reward if helpful
Regards
Byju -
How to customize the selection screen of Get Objec
hi all,
I'm developing a program for sap hr.
I use the 'Get objec' to creat the selection screen.
and I wanna limit the date selection.
The defaut display is the 'Period' of radio-button group.
and I want only the single field 'Date' for input insead of a period with starting and ending dates (manuelly we need click on a button to switch to 'Date' input).
How can I switch automatically to the 'date' when I initilize my program?
Thanks a lot for your help
YiminHi,
This is possible through program attributes.
goto attributes, click on 'HR Report category'
now make sure that, 'Master Data (Infotype)' is changed accordingly your requirement.
I think it is helpfull to you.
Regards
Sai -
How to Increase the Selection screen window length width big....
How to Increase the Selection screen window length width big.... I cant able to do some enter text... because of the window size it gives error... can anyone help me out this...
Thanks in advancehi,
Maximum size is fixed for selection-screen.
Split your text into different lines to fit it.
Create a text element for your text and write it as comments.
selection-screen begin of block b3 with frame title text-041.
selection-screen begin of line.
parameters : p_all radiobutton group g2 default 'X'.
selection-screen comment 10(75) text-049.
selection-screen end of line.
selection-screen begin of line.
parameters : p_iloc radiobutton group g2.
selection-screen comment 10(75) text-050.
selection-screen end of line.
selection-screen end of block b3.
Regards
Sailaja. -
How to create multiple selection screens in reports
How to create multiple selection screens in reports
Thanks,
SridharEx: hope you will find an idea from the below example :
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
CITYTO LIKE SPFLI-CITYFORM.
SELECTION-SCREEN end OF BLOCK SEL1
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS SEL1.
SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2
SELECTION-SCREEN END OF SCREEN 5000.
INITIALIZATION.
TIT1 = 'ITIES'.
aT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN '0500'.
MESSAGE W159(at) WITH 'SCREEN 500'.
WHEN '1000'.
MESSAGE W159(at) WITH 'SCREEN 1000'.
ENDCASE.
START-OF-SELECTION.
TIT1 = 'CITIES FOR AIRPORTS'.
TIT2 = 'AIRPORTS'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
TIT1 = 'CITIES AGAIN'.
CALL SELECTION-SCREEN 1000 STARTING AT 10 10. -
How to disable the Selection screens of LDB's ?
Hi,
How to disable the Selection screens of LDB's when we r using the predefined LDB for our executable pgm ? and how to include the predefined LDB can u write the Code for including LDb or if possible give an example of a Pgm using a Predefined LDB?
Thanks & Regards,
Gopi.Hi Gopi,
Go through the link,
http://www.sapdevelopment.co.uk/hr/hrhome.htm
Regards,
Azaz Ali. -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
How to display the selection screen with icons as well as with text element
How to display the selection screen with icons as well as with texts (written in text elements) for PlantDate, OrderType,WareHouse..
Report zex33.
type-pools: icon.
selection-screen begin of line.
selection-screen comment 1(20) text_001.
parameters: p_werks type marc-werks.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_002.
parameters: p_whouse(10).
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_003.
parameters: p_auart like vbak-auart.
selection-screen end of line.
initialization.
write ICON_PLANT as icon to text_001.
concatenate text_001 text-001 into text_001 separated by space.
write ICON_WAREHOUSE as icon to text_002.
concatenate text_002 text-002 into text_002 separated by space.
write ICON_ORDER as icon to text_003.
concatenate text_003 text-003 into text_003 separated by space. -
How to suppress the Selection Screen of Logical Database
Hi,
I am using one Logical Database for my report.
I want to show my customized selection Screen.
How can I hide the Selection Screen of Logical Database?Hi,
Check the attributes of the report program where you assign the LDB. You can see the parameter Selection Screen press the F4 and check the LBD is provided any Blank screen or not.
For some LDB's you can find the Report Category in the attribute section of the report. either you can create the new screen or standard screen might be provided with Blank.
Check there ..
If you don't find you can use LOOP AT SCREEN..ENDLOOP to hide the fields of LDB.
Which LDB you are using. -
How to create Multiple Selection Screen in ALV
Hi,
Can anybody tell me how to create the Multiple Selection screen in ALV reports.
Plse give me code sample if possible.
Thanks in advance
KPHi Rich,
thanks for the reply.
I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen.
Hope my problem is understood.
Thanks
KP -
How to disable the selection screen element?
Hello Colleague,
I have a report which has a checkbox in the selection screen. Currently I need to create two transaction codes for the report. When Tcode1 is executed, the program will execute in normal way. When Tcode2 is executed, the checkbox should be selected and greyed (not ready to input).
To implement the requirement, I think I should control the screen in the INITIALIZATION event according to the SY-TCODE. But when I tried to use LOOP AT SCREEN, I find SCREEN is empty.
I search a lot of threads. They all introduce the selection control after screen is displayed.
Can any expert help me on the problem?
Thansk & Regards, Yongbo.I think you can use Screen Variants T.Code SHD0.
-
How to hide the selection screen of a Logical datebase?
Dear All,
I used the logical database PNP in one of my program by maintain the attribute 'Logical Database' of this program.
Now I want to hide all the selection screen of this PNP during the ABAP runtime environment.
Who can tell me how I can realize it?
Thank you!
Regards,
Brian LiuHi,
If you call the logical database using a function module, the selection
screen is not displayed.
To call a logical database from another program, use the function module LDB_PROCESS.
<b>Example code:</b>
TABLES SPFLI.
SELECT-OPTIONS S_CARR FOR SPFLI-CARRID.
TYPE-POOLS: RSDS, RSFS.
DATA: CALLBACK TYPE TABLE OF LDBCB,
CALLBACK_WA LIKE LINE OF CALLBACK.
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
DATA: TEXPR TYPE RSDS_TEXPR,
FSEL TYPE RSFS_FIELDS.
CALLBACK_WA-LDBNODE = 'SPFLI'.
CALLBACK_WA-GET = 'X'.
CALLBACK_WA-GET_LATE = 'X'.
CALLBACK_WA-CB_PROG = SY-REPID.
CALLBACK_WA-CB_FORM = 'CALLBACK_SPFLI'.
APPEND CALLBACK_WA TO CALLBACK.
CLEAR CALLBACK_WA.
CALLBACK_WA-LDBNODE = 'SFLIGHT'.
CALLBACK_WA-GET = 'X'.
CALLBACK_WA-CB_PROG = SY-REPID.
CALLBACK_WA-CB_FORM = 'CALLBACK_SFLIGHT'.
APPEND CALLBACK_WA TO CALLBACK.
SELTAB_WA-KIND = 'S'.
SELTAB_WA-SELNAME = 'CARRID'.
LOOP AT S_CARR.
MOVE-CORRESPONDING S_CARR TO SELTAB_WA.
APPEND SELTAB_WA TO SELTAB.
ENDLOOP.
CALL FUNCTION 'LDB_PROCESS'
EXPORTING
LDBNAME = 'F1S'
VARIANT = ' '
EXPRESSIONS = TEXPR
FIELD_SELECTION = FSEL
TABLES
CALLBACK = CALLBACK
SELECTIONS = SELTAB
EXCEPTIONS
LDB_NOT_REENTRANT = 1
LDB_INCORRECT = 2
LDB_ALREADY_RUNNING = 3
LDB_ERROR = 4
LDB_SELECTIONS_ERROR = 5
LDB_SELECTIONS_NOT_ACCEPTED = 6
VARIANT_NOT_EXISTENT = 7
VARIANT_OBSOLETE = 8
VARIANT_ERROR = 9
FREE_SELECTIONS_ERROR = 10
CALLBACK_NO_EVENT = 11
CALLBACK_NODE_DUPLICATE = 12
OTHERS = 13.
IF SY-SUBRC <> 0.
WRITE: 'Exception with SY-SUBRC', SY-SUBRC.
ENDIF.
FORM CALLBACK_SPFLI USING NAME TYPE LDBN-LDBNODE
WA TYPE SPFLI
EVT TYPE C
CHECK TYPE C.
CASE EVT.
WHEN 'G'.
WRITE: / WA-CARRID, WA-CONNID, WA-CITYFROM, WA-CITYTO.
ULINE.
WHEN 'L'.
ULINE.
ENDCASE.
ENDFORM.
FORM CALLBACK_SFLIGHT USING NAME TYPE LDBN-LDBNODE
WA TYPE SFLIGHT
EVT TYPE C
CHECK TYPE C.
WRITE: / WA-FLDATE, WA-SEATSOCC, WA-SEATSMAX.
ENDFORM.
Regards,
Sumit.
Message was edited by: sumit kumar
Message was edited by: sumit kumar -
How to create a selection screen in a FM
Hello,
I have a FM. Here i have an import parameter called Selection.
So when Selection = X i need to show a selection-screen like if it would be a report. Do you know any fm or way to do this?
We have thought to create a report with the selection screen and to do a submit and return in the FM, and import/export the parameters. But maybe there are some clearer an easier way...
Thanks,
Manel
Edited by: Manel Casadesus on Oct 7, 2009 11:57 AMHi Manel,
<li>Its absolutely possible. I just tried. It works
<li>Plase the code in the TOP include of the function pool.
FUNCTION-POOL ZTEST_GRP.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
PARAMETERS P_DATA TYPE CHAR2.
SELECTION-SCREEN END OF SCREEN 1001.
<li>Call the above defined selection-screen in the start of the function module.
FUNCTION ZTEST_FUNCTION_BADI.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(DAT) TYPE CHAR2
CALL SELECTION-SCREEN 1001.
ENDFUNCTION.
I hope that it solves your problem.
Thanks
Venkat.O
Maybe you are looking for
-
When I updated to iso7 my credit card information for my iTunes account is no longer valid. Tried to update my credit card information and it will not allow my current and valid credit card to be used and will not accept any of my other valid credit
-
HT5622 Why apple community not supported my apple id
I don't know why my apple Id was not working in my iPhone 4S plz there is some idea
-
At a time of uploading the file its giving a junk value.
Hi All, I am uploading .DOC file using GUI_UPLOAD function and its giving junk value in the internal table at a time of uploading the file. Is there any alternative or any function which can help me to upload the .DOC file or any scanned file? And i
-
Oracle Enterprise Linux Release 5 installation on DELL Studio 15
Hi All, Please let me know if any done Oracle Enterprise Linux Release 4 or 5 version installation on Dell Studio 15 or any New laptop of any company.Planing to install oracle application on new laptop of any company. Thank You Advance. Bestregards,
-
Hello! I have some problem with vars. The situation is the same I wrote here Re: External swf I have public var (for example ZZZ) in code of MAIN.swf (main class is Main.as), and I want to access it from code of loaded EXTERNAL.swf. But nothing helps