Logic needed in selection screen
hi experts,
in a selection screen i have one field S_budat ( it contains the range ) the user enters the date in it .the problum is we need to check the following condition .
if sy-datum> s_budat+13 months if it is ok we need get the values from the archive db else r/3 data .but in the mean while we have to check residency limit ( for ex: the data is archived till 22-03-2007. but in the selection screen the user entered the range 20-2-2006 to 24-5-2007 this falls in the both .so for this how to write the logic .till 22-03-2007 we have to take the data from the archive DB after thatwe have to take online data )
points will be reworded.
You can check whether the Achive date lies between the range.
If it does, then create 2 records in the select-option table
1) from s_budat-low to arcive date
2) from archive date to s_budat-high.
Now you can do 2 selects 1 on archived tables , other on R/3 data using these 2 date ranges.
For the 2nd select , you can use the "appending" addition in the select statement
Similar Messages
-
Logical Database (PNPCE) , selection screen hide.
Hi Gurus,
i have couple of questions related to logical database pnpce.
1.Since i know logical database has there own selection screen , my requirement is i want to add my custom fields to the selection screen other than what is provided is it possible or not.
2. i want to hide the selection screen of the logical database, but i do want to create my own in which i will be declaring some select options of the standard logical database screen has, like pernr, organisation unit, etc, how do i communicate the entered data with the logical database if i dont use the logical database standard selection screen, hope i could able to explain my problem, please see into my problem and let me know thanks in advance,
hussainiHussain,
LDB have standard selection screens, if at all you want to customize those standard selection screen you would have to define a report category for your program. You`ll have to configure in the spro settings for your corresponding report category.
If you would like to declare your own selection criteria, you can very well do it and these criteria are visible below the standard selection criteria. You can process these elements in your program and not in the LDB standard program. Use the normal selection screen events in your program for processing your selection criteria.
Hope this info is helpful, reward points if convinced.
Regards -
I need a selection screen if there r 3 selection screen in O/P screen
If i click on 1 selection other 2 should be disableHi Swaroop,
write like this, i hope your problem will solve
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.MODIF ID S1.
PARAMETERS: P_MATNR TYPE MATNR MODIF ID S2,
P_WERKS TYPE WERKS_D MODIF ID S3.
SELECTION-SCREEN END OF BLOCK B1.
BLOCK 2 ****
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND UG1,
R2 RADIOBUTTON GROUP G1 ,
R3 RADIOBUTTON GROUP G1 .
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 EQ 'X' .
IF SCREEN-GROUP1 EQ 'S2' AND SCREEN-GROUP1 EQ 'S3'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
SET CURSOR FIELD 'S_EBELN'.
ENDIF.
ENDIF.
IF R2 EQ 'X'
IF SCREEN-GROUP1 EQ 'S1' AND SCREEN-GROUP1 EQ 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
SET CURSOR FIELD 'P_MATNR'.
ENDIF.
ENDIF.
IF R3 EQ 'X'.
IF SCREEN-GROUP1 EQ 'S1' AND SCREEN-GROUP1 EQ 'S3' .
SCREEN-INPUT = 0.
MODIFY SCREEN.
SET CURSOR FIELD 'P_MATNR'.
ENDIF.
ENDIF.
ENDLOOP.
Thanks,
Murali -
Help needed in selection screen - Urgent
Hi Experts,
I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters.
e.g : if radiobutton1 is selected, njo activation needed,
if radiobutton2 is selected, activate selection screen parameter p_one,
if radiobutton3 is selected, activate selection screen parameter p_two.
All three radiobuttons are attached to the same radio button group.
I have assigned the parameters p_one, p_two, p_three to MODIF ID as follows.
p_one - NULL
p_two - t01
p_three - t02.
on the selection of a radio button I want the corresponding parameter to get activated.
please help me.
Regards,
Arul jothi A.hi
jothi
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.
regards
praveen -
Need Different Selection screen for different Queries in a Workbook
Hi,
I have created a workbook with Multiple tabs in BI 7.0. Each Tab has different Queries and each query has different Selection screens (Variable Selections).
When i open the workbook and refresh it, the selection screen is appearing only for one query. All the queries are refreshed by this single selection screen, though each query has different Variable selections. What i need is a seperate selection screen i.e seperate Variable selection appearing for each queries, when i refresh each one of them.
Is it possible to do this? If anybody has tried this, help me in solving this issue. Thanks for ur time.
Regards,
MuraliMurali,
If you un-check the 'Display Duplicate Variables Only Once' this WILL solve your problem.
When you Refresh, you should be presented with a single variable selection dialog box, but it should contain an area for each Query (DataProvider) that is embedded in the Workbook.
This is the case if the queries are all on the same tab, or on different tabs.
However, if you have multiple tabs each with a query on it, each query must have it's own DataProvider. If all queries are based on the same DataProvider, it will not work as the Workbook only 'sees' one Query for which it needs variable input.
If you REALLY want multiple variable selection dialog boxes, then maybe the best way to do this is to have the queries in separate Workbooks.
If you don't want the User to have to open 5 queries manually, you could use a Macro in each Workbook that runs on opening, to open the next Workbook in the sequence.
I hope this makes sense!
Regards
Steve -
FBL5N - Logical databases - Dyanamic selection screen fields
I am trying to insert "Profit center" from BSEG table of Logical database DDF into the dynamic selection screen of FBL5N.
Procedure I followed:
Program -> Attributes -> Logical database -> Extras -> Selection views.
Interestingly when I add "Profit center" from BSID table instead of BSEG, it appears on dynamic selection screen. But this is not working for BSEG. I have no clue why this is so? If someone can help me in this regard, that would be great.
P.S: I can not insert Profit center from BSID table as BSEG contains profit center values and BSID is not storing the same info.Rob,
Below is the BSEG contents:
Company code Document Number Customer Profit Center
1000 1800001111 0000100006
1000 1800001111 0000000401
BSID contents:
Company code Customer Document Number Profit Center
1000 0000100006 1800001111
As BSID stores customer info, I believe only line item that has customer info is stored here.
I guess, that is the reason.
I will try the option told by prev post. Will keep you guys posted.
Thanks,
Phani -
Reg logic required for selection-screen.
Hi,
i have one requirement
on selection screen 2 radio button
1 for service
2 for account
Parameter FILE LOCALFILE Filename
If the radiobutton ACCOUNT is selected the default name for file will be:
Rev_acc_com_&system_time_stamp&.dat
Elseif the radiobutton SERVICE is selected the default name for file will be:
Rev_srv_com_&system_time_stamp&.dat
some body can give the logic for this.take the following solution
data: tstamp type TZNTSTMPS.
data: filename type string.
call function 'CONVERT_INTO_TIMESTAMP'
exporting
I_DATLO = sy-datum
I_TIMLO = sy-uzeit
importing
E_TIMESTAMP = tstamp.
if ACCOUNT is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
else if SERVICE is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
the filename variable will be containing ur required file name..
reward points if useful.... -
Help Needed for selection screen
Hi Experts
I'm doing one report of pm module using one standard program called me RIQMEL10
my query is if u execute this stand.prog u'll get one selection screen ,and having three selction-screen blocks. first sel-scr block name is Notification status this selection screen is calling dynamically by using sap stand.prog SAPDBQMI
SCR NO : 1000
can any one send me the default code of this selection screen block ( Notification status ) which sap is providing .INCLUDE DBQMISEL
It will be automatically included into the database program.
If the source code is automatically generated,
please perform the following steps:
1. Replace ? by suitable names (at most 8 characters).
2. Activate SELECT-OPTIONS and PARAMTERS (delete stars).
3. Save source code.
4. Edit database program
Hint: Syntax-Check is not possible within this Include!
It will be checked during syntax-check of database program.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-011.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS dy_ofn LIKE rihea-dy_ofn FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 3(11) text-001
FOR FIELD dy_ofn ID 001.
PARAMETERS dy_rst LIKE rihea-dy_rst FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 16(10) text-002
FOR FIELD dy_rst ID 002.
PARAMETERS dy_iar LIKE rihea-dy_iar FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 29(10) text-003
FOR FIELD dy_iar ID 003.
PARAMETERS dy_mab LIKE rihea-dy_mab FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 42(10) text-004
FOR FIELD dy_mab ID 004.
SELECTION-SCREEN COMMENT 52(10) text-005
FOR FIELD selschem ID 005.
PARAMETERS: selschem LIKE tj48t-selid FOR TABLE diqmel.
SELECTION-SCREEN PUSHBUTTON 73(5) p_addr USER-COMMAND addr
FOR TABLE diqmel ID 006.
PARAMETERS dy_adrfl NO-DISPLAY FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 79(30) ad_icon FOR TABLE diqmel ID ic1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-012.
SELECT-OPTIONS:
qmnum FOR diqmel-qmnum MATCHCODE OBJECT qmeg,
qmart FOR diqmel-qmart,
tplnr FOR diqmel-tplnr NO-DISPLAY,
strno FOR diqmel-strno MATCHCODE OBJECT iflm,
equnr FOR diqmel-equnr MATCHCODE OBJECT equi,
matnr FOR diqmel-matnr MATCHCODE OBJECT mat1,
serialnr FOR diqmel-serialnr,
deviceid FOR diqmel-deviceid,
aufnr FOR diqmel-aufnr MATCHCODE OBJECT orde.
*--- date from - until
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(28) text-009 FOR FIELD datuv.
SELECTION-SCREEN POSITION 33 FOR TABLE diqmel.
PARAMETERS datuv LIKE rihea-termab FOR TABLE diqmel DEFAULT sy-datum.
SELECTION-SCREEN COMMENT 51(6) text-010 FOR FIELD datub.
PARAMETERS datub LIKE rihea-termbi FOR TABLE diqmel DEFAULT sy-datum.
SELECTION-SCREEN END OF LINE.
*--- partner function, partner
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(9) text-006 FOR FIELD dy_parvw.
SELECTION-SCREEN POSITION 10 FOR TABLE diqmel.
PARAMETERS dy_parvw LIKE ihpa-parvw FOR TABLE diqmel
AS LISTBOX VISIBLE LENGTH 22.
SELECTION-SCREEN POSITION 33 FOR TABLE diqmel.
PARAMETERS dy_parnr LIKE ihpa-parnr FOR TABLE diqmel VALUE-REQUEST.
*--- button classification
SELECTION-SCREEN PUSHBUTTON 73(5) text-013 USER-COMMAND clse
FOR TABLE diqmel.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block2.
*--- freie Abgrenzungen für log.Datenbankselektion -
SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE diqmel ID 010.
SELECTION-SCREEN BEGIN OF VERSION 001 text-v01.
SELECTION-SCREEN EXCLUDE PARAMETERS: dy_mab, dy_ofn, dy_rst, dy_iar,
selschem, dy_adrfl.
SELECTION-SCREEN EXCLUDE IDS: 001, 002, 003, 004, 005, 006, 010, ic1.
SELECTION-SCREEN END OF VERSION 001.
SELECTION-SCREEN BEGIN OF VERSION 002 text-v02.
SELECTION-SCREEN EXCLUDE IDS: 010.
SELECTION-SCREEN END OF VERSION 002.
*--- Parameter für Selektionssteuerung -> es sollen nicht -
*--- automatisch alle Segmente der log.DB selektiert werden -
*--- neu mit P30K047900 -
PARAMETERS: ldb_ihpa NO-DISPLAY DEFAULT 'X' FOR TABLE diihpa,
ldb_iflo NO-DISPLAY DEFAULT 'X' FOR TABLE diiflo,
ldb_equi NO-DISPLAY DEFAULT 'X' FOR TABLE diequi,
ldb_qmfe NO-DISPLAY DEFAULT 'X' FOR TABLE diqmfe,
ldb_qmma NO-DISPLAY DEFAULT 'X' FOR TABLE diqmma,
ldb_qmmx NO-DISPLAY DEFAULT 'X' FOR TABLE diqmmax,
ldb_clas NO-DISPLAY DEFAULT 'X' FOR TABLE diclass,
ldb_clda NO-DISPLAY DEFAULT 'X' FOR TABLE dicldat,
ldb_qmsm NO-DISPLAY DEFAULT 'X' FOR TABLE diqmsm,
ldb_qmsx NO-DISPLAY DEFAULT 'X' FOR TABLE diqmsmx,
ldb_aufk NO-DISPLAY DEFAULT 'X' FOR TABLE diaufk.
regards
vinod -
How to use a logical database's selection screen elements
Hi all,
I have used the logical db, pnp, in my report, however when I want to select data about a personel , ie. her name surname plans-positions, how will I join the two tables pa0001 and logical db? and the table t528t - text for plans?
Thanks.Hi Deniz,
First of all give Logical database PNP in program attributes(Goto->Attributes).
In program write the following code.
Infotypes : 0000,
0001.
start-of-selection.
get pernr.
rp-provide-from-last p0000 space pn-begda pn-endda.
if pnp-sw-found = '1'.
w_itab-pernr = p0001-pernr.
else.
reject.
endif.
rp-provide-from-last p0001 space pn-begda pn-endda.
if pnp-sw-found = '1'.
w_itab-vorna = p0001-plans.--->position
else.
reject.
endif.
rp-provide-from-last p0002 space pn-begda pn-endda.
if pnp-sw-found = '1'.
w_itab-vorna = p0002-vorna. -
>first name
w_itab-nachn = p0001-nachn.--->last name
else.
reject.
endif.
append w_itab to t_itab.
end-of-selection.
Dont forget to reward points if found useful.
Thanks,
Satyesh -
Need to validate selection screen parameter valus
Hi all,
we have a requirement to validate parameter values ,
parameter values should be less than or equal to 12 and should accept 2 decimals .
how to declare parameter?
eg: 11.34, 12.00
regards
sridharshould accept 2 decimals .
PARAMETERS : p1 type p DECIMALS 2.
this automatically comes with validation.
and for less than 12, keep logic in at selection-screen event.
both AT SELECTION-SCREEN. and AT SELECTION-SCREEN. on p1 works.
AT SELECTION-SCREEN.
IF p1 > 12.
MESSAGE 'Provide values less than 12' type 'E'.
ENDIF.
and
AT SELECTION-SCREEN ON p1.
IF p1 > 12.
MESSAGE 'Provide values less than 12' type 'E'.
ENDIF.
the difference between these tow is the later displays the error on that particular field (useful when you have multiple fields in selection screen)
hope this helps.
Somu
Edited by: soumya prakash mishra on Jul 31, 2009 8:01 AM -
Error while using selection option variable in the selection screen
Hi All,
I am facing an issue while using selection option variable in the selection screen for one of my reports.
Scenario: For the field "Region From" we need to have wild card logic () in tes selection screen, for example if we put "BE" in the selection screen for the field Region From then the query should be executed only for those "Region From" values which begin from "BE".
Approach: For the above requirement I have made a selection option variable for "Region From". This allows use wild card
But when the report is executed we get the following error:
"System error in program CL_RSR_REQUEST. Invalid filter on ETVRGNFR".
(ETVRGNFR is technical name of the info object Region From)
Though the report is executed it displays all the values for the field "Region From" irrespective of the selection given in the selection screen.
Please give suggestions / alternate solutions to crack this issue.
Thanks in advance
Regards
Priyanka.Hi,
Try to use a variable of type Customer Exit and do the validation inside the exit to display according to your request.
This is just my view, i am not sure if u are already using this or Char. Variable.
Cheers.
Ranga. -
Abap objects and selection screen
Hello everybody,
I am interested in your ways of implementing selection-screens in the style of ABAP Objects.
In earlier times (when I used to implement ABAP objects in a procedural way) I just put the selection-screen commands in an include or a form routine of my ABAP report. So it was possible to run the report in background.
Now I read something about selection-screens/dynpros and "separation of concerns" in the book "ABAP Objects" written by Keller. He advises using function groups to encapsulate presentation from logical matters. (Selection-screen commands are in an automatically generated include now). I implemented this way. (ABAP report with a local class, which has a main method, where function module of the function group is called). It works, but i see no chance to run my report in background now.. but I need to run the report in background.
Does anybody know a solution without deleting function group?
What do you think is the best way of using selection-screen-commands and ABAP Objects, especially regarding running in background?
Thx for your advise in advance.
Kind regards,
AnneHi Naimesh,
thx for explanation. I am not sure, if I understood everything in the right way.
Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)
If you write these commands in a class method, you will get a syntax error ( because it's forbidden per definition of ABAP objects). So, am I right assuming that you put the coding just at the beginning of the ABAP report ? And after START-OF-SELECTION-event you start the processing... ?
Furthermore, I don't really understand why you create an separate class for ALV. I found your "SAP abap help"-blog, where you explained the concept of MVC ((By the way, well done!), but you didn't mention an "ALV class" there..
Mh.. another question - have you ever combined MVC with object services?
At the moment I'm working on a software project where I use object services. I created 2 persistent classes via SE24 and one local class in my ABAP Report.
I don't really see possibility to implement MVC in this project without change very much of coding and class structure...
In my opinion the M (data&business logic) are my existing global classes and my local class is kind of Controller class?!
Thx in advance,
Anne -
Finding selection screen code in xmb_support_restart
Hi experts,
There is a standard program called zsxmb_support_restart which i copied and made zsxmb_support_restart, which has got a selection screen,where i can put the message id.
But i need to pass this MID through a function module, so that the message id is taken as input into the z program dynamically, when i call the function module.
I am not being able to find the position of selection screen in the z program (zsxmb_support_restart) code, which i need to comment out, so as to pass the value from the FM input parameter .
Please suggest.
Thanks,
shreyaMaybe, in property tab of report, it's linked to a logical DB, with selection-screen parameters.
-
VBA To judge "Cancel" at variable selection screen in BEx analyzer
Hi BI experts,
I need some advices about how to judge whether "Cancel" button is pressed or not.
We need correction of Excel Macro for migrating reports from 3.x to 7.x.
<Summary of Macro>
1.Call variable selection screen once you pressed VBAbutton.
2.Then, depends on pressed "OK" or "Cancel", the following process wil be diverged.
 
<1st process's change>
Old:「Return_Code = Run("SAPBEX.XLA!SAPBEXrefresh", False, inWorksheet.Range("B30")) 」
New:「Return_Code = Run("BExAnalyzer.xla!MenuChangeVariable")」
<2nd process's change>
Under 3.x verstion, I used the situation that workbook would not be updated if you pressed "Cancel" button and write the logic.
But under 7.x verstion, even if you pressed the "Cancel" button, the workbook would be updated.
So, now I can not use the logic before and need to correct it.
Please give me some advice how to judge whether "Cancel" button is pressed or not at variable selection screen.
Also my correction of calling logic of variable selection screen?
Thanks a lot in advance!
Keiko
Message was edited by:
Keiko MatsuiI would like to add questions.
What I want to know is....
How to make variable selection button (VBA) in 7.x, which has chance to choose "OK" and "Cancel".
I see a lot of posts about VBA, but most of them are about under 3.x verstion.
keiko -
Two options are required in the Selection Screen
Hi All,
I need a selection screen with two option:
Option 1: Based on Open delivery
The following are the input fields:
In which Delivery types and dates are mandatory
1. Delivery
2. Delivery Type(Mandatory field)
3. Shipping Point/Receiving Point
4. Material
5. Planned goods movement Date(Mandatory Field)
6. Total goods movement Stat
and,
Option 2: Based on Material
There are no mandatory fields in this option,
The following are the input fields:
1. Material
2. External Material Group
3. Plant
I want to implement the same using Radio buttons,
In which If i select the radio button 1, option 1 should be triggered,
and if I select radio button 2, option 2 should be triggered.
How do I go about this??
Thanks,
Debrup.Hi,
Check the following code:
tables: vbap, mara.
parameters: p_open radiobutton group grp1 user-command abc,
p_mat radiobutton group grp1.
selection-screen: begin of block b1 with frame title text1.
parameters: p_vbeln like vbap-vbeln modif id opn,
p_matnr like vbap-matnr modif id opn,
p_grkor like vbap-grkor modif id opn,
p_vstel like vbap-vstel modif id opn.
selection-screen: end of block b1.
selection-screen: begin of block b2 with frame title text2.
parameters: p_matel like mara-matnr modif id mat,
p_matkl like mara-matkl modif id mat,
p_satnr like mara-satnr modif id mat.
selection-screen: end of block b2.
initialization.
p_open = 'X'.
at selection-screen output.
text1 = 'Open orders'.
text2 = 'Material'.
if p_open = 'X'.
loop at screen.
if screen-group1 = 'OPN'.
screen-active = 1.
modify screen.
endif.
if screen-group1 = 'MAT'.
screen-active = 0.
modify screen.
endif.
endloop.
elseif p_mat = 'X'.
loop at screen.
if screen-group1 = 'MAT'.
screen-active = 1.
modify screen.
endif.
if screen-group1 = 'OPN'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
Regards,
Bhaskar
Maybe you are looking for
-
Moving an imovie file from one mac to another
My mac says it's too big to burn the file onto a disk and I don't have a DVD burner. So I've been trying to move the file to my friends mac. I've tried to export the movie and made it a DVD project and burned it as just a normal data file but when i
-
Access to Outbound Emails in Interaction Center
Hello All, In our CRM 2007 interaction centre users send emails to customers through the email component. We would like there to be a capability to view a history of these outbound emails just like there is with inbound emails in the inbox. What are
-
Hi, I'm using Logic Express Actually. I'm using very cheap guitar for Recording...that's EG112 yamaha electric guitar and RBX170 with me and my recording!!:D Erm...is it really important to get a high range Guitar for recording??like Taylor,Fender,Ib
-
Cs6 histogram why always set to colors?
Hi about cs6 , why the histogram is always set to colors?? i mean is a bug like cs5 it should be set by default to rgb every photo i load it's always set to colors and i guess there is not option to save and have rgb by default thanks cheers
-
Portable Device blocking Policy issue
Hi, We have recently applied GPO to block Portable devices using GP setting under computer configuration/admin tools/system/removable storage devices/WPD devices We have also created exception policy based on group membership. We have some of the us