Selection screen / how to clear values in screen parameters parameters
Hello ,
I am developing report . It is simple one with standard screen 1000 ( Not Dynpro ).
On the screen I have several parameters and select options . When I run program , display list
and press the "Back" Button from tool bar ,entered values still remain in screen parameters.
I code I did 'clear' of parameters , so after pressing "back" button and before selection screen
is displayed the parameters show up as initial ( empty ) but once selection screen is displayed
the values are in parameters again .
Can you advice how I can clean up the values from screen parameters .
Thank you
Hi,
Try the below code....
DATA: executed TYPE n.
SELECT-OPTIONS : selop1 FOR sy-datum.
INITIALIZATION.
executed = 1.
AT SELECTION-SCREEN OUTPUT.
BREAK-POINT.
IF executed = 1.
executed = 0.
REFRESH: selop1.
CLEAR : selop1.
ENDIF.
Regards
Arbind
Similar Messages
-
In Select query how to fetch values through multiple parameters where conditon
Dear Experts,
I have one table(T) with 4 fields: f1, f2, f3, f4. In that based on f2, f3, f4 and parameter condition( f2 values) how to fetch f1 values. I have attached screen shot. What is the where condition in select query?
DATA: it_T type standard table of ty_T,
wa_T type ty_T.
parameters: p_f2_1 type T-f3,
p_f2_2 type T-f3,
p_f2_3 type T-f3,
p_f2_4 type T-f4,
p_f2_5 type T-f4,
p_f2_6 type T-f4.
select f1 f2 f3 f4 from T into table it_T where ?
What is the where condition ?.
Regards,
Abbas.Hi Syed,
Do all the parameters p_f2_1 ... p_f2_6 contain values for the same field f2? And do you need all the entries from the table T which contain f2 = any of the entered value? If yes, Then you can try the following where condition -
select f1 f2 f3 f4 from T into table it_T
where f2 = p_f2_1 OR
f2 = p_f2_2 OR
f2 = p_f2_3 OR
f2 = p_f2_4 OR
f2 = p_f2_5 OR
f2 = p_f2_6.
P.S: If any of the above parameters are optional as per your requirement it will be better to build a dynamic query and use it in the where condition.
Regards,
Rachna. -
How to clear all selection screen parameters before calling transaction?
Hi Experts
I have a ABAP report that displays data using ALV.
When I double click a cell it calls transaction MB51. Before calling the transaction I need to set some parameters of the selection screen of the transaction.
My code is like below:
<UL>
<LI>FREE MEMORY ID 'MAT'. <I>"material</I>
<LI> FREE MEMORY ID 'WRK'. <I>"plant</I>
<LI> FREE MEMORY ID 'CHA'. <I>"batch</I>
<LI><I>* Get the selected ALV row data</I>
<LI>READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
<LI><I>* If link MB51 is clicked then open tcode MB51</I>
<LI> IF p_selfield-sel_tab_field+8(4) = 'MB51'.
<LI><I>* Pass material, plant to the corresponding tcode</I>
<LI> SET PARAMETER ID 'MAT' FIELD x_recon-matnr.
<LI> SET PARAMETER ID 'WRK' FIELD p_plant.
<LI> CALL TRANSACTION 'MB51' AND SKIP FIRST SCREEN.
</UL>
The problem is:
<UL> <LI> 1. First, I run the given transaction before running the report in a separate session with some set of values in the selection screen. For example: plant = AB01, Material = 990001 and Batch = 10001.</LI>
</UL>
<UL>
<LI> 2. Then in another session I run my report. In the report ALV I have selected a record where plant = AB01, Material = 990001 but Batch is blank. But it opens the transaction with plant = AB01, Material = 990001 and Batch = 10001.
Even though in my ALV record the batch is blank yet it uses the batch value from the memory. That is, the batch value that was given in the transaction earlier. Why it is not getting cleared? I have also used FREE MEMORY ID code in the beginning. But still it is not clearing the values in the memory.
</UL>
<UL>
<LI>What shall I do to clear all the selection screen parameters before calling the transaction?</LI>
</UL>
<UL>
<LI>
Thanks
Gopal
</LI>
</UL>
Edited by: gopalkrishna baliga on Aug 11, 2010 10:29 AMIts because sap memory is globally shared.
Do it like this.
READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
IF p_selfield-sel_tab_field+8(4) = 'MB51'.
perform bdc_dynpro using 'RM07DOCS' '1000'.
perform bdc_field using 'BDC_OKCODE' '=ONLI'.
perform bdc_field using 'MATNR-LOW' x_recon-matnr.
perform bdc_field using 'WERKS-LOW' p_plant.
perform bdc_field using 'CHARG-LOW' p_batch.
perform bdc_field using 'DATABASE' 'X'.
call transaction 'MB51' with i_bdcdata mode 'E'.
endif.
form bdc_dynpro using program dynpro.
clear la_bdcdata.
la_bdcdata-program = program.
la_bdcdata-dynpro = dynpro.
la_bdcdata-dynbegin = 'X'.
append la_bdcdata to i_bdcdata.
endform.
form bdc_field using fnam fval.
clear la_bdcdata.
la_bdcdata-fnam = fnam.
la_bdcdata-fval = fval.
append la_bdcdata to i_bdcdata.
endform. -
Submit program with selection screen parameters - getting blank values
Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN ) but the value is blank in selection screen. I'm using the below code for this.
SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR SIGN 'I'
WITH WERKS_GL EQ I_WERKS SIGN 'I'
WITH PLSCN EQ I_TPLSCN SIGN 'I'
via selection-screen AND RETURN.
Could anyone please help me how to display value '000' rather than blanks.
thanks in advance.If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
SUBMIT rmcpamrp
WITH matnr_gl = i_matnr
WITH plscn = i_tplscn
WITH werks_gl = i_werks
via selection-screen
AND RETURN .
If I_MATNR, I_TPLSCN and I_WERKS are of type range then try with
SUBMIT rmcpamrp
WITH matnr_gl IN i_matnr
WITH plscn IN i_tplscn
WITH werks_gl IN i_werks
via selection-screen
AND RETURN
Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM -
Hi Developer,
i have issues that i need stop or restrict the same entries provided in the selection screen parameters it should no display that data but it should give an alert message by saying the data all ready viewed or displayed.
example: organisation :getha pvt.td.
name :ramesh.
start date:10.2.2013.
these are parameter which has been displayed by clicking execute ,if provide the same value to display again it should give waring message.
Please guide me in solve the problem.
thanks.
ravi.Hi Somendra,
Thanks for your response sir , i have provided the according to your provided information sir but it was not displaying the data first time also its giving message which i have provided ,my issues is if i provide data from time should display if i provide same data next time then only it should restrict the data and give a message.
example:
types:BEGIN OF str1,
ROOMNO type zROOMNO,
NAME TYPE zname3,
BRANCH type zBRANCH,
PHONENUMBER type zPHONENUMBER,
END OF str1.
data:it_str1 type TABLE OF str1,
wa_str1 type str1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
skip.
PARAMETERS:s_roomno type ZTABLE_2-roomno.
skip.
parameters:s_name type ztable_2-name.
skip.
PARAMETERS:s_branch type ztable_2-branch.
skip.
PARAMETERS:s_pho type ztable_2-phonenumber.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT roomno
name
branch
phonenumber from ztable_2 into TABLE it_str1
WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
READ TABLE it_str1 INTO wa_str1 with KEY roomno = s_roomno name = s_name branch = s_branch phonenumber = s_pho.
if sy-subrc eq 0.
MESSAGE 'THE DATA IS ALL READY VIEWED' TYPE 'E'.
RETURN.
ENDIF.
START-OF-SELECTION.
SELECT roomno
name
branch
phonenumber from ztable_2 into TABLE it_str1
WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
loop at it_str1 into wa_str1.
WRITE:/1 wa_str1-roomno,
10 wa_str1-name,
30 wa_str1-branch,
60 wa_str1-phonenumber.
ENDLOOP.
please guide me in solving the issue sir.
thanks,
Ravi -
How to pass selection screen parameters in text elements?
how to pass selection screen parameters in text elements?
don't you mean he other way around. Assign text-elements (selection texts) to select options?
This you do in the menu where you can find text-elements, selection texts.
menu Goto->text elements->selection texts.
Edited by: Micky Oestreich on May 10, 2008 2:45 PM -
Reset selection screen parameters.
Hi,
I enter values in parameters on screen and generte output(add values to table/view report). After I return to originial screen, the fields should be reset to initial empty status.
How do I do that.
Thanks
PraveenHi,
U Clear the Selection Screen Parameters in At Selection Screen event, before clearing the value pass the Parameter value to some global variable for further use.
eg:
PARAMETERS : p_matnr TYPE matnr.
DATA : gv_matnr TYPE matnr.
AT SELECTION-SCREEN.
gv_matnr = p_matnr. "Passing the P_matnr value to global variable gv_matnr
CLEAR : p_matnr.
START-OF-SELECTION.
WRITE : gv_matnr.
Hope it helps!!
Rgds,
Pavan -
Hi its urgent...help on selection screen parameters
Hi all,
I need help on selection screen parameters.
requirement is that,
i am having input fields for material, plant ,start date and end date and a check box and an input field for getting the txt file.
when i select the checkbox, it should ignore the mandatory fileds in the selection screen.
and when i get the file input, it should take the input data material, plant, start date and end date from the flat file and populate the corresponding input fields in selection screen.
How to do this..
thanks in advance.Hi ..
While declare the Matnr, Plant etc dont use the OBLIGATORY addition.
instead of the based on the value of check box validate them .
AT SELECTION-SCREEN.
IF c_box = ' '.
<< validate for mandatory fields>>
endif.
<b>REWARD IF HELPFUL.</b> -
Selection Screen Parameters in SQL statements
Very new ABAP programmer here, so sorry if this is a really dumb question.
I'm trying to use my selection screen parameters to limit what is pulled in by my SQL statement (which seems to me to be a very logical thing to do). But I'm having a problem, that when no values are entered in the parameters, no data is returned in the table instead of all the data being returned.
Here is the code I have now:
SELECT cname1 akostl aorgeh asname apernr bbegda bendda bstatu
bconfl bmedcf breasn breman b~rqday
INTO CORRESPONDING FIELDS OF TABLE it_record
FROM ( ( pa0001 AS a
INNER JOIN pa0672 AS b ON bpernr = apernr )
INNER JOIN t500p AS c ON cpersa = awerks )
WHERE b~reman in so_reman
AND a~kostl in so_kostl
AND a~orgeh = p_orgeh
AND b~begda = p_begda
AND b~statu = p_statu
AND b~confl = p_confl
AND b~medcf = p_medcf
AND b~reasn = p_reasn
AND b~rqday = p_rqday
AND c~name1 = p_name1.
Can anyone tell me what I'd need to do to make it return properly?When you use parameters and no value is entered, it is treated as initial value. and the select statement looks for the initial values for those fields in the tabl;e...
you can make the parameters mandatory..then the user would be forced to enter something....
also you could do the following..
instead of parameters, use select-options with the addition no intervals and no extension, then practically it looks like a parameter but internally it is a select-option...
and in the select statement, give conditions like....field1 in <s_option name>....in this case if the user is not entering a value ...it is treated as *...
Thnaks & Regards,
Renjith -
ABAP Query Selection screen parameters
I need to add an additional selection screen parameter in existing ABAP Query. How to modify the selection screen fields in existing ABAP query ? Kindly help me.
Hi,
GO to info set transaction SQ02
Give the infoset
Press change
Press the selections button..Shift F7
In the right hand side you will get a table control to enter the selection screen parameters..
Press create button on top of the table control to create new parameters
Thanks,
Naren -
Auto-populating the selection screen parameters for web report
hello
i am having a scenario where my web report is a link to another internet application (a BSP application) and it is called by clicking some link or button on the BSP page.
can i pass the selection values for BW Web report directly from BSP application through a query string or by setting some cookie values so that the user will directly view the report on click of that link?
Thanks in advance.
Regards
Rajeevwe can do this by adding a URL as the query-string with web template_id and with the selection screen parameters as key value pairs
-
Get selection screen parameters from sap query
Hello. I use SAP Query Reporting, so I added a report assignment for detailing (sq01 -> Change button -> Goto -> Report Assignment -> Insert row -> Other type row -> Abap Report Program)
and put there ABAP program.
When I run query and press CtrlShiftF1 (or double click) It calls my abap program.
So the question is: how to get selection screen parameters in my program ?
to be more precise I want to get date parameter (begda, endda)
Thanks a lot.There is a Z query which I can see in sq01. I set reporting period and run the query; when I run it, it gives me the employee list.
So I wrote the abap report to get an employee details, customized query as I mentioned above.
The query calls my report and I need to get parameters.
SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-001.
PARAMETER : p_pernr LIKE p0001-pernr OBLIGATORY MATCHCODE OBJECT prem.
PARAMETER : p_date LIKE sy-datum.
SELECTION-SCREEN END OF BLOCK frm1.
Parameter
p_pernr
passes normal. ALV Query contains it, but I'd like to get one more parameter from selection screen of the query and don't know how to get it. -
How to clear value set values from node info
Hi,
I have set some values on value set to display on a dropdown in my view. using following method.
l_node_info->set_attribute_value_set( name = 'XYZ' value_set = l_value_set ).
Now i need to clear node info value set. Otherwise particular attribute which i used for dropdown is always showing values added .
Please suggest how to clear value set.
Thanks,
Venkat.Hi,
Interface IF_WD_CONTEXT_NODE_INFO is for metadata of a node. It has nothing to do with the values in dropdown list.
In order to manipulate the values in the dropdown of an attributes, you can use the IF_WD_CONTEXT_NODE.
As you are saying its a dropdown, what I can suggest is to write supply function for the node.
And then get the index (V_INDEX) of the value you wanted to see in the dropdown list, and then use the following code in the method WDDOINIT
LO_NODE->SET_LEAD_SELECTION_INDEX( INDEX = V_TABIX ). -
How to bind values for input parameters from an adf table?
Hi,
The version I am using is
Jdev TP4 11.1.1.0.0
I need to know how to bind values for input parameters to methods.
I have created an af:table and I have a button created using a method which is outside the af:table. This method needs to take input parameter values from the column values in the table.
When I have an adf form instead of the table the binding works.
Any help?
Thanks.Hi Balaji,
you need to bind you table to a backing bean and call a method in the backing bean when you hit the button. In the method you get the selected row from the table and have access to the columns of it. Then call the the method with the parameters.
To bind the table to a bean select the properties of the table, go to behavior section and look for the advanced section 'Binding' property.
Select the small down arrow at the right side and click edit. In the dialog select or create a bean and property for the table.
Go to the button properties, look for 'Action', again select the small down arrow and click 'Edit'. Select the bean which holds the table property and create a method for the button.
The method look like public void bearbeitenQuelle(ActionEvent actionEvent)
// Add event code here...
RichTable lTable = getYourTable();
Object lData = lTable.getSelectedRowData();
FacesCtrlHierNodeBinding lNB = (FacesCtrlHierNodeBinding) lData;
YourViewRow lRow = (YourViewRow ) lNB.getCurrentRow();
}Hope the get you started
Timo -
Selection screen Parameters - Select -options values populated from ITAB
PARAMETERS : PLANT
SELECT-OPTIONS : MATERIAL
My Selection Screen contents of should change as the PLANT changes ..
and i want to populate the contents of SELECT-OPTIONS from an ITAB how can i do that .
wen plant changes its corresponding materials should reflect inthe Select -options. this is my need .
please solve..
thanks, .
Aslam.Srry Raj u misundersttod me ...
I was not saying ur solution is not gud ...my question was different .....may be this is not the right forum to ask what i want to know ....
just bear with me moderators plz ...
i just wanted to understand the interview process...since I have not appreared for any interview ( I started my carreer with a company and I am still with it ..wuld luv to continue [:d])
I believe , if you would have asked me the same question probably i would not have given u the best possible solution...as u r also admitting for ur particular scenario ur solution is better than max's .....
as an inteviewer will u expect the best solution from me .....( which might not come to my mind ( nd I am sure will not ..I luv abap debugger ) or u just wanna check if I know how to use difference selection screen events .
If u wanted to hear only the better solution ...( I am rejected ............now I will have to continue sticking to my current job [:d], not bcoz i prefer but bcoz I cant switch )
if u want to test if i know how to use selection screen events then ( I am selected ...but now I would like to stick to my current job ...bcoz I want to )
Now I realize I cannot do ABAP without Debugger.
Maybe you are looking for
-
I wanted to upgtade my iPhone software to Ver5 but it said I had to upgrade iTunes to Ver10.5. Once the updates were complete I saw that all my music,photo' and video etc had been erased from both my iTunes AND my iPhone!!!! I tried connecting to my
-
Fraudulent charges from Premium text messaging company
Has anyone had to deal with guessology.com and their deceptive surveys? Just had an encounter where they attached an unathorized survey to facebook. The claim was they were doing the survey for facebooks 6th anniversary and they were offering prizes.
-
Derivation rule to Capture Billing Doc & Sales Employee
Dear All, I want to create a derivation rule by table tookup to update the billing documnet no and the sales employee details in COPA. From which table i can get these details Regads Vasantha
-
Why is the content filtering level isn't allowing me to download certain apps?
I tried more than one apps.... And even try to download most apps that won't even take up much space....and still isn't working.... I was thinking if I should reset my phone... ?
-
Commerical adobe air application built using Robohelp - thoughts on software protection
Hello Forum, I am in the process of building a commerical software application - a niche business methodology (processes, tools, templates) - and for which I naturally want to apply *some* level of protection against unauthorized copying. The two ma