Table maintenance and transaction
HI ABAPERS
Iam created one ztable in that fields are
CLIENT like MANDT PRIMARY KEY
KUNNR like KUNNR PRIMARY KEY
MATNR like MATNR PRIMARY KEY
ERSDA like ERSDA Created On
ERNAM like ERNAm Name of Person
LAEDA like LAEDA Date of Last Change
AENAM like AENAm Name of Person Who Changed t
and iam maintaind settings as fallowes
Data class: 'APPL0'
Size category: '1'
Delivery Class: 'A'
Data Browser/Table view Maint: Display/maintenance allowed with restrictions
and i have this conditions
- Create Maintenance view to maintain Z_SD_CUST_MAT database table using SM30
- Assign transaction code 'ZCUSTMAT' to maintain table entries
- Information like Created by, changed by ERSDA, ERNAM, LAEDA, AENAM should be Display
only and should be populated by the system at the time of data maintenance.
how can i display only this four fields and in the table maitainence genarateor what Authorization Group i have to use.
Hi, since you are in the table maintainence , all the non-key fields will be enabled mode. If you want these fields to be in display mode, make them key fields.
But why do you want to have these fields disabled when accessing through sm30? You may as well use se11 or se16 to view the data .
Edited by: Srini Bhagavatam on Aug 21, 2008 12:36 PM
Similar Messages
-
Difference between table CKMLKEPH and transaction figure of CKM3
Hi Gurus,
Having an issue in material ledger transaction and table data.
There is a difference between table CKMLKEPH and transaction figure of CKM3 for couple of periods.
Single level price difference for raw material domestic figure coming in transaction CKM3 is not matching with CKMLKEPH table.
Can you advice the tentative reason of it.
Thanks in advance,
MC.Hi MC,
MLHELP_CCS_CONS_CHECK which check the actual CCS and the program
MLHELP_SPRICE_CCS_INIT for the standard CCS.
These programs are provided by the ML Helpdesk tool via note 364368.
Although these reports are used by SAP Support you can execute them in
test mode to verify your CCS data.
Regards,Declan -
Getting the original values in table maintenance and the new one and send t
Hello experts,
In table maintenance, I need to capture the original values in that selected column/field and
also the new one and send it to email. For example, I have a field in my z table named zaddress and whenever
the user changes the contents of that selected row I need to get/fecth the original value and the new and send it to email.
So the email will be something like this:
Dear Admin,
Changes were made to ztable. Here are the changes:
Customer : Customer 1
Order no : 1
Original Address : example address A
New Address : example address B
NOTE: Do not reply to this email.
Again, thank you guys and have a nice day!Hi Vijay,
<b>1</b>.
If u r using Modulepool programming to change the field contents ,u just capture field value into one variable .This is possible in <b>PBO</b>.before displaying .once u change the field value and press something ,now capture changed value in another variable .This is possible in <b>PAI</b>.After pressing something to modify Database.
I think u can get one idea after reading this .
<b>2</b>.
For sending mail it is not a problem.
You can check the following code.
*-------Mail related tables ,structures and variables
DATA:
w_subject LIKE sodocchgi1,
i_pack_list LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
i_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
i_contents_text LIKE solisti1 OCCURS 10 WITH HEADER LINE,
i_cont_bin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
i_objhex LIKE solix OCCURS 10 WITH HEADER LINE,
i_receiver LIKE somlreci1 OCCURS 1 WITH HEADER LINE,
i_listobject LIKE abaplist OCCURS 1 WITH HEADER LINE,
pdf LIKE tline OCCURS 100 WITH HEADER LINE,
content_out LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA:
tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp,
obj_desc LIKE w_subject-obj_descr,
sent_to_all LIKE sonv-flag,
client LIKE tst01-dclient,
name LIKE tst01-dname,
objtype LIKE rststype-type,
type LIKE rststype-type,
is_otf TYPE c ,
no_of_bytes TYPE i,
pdf_spoolid LIKE tsp01-rqident,
jobname LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount,
pn_begda LIKE sy-datum,
val(1) TYPE c,
pripar TYPE pri_params,
arcpar TYPE arc_params,
lay TYPE pri_params-paart,
lines TYPE pri_params-linct,
cols TYPE pri_params-linsz,
spool_name TYPE pri_params-plist.
CLEAR :w_subject,
sent_to_all,
i_pack_list[],
i_objhead[],
i_cont_bin[],
i_contents_text[],
i_receiver[].
i_cont_bin = ' | '.
APPEND i_cont_bin.
Subject of the mail.
obj_desc = 'Outstanding Appraisals' .
w_subject-obj_name = 'MAIL_ALI'.
w_subject-obj_descr = obj_desc.
Body of the mail
DATA :head_desc LIKE i_contents_text,
body_desc LIKE i_contents_text.
i_contents_text = space.
APPEND i_contents_text.
CLEAR i_contents_text.
CONCATENATE
'Please refer to the attached list of appraisal(s) that require your'
'attention. Please log in to the eHR System and use the eAppraisal'
'function to work on it.'
INTO body_desc
SEPARATED BY space.
i_contents_text = body_desc.
APPEND i_contents_text.
CLEAR i_contents_text.
CLEAR body_desc.
i_contents_text = 'Thank You.'.
APPEND i_contents_text.
CLEAR i_contents_text.
i_contents_text = space.
APPEND i_contents_text.
CLEAR i_contents_text.
CONCATENATE '(Note: This is system generated message, please'
'do not reply'
'to this Email.)'
INTO i_contents_text
SEPARATED BY space.
APPEND i_contents_text.
CLEAR i_contents_text.
Write Packing List (Body)
DESCRIBE TABLE i_contents_text LINES tab_lines.
READ TABLE i_contents_text INDEX tab_lines.
w_subject-doc_size = ( tab_lines - 1 ) * 255 + STRLEN(
i_contents_text ).
CLEAR i_pack_list-transf_bin.
i_pack_list-head_start = 1.
i_pack_list-head_num = 0.
i_pack_list-body_start = 1.
i_pack_list-body_num = tab_lines.
i_pack_list-doc_type = 'RAW'.
APPEND i_pack_list.
CLEAR i_pack_list.
Create receiver list
i_receiver-receiver = g_email_next_man.
i_receiver-rec_type = 'U'.
APPEND i_receiver.
CLEAR i_receiver.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_subject
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = sent_to_all
TABLES
packing_list = i_pack_list
object_header = i_objhead
contents_bin = i_cont_bin
contents_txt = i_contents_text
receivers = i_receiver
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc NE 0.
ENDIF.
I think it helps u something.
<b>Thanks,
Venkat.O</b> -
Logging Table changes and transactions
I am using oracle 11.2 DB and need to track some changes made to specific tables (need to capture old/new values of columns). I have experimented with creating a MV log on a table which seems to get me most of what I want:
CREATE materialized view log on students WITH SEQUENCE,rowid (id,last_name,first_name,middle_name) INCLUDING NEW VALUES
Since some of the processes update more that 1 table at a time before doing a commit, I need to be able to capture that these 3 table updates are all part of the same transaction (commit) . Is there any way of doing that?
ie.
update table 1 set x = '1';
update table 2 set y = '2';
update table 3 set z = '3';
commit;Triggers:
http://www.adp-gmbh.ch/ora/sql/trigger/before_after_each_row.html
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/triggers.htm
bobmagan
Handle: bobmagan
Status Level: Newbie
Registered: Feb 22, 2010
Total Posts: 431
Total Questions: 183 (115 unresolved)
remember close your threads marking them as answered when your doubt will be solved, keep the forum clean -
Problem with table maintenance and screen
Hi,
I modified the screen for a maintenance view table and added new fields. I went to SE11 to add the new fields in the table and then to SE51 to change the layout. My problem is when I edit the new field that I added, a message(Data was saved) at the bottom of the screen will appear but the value that I put in the field is gone. When i checked the contents of the table, the values were not also updated. Please let me know if there are other things that I forgot to activate or change.
Thanks in advance,
EricHi
Its the other way.
First you modify the table to add new fields. Goto sm30, delete the already generated maintenance screens and then regenerate them.
Regards,
Raj -
Table MBEW and Transaction MC.9
Hi,
I developed a report program that reads stocks from table MBEW, but it doesnt reconcile with the stocks you get from MC.9.
Im thinking MC.9 gets the data from other source tables. I need to explain why its not the same and possibly modify the code to reconcile the quantities.
Please help.
Thanks.
Kennycheck with LQUA Table,MLGT Table,MARD-LABST Table
See the below Program and Which is inventory report :
type-pools
type-pools : slis.
Data Declaration
tables : mara,
marc,
lagp,
mvke,
makt.
Constants
constants : c_werks(4) type c value '1000'," Plant
c_lgort(4) type c value '1000'," Storage Location
c_periv like MARC-PERIV value 'XX',
c_perkz like MVER-PERKZ value 'T'.
Internal Tables
Internal Table for MARA and MAKT and MARD
data : begin of I_material occurs 0,
matnr like mara-matnr, " Material
lgpla like mlgt-lgpla," Storage Type
zzdept like marc-zzdept," Pick Dept
ZZPRODDEPT like marc-ZZPRODDEPT," Prod Dept
vmsta like mvke-vmsta, " Material Status
end of i_material.
Structure
data : begin of i_final occurs 0 ,
matnr like mara-matnr," Material #
maktx like makt-maktx," Description
lgpla like mlgt-lgpla, " Storage Bin
days like P0347-SCRDD, " No of Days
menge like mseg-menge, " Avg Daily Sales
kbetr like konp-kbetr, " Avg
labst like mard-labst," Inventory Stock
stprs like mbew-stprs, " Mvg avg Price
dos like mseg-menge, " DOS Units
dosm like konp-kbetr, " DOS $$
end of i_final.
data : int_ges_verb_tab like sverbtaba
occurs 0 with header line.
Internal table for A004
data : i_a004 like a004 occurs 0 with header line.
Data Variables
data : v_stprs like konp-kbetr,
v_repid like sy-repid,
v_labst like mard-labst,
v_maktx like makt-maktx.
ALV Function Module Variables
DATA: g_repid like sy-repid,
gs_layout type slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat type slis_t_fieldcat_alv,
gs_print type slis_print_alv,
gt_events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
g_status_set type slis_formname value 'PF_STATUS_SET',
g_user_command type slis_formname value 'USER_COMMAND',
g_top_of_page type slis_formname value 'TOP_OF_PAGE',
g_top_of_list type slis_formname value 'TOP_OF_LIST',
g_end_of_list type slis_formname value 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
Selection-screen
selection-screen : begin of block blk with frame title text-001.
parameters : p_werks like marc-werks obligatory default '1000'.
select-options : s_matnr for mara-matnr,
s_MATKL for mara-MATKL,
s_mtart for mara-mtart,
s_LGTYP for LAGP-LGTYP,
p_vmsta for MVKE-VMSTA,
s_dept for marc-zzdept,
s_pdept for MARC-ZZPRODDEPT.
selection-screen: end of block blk.
selection-screen begin of block periods with frame title text-002.
selection-screen begin of line.
selection-screen comment (15) text-c01.
selection-screen position 18.
Period 1
parameters: p_stdat1 like mkpf-budat obligatory.
selection-screen position 35.
selection-screen comment (10) text-c02.
parameters: p_endat1 like mkpf-budat obligatory.
selection-screen end of line.
selection-screen end of block periods.
Fill the default values
initialization.
v_repid = sy-repid.
PERFORM LAYOUT_INIT USING GS_LAYOUT.
PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
Validation for Dates
at selection-screen.
if p_stdat1 > p_endat1.
message e206(zwave) with
' End date should be greater than or equal to Start Date'.
endif.
Make one of the Selection should be mandatory
if s_matnr-low is initial.
if s_matkl-low is initial and s_mtart-low is initial and
s_dept-low is initial and s_pdept-low is initial.
message e208(zwave) with
'Enter atleast one selection Criteria'.
endif.
endif.
Start-of-selection.
start-of-selection.
Get the data from MARA,MARD,MAKT Table
perform get_data_tables.
Read the data into FInal Table.
perform read_data.
END-OF-SELECTION.
end-of-selection.
if not i_final[] is initial.
ALV Function Module
perform print_alv.
endif.
*& Form get_data_tables
Get the data from Tables MARA,MARD,MAKT
FORM get_data_tables.
select a~matnr
b~lgpla
czzdept cZZPRODDEPT d~vmsta into table i_material
from mara as a inner join mlgt as b on amatnr = bmatnr
inner join marc as c on cmatnr = amatnr
inner join mvke as d on dmatnr = amatnr
where a~matnr in s_matnr
and c~werks = p_werks
and a~mtart in s_mtart
and c~ZZPRODDEPT in s_pdept
and a~MATKL in s_MATKL
and c~zzdept in s_dept
and b~lgnum = '100'
and b~LGTYP in s_lgtyp
and b~lgpla ne space
and d~vkorg = '0001'
and d~vtweg = '01'
and d~matnr in s_matnr
and d~vmsta in p_vmsta.
if sy-subrc ne 0.
message e207(zwave) with 'No data found for Given Selection Criteria'.
endif.
sort i_material by matnr .
DELETE ADJACENT DUPLICATES FROM i_material COMPARING matnr.
ENDFORM. " get_data_tables
*& Form read_data
Read the data
FORM read_data.
loop at i_material.
Storage Bin
i_final-lgpla = i_material-lgpla.
Days of Sales ( End date - Start date )
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
DATE1 = p_endat1
DATE2 = p_stdat1
OUTPUT_FORMAT = '02'
IMPORTING
DAYS = i_final-days.
Get the Average Daily Sales (Units) from MVER Table
perform get_average_sales.
Get the Average Daily Sales ($$) from VK13 Transaction
perform get_avgsales_price.
clear : v_labst.
Get the Inventory from MARD Table
select single labst from mard into v_labst
where matnr = i_material-matnr
and werks = p_werks
and lgort = c_lgort.
if sy-subrc eq 0.
Inventory Stock - MARD-LABST
i_final-labst = v_labst.
endif.
Material #
i_final-matnr = i_material-matnr.
Get the Material Description
clear v_maktx.
select single maktx from makt into v_maktx
where matnr = i_material-matnr
and spras = 'EN'.
if sy-subrc eq 0.
Description
i_final-maktx = v_maktx.
endif.
Get the Mvg Average Price
perform get_moving_avgpr.
Days of Supply Units.
if i_final-kbetr ne 0.
i_final-dos = i_final-labst / i_final-menge.
endif.
Days of Supply $$
i_final-dosm = i_final-dos * v_stprs.
append i_final.
clear : i_final,
i_material.
endloop.
refresh i_material.
ENDFORM. " read_data
*& Form get_average_sales
Get the data from MVER Table
FORM get_average_sales.
data : lv_menge like mseg-menge.
refresh int_ges_verb_tab.
clear : int_ges_verb_tab,
lv_menge.
CALL FUNCTION 'CONSUMPTION_READ_FOR_MM'
EXPORTING
KZRFB = ' '
MATNR = i_material-matnr
WERKS = c_werks
PERKZ = c_perkz
PERIV = c_periv
TABLES
GES_VERB_TAB = int_ges_verb_tab
UNG_VERB_TAB =
EXCEPTIONS
WRONG_CALL = 1
NOT_FOUND = 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.
loop at int_ges_verb_tab.
if int_ges_verb_tab-ertag >= p_stdat1 and
int_ges_verb_tab-ertag <= p_endat1.
add int_ges_verb_tab-vbwrt to lv_menge.
endif.
endloop.
i_final-menge = lv_menge / i_final-days.
ENDFORM. " get_average_sales
*& Form get_avgsales_price
Avg Daily Sales Price
FORM get_avgsales_price.
Get the data from A004 table to get KNUMH
Added new field Sales Unit - Seshu 01/09/2006
refresh : i_a004.
clear : i_a004.
data : lv_kbetr like konp-kbetr," Condition value
lv_KPEIN like konp-kpein , "per
lv_KMEIN like konp-KMEIN. " Sales Unit
select * from a004 into table i_a004
where matnr = i_material-matnr
and vkorg = '0001'
and vtweg = '01'.
if sy-subrc eq 0.
sort i_a004 by DATAB descending.
Get the Latetest Date
read table i_a004 with key matnr = i_material-matnr
vkorg = '0001'
vtweg = '01'
binary search.
Get the Sales Value
select single kbetr KPEIN KMEIN from konp
into (lv_kbetr,lv_KPEIN, lv_KMEIN)
where knumh = i_a004-knumh
and kappl = i_a004-kappl
and kschl = i_a004-kschl.
if sy-subrc eq 0.
i_final-kbetr = lv_kbetr / lv_KPEIN.
i_final-kbetr = i_final-kbetr * i_final-menge.
endif.
endif.
clear : lv_kbetr,
lv_kpein,
lv_KMEIN.
ENDFORM. " get_avgsales_price
*& Form get_moving_avgpr
Get the data from MVEW Table
FORM get_moving_avgpr.
Local Variables
data : lv_stprs like mbew-stprs, " Standard Price
lv_verpr like mbew-verpr, " Moving avg Price
lv_vprsv like mbew-vprsv. " Price Indicator
clear : lv_stprs,
lv_verpr,
lv_vprsv,
v_stprs.
select single stprs verpr vprsv from mbew
into (lv_stprs,lv_verpr,lv_vprsv)
where matnr = i_material-matnr.
if sy-subrc eq 0.
if lv_vprsv = 'S'.
i_final-stprs = lv_stprs * i_final-labst.
v_stprs = lv_stprs.
elseif lv_vprsv = 'V'.
i_final-stprs = lv_verpr * i_final-labst.
v_stprs = lv_verpr.
endif.
endif.
ENDFORM. " get_moving_avgpr
*& Form print_alv
REUSE_ALV_GRID_DISPLAY Function Module
FORM print_alv.
PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
Populate field catalog
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = g_top_of_page
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_final
EXCEPTIONS
PROGRAM_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.
ENDFORM. " print_alv
*& Form get_fieldcatlog
Fieldcatlog
*& Form fieldcat_init
Fieldcat
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'MARA'.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Material'.
ls_fieldcat-seltext_M = 'Material'.
ls_fieldcat-seltext_S = 'Material'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material Description
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MAKTX'.
LS_FIELDCAT-OUTPUTLEN = 30.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Description'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Storage Bin
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LGPLA'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Storage Bin'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Start Date
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'SDATE'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Start Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
End Date.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'EDATE'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'End Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Days of Sales
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DAYS'.
LS_FIELDCAT-OUTPUTLEN = 12.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Days of Sales'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales(Units).
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MENGE'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Average Daily Sales(Units)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'KBETR'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Average Daily Sales($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory(Units)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LABST'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Inventory(Units)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STPRS'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Inventory($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DOSM'.
LS_FIELDCAT-OUTPUTLEN = 13.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'DOS($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS(Days)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DOS'.
LS_FIELDCAT-OUTPUTLEN = 13.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'DOS(Days)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " get_fieldcatlog
FORM COMMENT_BUILD *
--> LT_TOP_OF_PAGE *
FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Variables for Date
data : lv_year(4) type c,
lv_mon(2) type c,
lv_day(2) type c,
lv_date1(10) type c,
lv_date2(10) type c.
LIST HEADING LINE: TYPE H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = sy-title.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
clear : lv_year,
lv_day,
lv_mon,
lv_date1.
lv_year = p_stdat1+0(4).
lv_mon = p_stdat1+4(2).
lv_day = p_stdat1+6(2).
concatenate lv_mon '/' lv_day '/' lv_year into lv_date1.
STATUS LINE: TYPE S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-c01.
LS_LINE-INFO = lv_date1.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
clear : lv_year,
lv_day,
lv_mon,
lv_date2.
lv_year = P_ENDAT1+0(4).
lv_mon = P_ENDAT1+4(2).
lv_day = P_ENDAT1+6(2).
concatenate lv_mon '/' lv_day '/' lv_year into lv_date2.
LS_LINE-KEY = text-c02.
LS_LINE-INFO = lv_date2.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'FDLOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
FORM EVENTTAB_BUILD *
--> RT_EVENTS *
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
*"Registration of events to happen during list display
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM.
FORM LAYOUT_INIT *
--> RS_LAYOUT *
FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
**"Build layout for list display
RS_LAYOUT-DETAIL_POPUP = 'X'.
lslayout-f2code = p_f2code.
rs_layout-zebra = 'X'.
rs_layout-colwidth_optimize = 'X'.
ENDFORM.
Reward Points if it is helpful
Thanks
Seshu -
Table lock and transaction timout problem
We encounter 2 problems and aprreciate your suggestion :
1. if it is container-managed connection, supposed the trans-timeout-seconds is
set to 10 secs.
why does the ejb receive time-out exception with message like " timeout
after 13 secs" rather than after 10 seconds.
2. if the table accessed in the container-managed transaction is locked , why
the ejb does not
receive the timeout exception until the table get unlocked ?
Thanks.
Hi,
I think this is beacouse the LOck used for lockign the DB table is a Exclusive loacked.
If its a custom code try changin the locking mechanism from exclusive to share lock.
This may solve ur problem.
One more method... I think the exceptions from the function module used for locking is not declared in the program
so that its terminating. Call FM properly with all exceptions & handle the Exceptions programatically.
(Meaning U can code to tell some message by checking the SY-SUBRC)
Reagrds,
Bhargava -
Difference between Table Maintenance and SE11
Hi all,
I want to know what is the difference between creating modifying table records using SM30 and creating modifying table records using SE11. As in Se11 itself we have the options for creating modifying Customer table records why we have to go for SM30.
Regards,
Kasi SCheck out these links
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
regards,
Santosh -
Allocations are differing in table T811F and 4KE3 transaction(urgent)
Hi experts,
we have come across an incident where the allocations in table T811F and transaction 4ke3 are differing alot?can any one tell why it is so? the tracing factor tab of 4ke3 is showing 000 for some profit centers where as it is showing 100 in T811F table the sender and receiever rules are 1 and 4 respectively in 4ke3.due points will be given.
Thanks in advance.
Moses.Hi
anyupdate on this .i appriciate your inputs on this and due points will be assigned.
regards,
moses. -
Hi Experts
I have done a table maintenance program and assigned to a transaction.
First time it works fine. Due to some reason, i deleted the table maintenance and created new one.
When i transport this request to the testing client, it goes to dump and gives the following error.
Syntax error in a screen
While generating a screen, the system discovered that it contained a
syntax error, or that it could not be generated for some other reason.
While generating a screen, the system discovered that it contained a
syntax error.
While am creating new maintenance, the standard program is SAPLZCTL01
But it gives the error related to the program SAPLZECTL5 older one.
i think this pgm not transported to the testing client.
do i want to transport program too. can anyone tell me what could be the reason?
Thanks in advance.
Regards
RajaramIn that case I suggest u re-do the maintenance transaction and re-transport it, as, if the program was a Z program, u can make small changes and attach it to your new request, but since it is a std pgm, that wouldn't be advisable. This time ensure all ur objects lie under 1 request, and transport with care
-
Restrict table maintenance for a Z Table in SM30 in Test systems
Hello,
I have 2 Z tables ZTAB1 & ZTAB2 which has table maintenance created. Both tables should be non modifiable in Test systems but should be able to make entries in DEV system.
This means any entry that needs to be present in PROD or TEST systems for these tables should be moved through transports from DEV only.
The Tables are defined as follows:
The Delivery Class in Both Tables is 'C' and both table. In the table maintenance screen, the authorization group for ZTAB1 is ZT1 & for ZTAB2 is ZT2. The Authorization object is S_TABU_DIS for Both tables.
ZTAB1 has 2 screens for maintenance and ZTAB2 has 1 screen for maintenance.
The recording routine is "Standard recording routine" for both tables.
The Problem is as follows:
In TEST system, In SM30 for table ZTAB2, when I click Maintain I get an error message "Client XXX status is 'not modifiable' " which is correct. That means we cannot modify the entries for this table in TEST system.
However for table ZTAB1, I am able to change the table entries through SM30.
Could anyone suggest how to restrict for making entries in table ZTAB1 in SM30.
I debugged SM30 for both tables & found that the SM30 program checks for an entry in OBJH table with the table name as OBJECTNAME and if the OBJCATEGORY in OBJH is equals 'CUST', it throws error message "Client XXX status is 'not modifiable' ".
For the problematic table ZTAB1, the OBJH entry has 'APPL' and that is why we dont get the error message and the table entries are editable in SM30.
(The transaction SOBJ can be used to changes OBJH entries. I haven't used this before. Not sure if I can use it to correct the problem.)
Can anybody tell me how this OBJH gets populated when we create a Z table?
Could anyone suggest how to restrict for making entries in table ZTAB1 in SM30.
Thanks,APPL stands for the Delivery Class A (Application Table)
CUST stands for the Delivery Class C (Customizing Table) in table OBJH.
It seems, the delivery class for the ZTAB1 has been changed from A (Application) to C(Customization). Try to delete the Table maintenance and regenerate it again.
Regards,
Naimesh Patel -
Restrict Table in SE16 Transaction Code
Hi All,
Can we restrict some standard table(eg. Mara, mseg, mkpf) in SE16 trsanction code so that they can not browse the restricted tables.
Couple of days before SOX Audit was carried on and they send some conflicts. I am not able to make it what is these statrements, which i have mentioned in below.
SE16_CHANGE (Change SAP tables)
SE16_CHANGE_CURRENCIES (Change currency table)
SE16_CLIENT_TABLE (Change client table T000)
Thanks & Regards,
KrushnaHello,
You can restrict access to tables with authorisation object S_TABU_DIS.
If a query accesses a certain table when it is run, the user needs display authorization for authorization object S_TABU_DIS. Field DICBERCLS must contain the tables authorization groups.
This authorization object protects all tables from unauthorized access. If you are accessing tables that are part of a logical database, authorization for data access can be set up using the logical database.
This is the same authorization that you need in order to be able to display tables using either the Data Browser (transaction SE16) or the initial table maintenance screen (transaction SM31).
Hope this helps. -
Assign Table Maintenance to custom tran
Hi Experts,
I created table maintenance and assigned to ztransaction using se93.
in which selected parameter transaction.
but when i am execting ztransaction giving error.
could you explain how to assign table maiantenace to ztran.
Thanks,Hi,
GOTO SE93. Enter the transaction code and press create button. Choose the button "Transaction with parameters".
In the transaction give SM30, check skip the initial screen button.
Then in the screen fields enter the following values.
Name of the screen field value
VIEWNAME ZTABLE
UPDATE X
Thanks,
Naren -
Table Maintenance - Field Names not appearing
Hi,
I given table maintenace for 'Z' table.
When i went to SM30 transcation, the fields which are taken as Built-in type instead of Data elements are not having caption( Field names ) . It is showing '+' in the place of Fieldname .
What may be the reason. In table i given short description of the field . Even though it is not displaying.
Please suggest me.
Thanks in advance
Pavan.Hi Pavan,
If you used the built-in types, then that is how it appears in SM30. It will <b>not</b> take the field short descriptions you entered in the table.
Only way to get around it is to go to the screen of the table maintenance and change the field lables there. Caution though, is that whenever you change the table maintenance, you need to do this screen change again.
Let me know if you need more info on how to do it.
Srinivas -
Validation after Excel File Upload in Table Maintenance
Hello All,
I've done extensive research on this topic and still have yet to find the answer. I have created a custom button in the TMG to upload an Excel file to the table maintenance using the FM CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD. I updated the EXTRACT and TOTAL table so it will show up in the TMG interface, but no validations occur. So, I am now trying to do the validations of this file upload. I would like to validate each record and allow the user to modify the error record then continue validating the rest. Essentially I would like to mimic the functionality that occurs when multiple records are copied to the table maintenance and validated one by one. Updating the EXTRACT table through ABAP, does not reach the PAI where the validations occur.
Is this approach possible? If not, what would be the best way to do validations, inform the user of the error record, and allow modification in the table maintenance interface?
Thanks,
JustinOr just a report program - have the file name on the selection screen.
1) Upload the file
2) Validate the file and produce error messages.
3) Based on the validations, update the table.
Rob
Maybe you are looking for
-
Hello, I have the following problem: This year in April, my boyfriend and I went to the US. In the Apple store in New York we bought and iphone 5. It came with Verizon as provider, but in the store they directly unlocked it for us. We never inserted
-
Can I Change the photo name generated by iPhone?
When I copy my iPhone (4S) photos to my Windows PC they are named IMG_nnnn.jpg. This is also the kind of name my Canon camera generates. Messy! Is there a way to get the iPhone to use some name that does not start with "IMG_" ? Or maybe get it to
-
Dear Experts, In Import purchase orders the Additional duty amount is not capturing in J1iex,where the problem ,please explain. Regards V.Ramakrishna
-
Having trouble syncing my itunes to my iphone 5
itunes sync gets stuck on "waiting for changes to be applied"
-
Cross-Tab - conditional suppression and formatting
I have a cross-tab report of "widgets" sold. There are $10 widgets, $20 widgets, and $50 widgets. All widgets will always cost some round dollar amount, never anything like $10.99. My report shows weekly, month-to-date, and year-to-date sales for eac