Clear the values?
hi,
I have a form with a lot of textboxes, radio buttons and check boxes..
Its kind of details entering form.
So after we enter details and click submit button, the details will be stored in a table
and i want to clear all the textbox values , reset radiobuttons and check boxes , so that we can enter another persons details.
How can i do that?
commit_form;
if form_success then
clear_form(no_validate);
message('You changes has been saved');
else
Message('Some error'|| sqlerrm);
raise form_trigger_failure;
end if;you have to test this code also
Similar Messages
-
How to clear the values present in SAP memory.
Hi,
i am building a module pool program in that im using subscreen which is designed as 'selection-screen 0500 as subscreen.'
when we validate the selection screen elements, if it come acrosses any error condition it disables every field in theselection-screen enabling the error field(error value is still present). this works fine here.
but i need to clear the values present in that field.to retain the values im using memory ids.
solution required immediately.
Thanks,
Nagaraju.Hi,
Use FREE MEMORY.
FREE MEMORY deletes the entire ABAP memory including all the data that was exported with EXPORT TO MEMORY ID key.
If helpful pl reward.
Cheers... -
I want to clear the values for the controls
Hi all,
After Adding Process, i want to clear the values for the controls in the form.
Any one help me.If you use 2005, you can use the Formdata Event and catch the FORM_DATA_ADD event... In there you can clear the data
-
How to clear the values from a Tab Screen.
Hi,
I have created Two Tab in my report by using the below mentioned code.
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK BR_ACB WITH FRAME TITLE TEXT-502.
PARAMETERS: P_VATNUM TYPE T001-STCEG,
P_NAME TYPE T001-BUTXT,
P_STREET TYPE rfpdo-KQSUSTRAS,
P_CITY TYPE rfpdo-KQSUPADD02,
P_CNTRY TYPE rfpdo-ALLGINLD.
SELECTION-SCREEN END OF BLOCK BR_ACB.
SELECTION-SCREEN END OF SCREEN 200.
SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK br4 WITH FRAME TITLE text-503.
PARAMETERS: P_IDLU TYPE LU_IDCODE,
P_VATNU TYPE LU_VATNUM,
P_DESIG TYPE LU_DESIGNATION,
p_telf LIKE rfpdo-asldtelf. "Telefonnummer
SELECTION-SCREEN END OF BLOCK br4.
SELECTION-SCREEN END OF SCREEN 201.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 8 LINES.
SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1 DEFAULT SCREEN 200.
SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2 DEFAULT SCREEN 201.
SELECTION-SCREEN END OF BLOCK tabb1.
INITIALIZATION.
tabs1 = text-500.
tabs2 = text-501.
Problem I am facing here is when report loads the screen once and I am filling all the valuse in the Tab Screen 200 and 201 and executing the report and when I am reloading any other variant then it is not clearing the valuse present in the Tab Screen 200 and 201.
Can any buddy help me regarding this to clear the Tab Screen 200 and 201.
Thanks and best regards,
Niteesh RaiHi Niteesh,
I have tested the scenario which you have mentioned above, Its working fine for me.
I have filled all the values in screen 200 and 201 as well and saved it as variant Test1, and again
I have filled all the values in screen 200 and 201 as well and saved it as variant Test2.
When I am changing the variants from Test1 to Test2 and vice versa. I displaying their respective data as well.
Regards,
Md Ziauddin. -
Adding a check box to my page clears the value in a hidden field on page 0
Hello, I hope that someone can assist me. I have a page that has multiple submit buttons on it. When I click a submit button the page refreshes to render the new content. I have a hidden field, and its region is set to one on page 0. Without any check boxes on my page, I can set a value in the hidden field, and it remains there even if I click on any submit buttons. If I put a check box on the page and then press a submit button, the value is cleared in the hidden element which is not desired. I did notice that in this case with the check box, if I refresh the browser the hidden field value is not cleared. Perhaps the page is being rendered differently after the submit because of the checkbox. Does anyone have any ideas of what is happening?
That doesn't sound right. Adding a checkbox shouldn't have that effect. Please try to reproduce this on htmldb.oracle.com so we can take a look or post a screenshot of your relevant page components.
-
How to clear the value of a variable in a managed bean after AM method...
I have two inputText fields on a page - user inputs a value in FieldA and performs a search (execute w/ params)... FieldB shows up under Results table with an 'Add' button. User can enter a value in FieldB and click 'Add' to insert a new row in the Results table.
I got the insert to work by making FieldB binding = #{userState.newVisitorId} where userState is a session scoped bean.
When the page reloads after the insert, the value entered in FieldB is still there - I want to clear it out. I know 'marrying' the AM code for the insert to the View code for the bean is bad practice; what is a better way to do this?
Thanks!For anyone who might also be looking for this solution... I simply added a SetActionListener to the 'Add' button that was set as From: #{null} To: #{userState.newVisitorId} and it works like a charm.
-
Clear the values in the ALV report after calculating Subtotals
Hi All,
In my ALV report, I am displaying subtotals by passing DO_SUM in the Field Catalog.
Now my problem is in the display I do not want the individual values to be displayed, I want to hide the values in the column(Not the whole column) but I want to display the subtotal of these values in the Subtotal Row.
Example:
Item1 10 20
Item2 20 30
Item3 10 50
40 100
As per our requirements, the output should be
Item1
Item2
Item3
40 100
How can this be done? Please suggest.Populate i_sort table for the fields for which u want subtotal as shown below:
*& Form sub_populate_sort
Populate ALV sort table
No Parameter
FORM sub_populate_sort .
Sort on material
wa_sort-spos = '01' .
wa_sort-fieldname = 'MATNR'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
Sort on plant
wa_sort-spos = '02'.
wa_sort-fieldname = 'WERKS'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
ENDFORM. " sub_populate_sort
Then when populating the field catalog tables use:
wa_lfl_fcat-no_out = 'X'. "No output
Then display ur data:
This function module for displaying the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_top_of_page = 'SUB_ALV_TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = i_fieldcat
it_sort = i_sort
it_events = i_event
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = i_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
Regards,
Joy. -
Clear the values in Drop down by key
hi all ,
i m using drop down by key (Combo box) ..
i have populated some values in that ..
then i navigate to next view ... from that view i m again navigating back to the
previous view .. now the values which was filled needs to be cleared ..
i used invalidete method also even though the values are present in the list ..
can any one help in this ...
points will be rewarded
Thanks and regards
JKHi,
Do you want the currently selected value to be reset, or do you want to delete the entire list of values? If you want to only reset your current selection, node->invalidate( ) should do it. Invalidate your node in the inbound plug handler.
Regards
Nithya -
it is the values we enter into a form and when we try to fill the form again we get those values. i want to delete those
I am sure you can adapt one of the two solutions shown here.
LabVIEW Champion . Do more with less code and in less time . -
How to clear the value of variable declared with STATICS keyword in FM?
Hi All,
I am using a standard CRM FM:CRM_CLA_RES_UPDATE_FM in that a STATICS variable is declared. In my code this STATICS varible value is populating. Iam to clear that Varible.
How to do that.
Thanks and Regards,
Shabeer Ahmed,If you have 6.0 or up version then you will have a spiral button for your ABAP editor in you application toolbar. this is to find enhancements provided to you for standard programs. if you click on this you will get the enhancement points which you can identify and use accordingly to change/edit your STATICS variable content.
if not, then you'll probably have to write to OSS , if you can open the code and do the required correction. -
Clearing the displayed value for a SELECT-OPTION
How do I clear the displayed value of a SELECT-OPTION?
I have 2 SELECT-OPTIONs on my screen (standard basic report program screen). I use code like this to populate the drop-down boxes for each one.
=====
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prgrp-low.
PERFORM fill_prgrp_values.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-low.
PERFORM fill_prctr_values.
=====
The value the user picks for the first SELECT-OPTION will affect what values I put in the drop-down list for the second SELECT-OPTION.
If a user enters a value for the second SELECT-OPTION, and then goes back and changes the value of the first SELECT-OPTION, then I want to do two things:
1. Create a new set of values for the drop-down list for the second SELECT-OPTION (no problem; working fine);
2. Clear the displayed value from the second SELECT-OPTION that the user entered previously. That value became invalid when the user picked a new value for the first SELECT-OPTION.
How do I clear that second displayed value?
I have tried CLEAR and REFRESH for the second variable using the formats s_prctr, s_prctr[], and s_prctr-low. They will erase the values of the internal table or part(s) of it, but the displayed value stays on the screen.
I need to clear out the displayed value so the user will either leave it blank or enter or select a new value.
I am using F4IF_INT_TABLE_VALUE_REQUEST to build the drop-down lists, and it works fine, but I do not see any function module to clear the displayed value off the screen.
Thanks for your help.Sorry, but calling DYNP_VALUES_UPDATE did not work. This is how I coded it.
fld_reset_rcd-fieldname = 'S_PRCTR'.
fld_reset_rcd-stepl = sy-stepl.
CLEAR fld_reset_rcd-fieldvalue. " re-initialize s_prctr
CLEAR fld_reset_rcd-fieldinp. " what goes in here?
APPEND fld_reset_rcd TO fld_reset_tbl.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'ZFI_GL_BALANCE_NGL'
dynumb = '1000'
TABLES
dynpfields = fld_reset_tbl
<Added code tags>
I have discovered that CLEAR and REFRESH of s_prctr will clear it somewhat. If I enter multiple values, ranges, etc., they will all be cleared, EXCEPT for the one single value that is displayed on the main screen. It is not cleared and it remains if you push the button to display the pop-up to enter ranges, etc.
To devrath.sampat -- Thanks for your example for building the drop-down list, but that is not the problem I am having. I am already able to build it just fine.
To repeat my problem, if I:
1. first enter / select a value for the first SELECT-OPTION s_prgrp
2. then enter / select a value for the second SELECT-OPTION s_prctr
3. And finally go back and select a new value of the first SELECT-OPTION s_prgrp from its drop-down list,
when I do, the program needs to clear the value displayed on the main screen for the second SELECT-OPTION s_prctr (any additional values, ranges, etc., are cleared by CLEAR and REFRESH, if I go look; but not the value shown on the main screen).
Edited by: Scott Crosby on Feb 14, 2012 4:20 PM
Edited by: Suhas Saha on Feb 15, 2012 12:03 PM -
IF l_v_ucomm = c_click.
IF fp_selfield-fieldname = c_matnr.
IF fp_selfield-value IS NOT INITIAL.
SET PARAMETER ID mak FIELD sd_selfield-value.
i want to clear the value of sd_selfield but i am not able to clear since it is not an internal table of occurs 0. how can i refresh the body of the field here.
SET PARAMETER ID ctd FIELD fp_selfield-value.
CALL TRANSACTION c_ms05 AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
thanks
reddyTry:
sd_selfield-value = space. -
How to clear the fields of the screen ?
Hi,
I'm having two fields for selection..when i press enter after entering some values,based on that my table control will get filled up..and when i double -click on that row in table control i get all the values of that row in the respective fields in my tabstrip..all these r in same screen 100..and in tabstrip i have 5 tabs with 5 subscreens..containing the fields of table control..now that when i enter a value in the selection screen fields..my table control is getting added with a second row of values as required..but my problem is that the values of the tabstrip should get cleared..this is not happening..i wrote logic like if my tablecontrol is getting appended the values from tabstrip should get cleared..all the fields are getting cleared except the fields of tab which is active..how to do it..Hi,
Try this out.
declare a variable in Top Include
data : appended type c.
if the appending to the internal table is success means sy-subrc = 0
make appended = 'X'.
go to the PBO of subscreen of the tab where you want to clear the data
if appended = 'X'.
clear appended.( this is must otherwise for every call of the subscreen of this tab the values get cleared)
here clear the value of the subscreen of the tab strip)
endif.
The same can be achieved using the OK_CODE also
Regards
Ramchander Rao.K -
Issue with clearing the LOV field
Hi,
Could someone please help me with the code to reset/clear the value of an LOV field.
I have a messageChoice and an LOV on the page. My requirement is that when a value is selected from the messageChoice, the value populated in the LOV field needs to get cleared.
I have defined a PPR event for the messageChoice bean and I am handling it in the PFR of the CO.
However, the below code does not clear the LOV field.
lovBean.setValue(pageContext, null);
lovBean.setText(pageContext, null);
If I add the statement lovBean.setText(""), then the value selected from the LOV window does not get populated in the LOV field in the base page.
The LOV is based on a VO and has just a single result mapping defined.
Thanks.As per OAF standards, you cannot set a bean value in process form request, i.e. methods like
lovBean.setValue(pageContext, null);
lovBean.setText(pageContext, null);
You can clear LOV using either of the ways:
1)Redirect the flow to process request from process form request,i.e redirect to same page and then set value using
lovBean.setText(pageContext, null
2) in process form request , get the VO row attached to the LOV and update the corresponding attribute value as null.
--Mukul -
Set the value of items when check box is checked
Hi,
My requirement is when we click a check box it should set the value of an item as 111111 and clear the values of two items in an apex page.
I used java script onClick event to set those items using document.getElementByID('Item_Name')='';
One of the item which needs to be cleared is a conditonal type.
When the condional item present, java script works fine. But if it is not present,
code works but it shows "error on page" for few seconds.
Is it possible to clear the item, only when the item is present in the page.
Thanks,
RaviHi,
Yes e.g. like
if($x("ITEM_NAME")){
$s("ITEM_NAME", "");
}Regards,
Jari
Maybe you are looking for
-
I have down loaded adobe acrobat XI pro and now want to put key. what should do?
I have completed down load of adobe acrobat xi pro how can i start working on it?
-
How do I attach an emailed PDF to a SMS message
When I open the emailed attachment it gives me the option to print or email the file but not message it
-
AR Invoice Item Number - Anonymous Value display
Dear All, In AR Invoice when I give the Item Number it automatically getting change to some anonymous value ( _SYS00000000295 ) for one particular user login only. Pls help me. Thanks in advance. Rajesh
-
Hi, I have a query with regard to HR - ABAP. I have a functional background (HR) but looking at the future career prospects in the long run I feel that I will require to know thetechnical part too. Can someone suggest me whether I need to go for a sp
-
POS flat file to ISRetail upload .. please look
Hi experts, the requirement Interface will retrieve the data from the LOGISOFT POS system. POS system will output all essential information to generate invoices in the SAP Retail system. I need to get the flat file generated by Pos system into Is re