Dialog Prog. with a selection screen
Hi Gurus,
How its possible to achieve a SELECTION-SCREEN with in a Dialog Prog. Pls. give me rough idea.
Thank you.
Hi,
If you are taking about to use the selection screen in you Dialog Program than please follow the following.
You will have to add following Lines in PBO and BAI You need a custom Control on the your Screen where you display your sub screen.
PBO
CALL SUBSCREEN <custom_control_name> INCLUDING '<Programe_name_where_sub_screen'> '<Screen Number'>
PAI
CALL SUBSCREEN <custom_control_name>
In Program it must be like this.
selection-screen begin of screen 0001 as subscreen.
parameters: date like sy-datum.
selection-screen end of screen 0001.
Hope above will help you,
Please Reply if not Clear,
Kind Regards,
Faisal
Similar Messages
-
How to replace the existing selection screen with new selection screen
Hi,
I have first selection screen with parametre as a table name, then I have created dynamic selection screen as 2nd selection screen with different fields of that table as select options. This is done using genaration of dynamic report. Now If I click on button on this 2nd selction screen , then I want to replace this 2nd dynamic selection screen , with the other selection screen fields.
Can anybody guide me, How to do replace one slection screen with different selection screen.
and one imp thing is this selction screen is populating with dynamic fields on it.
Regards,
MrunalAs I can understand you want to make some of the screen field to disable or visible on screen depending upon the interaction of user with screen 1.
You may use this example code in PBO of screen 2.
LOOP AT SCREEN.
" action has been taken to modify the area office screen as per the option chosen at screen 99.
CASE ACTION.
" if the user has taken up the option of UPLOAD
WHEN 'UP'. " screen processing while we upload the plan
" during upload we will make dates as output fields only
IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
" also make 2 buttons disabled
IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_VE'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
WHEN 'DN'. " screen processing while we upload the approved plan
" during upload we will make dates as output fields only
IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
" also make 2 buttons disabled
IF SCREEN-NAME = 'AO_UP' OR SCREEN-NAME = 'AO_VE'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
WHEN 'VW'. " screen processing while we view the plan
" during upload we will make dates as output fields only
IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
" also make 2 buttons disabled
IF SCREEN-NAME = 'RLGRAP-FILENAME' OR SCREEN-NAME = 'FNAME'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
" and hide the file input field
IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_UP'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDCASE.
ENDLOOP. -
Tabbed selection screen with AT SELECTION-SCREEN ON events does not work
I have a selection screen with 3 tabs fields on each tab have AT SELECTION-SCREEN ON field events.
If you are on tab 1 and select a variant that populates fields on all tabs and then click the execute button ABAP does not seem to recognize that the field has changed when it executes AT SELECTION-SCREEN ON field event unless you physically go to each tab.
I can work around this by:
1) moving all of the AT SELECTION-SCREEN ON field events in a AT SELECTION-SCREEN OUTPUT event. This is not efficient and it potentially opens me up to other problems.
2) changing the selection screen to remove the tabs and have all of the fields on 1 screen. This makes for a very long screen.
Is there any way to have ABAP check all tabs?
Thanks,
JerryI finally got it to start. Let it sit and tried and it wouldn't but then I tried again and it did. How do I blow the dust out? I think it must be something with the heat since that comes up alot.
I will do it, I love my Mac. -
Unable to fetch records from database with huge selection screen
Hi all,
I have 20 fields from selection screen.
I have a z table with these 20 fields .
Now with the values entered in the selection screen i have to fetch the records from the z table.
All fields in the selection screen are not mandatory, the user may or may not enter the values.
I have to fetch the records based on the values entered.
I wrote a select with where condtion to all those 20 fields. but its not retreving the records.
All the fields in the selection screeen are parameters.
Could you help me on this, please. I wrote in the where conditon with field1 = value AND field 2 = value.. etc... field20 = value.
Please guys help me out.
KV.
Edited by: Nithin Kumar on Mar 18, 2008 8:48 AMGuys,
I have a problem with the select query.
as i said i have 20 fields, ranges are working for few fields.
But i have couple of fields as descriptions. So i have to fetch the records for pattenr as well.
Means, user can enter in the description............. like "ab". So in the description if there is anything with 'ab' it should fetch.
it works with a LIKE statement with % symbols.
but it doenst work with ranges and patterns in same select. I mean the below is not working.
SELECT *
FROM crmd_orderadm_h
INTO table itab
WHERE object_id IN r_obj AND
process_type IN r_pro AND
description LIKE s_des.
r_obj, r_pro are ranges and s_des is the pattern, ex: %ab%. so in this case how it has to be done... could you please help me on this.. the other fields could be blank( r_obj and r_pro)..
kindly help me out......
KV -
Mapping function module paramters dynamically with a selection screen
Hi Experts,
I got a situation,
i am maintaining data of a function module paramters in a dictionary table.
in the screen pbo i will fetch the the fm data from that table into the internal table(ITAB).
in my report screen i am having the selection screen and the selection screen parameters are also mentioned in the FM Dictionary Table, we are having the those details in our internal table (ITAB).
now the issue is how to call the FM by using the ITAB values.
example: ITAB
fmname parametr type str_name ss_field
get_notif im_notif import qmnum s_notif
here s_notif[ ] is having the values in it which is nothing but selection screen parameter.
and we are having S_NOTIF as a string values in the ITAB.
now how can i link this S_notif(type string) to s_notif(value of notification) ?
what i have done is ,
loop at itab into wa_itab where type = 'import'.
case wa_itab-parameter.
when 'IM_NOTIF'. " for example im dealing with only one parameter this can have many
get reference of S_NOTIF[ ] to v_notif.
endcase.
endloop.
now i dont wanmt hard code the parameter name ,
is there any way to do it dynamically... ?
experts please help me on this ?
thanksHi ,
This sample will help you.
DATA: lv_fname TYPE string,
lt_ptab TYPE abap_func_parmbind_tab,
ls_ptab TYPE abap_func_parmbind,
lt_etab TYPE abap_func_excpbind_tab,
ls_etab TYPE abap_func_excpbind.
*** Table
ls_ptab-name = 'IT_TABLE'.
ls_ptab-kind = abap_func_tables.
GET REFERENCE OF <itab> INTO ls_ptab-value.
INSERT ls_ptab INTO TABLE lt_ptab.
*** Exceptions
ls_etab-name = 'DATA_NOT_FOUND'.
ls_etab-value = 1.
INSERT ls_etab INTO TABLE lt_etab.
lv_fname = 'GET_MY_DATA'." Function Name
CALL FUNCTION lv_fname
PARAMETER-TABLE
lt_ptab
EXCEPTION-TABLE
lt_etab.
IF sy-subrc NE 0.
ENDIF. -
Issue with BEx selection screen
Hi Gurus,
We recently upgraded from BW 3.5 to 7.0. After the upgrade, while running the BEx queries the selection screen is not popping up and the query runs without the selections in it. Then the report errors out.... " Error Specify a value for variable XXXX".
Apparently, the query runs fine with selection when executed on WEB.
Did anyone of you come across with this issue..
Thanks
James.Hi Guys
Run your query without the variable ,Try by removing the restrcition , if it is working fine without the variable then
I would suggest to check your variable once again like
Check if 'Ready for input' check is checked for the respective variable,
Remove the restriction ( drag out the variable )
check your variable once again with all the setting and variable type
OR create a new varilable, if it is a customer exit type then check ABAP code written for populating values.
let me know if this helps,
cheers
sukhi -
Issue with AT SELECTION-SCREEN ON event
Hi Experts!!
In the below code, p_jan, p_feb are showing as blank though they are filled in. Is this how this event works?
PARAMETERS: p_categ TYPE zpycateg,
p_jan TYPE sy-datum,
p_feb TYPE sy-datum.
AT SELECTION-SCREEN ON p_categ.
IF NOT p_jan IS INITIAL.
ENDIF.
Please help me out.Hi
That event works for P_CATEG, here other parameters of the screen can't been seen.
If you want to do a validation has to check several parameters of a selection-screen you should use the event AT SELECTION-SCREEN.
Anyway if you think it's better the event AT SELECTION-SCREEN ON <screen field>, the values of other fields can be picked up bu fm DYNP_VALUES_READ
AT SELECTION-SCREEN ON P_CATEG.
DATA: T_FIELDS TYPE STANDARD TABLE OF DYNPREAD WITH HEADER LINE.
T_FIELDS-FIELDNAME = 'P_JAN'. APPEND T_FIELDS.
T_FIELDS-FIELDNAME = 'P_FEB'. APPEND T_FIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = T_FIELDS.
READ TABLE T_FIELDS WITH KEY FIELDNAME = 'P_JAN'.
IF NOT T_FIELDS-FIELDVALUE IS INITIAL.
ENDIF.
Max -
Issue with At selection-screen output
Hi,
I tried in SDn to find suitable thread atlast i am creating query here.
My requirement is: i have two radiobuttons.
when i click first radiobutton it hasto show one selection screen it contains pernr and bukrs
when i click second radiobutton it has to show second selection screen . This screen includes personnel area and Wage type
Thanks,
MaheedharUse "AT SELECTION-SCREEN OUTPUT" and distinguish them with "MODIF ID"
Code flows like this:
PARAMETERS r_online RADIOBUTTON GROUP g1
USER-COMMAND ex DEFAULT 'X'.
PARAMETERS r_batch RADIOBUTTON GROUP g1.
PARAMETERS r_down RADIOBUTTON GROUP g1.
PARAMETER: p_bukrs LIKE t024e-bukrs OBLIGATORY
DEFAULT 'US60'.
SELECT-OPTIONS: s_werks FOR marc-werks.
PARAMETER: p_vari TYPE slis_vari MODIF ID md5.
PARAMETERS: p_a_file LIKE rlgrap-filename
DEFAULT '/transfer/us6/ZUS6MM04_MatPlt'
MODIF ID md2.
PARAMETERS: p_h_file LIKE rlgrap-filename
DEFAULT '/transfer/us6/ZUS6MM04_MatPlt_HDR'
MODIF ID md2.
PARAMETERS: p_hfile1 LIKE rlgrap-filename
DEFAULT '/transfer/us6/ZUS6MM04_MatPlt_HDR'
MODIF ID md3.
PARAMETERS: p_hfile2 LIKE rlgrap-filename
default 'C:\Transfer\US6\ZUS6MM04_MatPlt_HDR.txt'
MODIF ID md4.
* AT SELECTION-SCREEN EVENTS
AT SELECTION-SCREEN OUTPUT.
PERFORM modify_screen.
*& Form MODIFY_SCREEN
FORM modify_screen .
LOOP AT SCREEN.
IF r_online = 'X'.
IF screen-group1 = 'MD3' OR
screen-group1 = 'MD4' OR
screen-group1 = 'MD2'.
screen-active = '0'.
ENDIF.
ELSEIF r_batch = 'X'.
IF screen-group1 = 'MD3' OR
screen-group1 = 'MD4' OR
screen-group1 = 'MD5'.
screen-active = '0'.
ENDIF.
ELSEIF r_down = 'X'.
IF screen-group1 = 'MD2' OR
screen-group1 = 'MD5'.
screen-active = '0'.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " MODIFY_SCREEN -
Report with two selection screen
Hi,
I have one requirement for report.
When we execute the report then it should have two parameter (sales org, document number)
After pressing F8 it should display another screen or same screen with display customer name, city for that document and screen should have 2 more parameters (New customer kunnr).after pressing F8 program functionality should work.
Please suggest.please create 2 reports as given below.-
REPORT ZSZP_00007.
parameters a(5) .
parameters b(5) .
parameters c(5) .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'A' or screen-name = 'B' .
get parameter id 'aaaaaaaaaaa' field a.
get parameter id 'bbbbbbbbbbb' field B.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
start-of-selection.
your logic
REPORT zszp_00005.
PARAMETERS a(5).
PARAMETERS b(5).
START-OF-SELECTION.
SET PARAMETER ID 'aaaaaaaaaaa' FIELD a.
SET PARAMETER ID 'bbbbbbbbbbb' FIELD b.
your logic
SUBMIT zszp_00007 VIA SELECTION-SCREEN.
i hope this approach will solve your problem.
thanks
Swanand -
Working with dynamic selection screen in LDB FMF
Hi Guys,
I am working with LDB FMF and I have a requirement where user need the selection field in initial screen which is already comming in dynamic selection option.
Is it possible without changing the standerd LDB.
Atul
Edited by: Atul Dhariwal on Jun 16, 2009 6:27 AMHi,
my requirement is to list fields from dynamic selection to appear in the main selection screen.
user doesn't want's to click on dynamic selection option and select the fields.
I hope i am clear this time.
Atul -
Submit a report program with same selection screen with some values exclude
Dear All,
I have to submit a stndard report program from a copied zprogram with same slection screen values ,
and in some slect-options some values will be excluded depending upon the zprogram.
How to make it.
I mean when i submit , same selction screen values should go along with , depending upon some condions i have to exclude some values .
for ex: selection screen from a to b
posting date should go same
but may be along with it i have to pass movem,ent type <> 202 to the submit screen ,.
how to do this?Hi Rajendra
>What if i have to pass the movement type also 200 to 250 , with 202 and 203 exluded .
Use BT ( between ) operator for 200 to 250 :
lr_move_type-sign = 'I'.
lr_move_type-option = 'BT'.
lr_move_type-low = '200'.
lr_move_type-high = '250'.
COLLECT lr_move_type.
And use NE ( not equal ) operator to exclude 202 and 203 :
lr_move_type-sign = 'I'.
lr_move_type-option = 'NE'.
lr_move_type-low = '202'.
COLLECT lr_move_type.
lr_move_type-low = '203'.
COLLECT lr_move_type.
It works just this way.
> Secondly,
>
> If i have the selction sreen same in both the screen , is it possible to pass the same values as it is with out writing one by one selct-option and parameter?
No I don't think there is way to do it without writing one by one
but you may not specify for empty select-options.
Edited by: Bulent Balci on Aug 21, 2010 11:46 AM -
Problem with the selection screen in submit program
Hi Friends,
i am facing the problem wih the selection screen in submit program. in my Module pool program i am using the submit program statement, When i execute the program , The module program display the submit program selections creen.
I have implemented the code same as below.
submit ztest with tknum =p_tknum and return.
Can you pleaes help me how to avoid the submit program selection screen.
Thanks,
CharanHi Charan,
You have to give the selection screen values when you submit a job.
Press F1 on submit and you will see more details.
Here is an example from ABAP Documentation.
Program accessed
REPORT report1.
DATA text(10) TYPE c.
SELECTION-SCREEN BEGIN OF SCREEN 1100.
SELECT-OPTIONS: selcrit1 FOR text,
selcrit2 FOR text.
SELECTION-SCREEN END OF SCREEN 1100.
Calling program
REPORT report2.
DATA: text(10) TYPE c,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
Regards,
Jovito. -
Problem with the selection screen
Hi All,
In my program i have given the input in selection screen , Its process something and a msg was displayed , and user confirm it to continue , the program take us back to the selection screen - in this case i have to clear all the values from the selection parameters.
I tried lot , but i didn't get this result.
I know this is the standard functionality , But anything is there to clear the selection parameters.
Regards,
S.C.KHi All,
In my program i have given the input in selection screen , Its process something and a msg was displayed , and user confirm it to continue , the program take us back to the selection screen - in this case i have to clear all the values from the selection parameters.
I tried lot , but i didn't get this result.
I know this is the standard functionality , But anything is there to clear the selection parameters.
Regards,
S.C.K
I didn't go through the long list of replies nor I don't know if you gave it a thought, but you can try this,
create a [system variant|http://help.sap.com/saphelp_nw04/helpdata/en/c0/980389e58611d194cc00a0c94260a5/content.htm] (variant name starts with CUS& eg: CUS&BLANK) with the entire selection screen fields blanks and use the following function module to call that variant after msg is displayed.
CALL FUNCTION 'RS_SUPPORT_SELECTIONS'
EXPORTING
report = sy-repid
variant = 'CUS&BLANK'
EXCEPTIONS
variant_not_existent = 01
variant_obsolete = 02.
You can hide the variant by checking the box "Only display in catalog". -
Problem with matchcode/selection screen
Hello,
When i press the matchcode of a parameter of the selection screen it has to show the values depending of the values of other parameter:
Ex:
Parameter A: 2
Parameter B: press matchcode (values 5,6,7)
Parameter A: 3
Parameter B: press matchcode (vales 1,2,3)
I have already this programed in at selection scree on value-request for B. There i do the select to the table where i obtain the correspondences between A and B depending the values from A. Finally i create the help with HELP_VALUES_GET_WITH_TABLE function.
It works correctly with A = 2 but not with A = 3 or other value where always i obtain the values as A = 2 (it is because in the declaration of parameter the default is 2). In other words, it is like im not obtaining the changes of values for A in this point.
Maybe i wrong the election of the event? Any idea?
Thank you,
ManelHi!
The value of field A would not be directly available in at selection screen on value-request for B. Try using FM C14Z_DYNP_READ_FIELD ( or some other similar FM) to get the value in the selection screen parameter for A. Using this you can decide the values for the popup for field B.
Cheers! -
Problem with Dynamic Selection Screen
Hi ppl,
I have this part of code in my program. But it is not working as desired. Please could somebody let me know what is wrong with it.
TYPES: BEGIN OF tp_selscr,
klart TYPE klah-klart,
class TYPE klah-class,
END OF tp_selscr.
DATA: wa_selscr TYPE tp_selscr.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK cls WITH FRAME TITLE text-s01.
PARAMETERS: p_cls AS CHECKBOX USER-COMMAND chk.
SELECT-OPTIONS: s_klart FOR wa_selscr-klart MODIF ID cls, "Class type
s_class FOR wa_selscr-class MODIF ID cls
MATCHCODE OBJECT clas.
SELECTION-SCREEN END OF BLOCK cls.
AT SELECTION-SCREEN.
*AT SELECTION-SCREEN ON p_cls.
PERFORM dynamic_sel. "Selection based on class
*& Form dynamic_sel
* Selection based on class option
FORM dynamic_sel.
IF p_cls EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'CLS'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'CLS'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " dynamic_sel
Regards.The event is wrong. It should be AT SELECTON SCREEN OUTPUT
TYPES: BEGIN OF tp_selscr,
klart TYPE klah-klart,
class TYPE klah-class,
END OF tp_selscr.
DATA: wa_selscr TYPE tp_selscr.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK cls WITH FRAME TITLE text-s01.
PARAMETERS: p_cls AS CHECKBOX USER-COMMAND chk.
SELECT-OPTIONS: s_klart FOR wa_selscr-klart MODIF ID cls, "Class type
s_class FOR wa_selscr-class MODIF ID cls
MATCHCODE OBJECT clas.
SELECTION-SCREEN END OF BLOCK cls.
AT SELECTION-SCREEN OUTPUT. """ Instead of AT SELECTION SCREEN
*AT SELECTION-SCREEN ON p_cls.
PERFORM dynamic_sel. "Selection based on class
*& Form dynamic_sel
* Selection based on class option
FORM dynamic_sel.
IF p_cls EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'CLS'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'CLS'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM.
Vikranth
Maybe you are looking for
-
CRM 7.0 EHP1_error 2
Hello Gurus, We are in the process of upgrading CRM 7.0 to EHP1 CRM 7.0 We are stuck in the "check" step. Error description: (NTCHK.LOG) 1 ETQ201 Entering upgrade-phase "NTACT_CHK" ("20110520053547") 4 ETQ399 Set environment for standard connect: 2 E
-
Hi I'm trying to Map Oracle data to Java. Call some procedure which return nested table of object. I'm using thin driver. Here is my code. type test1 as object (data1 VARCHAR2(40),data2 varchar2(30)); type test2 IS TABLE OF test1; procedure test (ven
-
I just got my code for my free uprgrade to lion. I copied and pasted it in... It says It's not a valid code. I treid with no spaces.. same thing... and I have also tried with no dashes and typing it in instead of copying and pasting... Any ideas?
-
Hi, If anyone could help, that would be great. JTables are starting to drive me crazy. I have an editable JTable that I have created a CellEditor for. I found that if I am editing a cell and want to tab to the next cell, I have to hit the tab twice.
-
WLP Ajax Struts Portlet Links not function correctly after refresh
Hi All, I hope this hasn't being answered yet but i couldn't find any previous post on this, let me describe the environment. Im working in WLP 10.3.2 Struts Portlet, i had enable: Enable Tree Optimization: True Enable ScrollToWindow: True As