How to use table maintenance view in module pool screen
hi ,
want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.
You can simply call it via SM30. Or you can call the table maintence view from any program(report or module pool) using a function module.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = 'Z_Table_Name'
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
Regards,
RIch Heilman
Similar Messages
-
How to draw table in layout in module pool
how to draw table in layout in module pool with wizard or table control
Hi
Goto Screen Painter .
here we can create table in 2 ways,
with wizard and without wizard.
with wizard it will step by step...
for without wizard (its quite easy)
Click Table control and Drag into ur screen.
then --> click input box and place into to that table control
for two column do this two times.
then for header click the text icon in left side and drag into
correspoding places .. then ur table is ready..
then give names using double clicking the elements
See the prgrams:
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
Reward if useful. -
How to get the Grand Total in Module pool Screen
Hi Frds.
How to get the Grand Total in Module pool Screen
Example i have 10 different materials
for each matarial has different moving . But in my case matarials is doesnt matter here
10 material Moving Average price to do Frand total and display in one column...
Please Help me out Frds.
Regards,
KabilHi
You need to calculate the total in a module of PAI (or PBO) event:
PROCESS PAI.
LOOP.....
ENDLOOP.
MODULE CALCULATE_TOTAL.
MODULE CALCULATE_TOTAL.
GRAND_TOTAL = 0.
LOOP AT ITAB,
GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
ENDLOOP.
ENDMODULE.
In this way the grand total will be calculated as soon as the user presses enter or another command.
You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop, -
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. -
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 -
How to give ** bydefault in password in module pool screen .
Hi experts
how to give ******* by default in password in module pool screen .
ThanksHi ,
Double click on the field u will get a pop up window
i.e. attribute window for that field.
in that window you have a tab called Program at the bottom.
in program tab you have many checkboxes.
check the check box with name *Entry.
and activate.
what ever you enter now will be in password formate
Regards
Ajay -
How to add help documentation in a module pool screen?
Hi ,
I have to add documentation for a module pool screen. I have added the documentation for the program in se38 but what can I do to make it visible on the screen I have designed.
Since I am new to module pool, kindly explain me step by step.
Thanks,
NidhiHello Nidhi,
if you want at field level you use
PROCESS ON HELP-REQUEST. in flow logic of screen.
one mre thing you can add one text edit control on screen and put your text in screen -
How to use SET & GET Parameters in Module Pool
Hi Friends,
Can anyone please tell how to use SET / GET parameters and PARAMETER ID for a text box (Input / Output field ) in module pool? What is the purpose and where do we need to do coding for it?
Note : I will definitely give the marks for good responses.
Thanks in advance,
PradeepHi Pradeep,
You can save values in the SAP memory using a parameter ID. These
are user and terminal-session specific, but available to all internal and
external sessions.
SET Parameter copies the corresponding field contents into the SAP
System memory in the PAI processing block.
GET Parameter copies the corresponding field contents from the SAP
memory at the end of the PBO processing block, after data has been
transferred from the program, if the screen field still has its initial value
You can link an input/output field to an area of the SAP memory in the
ABAP Dictionary.
When you use an input/output field that is defined in the ABAP
Dictionary, its parameter ID is displayed in the Dictionary attribute
Parameter ID in the Screen Painter.
Usage
SET PARAMETER ID: CAR FIELD space,
CON FIELD space,
DAY FIELD space.
Here is the link that explains the usage of GET/SET in detail
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm</a>
Regards,
Sharadha -
How to display LONG TEXT STRING in Module Pool Screen ?
Hi Experts,
I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
Please provide solution.
Thanks in advance.
Regards
DeepakThis is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
*& Module pool ZMP_LTEXT *
PROGRAM ZMP_LTEXT .
TABLES: STXL.
*& Module STATUS_9000 OUTPUT
MODULE STATUS_9000 OUTPUT.
CONSTANTS:line_length type i value 132.
DATA:g_editor type ref to cl_gui_textedit,
g_editor_container type ref to cl_gui_custom_container,
CONT1 type scrfname value 'CONT1',
g_repid like sy-repid,
g_ok_code like sy-ucomm,
g_mytable(132) type c occurs 0,
g_mycontainer(30) type c ,
v_result(256) type c,
g_head like thead,
it_line type table of tline with header line,
wa_stxl type stxl.
DATA : BEGIN OF IT_THEAD1,
ICON TYPE ICON-ID.
INCLUDE STRUCTURE STXL.
DATA : END OF IT_THEAD1.
DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
WA_THEAD LIKE LINE OF IT_THEAD.
IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
select SINGLE * from STXL into wa_stxl
where tdname = '00006000156500000002'.
SELECT SINGLE * from STXL into wa_stxl
where tdname = WA_THEAD-TDNAME
AND TDID = WA_THEAD-TDID
AND TDOBJECT = WA_THEAD-TDOBJECT
AND TDSPRAS = WA_THEAD-TDSPRAS.
IF SY-SUBRC NE 0.
MESSAGE 'NO RECORD EXIST' TYPE 'E'.
ENDIF.
MOVE-CORRESPONDING WA_STXL TO G_HEAD.
SET PF-STATUS 'STATUS'.
SET TITLEBAR '001'.
if g_editor is initial.
CREATE OBJECT G_EDITOR_CONTAINER
EXPORTING
PARENT =
CONTAINER_NAME = CONT1
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT G_EDITOR
EXPORTING
MAX_NUMBER_CHARS =
STYLE = 0
WORDWRAP_MODE = cl_gui_textedit=>wordwrap_at_fixed_position
for to fix number of characters in row to 132 characers
WORDWRAP_POSITION = line_length
WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
for the word to break to next line if it dont fit in line
FILEDROP_MODE = DROPFILE_EVENT_OFF
PARENT = G_EDITOR_CONTAINER
LIFETIME =
NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
GUI_TYPE_NOT_SUPPORTED = 5
others = 6 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH g_mytable.
MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
WA_THEAD-TDID TO STXL-TDID,
WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = wa_stxl-tdid
LANGUAGE = wa_stxl-tdspras
NAME = wa_stxl-tdname
OBJECT = wa_stxl-tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = it_line
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT IT_LINE INTO V_RESULT.
APPEND V_RESULT TO G_MYTABLE.
ENDLOOP.
CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
EXPORTING
TABLE = G_MYTABLE
EXCEPTIONS
ERROR_DP = 1
ERROR_DP_CREATE = 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.
endif.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
MODULE USER_COMMAND_9000 INPUT.
CASE SY-UCOMM.
REFRESH G_MYTABLE[].
REFRESH IT_LINE[].
CLEAR V_RESULT.
WHEN 'SAVE'.
CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
EXPORTING
ONLY_WHEN_MODIFIED = FALSE
IMPORTING
TABLE = G_MYTABLE
IS_MODIFIED =
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT G_MYTABLE INTO V_RESULT.
APPEND V_RESULT TO IT_LINE.
ENDLOOP.
CLEAR V_RESULT.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = G_HEAD
INSERT = ' '
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = IT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH G_MYTABLE[].
REFRESH IT_LINE[].
CLEAR V_RESULT.
WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
LEAVE TO SCREEN '0'.
*CALL SCREEN '0'.
WHEN OTHERS.
ENDCASE.
*G_OK_CODE = SY-UCOMM.
*CLEAR SY-UCOMM.
ENDMODULE. " USER_COMMAND_9000 INPUT -
How to enable the 'FIND' Button in Module Pool Screen. Logic please
Hi All,
I am writing one Module Pool Program. I have one requirement like I have to put FIND, FIND+ buttons on different screens.
I am able to do the code for normal FIND. According to my requirement I have to display one Popup when the user click on FIND button. Once he entered some value it should find all the records and all the fields and display the list of hits in another popup. This whole process should as same as in SE11 Transaction functionality.
Example: SE11 ->Table Entries -> and click the FIND Button. I need the same functionality in my Program.
Please let me know ASAP. If you provide some code sample it will be Great.
Thanks & Regards
KiranHi
If you have just implemented the code for FIND I believe u need to add some little modifications for FIND+.
U need only to manage the position of the last found value, so u need to go on from that position for FIND+.
The position should have the two coordinates X (the position in the record) and Y (the number of the record):
- FOUND should start for postion = 0, 0
- FOUND+ should start for position = X, Y
Max -
How can i embed Area menu in module pool screen
Hi All,
I developed a module screen 100 now i have to call area menu in a container can you please help me in this issue or if i am wrong in this way can you please suggest which approach will full fill this requriement.
Manohardfgdfg
-
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. -
How to hide a field from table maintenance view?
Hi,
How to hide a field from table maintenance view?
The field is used for data created date. I need to hide it from display.
ThanksChk this link.
http://help.sap.com/saphelp_nw04/helpdata/en/66/33f52010dd11d6999300508b5d5211/frameset.htm
Maintenance Attributes
You can assign a maintenance attribute P to individual fields in the maintenance view definition in the Dictionary (SE11). It can be H (hidden)
H (hidden)
A field flagged H is not displayed on the screen. This field must also be filled in the background by a routine at an event.
The system writes R and H fields to the database like all other fields when a new data record is saved. -
Using an event in table maintenance view to populate a field
I have a table maintenance view, and I would like to populate one field of the table with derived data. I am trying to do this by coding a routine for one of the events, but so far no luck. I have been able to chege the data in the TOTAL table, but still it does not populate the field on the screen.
Note this is not for one row as it is entered, but I want all rows of the table displayed to show this field with derived data.
So the question is: what is the correct event to use, and what is the correct internal table to update? Can I make changes to EXTRACT or TOTAL to do this?
Kind Regards,
Tony.Hi Rob,
Sorry for being lazy; I'll close this and off and search :-}
BR,
Tony.
Maybe you are looking for
-
How do I get a OS image on the new drive
I had to replace the SSD in my 3.2 air, How do I get a new os image on the new SSD?
-
Indesign or Acrobat multi page and crop files
I have a two-page indesign document which is 24.5 inches wide and 9 inch tall. As we move through the production cycle I need to supply my client with Actual size files for review. The current process is to distill a PDF. (1) Open in acrobat Pro (2)
-
I have Version 11 in the Adobe Reader now. Now I can't open-password won't work
I have downloaded my new verison 11--now I can't open. Password won't work
-
Hello, running Macbook pro with 10.6.5 and frequently I loose the ability to connect to my VPN server. when it happens I can't ping any adresses at my office but the internet http browsing still works. The only solution I found to make it work again
-
G4 won't boot from install CD, with no startup chime
I got this G4 from my job for free, but the company erased the hard drive and I'm trying to reinstall OS 10.3. I'm pretty sure there's nothing wrong with the hardware because this computer worked fine until a big layoff and it's just been sitting unu