Custom Table Authorization Control
Hi gurus-
I got the following scenerios-
The scenario is-
We have a custom table. On that custom table, there are couple of fields that we want to control access (display access, edit access, no access etc.) based on different user profile role. I know you can control access on table basis by Authorization Group but for access control within a field (some records within that field will be accessed by only few people, other records by other group of people), how can these be accomplished, if possible. Authorization Object Controls access for a particular field. But my understanding is for all records in the field. Can you subdivide those into different groups of records?
The logic is-
After user enters input values (key fields in the custom table maintenance program), the program looks up the authorization group for the user and checks if the key combination has authorization to change access, if yes it executes the program, otherwise returns an error message. Can you accomplish that with the use of another field like Profile Group to maintain a list of records for different user groups?
Any help will be greatly appreciated!!!
Thanks!
Hi,
you can ask your ABAP consultant to code in the table maintenance events. We need to call appropriate authorization objects in the events and allow/disallow the changes for a field/record based on the authorization.
If you want more details on TMG events, just search in SCN. We have lot of information on this.
Thanks,
Vinod.
Similar Messages
-
AR Customer Maintenance Authorization Control
Hi All,
I'm using SAP ECC6 and Oracle 10.2.0.4.0.
I wanted to control the authorization for Accounts Receivables (AR) Customer Maintenance.
Currently, there are some tcodes under this role, such as:
1) XD01 - Create Customer (Centrally)
2) FD01 - Create Customer (Accounting)
How can it be control from authorization point of view if I want to allow my user to have DISPLAY authorization only whenever they execute the above tcodes.
For example:
If user execute tcode: XD01 and key in the account group: End Customer, they will not be able to enter any information and save it.
I understand that this tcode is fall under maintenance authorization group, but can it be controlled?
Please kindly advice how can this be done.
Appreciate for any of your help and advice.
Thank you.
PeterHi Suresh,
Thank you for your kind response.
I've checked OB31 and found no entries. I've used tcode: SU21 and SU22 to chec the affected tcode: FD01 .
I've also checked and analyzed authorization object F_KNA1_AEN and have configured a dummry role for testing in QAS.
Authorization package in the dummy role:
-> Maintained Customer: Change Authorization for Certain Fields F_KNA1_AEN
-> Maintained Customer: Change Authorization for Certain Fields T-QS25298300
-> Field group VGRUP
For Field group (VGRUP), I'm able to define the "Object Type": D for Customers, but I do not know what is the value for "Field Group"
Please kindly advice how can this be done.
Thank you.
Cheers. -
Authorization coding in custom table
Hi frnds,
I want to give an authorization to a custom table. I have created a new authorization group and assigned a role and user for it.
I had done a coding to check the authorization in Maintenance generator program.
MODULE CHECK_AUTHORIZATION OUTPUT.
data : w_tddat like tddat,
viewname type tabname value 'ZTSD_IB_TRMAP',
act_level.
select single * from tddat into w_tddat where tabname = viewname.
if sy-subrc <> 0 or w_tddat-cclass = space.
w_tddat-cclass = '&NC&'. " 'non classified table'
endif.
authority-check object 'S_TABU_DIS' "check by class
id 'ACTVT' field '02'
id 'DICBERCLS' field w_tddat-cclass.
if sy-subrc <> 0. "not allowed
authority-check object 'S_TABU_DIS' "check by class
id 'ACTVT' field '03'
id 'DICBERCLS' field w_tddat-cclass.
if sy-subrc = 0.
fupd = space.
fshow = 'X'.
act_level = '03'.
p_action = 'S'.
message w106(tb) with viewname."only show allowed
else.
message e107(tb) with viewname."no upd auth
endif. "sy-subrc from 2nd auth_check
else. "act_level <> 02
message e105(tb) with viewname . "no show auth
endif.
endif.
ENDMODULE. " CHECK_AUTHORIZATION OUTPUT
But the problem is on debugging even for the unauthorized user the authorization check coding:
authority-check object 'S_TABU_DIS' "check by class
id 'ACTVT' field '02'
id 'DICBERCLS' field w_tddat-cclass.
gives sy-subrc = 0.
What is the problem with the coding.
Also can an one explain me about
fupd = space.
fshow = 'X'.
act_level = '03'.
p_action = 'S'.
and what are the datatypes to be given for it on data declaration.
Thanks in Advance>
neethu wrote:
> I have created a Z table and I need to create and assign an Authorization group to the table. The requirement is like, say, if there are 10 users who belong to this particluar Authorization group, then 5 users should be given display and change authorization. And the remaining 5 users should be given only display authorization & no change authorization.
>
Assuming users are accessing the table content using SM30 (or SM30 parameterised transaction) you can use authority object S_TABU_DIS to control change mode. User who are suppose to change content should have authority object S_TABU_DIS with following values in their role.
S_TABU_DIS
ACTVT = 02
DICBERCLS = AUTH_GRP
for display only
S_TABU_DIS
ACTVT = 03
DICBERCLS = AUTH_GRP
Where AUTH_RP is authorization group assigned to table
Regards,
Pawan.
Edited by: Pawan Kesari on Aug 9, 2010 4:17 PM -
Custom Table Control in VA21/22/23 Tranaction Issue
Hi Friends,
Working on SAP R/3 Release 4.6C.
There is a custom Table Control in one of the screen of VA21 Transaction.
My requirement is to insert one more Field/Column to this table Control.
The following are the sequence of fields in Table Control.
Column1
Column2
Column3
Column4
After Inserting the Field in the middle of Column1 and Column2.
The Sequence of Table Control is getting Changed.
The Table Control has to show like this.
Column1
Column2 "New Field which is added
Column3
Column4
Column5
But I'm getting as below
Column5
Column3
Column2 "New Field which is added
Column1
Column4
When executing the Table Control Screen in SE51 with Screen Name and Screen Number,I am getting the perfect output.
When executing thro VA21/22/23, Iam getting sequence mismatch.
Anyone come across this scenario. Please guide to solve this.
Thanks.Solved.
Thanks. -
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 -
How to fetch the Table Control data to Customer Table(Z-Table) ?
How to fetch the Table Control data to Customer Table(Z-Table) ?
Hi Krishna,
Check this sample programs
http://www.planetsap.com/online_pgm_main_page.htm
http://sap.niraj.tripod.com/id29.html
http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm
Have a look at below links. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
Thanks,
Reward If helpful. -
Could you please send me the links to get an idea on Custom table controls
Hi Friends,
I am working on custom table controls, Could you please send me any links on Custom table controls or documentation.
Thanks and Regards,
Sandeep Kumar BonamHello Sandeep,
See here for the latest table features in 2004s.
<a href="/people/bertram.ganz/blog/2006/07/03/web-dynpro-java-foundation--whats-new-in-sap-netweaver-2004s:///people/bertram.ganz/blog/2006/07/03/web-dynpro-java-foundation--whats-new-in-sap-netweaver-2004s
This link also has a lot information on tables
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d43bb0e5-0601-0010-3a97-d9760726bf4c">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d43bb0e5-0601-0010-3a97-d9760726bf4c</a>
Regards,
Sudeep. -
Updating custom table through table control in module pool
Hi
I am entering a data in the module pool screen in a table control . The functionality is that whatever i enter in a row gets updated in a custom table in the database with the same values . My problem is that when i enter some values and press the save button on the module pool screen , the data gets updated on the table but gets invisible from the module pool screen . The user wants the data to be displayed even after it has been saved ..if anyone can help on this ...
thankshi,
Check whether u have activated the report and screen. -
Table type not defined for table control "T_CONTROL" (Custom table)
Hi All,
I m facing a problem in ITS mobile service.
The Table control designed by me in R/3 (Module pool program) is
not getting displayed in ITS mobile page.
It is giving me an error "Table type not defined for table control "T_CONTROL" (Custom table) ".
Can you please let me how this issue can be resolved.
With Regards,
MaheshCONTROLS: table_ctr TYPE TABLEVIEW USING SCREEN '0010'.
try using this....
Regards
Vasu -
Converting garbled characters for JAPANESE characters in a custom table
Hi all,
I have a custom table that store Japanese characters.
After my company has upgraded to ECC6.0, this data in the custom table has become garbled and its alot of it garbled.
Is there any SAP tool that can I use to make the correction on those garbled Japanese characters?
Thanks,
William WilstrothHi Nils,
I really really really had a field day reading and testing around UC... To my dissappointment, I do not have the authorization to use SUMG and SCP too as well as a few of the TCODES...
I finally told my higher level technical mgnt. that this table might need some changes...
Has this problem of mine got anything to do with MDMP since its no longer supported in ECC6 and I found one coding that search for MDMP in RSVTPROT...
My colleagues suggest that the data be corrected from table DBTABLOG... which i find, in my opinion, is not the right way...
Thanks,
William -
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 -
How to manage data in a custom table added in SBO?
Hello,
I'm developing a addon for one client that needs to control an aditional step, after each Invoice is posted.
Since SBO does not allow me to add additional fields to Invoice header table (OINV), I thought to add a custom table to SBO database to control the process for each Invoice (simple table with 2 columns: DocNum to hold the Invoice number, and Status to keep track if the Invoice was processed or not).
When I added a Custom Table in SBO and checked the table definition in SQL Manager, I found that SBO added automatically 2 new columns (Code and Name).
Since the PK is defined at Code column (and not the DocNum has I wanted), I found that it not very handy to manage data (insert, delete & update) with this table definition.
I tried to find a DI object that could manage easily the data of this table type but had no sucess.
Then I thought in adding the custom table directly in SQL Manager, and manage it directly with Recordet objects.
However this seems not a standard process to manage data since it interacts directly with the DBMS, which can be dangerous...
Is there any way or DI object to manage this custom tables added in SBO?
Thanks all!
Manuel DiasHi Manuel,
What do you mean by SBO does not allow me to add additional fields to Invoice header table (OINV).
Have you tried it add a UDF to OINV,if so what is the exception you got while adding.
If you Have not tried Use the following code to create.
Dim oUserFieldMD As SAPbobsCOM.UserFieldsMD
oUserFieldMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
If (Not isColumnExist(TableName, ColumnName)) Then
oUserFieldMD.TableName = "OINV"
oUserFieldMD.Name = ColumnName
oUserFieldMD.Description = Description
oUserFieldMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUserFieldMD.EditSize = Size
(objUserFieldMD.Add() )
End If
if the field is added successfully.
Then open the Invoice screen and goto View menu and click on user defined fields then it will show you one form which contains the field you added,
You can access this field using DIAPI of Invoice object
regards
Vishnu -
How to create an EIT in Oracle apps with custom table?
Hi,
I have a custom table in APPS schema where training information is loaded everyday by running a control file.
I've to pick the training end date and status of 5 particular trainings and create an EIT.
When I try to create an EIT which is basically a DFF, in value set I'm not able to find my table.
Please guide me through this as I'm doing this for the first time.Hi Rajesh,
You can do the below steps to achieve your requirement (Code may vary to suit your needs, these are just a hint to approach your solution) :
1. Extract the zip file payload from the incoming module data
Object obj = inputModuleData.getPrincipalData();
Message msg = (Message)obj;
Payload attachment = msg.getMainPayload();
2. Construct a new outgoing payload using DOM resembling the structure that you defined in your design.
XMLPayload xmlpayload = msg.getDocument();
DocumentBuilderFactory factory;
factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
<Create your xml structure using DOM APIs>
// Transforming the DOM object to Stream object.
TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer transformer = tfactory.newTransformer();
Source src = new DOMSource(document);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Result dest = new StreamResult(out);
transformer.transform(src, dest);
byte[] docContent = out.toByteArray();
3. Set the newly created xml structure as the new main payload
xmlpayload.setContent(docContent);
msg.setMainPayload(xmlpayload);
4. Add the original document (zip file) as an attachment to the main payload.
msg.addAttachment(attachment);
5. Set the modified message to the inputModuleData and return it to the messaging system
inputModuleData.setPrincipalData(msg);
return inputModuleData;
Regards
Bikash -
Authorization control for batch master
Hello Experts,
I have a special requirement from client on authorization control on batch master. The requirement is user should not be allowed to change the batch header details but allow to change selected characteristic values. For e.g If I have a batch A, the header values such as prod date, country of orgin etc should not be allowed to change. In classification view few characteristics only should be editable, rest all should only be displayed.
Is there any option to do this. Either through authorization control or exits. We dont want to create a custom transaction to achieve this.
Thanks in advance
PrathibHello
The following document explains how to check which authorization objects are called on each transaction:
How to analyze authorization issues in debug
BR
Caetano -
Setting custom table attribute set value in region item table
Dear all
I am working on oracle application customization and extension in
oracle JDeveloper R12. I am finding a difficulty in an query region of
a OA framework page
My Entity object is on the table FWK_TBX_ADDRESS table
and VO objects has the fields or columns
AddressName, AddreessId, TownC-OrCity
what I am doing shown in the following steps
1-I select region using wizard option
2-select my AM and VO
3-select table as style
4-shuttle all attributes associated with VO
5-in region items table , select the Attribute set field for AddressName attribute and click the serach flashligh icon
6-After that select the browse button , using the package browser , expand down to oracle > apps > fnd> framwork > toolbox > attributesets, then oK
7-select the serach control , and then it list all the attributes set related to fwkTbxEmployees table like the following
/oracle/apps/fnd/framewok/toolbox/attributesset/FwkTbxAddress/AddressName
Now the problem which I am facing now is that if I have custom table suppose "xxEmployees" and have attributes or column
for example employeeId, employee_name, email etc. what would I do to search these attributes when I come to step number 6 which
I mentioned above. from where in which package I can find these attributes to set attributesset value. in above i find these attributes
in /oracle/apps/fnd/framewok/toolbox/attributesset/FwkTbxAddress/AddressName
but in my case for attribute lie employeeId or employee_name from where I can get this how can I set the value of attribute set field in regin item
table in step 5
NomanI dont know what u trying to ask
My problem is just that I want to set the attribute set value of my attribute employee_name, same is AddressId in fwk_tbx_address
ame is AddressId in fwk_tbx_address found on
/oracle/apps/fnd/framewok/toolbox/attributesset/FwkTbxAddress/AddressName
where can I find my attribute employee_name
in jdeveloper
Maybe you are looking for
-
During the 1990s I edited my DV firewired footage on Canopus Storm editing which, from the start, had a very simple but marvelous Batch Capture facility enabling frame accurate clips to be captured to the timeline. Could anyone tell me which of the
-
To Open (Windows open dialog box )
Hi i am using 4.5 forms and on click of button i wanna open a windows dialog box from this user can opne any other file say doc or excel file. help me in this matter.. thanx in advance..
-
Hi, I read through the user manual but didn't see this one listed. When I'm looking at my contacts and choose to edit information, there is a green "+" next to the ringtone field. I'm really just wondering what this does, as nothing happens once I ta
-
Can't get Listener to use the Correct listener.ora file
I am on a Windows 2003 Server. I have copied the 10gR2 ORACLE_HOME from a diffent Windows 2003 server on to this one. I want to start the Oracle Listener on this server. I have: set TNS_ADMIN = E:\oracle\product\10.2.0\network\admin\EBIZBLK_nvciebizd
-
Cc 2014 update results in no video anymore
Performed an update to CC 2014 suite and now Premiere outputs no video. Not in the source monitor or the program/sequence monitor (as if playing audio only, but without a waveform). Video output to a "playback" monitor is full white. Importing new