Custom Table Updation
I have a custom table. While updating a field in that table , suppose when we enter some value like hITLeR then the same string should get updated in that table . It should not get modified to either lowercase or uppercase.Is there any way to do it.
Hi,
follow the simple steps you can have ur requirement,
1)GOTO se11.
2)give the domain name of the element where you have case sensitive requirement
3)select change
4) goto definition tab
5) in that you have check box named lower case, check that
6) save and activate
7) activate your table.
then you can fulfill your requirement
regards
prasanth
Similar Messages
-
BADI/User Exit for custom table update from Delivery
Hi
Our requirement is to update a custom table with the delivery number and other related details when the picking status is changed to "C". Kindly suggest BADI/User exit for this requirement .
Thanks in Advance for your immediate help .Hi Joseph,
See SAP Note 415716 - User exits in delivery processing. It says when you have the document number available, what is permitted, what not, ....
I hope this helps you
Regards
Eduardo -
Custom Table updation thru table control
Hi All,
My requirement is to update the custom table by creating a custom screen with table control,say my z table has 2 fields name1 and bukrs.
if i enter the value in table control then i click the save icon these fields should get updated in the z table .can any one send me the piece of code for this,since i have not worked on table control i need it in detail.
Useful answers will be rewarded....
Thanks in Advance.....PROGRAM ZSD_REBATE_MASTER MESSAGE-ID FV
NO STANDARD PAGE HEADING.
TABLES: KONA,
ZSD_BILLINFO,
ZSD_RBT_ELG_INV,
KNVV.
DATA: OK_CODE LIKE SY-UCOMM,
L_CODE LIKE SY-UCOMM.
DATA : BEGIN OF I_KNVV_DATA OCCURS 0,
GJAHR LIKE ZSD_RBT_MAS_DATA-GJAHR,
KNUMA LIKE ZSD_RBT_MAS_DATA-KNUMA,
VKBUR LIKE ZSD_RBT_MAS_DATA-VKBUR,
VKORG LIKE ZSD_RBT_MAS_DATA-VKORG,
VTWEG LIKE ZSD_RBT_MAS_DATA-VTWEG,
SPART LIKE ZSD_RBT_MAS_DATA-SPART,
OTQTY LIKE ZSD_RBT_MAS_DATA-OTQTY,
PCPDAYS LIKE ZSD_RBT_MAS_DATA-PCPDAYS,
OTPC LIKE ZSD_RBT_MAS_DATA-OTPC,
MATKL LIKE ZSD_RBT_MAS_DATA-MATKL,
EBDFROM LIKE ZSD_RBT_MAS_DATA-EBDFROM,
EBDTO LIKE ZSD_RBT_MAS_DATA-EBDTO,
STATUS LIKE ZSD_RBT_MAS_DATA-STATUS,
END OF I_KNVV_DATA.
DATA : G_ANS(1), GR1, FLAG(1),LS(1).
*& Module STATUS_1500 OUTPUT
text
MODULE STATUS_1500 OUTPUT.
SET PF-STATUS '1500'.
SET TITLEBAR 'HEADING_1500'.
ENDMODULE. " STATUS_1500 OUTPUT
*& Module USER_COMMAND_1500 INPUT
text
MODULE USER_COMMAND_1500 INPUT.
OK_CODE = SY-UCOMM.
L_CODE = OK_CODE.
IF L_CODE = 'EXIT'.
LEAVE PROGRAM.
ELSEIF L_CODE = 'OK'.
PERFORM ERROR_MESSGE.
IF FLAG <> '1'.
SELECT SINGLE * FROM ZSD_RBT_ELG_INV WHERE KNUMA = KONA-KNUMA.
IF SY-SUBRC = 0.
UPDATE ZSD_RBT_MAS_DATA SET STATUS = 'C'
WHERE KNUMA = KONA-KNUMA.
COMMIT WORK.
ENDIF.
CALL SCREEN 1600.
ENDIF.
ENDIF.
ENDMODULE. " USER_COMMAND_1500 INPUT
*& Module MOD_CHECK_INPUT INPUT
text
MODULE MOD_CHECK_INPUT INPUT.
SELECT SINGLE * FROM KONA WHERE KNUMA = KONA-KNUMA.
IF SY-SUBRC <> 0.
MESSAGE E999 WITH 'Agreement No. ' KONA-KNUMA 'does not exists'.
ENDIF.
ENDMODULE. " MOD_CHECK_INPUT INPUT
*& Module EXIT INPUT
text
MODULE EXIT INPUT.
OK_CODE = SY-UCOMM.
L_CODE = OK_CODE.
CLEAR OK_CODE.
IF L_CODE = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE. " EXIT INPUT
***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'GRID_MAST'
*&SPWIZARD: DEFINITION OF DDIC-TABLE
TABLES: ZSD_RBT_MAS_DATA.
*&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'GRID_MAST'
TYPES: BEGIN OF T_GRID_MAST,
GJAHR LIKE ZSD_RBT_MAS_DATA-GJAHR,
KNUMA LIKE ZSD_RBT_MAS_DATA-KNUMA,
VKBUR LIKE ZSD_RBT_MAS_DATA-VKBUR,
VKORG LIKE ZSD_RBT_MAS_DATA-VKORG,
VTWEG LIKE ZSD_RBT_MAS_DATA-VTWEG,
SPART LIKE ZSD_RBT_MAS_DATA-SPART,
OTQTY LIKE ZSD_RBT_MAS_DATA-OTQTY,
PCPDAYS LIKE ZSD_RBT_MAS_DATA-PCPDAYS,
OTPC LIKE ZSD_RBT_MAS_DATA-OTPC,
MATKL LIKE ZSD_RBT_MAS_DATA-MATKL,
EBDFROM LIKE ZSD_RBT_MAS_DATA-EBDFROM,
EBDTO LIKE ZSD_RBT_MAS_DATA-EBDTO,
STATUS LIKE ZSD_RBT_MAS_DATA-STATUS,
END OF T_GRID_MAST.
*&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'GRID_MAST'
DATA: G_GRID_MAST_ITAB TYPE T_GRID_MAST OCCURS 0 WITH HEADER LINE,
G_GRID_MAST_WA TYPE T_GRID_MAST. "work area
DATA: G_GRID_MAST_COPIED. "copy flag
*&SPWIZARD: DECLARATION OF TABLECONTROL 'GRID_MAST' ITSELF
CONTROLS: GRID_MAST TYPE TABLEVIEW USING SCREEN 1600.
*&SPWIZARD: LINES OF TABLECONTROL 'GRID_MAST'
DATA: G_GRID_MAST_LINES LIKE SY-LOOPC.
DATA: L_LINE LIKE GRID_MAST-CURRENT_LINE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'GRID_MAST'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: COPY DDIC-TABLE TO ITAB
**& Module GRID_INACT OUTPUT
text
MODULE GRID_MAST_INIT OUTPUT.
DATA: L_FLAG(1).
IF G_GRID_MAST_COPIED IS INITIAL.
*&SPWIZARD: COPY DDIC-TABLE 'ZSD_RBT_MAS_DATA'
*&SPWIZARD: INTO INTERNAL TABLE 'g_GRID_MAST_itab'
PERFORM GET_DATA.
LOOP AT I_KNVV_DATA.
G_GRID_MAST_ITAB-GJAHR = I_KNVV_DATA-GJAHR.
G_GRID_MAST_ITAB-KNUMA = I_KNVV_DATA-KNUMA.
G_GRID_MAST_ITAB-VKBUR = I_KNVV_DATA-VKBUR.
G_GRID_MAST_ITAB-VKORG = I_KNVV_DATA-VKORG.
G_GRID_MAST_ITAB-VTWEG = I_KNVV_DATA-VTWEG.
G_GRID_MAST_ITAB-SPART = I_KNVV_DATA-SPART.
G_GRID_MAST_ITAB-OTQTY = I_KNVV_DATA-OTQTY.
G_GRID_MAST_ITAB-PCPDAYS = I_KNVV_DATA-PCPDAYS.
G_GRID_MAST_ITAB-OTPC = I_KNVV_DATA-OTPC.
G_GRID_MAST_ITAB-MATKL = I_KNVV_DATA-MATKL.
G_GRID_MAST_ITAB-EBDFROM = I_KNVV_DATA-EBDFROM.
G_GRID_MAST_ITAB-EBDTO = I_KNVV_DATA-EBDTO.
G_GRID_MAST_ITAB-STATUS = I_KNVV_DATA-STATUS.
G_GRID_MAST_ITAB-OTPC = I_KNVV_DATA-OTPC.
APPEND G_GRID_MAST_ITAB.
ENDLOOP.
L_FLAG = 'X'.
G_GRID_MAST_COPIED = 'X'.
REFRESH CONTROL 'GRID_MAST' FROM SCREEN '1600'.
ENDIF.
IF L_FLAG IS INITIAL.
L_LINE = GRID_MAST-CURRENT_LINE.
IF NOT G_GRID_MAST_WA IS INITIAL.
READ TABLE G_GRID_MAST_ITAB INDEX GRID_MAST-CURRENT_LINE.
IF SY-SUBRC <> 0.
MOVE-CORRESPONDING G_GRID_MAST_WA TO G_GRID_MAST_ITAB.
APPEND G_GRID_MAST_ITAB.
REFRESH CONTROL 'GRID_MAST' FROM SCREEN '1600'.
CLEAR G_GRID_MAST_WA.
ENDIF.
ENDIF.
ELSE.
CLEAR L_FLAG.
ENDIF.
ENDMODULE. "GRID_MAST_INIT OUTPUT
*&SPWIZARD: OUTPUT MODULE FOR TC 'GRID_MAST'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MOVE ITAB TO DYNPRO
MODULE GRID_MAST_MOVE OUTPUT.
IF NOT G_GRID_MAST_WA IS INITIAL.
MOVE-CORRESPONDING G_GRID_MAST_WA TO ZSD_RBT_MAS_DATA.
CLEAR G_GRID_MAST_WA.
ENDIF.
GRID_MAST-LINES = G_GRID_MAST_LINES + 100.
ENDMODULE. "GRID_MAST_MOVE OUTPUT
**&SPWIZARD: OUTPUT MODULE FOR TC 'GRID_MAST'. DO NOT CHANGE THIS LINE!
**&SPWIZARD: GET LINES OF TABLECONTROL
MODULE GRID_MAST_GET_LINES OUTPUT.
SELECT SINGLE * FROM ZSD_RBT_ELG_INV WHERE KNUMA = KONA-KNUMA.
IF SY-SUBRC = 0.
UPDATE ZSD_RBT_MAS_DATA SET STATUS = 'C'
WHERE KNUMA = KONA-KNUMA.
COMMIT WORK.
IF ZSD_RBT_ELG_INV-ZFLAG = 'C'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'GR1'.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
G_GRID_MAST_LINES = SY-LOOPC.
ENDMODULE. "GRID_MAST_GET_LINES OUTPUT
*&SPWIZARD: INPUT MODULE FOR TC 'GRID_MAST'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
MODULE GRID_MAST_MODIFY INPUT.
MOVE-CORRESPONDING ZSD_RBT_MAS_DATA TO G_GRID_MAST_WA.
IF L_FLAG IS INITIAL.
L_LINE = GRID_MAST-CURRENT_LINE.
IF NOT G_GRID_MAST_WA IS INITIAL.
IF L_LINE = GRID_MAST-CURRENT_LINE.
READ TABLE G_GRID_MAST_ITAB INDEX GRID_MAST-CURRENT_LINE.
IF SY-SUBRC = 0.
MODIFY G_GRID_MAST_ITAB FROM G_GRID_MAST_WA
INDEX GRID_MAST-CURRENT_LINE.
ELSE.
MOVE-CORRESPONDING G_GRID_MAST_WA TO G_GRID_MAST_ITAB.
APPEND G_GRID_MAST_ITAB.
REFRESH CONTROL 'GRID_MAST' FROM SCREEN '1600'.
ENDIF.
ELSE.
MOVE-CORRESPONDING G_GRID_MAST_WA TO G_GRID_MAST_ITAB.
APPEND G_GRID_MAST_ITAB.
REFRESH CONTROL 'GRID_MAST' FROM SCREEN '1600'.
CLEAR G_GRID_MAST_WA.
ENDIF.
ENDIF.
ELSE.
CLEAR L_FLAG.
ENDIF.
MODIFY G_GRID_MAST_ITAB
FROM G_GRID_MAST_WA
INDEX GRID_MAST-CURRENT_LINE.
ENDMODULE. "GRID_MAST_MODIFY INPUT
*&SPWIZARD: INPUT MODULE FOR TC 'GRID_MAST'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: PROCESS USER COMMAND
MODULE GRID_MAST_USER_COMMAND INPUT.
OK_CODE = SY-UCOMM.
PERFORM USER_OK_TC USING 'SY-UCOMM'
'G_GRID_MAST_ITAB'
'FLAG'
CHANGING OK_CODE.
SY-UCOMM = OK_CODE.
ENDMODULE. "GRID_MAST_USER_COMMAND INPUT
*& Module STATUS_1600 OUTPUT
text
MODULE STATUS_1600 OUTPUT.
SET PF-STATUS 'STATUS_1600'.
SET TITLEBAR 'HEADING_1600'.
ENDMODULE. " STATUS_1600 OUTPUT
*& Module USER_COMMAND_1600 INPUT
text
MODULE USER_COMMAND_1600 INPUT.
CASE SY-UCOMM.
WHEN 'CAN'.
CLEAR: G_GRID_MAST_COPIED, G_GRID_MAST_ITAB.
LEAVE TO SCREEN '1500'.
WHEN 'BACK'.
CLEAR: G_GRID_MAST_COPIED, G_GRID_MAST_ITAB.
LEAVE TO SCREEN '1500'.
WHEN 'EXIT'.
LEAVE TO SCREEN '1500'.
WHEN 'SAVE'.
DELETE FROM ZSD_RBT_MAS_DATA WHERE KNUMA EQ KONA-KNUMA.
PERFORM SAVE_DATA.
WHEN 'DELE'.
ENDCASE.
ENDMODULE. " USER_COMMAND_1600 INPUT
*& Form FCODE_INSERT_ROW *
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO <LINES>.
*&SPWIZARD: get current line *
GET CURSOR LINE L_SELLINE.
IF SY-SUBRC <> 0. " append line to table
L_SELLINE = <TC>-LINES + 1.
*&SPWIZARD: set top line *
IF L_SELLINE > <LINES>.
<TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
ELSE.
<TC>-TOP_LINE = 1.
ENDIF.
ELSE. " insert line into table
L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
<TC>-LINES = <TC>-LINES + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE L_LINE.
ENDFORM. " FCODE_INSERT_ROW
*& Form FCODE_DELETE_ROW *
FORM fcode_delete_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: delete marked lines *
DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
IF <MARK_FIELD> = 'X'.
DELETE <TABLE> INDEX SYST-TABIX.
IF SY-SUBRC = 0.
<TC>-LINES = <TC>-LINES - 1.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " FCODE_DELETE_ROW
*& Form COMPUTE_SCROLLING_IN_TC
text
-->P_TC_NAME name of tablecontrol
-->P_OK ok code
FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
P_OK.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TC_NEW_TOP_LINE TYPE I.
DATA L_TC_NAME LIKE FELD-NAME.
DATA L_TC_LINES_NAME LIKE FELD-NAME.
DATA L_TC_FIELD_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
ASSIGN (L_TC_LINES_NAME) TO <LINES>.
*&SPWIZARD: is no line filled? *
IF <TC>-LINES = 0.
*&SPWIZARD: yes, ... *
L_TC_NEW_TOP_LINE = 1.
ELSE.
*&SPWIZARD: no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = <TC>-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = <TC>-LINES
LAST_PAGE_FULL = 'X'
LOOPS = <LINES>
OK_CODE = P_OK
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
ENDIF.
*&SPWIZARD: get actual tc and column *
GET CURSOR FIELD L_TC_FIELD_NAME
AREA L_TC_NAME.
IF SYST-SUBRC = 0.
IF L_TC_NAME = P_TC_NAME.
*&SPWIZARD: et actual column *
SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
ENDIF.
ENDIF.
*&SPWIZARD: set the new top line *
<TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
ENDFORM. " COMPUTE_SCROLLING_IN_TC
*& Form FCODE_TC_MARK_LINES
marks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
&SPWIZARD: EGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: mark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Form FCODE_TC_DEMARK_LINES
demarks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: demark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = SPACE.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
FORM GET_DATA...
FORM GET_DATA.
CLEAR : I_KNVV_DATA, ZSD_BILLINFO, G_GRID_MAST_COPIED,
G_GRID_MAST_ITAB, ZSD_RBT_MAS_DATA, KNVV, ZSD_RBT_ELG_INV.
REFRESH: I_KNVV_DATA, G_GRID_MAST_ITAB.
SELECT SINGLE * FROM KONA WHERE KNUMA = KONA-KNUMA.
IF SY-SUBRC = 0.
SELECT * FROM ZSD_RBT_MAS_DATA
INTO
CORRESPONDING FIELDS OF
TABLE I_KNVV_DATA
WHERE KNUMA = KONA-KNUMA.
IF SY-SUBRC <> 0.
SELECT * INTO CORRESPONDING FIELDS OF TABLE I_KNVV_DATA
FROM KNVV
WHERE KUNNR = KONA-BONEM.
SELECT SINGLE * FROM ZSD_BILLINFO WHERE KUNAG = KONA-BONEM.
LOOP AT I_KNVV_DATA.
SELECT SINGLE * FROM ZSD_RBT_ELG_INV
WHERE KNUMA = KONA-KNUMA
AND VKORG = I_KNVV_DATA-VKORG
AND VTWEG = I_KNVV_DATA-VTWEG
AND SPART = I_KNVV_DATA-SPART.
IF SY-SUBRC = 0.
I_KNVV_DATA-STATUS = ZSD_RBT_ELG_INV-ZFLAG.
ENDIF.
I_KNVV_DATA-GJAHR = ZSD_BILLINFO-GJAHR.
I_KNVV_DATA-KNUMA = KONA-KNUMA.
MODIFY I_KNVV_DATA INDEX SY-TABIX.
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM. "GET_DATA
FORM SAVE_DATA...
FORM SAVE_DATA.
IF NOT G_GRID_MAST_ITAB IS INITIAL.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Confirmation'
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = 'Do you want to save the document?'
TEXT_BUTTON_1 = 'YES'
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'NO'
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = ''
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
ANSWER = G_ANS
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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.
IF G_ANS = '1'.
SELECT SINGLE * FROM ZSD_RBT_MAS_DATA
WHERE KNUMA = KONA-KNUMA.
IF SY-SUBRC = 0.
LOOP AT G_GRID_MAST_ITAB.
IF G_GRID_MAST_ITAB-OTQTY > 0.
I_KNVV_DATA-PCPDAYS
I_KNVV_DATA-OTPC
I_KNVV_DATA-EBDFROM
I_KNVV_DATA-EBDTO
ZSD_RBT_MAS_DATA-GJAHR = G_GRID_MAST_ITAB-GJAHR.
ZSD_RBT_MAS_DATA-KNUMA = G_GRID_MAST_ITAB-KNUMA.
ZSD_RBT_MAS_DATA-VKBUR = G_GRID_MAST_ITAB-VKBUR.
ZSD_RBT_MAS_DATA-VKORG = G_GRID_MAST_ITAB-VKORG.
ZSD_RBT_MAS_DATA-VTWEG = G_GRID_MAST_ITAB-VTWEG.
ZSD_RBT_MAS_DATA-SPART = G_GRID_MAST_ITAB-SPART.
ZSD_RBT_MAS_DATA-MATKL = G_GRID_MAST_ITAB-MATKL.
ZSD_RBT_MAS_DATA-OTQTY = G_GRID_MAST_ITAB-OTQTY.
ZSD_RBT_MAS_DATA-PCPDAYS = G_GRID_MAST_ITAB-PCPDAYS.
ZSD_RBT_MAS_DATA-OTPC = G_GRID_MAST_ITAB-OTPC.
ZSD_RBT_MAS_DATA-EBDFROM = G_GRID_MAST_ITAB-EBDFROM.
ZSD_RBT_MAS_DATA-EBDTO = G_GRID_MAST_ITAB-EBDTO.
MODIFY ZSD_RBT_MAS_DATA.
COMMIT WORK.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT G_GRID_MAST_ITAB.
IF G_GRID_MAST_ITAB-OTQTY > 0.
I_KNVV_DATA-PCPDAYS
I_KNVV_DATA-OTPC
I_KNVV_DATA-EBDFROM
I_KNVV_DATA-EBDTO
ZSD_RBT_MAS_DATA-GJAHR = G_GRID_MAST_ITAB-GJAHR.
ZSD_RBT_MAS_DATA-KNUMA = G_GRID_MAST_ITAB-KNUMA.
ZSD_RBT_MAS_DATA-VKBUR = G_GRID_MAST_ITAB-VKBUR.
ZSD_RBT_MAS_DATA-VKORG = G_GRID_MAST_ITAB-VKORG.
ZSD_RBT_MAS_DATA-VTWEG = G_GRID_MAST_ITAB-VTWEG.
ZSD_RBT_MAS_DATA-SPART = G_GRID_MAST_ITAB-SPART.
ZSD_RBT_MAS_DATA-OTQTY = G_GRID_MAST_ITAB-OTQTY.
ZSD_RBT_MAS_DATA-PCPDAYS = G_GRID_MAST_ITAB-PCPDAYS.
ZSD_RBT_MAS_DATA-OTPC = G_GRID_MAST_ITAB-OTPC.
ZSD_RBT_MAS_DATA-EBDFROM = G_GRID_MAST_ITAB-EBDFROM.
ZSD_RBT_MAS_DATA-EBDTO = G_GRID_MAST_ITAB-EBDTO.
ZSD_RBT_MAS_DATA-STATUS = G_GRID_MAST_ITAB-STATUS.
ZSD_RBT_MAS_DATA-MATKL = G_GRID_MAST_ITAB-MATKL.
INSERT ZSD_RBT_MAS_DATA.
COMMIT WORK.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "SAVE_DATA
ENDMODULE. " GRID_CHECK OUTPUT -
File to SAP R/3 custom table using PI
Hi ,
Any once can help me with File to Custom table updation possibilities using PI.
Regards,
KiranHi Kiran,
You can do like I mentioned in the above blog.
Also would suggest not to write to the database directly from PI. Ask an abaper or yourself write a code like an ZBAPI through which you can send data to the table. Then in that case you need to send data to ZBAPI like file - xi - rfc scenario.
One more possibility is you can create a proxy and then send data to proxy and then let the proxy upload the data in the ztable.
If you have any specific questions you can ask here.
Regards,
---Satish -
hi friends...
i am posting fico document using bapi BAPI_ACC_GL_POSTING_POST.
after that i am updating the document number to my custom table.
but in some cases while updating the document in my custom table i am getting the fallowing dump..
in ST22
How to correct the error:
Database error text........: "[1205] Transaction (Process ID 66) was deadlocked
on lock resources with another process and has been chosen as the deadlock
victim. Rerun the transaction."
Internal call code.........: "[RSQL/UPDT/ZIF004_PKT ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"ZFI_01_MONTHLY_RESULT_FRM_PKT" or "ZFI_01_MONTHLY_RESULT_FRM_PKT"
"UPLOAD_SAP"
Source Code Extract
LOOP AT i_zif004_pkt_sum .
UPDATE zif004_pkt SET xblnr = i_zif004_pkt_sum-xblnr ---> i am getting DUMP here
gjahr = i_zif004_pkt_sum-gjahr
sap_flag_posting = i_zif004_pkt_sum-sap_flag_posting
WHERE compcode = i_zif004_pkt_sum-compcode
AND ccode = i_zif004_pkt_sum-ccode
AND wbselement = i_zif004_pkt_sum-wbselement
AND kostl = i_zif004_pkt_sum-kostl
AND code = i_zif004_pkt_sum-code
AND month1 = l_ltx
AND year1 = p_year.
IF sy-subrc = 0.
WRITE :/ 'Document ', i_zif004_pkt_sum-xblnr, 'is posted for ', i_zif004_pkt_sum-code.
ENDIF.
ENDLOOP.
kindly give some inputs..
regards
SelvaHi,
You will face this issue if your oracle data base is lack of work processes. try to check the work processes and increase them if possible with the helps basis guys.
check the below thread.
DI job failed ORA-12537: TNS:connection closed.
Regards,
Venkatesh -
How to find out the volume of the data updated in the custom table
Hi,
I need to find out the the volume of the data inserted or updated in the the custom table(Y tables).I have tried by the sm37.the job running in to update the table but i didnot get thde amount of the data.and if get the volume of the data which being updated in the custom table is there any option to control that amount to being updated?
Thanks in advance .....waiting for the respone.Hi Sreenivas.
How did you find the solution to this? Trying to do the same thing!
Cheers,
Tom -
Update real time account general data into a custom table
Hi,
I have created a z table for storing account general data for some business requirement. I have created a program and executing batch job to update this z table on periodic basis. Can anyone suggest some other alternative solution to update this z table whenever an account gets created/modified in CRM system? Instead of running a batch job periodically, I need a real time replication of the account data in this custom table.
Thanks and Regards,
Sneha.Hi,
Thanks for your reply.
But, Can you elaborate the solution, Can we use Business Transaction Events(BTEs) for updating Partner data? Will these be triggered for Account Creation/Modification. If so, Can u suggest any BTE which can be used for my requirement?
Thanks and Regards,
Sneha. -
User exit/BADI for updating custom table in MB1B transaction-
Dear All,
When performing a material to material conversion in MB1B transaction for batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
Kindly suggest a user exit/BAIi available for updating the same in the custom table.
Regards,
DeepakDeepak, Exits for MB1B are
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc. -
OAF Update of Custom Table causing ORA-600 with database block corruption?
Using OA Framework 12.1.3, running under EBusiness Suite 12.1.3
Created Custom Web page operating against Custom Tables
ISSUE
On about 2% of new records, when OAF is UPDATING a record in a certain table, it is failing with
java.sql.SQLException: ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kddummy_blkchk], [815], [26412], [6110], [], [], [], []
ORA-06512: at line 1
Before the DBA turned on 10.2.0.4.0 DB_BLOCK_CHECKING parameter, this actually
resulted in corrupted data blocks in the database and corrupted indexes that
eventually crashed the database and we had to do a full recovery with 2 days downtime.
Now that we have turned on DB_BLOCK_CHECKING, it simply errors out and puts things
in the alert log, but the records still fail to update as the writes are blocked.
Then oddly, a few days later.. the records become editable. And others fail.
This is ONLY happening on the one particular table being updated by OAF. Other custom pages
posting to other custom tables are having no problems. We've CTAS'd the table back and
forth and recreated the indexes, and that did not help.
Support says to post to the Forum ( So I am! ) or hire Oracle consulting.. which doesn't make
much sense given the error. The Recovery Team that helped us in a separate SR ( we had
to do db_repairs not just recovery ) felt it was an important problem the OAF team needed to
strongly review.
Anyone else encounter this already and know of a solution?
TIA
KarlAfter MANY hours of trial and error and research, we've identified ONE use case that seems to apply to 90% of the issue we have encountered.
YMMV.
The BC4J generated SQL which is generating the ORA-600 is
BEGIN UPDATE XXRETURNHEADER ReturnHeaderEO SET INTERNAL_TEXT=?,LAST_MOD_USERNAME=?,OBJECT_VERSION_NUMBER=?,LAST_UPDATE_DATE=?,LAST_UPDATED_BY=?,LAST_UPDATE_LOGIN=? WHERE RMA_NUMBER=? AND ORGANIZATION_ID=? RETURNING TROUBLESHOOT_DATE, FAA_TAG_DATE, FAILURE_ANALYSIS_DATE, LAST_MOD_DATE, FAA_REVISED_DATE, TTE_TECH_SEND_DATE, TTE_REP_RESPONSE_DATE, TTE_REP_APPROVED, TTE_RMA_RANDOM_KEY, OBJECT_VERSION_NUMBER, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN INTO ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?; END;".
We determined that if TTE_RMA_RANDOM_KEY was not a null value, we would get an ORA-600 error whenever we did an APPLY from the OAF Page to update the record.
If we set that table attribute to NULL for the record using SQL.. then used the OAF Page to APPLY.. it worked fine and the record saved without error.
We then modified the EO to NOT "Refresh After Update" ( thus removing it from the RETURNING clause generated )... and even if the TTE_RMA_RANDOM_KEY
had a value... the OAF Page APPLY worked and the record saved without error.
I cannot identify anything from the User programming side that is wrong ( and neither could Oracle ), and it REALLY should be in the RETURNING clause list of
attributes.. but this is the only workaround I've found that doesn't crash the Page and irritate the user to no end.
I have reported my findings via the SR back to Oracle to do with it what they may... but it looks strongly ,to me, to be an error in the BC4J/JDBC/Database
coordination and passing data between those black boxes. -
Insert delete or update entry in Custom table from KONV entry changed
Hi All,
I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
Thanks,Thanks for reply,
There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
Is this possible some how? by some database event or something.... -
Not Updating Customized Table when System having Performance Issue
Hi,
This is actually the same topic as "Not Updating Customized Table when System having Performance Issue" which is posted last December by Leonard Tan regarding the user exit EXIT_SAPLMBMB_001.
Recently we changed the program function module z_mm_save_hide_qty to update task. However this causes more data not updated. Hence we put back the old version (without the update task). But now it is not working as it used to be (e.g. version 1 - 10 records not updated, version 2 with update task - 20 records not updated, back to version 1 - 20 records not updated).
I tried debugging the program, however whenever I debugged, there is nothing wrong and the data is updated correctly.
Please advise if anyone has any idea why is this happening. Many thanks.
Regards,
JanetHi Janet,
you are right. This is a basic rule not to do any COMMIT or RFC calls in a user exit.
Have a look at SAP note 92550. Here they say that exit EXIT_SAPLMBMB_001 is called in the update routine MB_POST_DOCUMENT. And this routine is already called in UPDATE TASK from FUNCTION 'MB_UPDATE_TASKS' IN UPDATE TASK.
SAP also tells us not to do any updates on SAP system tables like MBEW, MARD, MSEG.
Before the exit is called, now they call 'MB_DOCUMENT_BADI' with methods MB_DOCUMENT_BEFORE_UPDATE and MB_DOCUMENT_UPDATE. Possibly you have more success implementing the BADI.
I don't know your situation and goal so this is all I can tell you now.
Good luck!
Regards,
Clemens -
How to capture userid,date in a custom table while updating a form
Hi,
I have a requirement to insert the userid, the form name and the date on which the record is saved in a custom table while updating a custom form.
We are using Form Builder 6.0.
I am new to Forms and can anyone help me with these?
I would also want to know under which trigger i should be writing the code in.
Thanks in advance.you can use:
usrid := get_application_property(username);
formname := get_application_property(current_form);
dt := to_char(sysdate,'dd/mm/yyyy hh:mi:ss');
you insert these values in on-update trigger at form level -
Updating Custom Table Only in Debug Mode
Hi All!
I have been encountering issues in updating a custom table. It would work successfully only in debug mode otherwise it won't update an entry in the table.
This is the piece of code that would update an entry in the table specifically used in a user exit. The functionality of this code is to automatically remove a transportation block:
SELECT SINGLE *
INTO wa_zblock
FROM zblock
WHERE zzblknum EQ c_tr01
AND vbeln EQ p_lvbeln
AND zzprocessed EQ space.
IF sy-subrc EQ 0.
DO.
CALL FUNCTION 'ENQUEUE_E_TABLES'
EXPORTING
MODE_RSTABLE = 'S'
TABNAME = c_lzblock
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
IF sy-subrc EQ 0.
wa_zblock-zzprocessed = c_x.
wa_zblock-zzapproveby = sy-uname.
wa_zblock-zzapproveon = sy-datum.
MODIFY zblock FROM wa_zblock.
if sy-subrc EQ 0.
COMMIT WORK AND WAIT.
endif.
EXIT.
ENDIF.
ENDDO.
CALL FUNCTION 'DEQUEUE_E_TABLES'
EXPORTING
MODE_RSTABLE = 'S'
TABNAME = c_lzblock.
ENDIF.
How can I make this update the custom table successful in undebugged mode? Please let me know your thoughts on this.
Thanks!I also suggest you to lock only the entry that will be updated (and not the whole table!) : you will have then far less problems of conflict with updating this table.
For that, you have to create a lock object on your table (via SE11 - for example EZ_MY_TABLE). This will create 2 function modules named ENQUEUE_E<name of your lock object> (in my example ENQUEUE_EZ_MY_TABLE) and DEQUEUE_E<...>.
You can then call those FM like this :
CALL FUNCTION 'ENQUEUE_EZ_MY_TABLE'
EXPORTING
MODE_RSTABLE = 'S'
KEYFIELD1 = ld_keyfield1 " Here are the key values for the entry that you have to update
KEYFIELD2 = ld_keyfield2
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
Best regards,
Samuel -
BTE for Parking a document and updating a custom table
Hi
I want to update a custom table whenever a new parking document got posted through FBV4. I want to use a BTE for this please advice....
Moderator message: please do some research before asking.
Edited by: Thomas Zloch on Mar 10, 2011 9:15 AMHi Gaurav,
First time the correct data i have entered..and pressed "Save" button it is going and updating .After that i given same priority to multiple absence types..it errored out.. till now everything is fine.. Again i changed to correct value.. and pressed "Save" button. It is error out with an error like :
JBO-25001: Name LOCATOR_SELECT3 of object type View Row Set Iterator already exists
Code :
int rowCount = vo.getFetchedRowCount();
RowSetIterator rIter1 = vo.createRowSetIterator("LOCATOR_SELECT3");
rIter1.setRangeStart(0);
rIter1.setRangeSize(rowCount);
int g=0;
rIter1.reset();
for ( int i=0;i<rowCount;i++)
XxchrResultSetVORowImpl row = (XxchrResultSetVORowImpl)rIter1.getRowAtRangeIndex(i);
String priority = ((String)row.getAbsencePriority());
System.out.println("First Priority" + priority);
for ( int j=0;j<rowCount;j++)
if(i==j)
g++;
//leave this row
else
XxchrResultSetVORowImpl rows = (XxchrResultSetVORowImpl)rIter1.getRowAtRangeIndex(j);
String priority2 = ((String)rows.getAbsencePriority());
//String priority2 = ((String)row[j].getAttribute("AbsencePriority"));
System.out.println("Second Priority" + priority2);
if(priority.equals(priority2))
//that means priority is repeated
throw new OAException("error",OAException.ERROR);
rIter1.closeRowSetIterator();
Serializable[] param = {Businessgroupname,Retroactivedays};
am.invokeMethod("Apply");
Thanks
Preeti -
Update customizing table on the production
Hi all,
Ik maked a customizing table on the development environment.
Evert time i need to update the data of this table , then i have to do it on the development and then tranport it to the production via a transport request.
Is it possible to change this (setting) table in the production, without using the transporting request ?
I changed the properties of the table from C (Customizing)
to A ( Application table), but it doenst help.
Anyone have a suggestion ?
Thanks,Goto Development system-> again change settings from C to A,use database utility ->activate and adjust database.
now delete table maintaince and re create table maintaince,now transport your request to production,it should be fine now.
Thanks
Seshu
Maybe you are looking for
-
Prevent invoice creation for closed Service Order
Hi , Is there a way to prevent invoices from being created against a closed Service Order? Thanks, Jograd
-
Missing syslog.conf file in /etc folder!
How do I create a syslog.conf file that I need in the /etc folder to resolve an isssue with DoorStop?
-
Hi all, I have an item on a form that has the datatype of date and has the format mask HH24:MI. It is giving me the error FRM-50002 Month must be between 1 and 12 when I try to tab off the field. This form worked ok in forms 6i but not in forms 10. H
-
I create new file using only "Write Characters To File". (I don't want user to see dialog to choose file name,etc.) I create .CSV file, and I want to set file as read only for any other applications except LabView. When MS Excel opens this file LabVi
-
Hi The apps I've installed on my iPhone are in the "Mobile Applications" directory. When there is an update a number is added to the app-name. My question: Is it possible to delete the old, original file and only keep the updated file? Would I have p