How to do dynamic selection
Hi all,
I have 2 radio button in the selection screen.
When I click the 1st button, Parameter1 should be displayed and when i clicked the 2nd button, Parameter2 should be displayed.
kindly provide any sample code if possible.
thanks in advance
points will be rewarded
Need to do some modifications to suit ur req
PARAMETERS : p_add RADIOBUTTON GROUP radi
USER-COMMAND radio MODIF ID MOD,
p_disp RADIOBUTTON GROUP radi DEFAULT 'X' MODIF ID pod,
p_chng RADIOBUTTON GROUP radi MODIF ID rad,
p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
SELECT-OPTIONS : s_idn FOR vendor MODIF ID mod,
s_pcode FOR ws_c_pcode MODIF ID pod.
PARAMETERS: p_plant LIKE zaw_pol_plan-plant MODIF ID rad,
p_zzvend LIKE zaw_pol_plan-zzvendor MODIF ID cod.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_add EQ 'X'.
IF screen-group1 EQ 'MOD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_disp EQ 'X'.
IF screen-group1 EQ 'POD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_chng EQ 'X'.
IF screen-group1 EQ 'RAD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_er_log EQ 'X'.
IF screen-group1 EQ 'COD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
Similar Messages
-
How to pass dynamic selection to logical databse using ldb_process function
dear friends,
can anybode tell me how to pass dynamic selection to the logical database when i m using LDB_PROCESS function module. however, in EXPRESSIONS paramter of the function module i m passing the selecti-option, it is passing their also but when i used more than two select-option or paramter it throw an exception FREE_SELECTIONS_ERROR.
SO PLEASE GUIDE ME HOW TO PASS MORE THAN TWO SELECT-OPTION IN LOGICAL DATANSE DYNAMICALLY USING LDB_PROCESS.would be nice if you post the answer to all
-
How To Document: Dynamic selection for InfoSpoke
Hello
I have downloaded and read the "How To" document: Dynamic selection for InfoSpoke & Use InfoSpoke Badi to correct KYF format
link: https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/01d3a090-0201-0010-9783-bc33ab690e70&overridelayout=true
I'm mostly interested for the dynamic selection part of the document and the code for that seems to be stored in an attached text document (ZLX_ESS_INTERFACE.txt). The problem is that i cannot actually view it or any other txt in the pdf.
Can anyone who has got the txt file link it here please or suggest a program that would dynamicaly change the infospoke selections?
Actualy i'm not interested in having an input screen for filling the variable value, i just want to get the value from an ODS
any suggestions?
Thanx in advance
FragiHello
I have downloaded and read the "How To" document: Dynamic selection for InfoSpoke & Use InfoSpoke Badi to correct KYF format
link: https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/01d3a090-0201-0010-9783-bc33ab690e70&overridelayout=true
I'm mostly interested for the dynamic selection part of the document and the code for that seems to be stored in an attached text document (ZLX_ESS_INTERFACE.txt). The problem is that i cannot actually view it or any other txt in the pdf.
Can anyone who has got the txt file link it here please or suggest a program that would dynamicaly change the infospoke selections?
Actualy i'm not interested in having an input screen for filling the variable value, i just want to get the value from an ODS
any suggestions?
Thanx in advance
Fragi -
How can i dynamically select columns based on the input parameter?
I have an input parameter which takes single numeric value.
Based on this value i have to dynamically select table-columns .
For eg: if i have following fields in my table :
SEM_1
SEM_2
SEM_3 and SEM_4.
And if i give numeric input as 2 , then i have to select "SEM_2" column only.
if the input is 3 then i have to select "SEM_3" only and leave the rest of the columns.
how do i achieve this dynamic feature in the "Select ..... From...... table...." statement in the ABAP??Hi,
you should try something like this.
TYPES: cond(72) TYPE c.
data: condtab TYPE TABLE OF cond,
condw type cond.
data: lv_field(30) type c value 'SEM_'.
write p_num to lv_field+4(1).
condw = lv_field.
append condw to condtab.
SELECT (CONDTAB) FROM table INTO.....
Kostas
Message was edited by:
Kostas Tsioubris -
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 get dynamic select options from logical database?
Hi,
in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
WHERE bukrs = p_burks AND ... AND
(where_tab)
Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
Thanks in advance.
Regards,
Ivaylo Mutafchiev
Senior SAP Abap ConsultantHi,
Try to use the following fm in your report and check
call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
exporting
curr_report = sy-cprog
mode_write_or_move = 'M'
importing
p_trange = gt_dyn_trange
exceptions
not_found = 1
wrong_type = 2
others = 3.
PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values
a® -
How to build dynamic select query
Using the ZCO_SETTLE_CHK-REC_FIELD and DISTRIBUTION_RULE-KONTY write a dynamic select single query <table>-<field name> e.g. <COAS>- <AUART> on the <table> e.g. <COAS>. If the DISTRIBUTION_RULE-KONTY is u2018ORu2019, then use DISTRIBUTION_RULE-AUFNR value in the where clause of the query to fetch the ZCO_SETTLE_CHK-REC_FIELD value maintained in the <table>-<field name>. If DISTRIBUTION_RULE-KONTY = u2018KSu2019 or u2018PRu2019 use DISTRIBUTION_RULE-KOSTL or DISTRIBUTION_RULE- PS_PSP_PNR respectively in the where clause to fetch the values.
For above how we can build dynamic queryHi,
Refer the below code which helps to design a dynamic where condition.
IF NOT p1 IS INITIAL.
CLEAR : lv_p1_condition.
CONCATENATE 'F1' ' = ' '''' p1 '''' INTO
lv_p1_condition.
ENDIF.
IF NOT p2 IS INITIAL.
CLEAR : lv_p2_condition.
CONCATENATE 'F2' ' = ' '''' p2 '''' INTO
lv_p2_condition.
ENDIF.
IF NOT p3 IS INITIAL.
CLEAR : lv_p3_condition.
CONCATENATE 'F3' ' = ' '''' p3 '''' INTO
lv_p3_condition.
ENDIF.
IF NOT lv_p1_condition IS INITIAL.
CONCATENATE lv_p1_condition lv_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
IF NOT lv_p2_condition IS INITIAL.
IF lv_condition IS INITIAL.
CONCATENATE lv_p2_condition lv_condition
INTO lv_condition SEPARATED BY space.
ELSE.
CONCATENATE lv_condition 'AND' lv_p2_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
ENDIF.
IF NOT lv_p3_condition IS INITIAL.
IF lv_condition IS INITIAL.
CONCATENATE lv_p3_condition lv_condition
INTO lv_condition SEPARATED BY space.
ELSE.
CONCATENATE lv_condition 'AND' lv_p3_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
ENDIF.
SELECT * FROM link INTO wa
WHERE lv_condition . -
How to use dynamic select query which queries from 3 different table.
Hi All,
I am new to Toplink, i would like to use a named query to select some of the columns from 3 different tables with dynamic where clause.
I have used the following lines. Please tell me how to get code for the dynamic where clause.
First try :
Vector objPersons = (Vector)session.executeQuery("findPersonByGlobalID",Person.class,vQueryArguments);
The above method is not returning the vector or collection.
Second Try:
ReadAllQuery query = new ReadAllQuery(Person.class);
query.useCollectionClass(LinkedList.class);
LinkedList person = (LinkedList) session.executeQuery(query);
The second try is returning the collection but, this fetches all the record from the table.
1. How to query for range of records?
2. How to query from multiple tables for some range. How to use dynamic range values ?
Please reply with your answers or some pointers would help.
Thanks and Regards,
Vijay.BHi,
Did you try using a SQLCall ? It might be able to satisfy you requirements .. :-
Employee employee = (Employee) session.executeSelectingCall(
new SQLCall("SELECT * FROM EMPLOYEE WHERE EMP_ID = 44")
);You can get more information here :-
http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/qrybas004.htm
Regards,
Sandeep -
How to do dynamic selection for fields
Hi,
Can you please help me on this.
I am adding the custom fields to the standard trasactions CJI3, CJI4, CJI5 for dispalying the line items. For this I am using COOMEP01 CO-OM: Information system -> line item reports enhancement.
I am displaying the custom fileds for line items.
The problem is...In all three t.codes I am having dynamic selection icon. user wants, selection is based on my custom fields...How to get my custom fileds on the selection screen?
Please assist me as soon.
Regards,
RaviHai reddy
This example shows how different transactions codes can be used to produce different selection options for the same program. The example allows for lookups on Sales Order number, Purchase Order Number, Delivery Number or Invoice number.
*--- SELECTION OPTIONS -
SELECTION-SCREEN BEGIN OF BLOCK SO WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,"Sales order number
S_VBELND FOR LIKP-VBELN,"Delivery number
S_VBELNI FOR VBRK-VBELN,"Invoice number
S_VBELNP FOR VBKD-BSTKD."PO number
SELECTION-SCREEN END OF BLOCK SO.
*--- EVENT AT SCREEN OUTPUT -
AT SELECTION-SCREEN OUTPUT.
CASE SY-TCODE.
WHEN 'ZEDI6'.
LOOP AT SCREEN.
CASE SCREEN-GROUP4.
WHEN '001'. "Sales order select
SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '002'. "Delivery select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '003'. "Invoice select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '004'. "PO Select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
WHEN 'ZEDI6D'. "Delivery select
LOOP AT SCREEN.
CASE SCREEN-GROUP4.
WHEN '001'. "Sales order select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '002'. "Delivery select
SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '003'. "Invoice select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '004'. "PO Select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
WHEN 'ZEDI6I'. "Invoice select
LOOP AT SCREEN.
CASE SCREEN-GROUP4.
WHEN '001'. "Sales order select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '002'. "Delivery select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '003'. "Invoice select
SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '004'. "PO Select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
WHEN 'ZEDI6P'. "PO select
LOOP AT SCREEN.
CASE SCREEN-GROUP4.
WHEN '001'. "Sales order select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '002'. "Delivery select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '003'. "Invoice select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '004'. "PO Select
SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ENDCASE.
Thanks & regards
Sreenivasulu P -
HR-How to use dynamic selection fields in prog ..?
Hii
I have written a prog to select data pertaining to details of all employees who belong to a particular country . For this i have provided a dynamic selection field for selecting country (through Selection View).But when i am getting all the records for all countries.
How to use the dynamic selection fields in program or they behave in the same way as the standard selection given by the LDB .As if we enter a value in the std screen then the GET event acts accordingly .
Ajitabh PradhanHi Ajitabh,
First off, is the Dynamic Selection working? If so, try the following code.. I am assuming, you only want to look at Permanent Address.
tables: pernr.
infotypes: 0001,0006.
start-of-selection.
get pernr.
rp-provide-from-last p0001 space pn-begda pn-endda.
check pnp-sw-found eq 1.
rp-provide-from-last p0006 1 pn-begda pn-endda.
check pnp-sw-found eq 1.
write:/ pernr-pernr,p0001-ename,p0006-land1.
end-of-selection.
Regards,
Suresh Datti -
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 add dynamic selection in LDB_PROCESS
Hi All,
We are calling LDB_PROCESS from our report. and we are sending callback events and selections and we are calling LDB KDF.
We enabled housebank (HBKID) in Dynamic Selection of the LDB. Could you please help us how we can send value of field HBKID (House Bank) from LDB_Process to narrow down the selection process.
Thanks and best regards,
NiteeshraiAnd the setClientAttributes() takes Set object, so i added ClientAttributeTag and then set it in HashSet. Is this the way to do it ??
and how can i set string value in ClientAttributeTag.setValue() ??
Please help.
Sudeep -
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 . -
How to make dynamic selection in case of innerjoin
hi
in run time i will get some table name into g_v_fubw
if i write a select quiry like this its working
SELECT * FROM (g_v_fubw)
INTO TABLE g_it_fubw
FOR ALL ENTRIES IN g_it_werks
WHERE kostl IN s_kostl3 AND
platznr IN s_platz3 AND
werks = g_it_werks-werks AND
matnr IN s_matnr AND
prctr IN s_prctr.
But if i am using inner join like bellow
SELECT
avalev ainvpe vastrd vtxjhr a~bukrs
awerks amatnr
aindei abwtar a~bklas
v~adqty
v~meins
a~peinh
INTO TABLE g_it_temp_display
FROM (g_v_fuba) AS a INNER JOIN
(g_v_abcd) AS v ON
amatnr = vmatnr AND
ainvpe = vinvpe
WHERE a~invpe EQ p_invw AND
a~valev EQ 'P' AND
v~astrd IN g_r_astrd AND
v~txjhr IN g_r_txjhr AND
a~bukrs EQ p_bukrs AND
its not working
how can i write dynamic select quiry using innerjoinHi...
Make sure the structure of g_it_temp_display is same as the selected fields.
FROM (g_v_fuba AS a INNER JOIN
g_v_abcd AS v ON
amatnr = vmatnr AND
ainvpe = vinvpe ).....>
See the syntax...
as below...
SELECT a~knuma_ag "SAP agreement number
a~boart_ag "SAP agreement type
a~zzlegsum "Legacy summary number
b~datab "Begin date
b~datbi "End date
FROM ( /irm/ipbbasp AS a INNER JOIN kona AS b ON
aknuma_ag = bknuma )
INTO TABLE i_irm_kona
FOR ALL ENTRIES IN i_kona_deal
WHERE a~boart_ag IN r_agrmnt_typ AND "SAP agreement type
a~zzlegsum IN r_summ_number AND "Legacy summary number
b~knuma = i_kona_deal-knuma AND "SAP agreement No
b~valdt IN r_ppd. "Prior price date -
How to extend dynamic selection for Logical Database PNPCE
Hi All,
I need to extend dynamic selection for Logical Database PNPCE. Can someone able to help with steps?
Thanks
RanjithHi All,
I need to extend dynamic selection for Logical Database PNPCE. Can someone able to help with steps?
Thanks
Ranjith -
How to hide dynamic selection fields in variants
hi,
When a selection variant is saved, we have the option to 'hide' a selection field. That field may contain a value, but it is not shown on the selection screen. There is, however, a button that will display these hidden field when required.
Is it possible to do this also with dynamic selection fields ?
The column 'Hide field' is shown in the variant atttributes screen, but it is not active.
Please suggest
MSExplore SHD0 T code
Maybe you are looking for
-
Faulty ObjectMessage Payload in Message Driven Bean
To all, I have a frustrating problem. I am using iPlanet application server 6.5 and Java Message Queue 2.0 beta. I have deployed a message driven bean into the application server. This bean expects ObjectMessage's. The bean successfully receives mess
-
I blocked video in website, how do I unblock?
I mistakenly blocked a video on http://www.filmtotaal.nl/filmsoptv.php (I thought I was blocking an ad); now I can't play any video from that site. How do I unblock?
-
Why has the navigator app disappeared from my droid?
This forum is ridiculous. I have a simple question but have to jump thru hoops just to put it up. my local app and my navigator app has disappeared from all our droid phones. whats up with that?
-
how do i make the sky more blue when it is very white looking?
-
"The Future of the Gravity Boy" by Infadels contains nothing but static.
I recently noticed that the entire album "The Future of the Gravity Boy" by Infadels contains nothing but 3 second clips of static, instead of the actual songs. Here's a link to the album I'm talking about:https://open.spotify.com/album/3OQ4dSIvojhfe