Handling Error message in Module Pool screen
Hi Folks,
I have developed a ALV report for table maintenace and I am calling the Dialog screen (small one) and Create and update the records of the Ztable through that screen.
Presently I am handling the error message in the main ALV screen .
My requirement is that I have to handle those error messages in small module screen.
How to do the same ?
Thanks.
Hemum.
crate message se91.
insert failure
if sy-subrc <>0.
message e001 with 'all readt exist'.
endif.
Similar Messages
-
Edit screen after error message in module pool
Hello Experts,
In our scenario ,we have some checks over inputs given in a table control of module pool screen.Requirement is that after error message we need to display that record of table control in editable mode.
Thanks.Thanks for the reply...The issue was resolved by dispaying information message and using EXIT to stop program flow.
-
Error message in Module Pool program
Hi folks,
I have developed a module pool program for a custom screen. while entering data on the screen,
it throws a error message for a wrong data entry.But, even after cliking enter, the error message coming repeatedly and the screen is disabled.I havent inculded the screen fields in between CHAIN-ENDCHAIN.Is this the reason for the bug. If so, i have approximately 50 fields on my screen.Should i keep all those fields in between CHAIN-ENDCHAIN. Pls suggest me...
Thanks in advance,
Shyam.Hi Shyam,
Please find the LInk below
Hope this is help full
[Error Message|Re: chain endchain]
Thanks
kalyan -
hi experts,
i ve a query.
say i am getting an error messages in modulepool, u all knw that if an eeror occurd flow halt in that particular screen
nw hw can i get exit from transaction without using, chain-endchain, at exit command, leave prog etc
plz help, thnx in advancehi,
if you are writing message statement with type 'E' the write the message statement with type 'S' display like 'E'. this will display the status messgae as error message and the flow will continue........
" for ex.
" if you write....
MESSAGE 'ERROR MESSAGE' TYPE 'E'.
" THEN CHANGE IT TO.....
MESSAGE 'ERROR MESSAGE' TYPE 'S' DISPLAY LIKE 'E'.
Regards,
Siddarth -
How to handle The Back button on Module Pool screen
Hi Gurus,
I have created a module pool screen. In that screen I have used some input/output fields(text box) which i have marked mandatory by making the input field as "required" under program tab.
now when running the screen if no data is entered into these mandatory input field then BACK button does not work. First I have to enter some data into the input filed only then the BACK button works. How should i code so that the back button works even without entering the data into these mandatory fields.hi,
use AT EXIT-COMMAND with the module.
eg. module user_command at exit command.
then there will be no problem. -
Add Picture to a Module pool screen
Any anyone know how to load a picture,im module pool
I have already uploaded a BMP file in se78.
After that do anyone know how to upload the picture
in the Module pool screen.ok. first create a container then place this picture in ur container.
For detail.
go through this program......
create object cust_container
exporting
container_name = 'MYCONTAINER1'
create object picture
exporting
parent = cust_container
clear url.
path = 'Zex'.
perform get_url using path.
CALL METHOD picture->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_fit
EXCEPTIONS
ERROR = 1
others = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD picture->load_picture_from_url
EXPORTING
url = url
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
form get_url using p_path.
DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.
DATA html_table LIKE w3html OCCURS 1.
DATA return_code LIKE w3param-ret_code.
DATA content_type LIKE w3param-cont_type.
DATA content_length LIKE w3param-cont_len.
DATA pic_data LIKE w3mime OCCURS 0.
DATA pic_size TYPE i.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
query_table-value = p_path.
APPEND query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 2
OTHERS = 3.
IF sy-subrc = 0.
pic_size = content_length.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
EXCEPTIONS
OTHERS = 1.
endform. " get_url
Regards
Abhishek -
Variants for module pool screena
Hi,
I tried creating a variant for module pool screen by using the FM : RS_CREATE_VARIANT.
For this i created a dummy report which has the same parameters as the fields in the screen.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
but when i try to retrieve the values stored in the variant using FM : RS_VARIANT_CONTENTS.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I get an error message : variant5 not found.
is there anything that i miss here?
or is the way i use to create variant for module pool screen not right?
Regards,
KaminiHi,
To avail save variant option in module pool screen,
1. You need to create a data base table similar to INDX table with the fields RELID, VARI_NAME
PROG_NAME
UNAME
SRTF2, MEMORYID, CLUSTR, CLUSID. And the remaining fields can be anything.
2. Enable the Save button in the Function keys part of GUI Status. And Add a push button for Get variant.
3. When Save button clicked call a screen with a single field for variant (let us say g_var). After g_var entered, in the PAI of the initial screen export all the screen values to the created database index using the statement .
EXPORT: g_characteristics_tab TO DATABASE zav0257(ch) ID g_var,
s_auart TO DATABASE zav0257(au) ID g_var.
So that the values will be exported to database.
Then update the fields(VARI_NAME,PROG_NAME,UNAME) of the database table using modify from work area.
So that you will have the history of variance existence.
4. Next time , when the user clicks on Get Variant option, call another screen to enter the variant name. Then import the values for that variant from the memory id in the database table.
It worked for me. -
Icon display in Module pool screen not visible to some users
Hi,
I have added an icon in one of the module pool screen with dynamic quick info. The page is rendered fine and the info is also displayed well for most users except some. I can't figure out why the icon is not being displayed for some users.
Do someone has any solution for this?
Thanks,
SumithAs I recall, the icons are actually stored in a file on each PC so some users may have a corrupted or out-of-date file with the icons. You can look for posting on "how to add an icon" to see a discussion on this topic.
I found some useful info at:
Create and Add Icons to table ICON?
Message was edited by: Charles Folwell -
How to display image and data in module pool screen?
Hi,
I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
Actually I am able to display image or data any one but not both.
one more thing I want to display multiple images and their data.
Please suggest some one if you have any idea.
Regards,
Dileep.You can try below way, I have used in report.
DATA: gc_docking TYPE REF TO cl_gui_docking_container, "#EC NEEDED "Docking Container
gc_split TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED "Splitter
gc_top_container TYPE REF TO cl_gui_container, "#EC NEEDED "Top Container
gc_bottom_container TYPE REF TO cl_gui_container, "#EC NEEDED "Bottom Container
gc_document TYPE REF TO cl_dd_document, "#EC NEEDED "Document
gc_events TYPE REF TO lcl_event_class, "#EC NEEDED " Local Event Class
gc_grid TYPE REF TO cl_gui_alv_grid, "#EC NEEDED " ALV Class
" Creating Docking
CREATE OBJECT gc_docking
EXPORTING
ratio = c_95.
IF sy-subrc EQ 0.
* Splitting the Docking container
CREATE OBJECT gc_split
EXPORTING
parent = gc_docking
sash_position = c_10 "Position of Splitter Bar (in Percent)
with_border = c_1. "With Border = 1 Without Border = 0
ENDIF.
* Placing the containers in the splitter
gc_top_container = gc_split->top_left_container .
gc_bottom_container = gc_split->bottom_right_container .
* Creating Grid
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_bottom_container.
ELSE.
* Background job handling
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_docking.
ENDIF.
* Creating the document
CREATE OBJECT gc_document
EXPORTING
style = 'ALV_GRID'.
Regards,
Sameer -
Assigning 2 fields of same table in Module pool screen
Hi,
I want to assign similar fields of table in module pool screen.
In one case i directly use the tablename-fieldname and in other case when i try doing the same i get error. I know that this is not possible.
Is there any way to get around this. The field i am referring to is attached to a custom domain which is having defined fields. In the second assignment i need to retreive the values of the domain and display it in dropdown mode so that the users are able to select it.
Regards,
ImranThe domain only attached with this field?check the same domain attached to any other field and insert that field in the screen.
shibu
reward if helpful -
How to bold/color text message in Module pool Programming ?
Hi All ,
I need to bold /color a message in module pool . this message will come when certain conditions satisfied , currently this text message is displaying through variable . I Refereed program DD_STYLE_TABLE , but still not getting desired output . .Is there any other way to achieve the same ?
Could you please help me ?
Thanks in advance !!!!
Regards ,
Mayank KHi Mayank,
You can give a try this.
Within the screen you are calling give keyword
Leave to list processing
and then you can give whatever colors which are there in SAP
For making the text bold you can set Format intensified on or off depending on your requirement.
For more details you can refer to programs
program1 : demo_leave_to_list_processing
program2: demo_call_screen_from_list
Regards,
Sandeep Katoch -
Call module pool screen from ABAP Webdynpro
Hi All
I designed one screen in normal classical dynpro in SE80 for module pool program. I want to call that screen layout design in webdynpro view layout.
So please help me how can i call that module pool screen from my ABAP webdynproHi
Thank you for your great replay. But Mr Ramakrishnappa and Mr Katrice as your reference i go through that but when i insert the program name and screen number program is end with a run time error saying
dynamic type conflict when assigning reference.
Please refer the below snap shot -
Problem in creating a Select-option im a module pool screen
I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
but I'm having trouble to replicate it...
I've created this conde in my TOP include
SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 201.
and this is my screen flow code
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE pbo_200.
PROCESS AFTER INPUT.
MODULE pai.
MODULE user_command_0200.
in the screen 200 I have a subscreen area named subs
but when I do this:
MODULE pbo_200 OUTPUT.
CALL subscreen subs including sy-repid '0201'.
ENDMODULE. " pbo_200 OUTPUT
it doesn't "compile"
it gives me this error:
""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).
-
Display Continuous Fluctuations in Input Data in Module Pool Screen
Dear All,
We are working on a Weighbridge Interface scenario, where the weighbridge is sending data to a digitizer, which is connected to the COM port of a PC. The objective is to read the data from the digitizer, and display in a Module pool screen. However, there is one more requirement: the weight may fluctuate until it stabilizes, and the fluctuations have to be displayed on screen. For example, the tare weight of a vehicle may be 12.4 TON, but when the vehicle is standing on the weighbridge, the weight may vary from 10.4 to 12.4 TON. The idea is to capture the stable weight, so that any discrepancies can be avoided. In the current IT system implementation, the fluctuations in the weight are displayed. But using ABAP, can these fluctuations be captured? For example, we may design a screen containing a field for capturing the weight, and the weight displayed there automatically refreshes as soon as there is a change in the digitizer reading. Is this possible to achieve? If so, how?
Awaiting answers.
Thanks and Regards,
SidHi Sid,
just a suggestion for the refreshing of an ABAP screen: you can use class CL_GUI_TIMER, but it only handles whole seconds, i.e. 1 second, 2 seconds and so on, but not 0.5 seconds...
An example of an ABAP listing could be the following:
*& Report ZZAVV001
REPORT zzavv001 NO STANDARD PAGE HEADING.
CONSTANTS: c_yes(1) TYPE c VALUE 'X'.
DATA: BEGIN OF t_bseg OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA: END OF t_bseg.
data: d_num_bkpf type i,
d_num_bseg type i.
PARAMETERS: interval TYPE i DEFAULT 5. "meaning 5 seconds
* CLASS lcl_receiver DEFINITION
CLASS lcl_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_receiver DEFINITION
* Global data
DATA:
test TYPE i,
receiver TYPE REF TO lcl_receiver,
timer TYPE REF TO cl_gui_timer.
START-OF-SELECTION.
CREATE OBJECT timer.
CREATE OBJECT receiver.
SET HANDLER receiver->handle_finished FOR timer.
timer->interval = interval.
CALL METHOD timer->run.
PERFORM load_data. "or whatever you have to do to read the weight
PERFORM show_list. "or whatever you have to do to print the weight you've read
* CLASS lcl_receiver IMPLEMENTATION
CLASS lcl_receiver IMPLEMENTATION.
METHOD handle_finished.
PERFORM carga_datos.
PERFORM muestra_listado.
CALL METHOD timer->run.
ENDMETHOD. "handle_finished
ENDCLASS. "lcl_receiver IMPLEMENTATION
*& Form load_data
* text
FORM load_data.
clear: d_num_bkpf,
d_num_bseg.
select single count( * )
into d_num_bkpf
from bkpf.
select single count( * )
into d_num_bseg
from bseg.
ENDFORM. "load_data
*& Form show_list
* text
FORM show_list.
get time.
skip to line 1.
position 1.
write: / 'Date / Time:', sy-datum, sy-uzeit.
write: / 'Number of BKPF records:', d_num_bkpf.
write: / 'Number of BSEG records:', d_num_bseg.
ENDFORM. " show_list
Okay, it's just a tiny code snippet, but I hope it may help you by designing auto-refreshing screens.
Kind regards,
Alvaro -
Getting select options in module pool screen
hi experts,
can any one suggest me how to provide select options in module pool screen.
thank you,
regards
vijayHi,
Take two fields on screen first for low value and other for high value (say vbeln_low and vbeln_high) also design a button next to the high textbox for select-option button used to display popup.
Using these two input fields append a range (say r_vbeln for vbap-vbeln) for the field to be used (either in query or anywhere).
ranges : r_vbeln for vbap-vbeln.
IF NOT vbeln_high IS INITIAL.
IF NOT vbeln_low LE vbeln_high.
MESSAGE e899 WITH text-007. "high value is smaller than low value
ENDIF.
ENDIF.
r_vbeln-sign = 'I'.
r_vbeln-low = vbeln_low.
IF vbeln_high IS INITIAL.
r_vbeln-option = 'EQ'. "if user takes only a singlr value
ELSE.
r_vbeln-option = 'BT'. "if user takes both low & high value
r_vbeln-high = vbeln_high.
ENDIF.
APPEND r_vbeln. "append range
CLEAR r_vbeln.
On the button click call this FM to call a popup for select-options.
DATA : tab TYPE rstabfield.
tab-tablename = 'VBAP'.
tab-fieldname = 'VBELN'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = text-002
text = ' '
signed = 'X'
* lower_case = ' '
* no_interval_check = ' '
* just_display = ' '
* just_incl = ' '
* excluded_options =
* description =
* help_field =
* search_help =
tab_and_field = tab
TABLES
range = r_vbeln
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
IF sy-subrc EQ 2.
MESSAGE s899 WITH text-003. "no value selected
ELSEIF sy-subrc <> 0 AND sy-subrc <> 2.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
This whole code will append your range r_vbeln to be used in program.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
Maybe you are looking for
-
Retrieve no of lines in a code for object types like procedures, pk,
Hi, Is there a way I could retrieve the number of lines in procedure or a package? Adding to that can I retrieve this information for each procedure in a schema in a single query? Thanks alot!, Reddy
-
How can I read the printer snapshot file printers.xml
How can I read the printer snapshot file printers.xml
-
NI cRIO-9073 connection (software error)
Hi, I tried to connect to the cRIO using MAX. But there is software error (as shown in picture MAX). What shoud I do? Regards Solved! Go to Solution. Attachments: MAX.jpg 115 KB Internet protocol version.jpg 70 KB
-
How do I restore iphoto on mac mini from macbook air restored on time capsule.
The iphoto library from the macbook air (10.8.5) to the mac mini (10.6.8) from time machine seems to install just fine. When I try to open it I get a message telling me that no apps are available to open. So I attempted to get iphoto '11 from app s
-
Modify a Existing Search Query
Is there a way to modify a query executed in a Look up screen to include Extended fields. For Example if I add some extension fields to a material can I modify the Lookup (Search) query on a Sales order to use these new fields when searching for a Pr