Dynamic Selection Screen Help
Hi,
I am trying to create a report screen with dynamics call....
I have a Sales Order select-option no interval and no extension
then i have few Parameters below such as
Customer Name, Part No, Material...
Whenever i select a SO, the screen will refresh and the value Customer Name, Part No and Material will reflects based on my selected SO.
Any experts can tell me, how can i do this..can it be done in normal report screen or needed dialog programming.............
urgently needed
Thanks
Maybe below is what you are looking for, though the requirement doesnt really make any sense to me.
tables: vbak, vbap.
select-options: s_vbeln for vbak-vbeln no intervals no-extension modif
id ABC.
parameters: p_kunnr like vbak-kunnr,
p_matnr like vbap-matnr.
at selection-screen output.
if not s_vbeln[] is initial.
select a~kunnr b~matnr into (p_kunnr, p_matnr)
from vbak as a
inner join vbap as b
on a~vbeln = b~vbeln
where a~vbeln in s_vbeln.
endselect.
endif.
Kind Regards
Eswar
Similar Messages
-
How to add a new Field in the Dynamic Selection screen section.
HI,
There is a requirement in which I need to add a field in existing program of dynamic selections.
I need to add a field KNKK-DBRTG (Customer Rating) in dynamic selections screen of some existing report
which has a dynamic selection screen with other fields like customer account, company code etc. Along with this i need to add Customer rating field also in the selection screen.
I have used GET KNKK statement to select this in the Dynamic selection screen. But I need to make it appear
on the screen.
LDB used is the Customer Database.
I have added GET KNKK statement after GET KNA1 statement.
Can any one help me how we can make this rating field appear in the selection screen.
With the GET statement Credit control area Fields can be selected in the selection screen but I have to permanantly add the field in the selection screen.
Regards
Prashant PrabhuHi,
So you need that this new field have data in old records?
1.- If you are in BI 7.0 and the logic or data for that New field are in the same Dimension, you can use a Remodeling to fill it. I mean if you want if you want to load from a Master Data from other InfoObject in the same Dim.
2.- If condition "1" is not yours.
First add the new field, then create a Backup Cube (both cubes with the new field) and make a full update with all information in the original Cube. The new field willl be empty in both cubes.
Create an UR from BackUp_Cube to Original_Cube with all direct mapping and create a logic in the Start Routine of the UR (modiying the data_package) you can look for the data in the DSO that you often use to load.
To do that both cubes have to be Datasources ( right click on Cube-> aditional function-> and I think is "Extract Datasource")
Hope it helps. Regards, Federico -
How to use dynamic selection screen inputs in main program
hi all,
its a report where in it calls one dynamic selection screen( user need to enter the parameters here) after that i need to use those inputs for some check, can any buddy help how to use/ get that input parameters into main program.
regards,
vara..Hi,
i think u have created that dynamic selection screen in seperate program and calling to ur main program.instead of that u just create that synamic selection screen program as include program and include it in ur main program.
or u need to use set/get parameter id concept.
rgds,
bharat. -
How to retrieve values from Dynamic Selection screen while using LDB - PSJ
I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
Please help me.
Thanks.in fact you don't have to get the values, you only need to tell to the program to take them into account :
GET PRPS.
CHECK SELECT-OPTIONS. -
Passing values to a dynamic selection screen via a report
Hi,
I have the following problem and need to seek your expertise urgently.
In my program, I need to call another report by passing in parameters to the selection screen of other report. However, I could not pass values into a dynamic selection screen. I tried to use submit (report) with free selection but do not know how it works.
Currently, I tried calling the function RS_REFRESH_FROM_DYNAMICAL_SEL and FREE_SELECTIONS_RANGE_2_EX. Using the object the first function has returned to me, I tried to append values such as fieldname etc to it. However, I realised the field names of a dynamic selection screen keeps changing. So I would not know how to pass a particular value to a selection field.
Appreciate any help given.
Thanks,
CKHello CK,
Are you using logical database in your selection screen program attributes? If it is, look at include file DBxxxSEL for parameter named xxxDYNSE where xxx = logical database. Debug the program that has that dynamic selection, and look at field xxxDYNSE. This should give you a hint on how to populate the parameter when you submit the program. -
Hello all,
I have a requirement to create a 'dynamic' selection screen with 2 sections(vertical).
The first section contains set of selection options for which the type comes from the values stored in the internal table(populated at runtime). The second section contains checkbox corresponding to each selection option generated/created in the first section mentioned above.
So the number of fields and checkboxes to be created are identified only at the runtime.
Note: I already tried to use FMs FREE_SELECTIONS* but it is not serving my purpose.
Looking forward to your inputs.
Thanks & Regards,
Rajat
Edited by: rajat.sap123 on Feb 7, 2012 7:18 PMWhy don't you use the At selection-screen output event.
As i have understood your scenario you have two sections. with the first one containing the select-options. The second will change on basis of the first section selection.
Hope it helps you.
Elaborate a bit more so i can paste a code. -
PF status in dynamic selection screen
Hi,
I am creating a dynamic selection screen ,it is having the default PF_status .But now i want to give a different PF_status in that dynamic selection screen.
Like if i press the back button it should take me to the previous screen,but now it is going to next screen.So,Please help to change the functionality of the BACK button.
thanks in advance
SravanthiHi Sravanthi,
Set your PF status in event 'At selection-screen output' of your dynamic selection screen.
Handle Back operation in event 'At selection-screen'.
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'TEST'.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'BACK'.
" Ur code
ENDCASE.
Thanks, -
How to generate dynamic selection-screen?
Hi all,
I have two radio buttons on selection-screen.
If user-selects the one, Then under the radio button another parameter should be displayed
if he selects another radio button, the previous parameter should not be displayed and another parameter should appear in the selection screen under the second radio button.
Please help by giving the code to solve this problem?
Thanks,
Vamshi.Hi Vamsi,
By using AT SELECTION-SCREEN OUTPUT and creating the MOdif id for the selection screen parameter you can achieve the dynamic selection scree..
AT SELECTION-SCREEN OUTPUT.
* Modify selection screen as per the radio buttons selected.
PERFORM modify_sel-screen.
FORM modify_sel-screen .
* If radio button - process in range of STR's selected, display STR
* range and Date range as input
IF p_rb1 EQ c_x.
LOOP AT SCREEN.
IF screen-group1 = c_ir2.
screen-active = c_0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
* If radio button - process from excel is selected, give option for
* user to upload file
ELSEIF p_rb2 EQ c_x.
LOOP AT SCREEN.
IF screen-group1 = c_ir1.
screen-active = c_0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " MODIFY_SEL-SCREEN
see the below example....
copy the below code you can come to know how the dynamic selection screen happens..
* S E L E C T I O N S C R E E N *
* Selection criteria
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_rb1 RADIOBUTTON GROUP gr1 USER-COMMAND com1 DEFAULT 'X',
"Process STR's in date range
p_rb2 RADIOBUTTON GROUP gr1. "Process STR's from Excel
SELECTION-SCREEN BEGIN OF BLOCK c1 WITH FRAME .
PARAMETERS : p_apover TYPE zcpeg_fg_related-pl_version OBLIGATORY.
"PJ1031008
SELECTION-SCREEN END OF BLOCK c1.
SELECTION-SCREEN END OF BLOCK b1.
* Display date range to process STR's
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_banfn FOR w_preq MODIF ID ir1,
"Purchase requisition number
s_lfdat FOR w_lfdat MODIF ID ir1.
"Date range
SELECTION-SCREEN END OF BLOCK b2.
* Option for uploading file to process STR's
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_file TYPE rlgrap-filename MODIF ID ir2. "File name
SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN OUTPUT.
* Modify selection screen as per the radio buttons selected.
PERFORM modify_sel-screen.
FORM modify_sel-screen .
* If radio button - process in range of STR's selected, display STR
* range and Date range as input
IF p_rb1 EQ c_x.
LOOP AT SCREEN.
IF screen-group1 = c_ir2.
screen-active = c_0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
* If radio button - process from excel is selected, give option for
* user to upload file
ELSEIF p_rb2 EQ c_x.
LOOP AT SCREEN.
IF screen-group1 = c_ir1.
screen-active = c_0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " MODIFY_SEL-SCREEN
Regards,
Prabhudas -
How to create dynamic selection-screen
Hi all,
I want to create dynamic selection-screen.in that dynamic selectio-screen i want to display date fields based on table name given in the selection-screen.
Regards,
BillaHi Billa,
Look into the function group SSEL, this has some SAP standard functions to work with dynamic selection screens.
Below is sample FM, I wrote making use of standard FM from the above. This FM will take table name as input and will display a screen with all the fields within that table for selection. This can also be customized to restrict the fields for display.
Hope this helps,
Sumant.
FUNCTION y_ss_test_dynamic_selection.
""Local interface:
*" IMPORTING
*" REFERENCE(TABNAME) LIKE DD02L-TABNAME
*" EXPORTING
*" REFERENCE(DS_CLAUSES) TYPE RSDS_WHERE
*" EXCEPTIONS
*" TABLE_NOT_VALID
*" OTHER_ERROR
DATA texpr TYPE rsds_texpr.
DATA twhere TYPE rsds_twhere.
DATA trange TYPE rsds_trange.
DATA BEGIN OF qcat. "Selections View for
INCLUDE STRUCTURE rsdsqcat. "Free Selectoptions
DATA END OF qcat.
DATA BEGIN OF tabs OCCURS 10.
INCLUDE STRUCTURE rsdstabs.
DATA END OF tabs.
DATA BEGIN OF fields OCCURS 10.
INCLUDE STRUCTURE rsdsfields.
DATA END OF fields.
DATA BEGIN OF efields OCCURS 10.
INCLUDE STRUCTURE rsdsfields.
DATA END OF efields.
DATA selid LIKE rsdynsel-selid.
DATA actnum LIKE sy-tfill.
DATA title LIKE sy-title VALUE 'Selection Screen'.
DATA: maxnum LIKE sy-subrc VALUE '69'.
CLEAR tabs.
tabs-prim_tab = tabname.
COLLECT tabs.
DATA: position LIKE dd03l-position.
DATA: keyflag LIKE dd03l-keyflag.
CLEAR fields.
fields-tablename = tabname.
fields-sign = 'I'.
DATA: step LIKE sy-subrc.
SELECT fieldname keyflag position
INTO (fields-fieldname, keyflag, position)
FROM dd03l
WHERE tabname = tabname
AND fieldname NOT LIKE '.INCLU%'
AND datatype NE 'CLNT'
ORDER BY position.
ADD 1 TO step.
CHECK step LE maxnum.
IF keyflag <> 'X'.
efields = fields.
APPEND efields.
ENDIF.
APPEND fields.
ENDSELECT.
IF sy-subrc <> 0.
RAISE table_not_valid.
ENDIF.
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
expressions = texpr
kind = 'F'
IMPORTING
selection_id = selid
expressions = texpr
where_clauses = twhere
field_ranges = trange
number_of_active_fields = actnum
TABLES
tables_tab = tabs
fields_tab = fields
fields_not_selected = efields
EXCEPTIONS
fields_incomplete = 01
fields_no_join = 02
field_not_found = 03
no_tables = 04
table_not_found = 05
expression_not_supported = 06
incorrect_expression = 07
illegal_kind = 08
area_not_found = 09
inconsistent_area = 10
kind_f_no_fields_left = 11
kind_f_no_fields = 12
too_many_fields = 13.
IF sy-subrc = 0.
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = selid
title = title
IMPORTING
where_clauses = twhere
expressions = texpr
field_ranges = trange
number_of_active_fields = actnum
TABLES
fields_tab = fields
EXCEPTIONS
internal_error = 01
no_action = 02
no_fields_selected = 03
no_tables_selected = 04
selid_not_found = 05.
IF sy-subrc = 0.
CLEAR ds_clauses.
MOVE tabname TO ds_clauses-tablename.
READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
IF sy-subrc <> 0.
RAISE other_error.
ENDIF.
ELSE.
RAISE other_error.
ENDIF.
ELSE.
RAISE other_error.
ENDIF.
ENDFUNCTION. -
DYNAMIC SELECTION SCREEN uisng FREE_SELECTIONS_INIT
Hi,
I am facing a problem regarding the dynamic selection screen using FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG .After entering the values in Dynamic Selections on pressing Enter, the values are getting distorted.For example if i gave the purchase order no as 0099994434 it is getting truncated to four digits no like 0099.
Its a bit urgent .Can any body help me out in resolving this isuue.Hi,
You may refer this http://help.sap.com/saphelp_47x200/helpdata/en/9f/db996135c111d1829f0000e829fbfe/frameset.htm
Raja T
Message was edited by:
Raja T -
To create Dynamic Selection screen using Key Fields
Hi All,
We have a requirement where we want to create Dynamic selection screen using Key fileds of Z-table or any standard table.
Please provide some solution if you have worked in this area.
Thanks in Advance,
Anand Raj KurubaHi,
You can use the following statement.
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
declares a node <node> of a logical database for dynamic selections in the selection include.
To use the dynamic selections in the SELECT statements of the subroutine PUT_<node>, you must use the data object DYN_SEL. The data object DYN_SEL is automatically generated in the logical database program as follows:
TYPE-POOLS RSDS.
DATA DYN_SEL TYPE RSDS_TYPE.
You do not have to program these lines yourself. The data object DYN_SEL is available in the database program but not in a connected executable program.
The type RSDS_TYPE of the data object is defined in the type group RSDS as follows:
TYPE-POOL RSDS.
WHERE-clauses ------------------------------
TYPES: RSDS_WHERE_TAB LIKE RSDSWHERE OCCURS 5.
TYPES: BEGIN OF RSDS_WHERE,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
WHERE_TAB TYPE RSDS_WHERE_TAB,
END OF RSDS_WHERE.
TYPES: RSDS_TWHERE TYPE RSDS_WHERE OCCURS 5.
Expressions Polish notation ---------------
TYPES: RSDS_EXPR_TAB LIKE RSDSEXPR OCCURS 10.
TYPES: BEGIN OF RSDS_EXPR,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
EXPR_TAB TYPE RSDS_EXPR_TAB,
END OF RSDS_EXPR.
TYPES: RSDS_TEXPR TYPE RSDS_EXPR OCCURS 10.
Selections as RANGES-tables -----------------
TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.
TYPES: BEGIN OF RSDS_FRANGE,
FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
SELOPT_T TYPE RSDS_SELOPT_T,
END OF RSDS_FRANGE.
TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.
TYPES: BEGIN OF RSDS_RANGE,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
FRANGE_T TYPE RSDS_FRANGE_T,
END OF RSDS_RANGE.
TYPES: RSDS_TRANGE TYPE RSDS_RANGE OCCURS 10.
Definition of RSDS_TYPE
TYPES: BEGIN OF RSDS_TYPE,
CLAUSES TYPE RSDS_TWHERE,
TEXPR TYPE RSDS_TEXPR,
TRANGE TYPE RSDS_TRANGE,
END OF RSDS_TYPE.
For more information, please check this link.
http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
Regards,
Ferry Lianto -
Adding a BSEG field to the FB03 dynamic selection screen
Hello,
We have a requirement wherein we want to add a field from BSEG in the dynamic selection screen of FB03.
We found that the logical database behind this is BRF. So we created a u2018CUSu2019 selection view for the logical database and added the field from BSEG to the functional group
and checked the checkbox u201CPreselectu201D for it to appear automatically in the FB03 screen.
But we still couldnu2019t see the field in FB03 dynamic selection.
On analysis, we found that only tables are that are defined in the nodes (Extras Selection views) can be used to create the dynamic selection and BSEG was not available
as one of the node. So we added BSEG as one of the node by adding the below code to the SELECTION of the logical database.
SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE BSEG.
Even after that, we couldnu2019t see the field from BSEG in the dynamic selection.
Are we missing anything here?
I see many threads here on similar lines but no one has posted the exact step. Any help is highly appreciated.
Thanks a lot.
Regards,
SuganyaHi
If you want to take the line item details than you can refer these t-codes rather than customizing.
S_AC0_52000887 - Receivables: Profit Center
S_AC0_52000888 - Payables: Profit Center
S_ALR_87012332 - G/L Account Statements
Here by using the dynamic selection you can get the results. Use object list display and select the layout for more fields.
Thanks -
How to generate a dynamic selection-screen
Hi folks,
I have a itab with all fields and descriptions of a database-table. Now i want to generate a selection screen dynamically. I want to create a select-option for every field of the table.
First I read all fields of a database table into my intern table:
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'database_tabname'
TABLES
dfies_tab = it_tabname_fields.
Then I tried to generate a dynamic selection-screen with a select-options statement per field of the itab, but it doesn't work:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 NO INTERVALS.
LOOP AT it_tabname_fields INTO s_tabname_fields. "should be 14 loops and 14 lines
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (25) s_tabname_fields-SCRTEXT_S FOR FIELD var1. "the name of the field should be set dynamically from the itab
SELECT-OPTIONS var1 FOR tabname-s_tabname_fields-fieldname. "s_tabname_fields-fieldname should be set dynamically for each line
SELECTION-SCREEN END OF LINE.
ENDLOOP.
SELECTION-SCREEN END OF BLOCK b2.
I know that this doesn't work but it should help you to understand what i want to do. It doesn't create more than one select-option (it should be 14 because there are 14 lines in the table) and it doesn't get the values from the table.
I hope you can help me...
Regards,
Sebastianhi
Firstly, have a look at the following code to see how this can be implemented -
REPORT ZTEST.
perform test.
class test definition.
public section.
methods: create_screen.
endclass.
class test implementation.
method create_screen.
data: report_line(72),
report_source like table of report_line.
data: err_message(240),
err_line type i,
err_word(100).
report_line = 'REPORT TEST.'.
append report_line to report_source.
report_line = 'PARAMETERS: P_TEST TYPE I.'.
append report_line to report_source.
report_line = 'START-OF-SELECTION.'.
append report_line to report_source.
report_line = 'WRITE : P_TEST.'.
append report_line to report_source.
syntax-check for report_source message err_message
line err_line
word err_word.
if err_message is initial.
INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
endif.
endmethod.
endclass.
form test.
data test type ref to test.
CREATE OBJECT TEST.
call method test->create_screen.
endform.
As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
Regards,
ravish
<b>plz dont forget to reward points if helpful</b> -
Dynamic Selection screen in FDK43 transaction
HI,
The transaction FDK43 has a dynamic selection screen used from LDB DDF .It does not show all selections views in the dynamic selection but when I test the LDB from se36 its shows all the selections in dynamic selections.
Any idea why it is not showind in the transaction FDK43 ??
Regards,
ShitalHi,
LDB fields are nothing to do with Dynamic Selection. It is not necessary that all the field of LDB should be visible in Dynamic Selection. FDK43 is a standard screen and SAP has designed the dynamic selection with limited option. If you want additional fields, you need to do the enhancement with the help of ABAPer.
Regards,
Ravi -
How to call dynamic selection screen from another report
hi,
i have transaction ZFAGLL03.
it has got standard selection screen.. and dynamic selection screen...
i am calling this transaction from another report, now how do i display this dynamic selection screen.....Try following code and see if it helps:
TYPE-POOLS : rsds.
TABLES:tgsb.
DATA: trange TYPE rsds_trange,
trange_line
LIKE LINE OF trange,
trange_frange_t_line
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line
LIKE LINE OF trange_frange_t_line-selopt_t,
trange_line1
LIKE LINE OF trange,
trange_frange_t_line1
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line1
LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.
DATA: seltab TYPE TABLE OF rsparams WITH HEADER LINE,seltex TYPE rsds_texpr.
SELECT-OPTIONS:so_gsber FOR tgsb-gsber.
LOOP AT so_gsber.
trange_line-tablename = 'FAGLFLEXA_FS'.
trange_frange_t_line-fieldname = 'RBUSA'.
MOVE-CORRESPONDING so_gsber TO trange_frange_t_selopt_t_line.
APPEND trange_frange_t_selopt_t_line
TO trange_frange_t_line-selopt_t.
ENDLOOP.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit FAGL_ACCOUNT_ITEMS_GL with FREE SELECTIONS texpr AND RETURN .
Maybe you are looking for
-
Error message when trying to connect to a SQL Server Database
All: I get the following message when I try to connect to a SQL Server Database within a form: "Connection for Source DataConnection failed because the environment is not trusted" Can anyone help me solve this problem? Thanks, BR
-
Sort Main Report on variable passed from Subreport
Post Author: realw CA Forum: Formula I'm working on a CR XI report. I want to be able to sort the main report on a value in the subreport. I am trying to create a shared variable to pass that value from the subreport to the main report. So far, howev
-
SET UPDATE TASK LOCAL Would this be an acceptable to improve performance
Hi All This is the below code is already there FORM Main_call_bapi_create USING fp_wg_req TYPE ty_req. DATA: l_msg TYPE bapi_msg, "Message l_ptype TYPE zzyproctype, "Processing type l_nlines TYPE i, "no of li
-
Hi , I have seach page uses query region where 'initial view panel' is true, when I click on 'personalize' button on view panel, then I come to 'Personalize View' page, when I click 'create view', I get error: Exception Details. oracle.apps.fnd.frame
-
Adobe Flasher Player not loading
I believe i have downloaded and installed the most recent version and yet when I go back to the espn website - it continues to indicate I need to download adobe? I ma not very computer savy - any advice?