Authorization for particular field
Dear All,
I have one issue about Authorization related..
My Os is --- IBM AIX
DB -- oracle
SAP - ERP 6.0
I want to restrict one field from all users in tcode KP26. when i execute KP26 tcode it will ask controlling area.
After putting controlling area. it will show "Change Activity Type/Price Planning: initial Screen
in that screen there is one field call "Version". we have six version in this filed. i want to give authoirzation for all users only one version from the six version.
But i could not restrict in the role...
I tried with new user and new role with zero base authorization. but i can't get the correct authorization object for restrict.
Can anybody help to resolve this issue...
Regards,
Sundar.C
Hi Sundar,
Did you check with the authorization objects being checked while calling KP26 . You may get the required auth. obejct there.
You may also want to run a trace to zero down on the exact authorization object.
Check if the user is getting the authorization for K_KA09_KVS from some other role?
Regards,
Manisha
Edited by: Manisha Nadir on May 26, 2010 8:50 PM
Similar Messages
-
Authorization for PO fields of over delivery and under delivery tolerance
Hi,Any one know how to set authorization for PO fields of over delivery and under delivery tolerance?
For example to allow certain user to edit the these fields but other users will be only display mode.Better create variant for restricting fields over & under delivery tolerance for certain users than applying authorization.
-
Define read-only authorization for specific field(s) on a form for 11.5.9
Dear all,
Can you pls let me know how is it possible to define read-only authorization access for specific field(s) per responsibility / user on a form in 11.5.9?
For example I want to protect the item master file by assigning for example to users with responsibility buyer authorization to modify the buyer information but to have read-only only authorization on other sensitive fields such as make/buy flag, expense accounts, etc
Through UI Modeller I have only managed to make specific fields on specific forms invisible, or whole tabs invisible, to specific responsibilities but this does not cover my needs as I want them to be able to view the data of the fields but to not be able to update themArun,
Almost but not quite.. The example you've given has the person VO at the top level which includes all the id's (City, State etc). My use case is slightly different.
query 1
select org_id, OrgName from x;
query 2
select emp_id, emp_name from y where org_id = x.org_id
query 3
multi-table join (approx 9 tables) to retrieve depts associated to employee
where org_id = x.org_id
and emp_id = y.emp_id
Rather than using LOV's would it be better to create VO's and pass in the bind parameters at run time? -
How to set a default value for particular field in SRM PO Portal
Dear Gurus,
Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
Thanks in advance...
Regards,
SathishDear Laurent,
Thanks for your response,
But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
Kinly guide me how to get the particular node of field in the Purchase order screen.
Thanks you in advance,
Sorry for the inconvenience if any
Regards,
sathish -
Clear historical cache for particular field
Hi all,
I am working on a module pool program. There is one field to display the exployee number, let's say the field length is 8 char.
Everytime accessing into the screen, the employee number field should clear (clear from history) for the next new employee to enter the employee number.
The problem I am facing now is, the next employee can easily press on the SPACEBAR to select the employee number from the history (which is not agreed by my boss).
I also understand that there is a fastest way to handle this by increasing the field length to longer, let's say 60 char. Then it will not display out in list for them to select from history even they press on SPACEBAR.
In ABAP programming, how do I remove it from history for this particular field? Other fields are required to store in history for easier data entry.
Thanks in advance.Hi,
For each user related information is stored in the local folder. You can get the latest cache file for that user from there. Below is the path to obtain the same.
C:\Documents and Settings\andy\SapWorkDir\SAP_Cache_andy
Here you will find a lot of files. They will contain the latest cache information.
Cache1 and Cache2. You need to manipulate these files to achieve the requirement.
Thanks,
Samantak. -
We need to give field-level authorization for some fields
The schenario is as follows :
1. There are various storage locations within a plant.
2. There is one or more people incharge of creating PO and receiving
stocks for every storage location.
3. We dont want to authorise the person incharge of one storage
location to receive stock in another storage location or even view the
other storage locations at the time of creating the PO or any other
transaction. The user incharge of one storage location should not be
able to view any other storage location in any storage location field's
drop down.
regards
Manish
+91 9811647727Hi Umesh,
Please see the documentations for authorization profile P_ABAP in the R/3 library and the following:
SU03 -> HR Human resources -> position your cursor to P_ABAP HR: Reporting -> choose button "Docu." -> the pop-up "help - P_ABAP" appears.
There is an example, which describes a similar issue regarding RPTIME00 and the Basic pay infotype (0008).
The standard reports of personnel administration are based on logical database PNP I would recommend to set your authorization as follows:
Object HR: Master data (P_ORGIN) (two authorizations)
Infotype 0002 ' '
Subtype * ' '
Authorization level R ' '
Organizational key ' ' 0001YYYYXXX
Object HR: Reporting (P_ABAP)
Report name SAPDBPNP
Degree of simplification 1
Please note, that if a user has authorization for e.g. the birthday list , (s)he will be able to view the birth date through thisquery, although (s)he cannot access to IT0002 through PA20.
Another possibility would be using Customer-Specific Authorization Object P_NNNNN. I have attached a file with a very comprehensive documentation regarding HR authorizations. P_NNNNN is documented on pages 40 ff.
Hope this help
Sarah -
Display authorization for particular line of table
Hi Experts,
I have a Z table contains sales area data. I want to display those records only which user has authorization for the sales area. It is possible through the table maintenance event or there is any other way to achieve this.
Quick response will be appreciated.
Thanks in advance for your sincere help.
Cheers,
AnilHi Anil,
Yes,Its possible through table maintainance event itself.
Only thing u need to do is check for the sales area the user is authorized..using
FM: SUSR_USER_AUTH_FOR_OBJ_GET
SEL_OBJECT:- CRM_ORD_OE.
Hope it helps!!
Regards,
PePe -
Validation of data in editable ALV report output for particular field
Hi Experts,
I have one input enabled field in ALV output. How to validate the data once user enters in that field and press enter? Is it possible to capture the value, hit the enter after user enters the data?
Thanks,
Surya PrakashHalo Prakash,
1 First you should registeer the ENTER Event.
call method g_grid->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
2 Declare event handler method for Event data_changed of cl_gui_alv_grid.
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
3 Inside the Event handler method , you get the event parameter er_data_changed type ref to CL_ALV_CHANGED_DATA_PROTOCOL.
loop at er_data_changed->mt_good_cells into ls_good.
case ls_good-fieldname.
when 'FIELD1'.
call method check_FIELD1.
when 'FIELD2 '.
call method check_FIELD2
endcase.
endloop.
4 Inside the Method check_FIELD1 and check_FIELD2 you can do the validation check .
call method er_data_changed->get_cell_value( Passing the row no and field name).
if the check fails you can use add_protocol_entry to write the error.
5 Finally call
er_data_changed->display_protocol.
Regards
Arshad -
One example for edit the grid in oops and provide f4 help for particular field in Grid
Hi all
Here is the code for that editable Grid
*& Report YVAMC_EDIT_GRID
REPORT YVAMC_EDIT_GRID.
DATA GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID .
*--- Name of the custom control added on the screen
DATA GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC1_ALV' .
*--- Custom container instance reference
DATA GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
*--- Field catalog table
DATA GT_FIELDCAT TYPE LVC_T_FCAT .
TYPES: BEGIN OF IT_LIST,
BANFN TYPE EBAN-BANFN,
BNFPO TYPE EBAN-BNFPO,
BSART TYPE EBAN-BSART,
BSTYP TYPE EBAN-BSTYP,
BSAKZ TYPE EBAN-BSAKZ,
LOEKZ TYPE EBAN-LOEKZ,
STATU TYPE EBAN-STATU,
ESTKZ TYPE EBAN-ESTKZ,
FRGKZ TYPE EBAN-FRGKZ,
FRGZU TYPE EBAN-FRGZU,
END OF IT_LIST.
DATA: GT_LIST TYPE STANDARD TABLE OF IT_LIST,
WA_LIST TYPE IT_LIST.
DATA GS_LAYOUT TYPE LVC_S_LAYO .
DATA OK_CODE TYPE SY-UCOMM.
DATA ZFLAG.
** data for event handling
DATA: GS_F4 TYPE LVC_S_F4,
GT_F4 TYPE LVC_T_F4.
START-OF-SELECTION.
SELECT BANFN
BNFPO
BSART
BSTYP
BSAKZ
LOEKZ
STATU
ESTKZ
FRGKZ
FRGZU
FROM EBAN INTO TABLE GT_LIST.
CALL SCREEN 9000.
*& Module DISPLAY_ALV OUTPUT
* text
MODULE STATUS_9000 OUTPUT.
set pf-status 'ZNEW_STS'.
PERFORM DISPLAY_ALV.
ENDMODULE. " DISPLAY_ALV OUTPUT
*& Module USER_COMMAND_9000 INPUT
* text
MODULE USER_COMMAND_9000 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'EDIT'.
ZFLAG = '1'.
PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
PERFORM REGISTER_EDIT.
WHEN 'DISPLAY'.
ZFLAG = '0'.
PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Form DISPLAY_ALV
* text
FORM DISPLAY_ALV.
IF GR_ALVGRID IS INITIAL.
CREATE OBJECT GR_CCONTAINER
EXPORTING
* parent =
CONTAINER_NAME = GC_CUSTOM_CONTROL_NAME .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT GR_ALVGRID
EXPORTING
I_PARENT = GR_CCONTAINER.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*----Preparing field catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT .
CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = GS_LAYOUT
CHANGING
IT_OUTTAB = GT_LIST[]
IT_FIELDCATALOG = GT_FIELDCAT
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
* EXPORTING
* is_stable =
* i_soft_refresh =
* EXCEPTIONS
* finished = 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.
ENDIF.
ENDFORM. "DISPLAY_ALV
*& Form prepare_field_catalog
* text
* -->PT_FIELDCAT text
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT .
LS_FCAT-FIELDNAME = 'BANFN' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '10' .
LS_FCAT-COLTEXT = 'Requisition no' .
* LS_FCAT-SELTEXT = 'Requisition no' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BNFPO' .
LS_FCAT-INTTYPE = 'N' .
*ls_fcat-outputlen = '5' .
LS_FCAT-COLTEXT = 'Item no' .
LS_FCAT-SELTEXT = 'Item no' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BSART' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '5' .
LS_FCAT-COLTEXT = 'Doc Type' .
LS_FCAT-SELTEXT = 'Doc Type' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BSTYP' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Doc Category' .
LS_FCAT-SELTEXT = 'Doc Category' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BSAKZ' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Control Indicator' .
LS_FCAT-SELTEXT = 'Control Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'LOEKZ' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Deletion Indicator' .
LS_FCAT-SELTEXT = 'Deletion Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'STATU' .
LS_FCAT-INTTYPE = 'C' .
LS_FCAT-F4AVAILABL = 'X'.
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Processing status' .
LS_FCAT-SELTEXT = 'Processing Status' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'ESTKZ' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Creation Indicator' .
LS_FCAT-SELTEXT = 'Creation Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'FRGKZ' .
LS_FCAT-INTTYPE = 'C' .
* ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Release Indicator' .
LS_FCAT-SELTEXT = 'Release Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'FRGZU' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '8' .
LS_FCAT-COLTEXT = 'Release Status' .
LS_FCAT-SELTEXT = 'Release Status' .
APPEND LS_FCAT TO PT_FIELDCAT .
ENDFORM. "prepare_field_catalog
*& Form update_field_catalog
* text
* -->PT_FIELDCAT text
FORM UPDATE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT.
DATA LS_FCAT TYPE LVC_S_FCAT .
CALL METHOD GR_ALVGRID->GET_FRONTEND_FIELDCATALOG
IMPORTING
ET_FIELDCATALOG = PT_FIELDCAT[].
LOOP AT PT_FIELDCAT INTO LS_FCAT .
IF ZFLAG = '1'.
IF LS_FCAT-FIELDNAME = 'BSART' .
LS_FCAT-EDIT = 'X' .
LS_FCAT-F4AVAILABL = 'X'.
LS_FCAT-REF_TABLE = 'T161T'.
LS_FCAT-REF_FIELD = 'BSART'.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSTYP' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSAKZ' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'LOEKZ' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'STATU' .
LS_FCAT-EDIT = 'X' .
LS_FCAT-F4AVAILABL = 'X'.
* ls_fcat-drdn_hndl = '1'.
* ls_fcat-outputlen = 15.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'ESTKZ' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'FRGKZ' .
LS_FCAT-EDIT = 'X' .
* for laready attcahed search help
LS_FCAT-F4AVAILABL = 'X'.
LS_FCAT-REF_TABLE = 'T161U'.
LS_FCAT-REF_FIELD = 'FRGKZ'.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF.
IF LS_FCAT-FIELDNAME = 'FRGZU' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
* add customise f4 help on feild STATU
CLEAR GT_F4.
GS_F4-FIELDNAME = 'STATU'.
GS_F4-REGISTER = 'X'.
* gs_f4-getbefore = check_be. "§7a
* gs_f4-chngeafter = chn_aft. "§7b
APPEND GS_F4 TO GT_F4.
CALL METHOD GR_ALVGRID->REGISTER_F4_FOR_FIELDS
EXPORTING
IT_F4 = GT_F4.
ELSEIF ZFLAG = '2'.
IF LS_FCAT-FIELDNAME = 'BANFN' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BNFPO' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
ELSE.
IF LS_FCAT-FIELDNAME = 'BSART' .
LS_FCAT-EDIT = SPACE.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSTYP' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSAKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'LOEKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'STATU' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'ESTKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'FRGKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'FRGZU' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
ENDIF.
ENDLOOP .
CALL METHOD GR_ALVGRID->SET_FRONTEND_FIELDCATALOG
EXPORTING
IT_FIELDCATALOG = PT_FIELDCAT[].
ENDFORM. "update_field_catalog
*& Form register_edit
* text
FORM REGISTER_EDIT .
CALL METHOD GR_ALVGRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
ENDFORM. "register_editHi all
Here is the code for that editable Grid
*& Report YVAMC_EDIT_GRID
REPORT YVAMC_EDIT_GRID.
DATA GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID .
*--- Name of the custom control added on the screen
DATA GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC1_ALV' .
*--- Custom container instance reference
DATA GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
*--- Field catalog table
DATA GT_FIELDCAT TYPE LVC_T_FCAT .
TYPES: BEGIN OF IT_LIST,
BANFN TYPE EBAN-BANFN,
BNFPO TYPE EBAN-BNFPO,
BSART TYPE EBAN-BSART,
BSTYP TYPE EBAN-BSTYP,
BSAKZ TYPE EBAN-BSAKZ,
LOEKZ TYPE EBAN-LOEKZ,
STATU TYPE EBAN-STATU,
ESTKZ TYPE EBAN-ESTKZ,
FRGKZ TYPE EBAN-FRGKZ,
FRGZU TYPE EBAN-FRGZU,
END OF IT_LIST.
DATA: GT_LIST TYPE STANDARD TABLE OF IT_LIST,
WA_LIST TYPE IT_LIST.
DATA GS_LAYOUT TYPE LVC_S_LAYO .
DATA OK_CODE TYPE SY-UCOMM.
DATA ZFLAG.
** data for event handling
DATA: GS_F4 TYPE LVC_S_F4,
GT_F4 TYPE LVC_T_F4.
START-OF-SELECTION.
SELECT BANFN
BNFPO
BSART
BSTYP
BSAKZ
LOEKZ
STATU
ESTKZ
FRGKZ
FRGZU
FROM EBAN INTO TABLE GT_LIST.
CALL SCREEN 9000.
*& Module DISPLAY_ALV OUTPUT
* text
MODULE STATUS_9000 OUTPUT.
set pf-status 'ZNEW_STS'.
PERFORM DISPLAY_ALV.
ENDMODULE. " DISPLAY_ALV OUTPUT
*& Module USER_COMMAND_9000 INPUT
* text
MODULE USER_COMMAND_9000 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'EDIT'.
ZFLAG = '1'.
PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
PERFORM REGISTER_EDIT.
WHEN 'DISPLAY'.
ZFLAG = '0'.
PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Form DISPLAY_ALV
* text
FORM DISPLAY_ALV.
IF GR_ALVGRID IS INITIAL.
CREATE OBJECT GR_CCONTAINER
EXPORTING
* parent =
CONTAINER_NAME = GC_CUSTOM_CONTROL_NAME .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT GR_ALVGRID
EXPORTING
I_PARENT = GR_CCONTAINER.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*----Preparing field catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT .
CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = GS_LAYOUT
CHANGING
IT_OUTTAB = GT_LIST[]
IT_FIELDCATALOG = GT_FIELDCAT
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
* EXPORTING
* is_stable =
* i_soft_refresh =
* EXCEPTIONS
* finished = 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.
ENDIF.
ENDFORM. "DISPLAY_ALV
*& Form prepare_field_catalog
* text
* -->PT_FIELDCAT text
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT .
LS_FCAT-FIELDNAME = 'BANFN' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '10' .
LS_FCAT-COLTEXT = 'Requisition no' .
* LS_FCAT-SELTEXT = 'Requisition no' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BNFPO' .
LS_FCAT-INTTYPE = 'N' .
*ls_fcat-outputlen = '5' .
LS_FCAT-COLTEXT = 'Item no' .
LS_FCAT-SELTEXT = 'Item no' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BSART' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '5' .
LS_FCAT-COLTEXT = 'Doc Type' .
LS_FCAT-SELTEXT = 'Doc Type' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BSTYP' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Doc Category' .
LS_FCAT-SELTEXT = 'Doc Category' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'BSAKZ' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Control Indicator' .
LS_FCAT-SELTEXT = 'Control Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'LOEKZ' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Deletion Indicator' .
LS_FCAT-SELTEXT = 'Deletion Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'STATU' .
LS_FCAT-INTTYPE = 'C' .
LS_FCAT-F4AVAILABL = 'X'.
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Processing status' .
LS_FCAT-SELTEXT = 'Processing Status' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'ESTKZ' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Creation Indicator' .
LS_FCAT-SELTEXT = 'Creation Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'FRGKZ' .
LS_FCAT-INTTYPE = 'C' .
* ls_fcat-outputlen = '1' .
LS_FCAT-COLTEXT = 'Release Indicator' .
LS_FCAT-SELTEXT = 'Release Indicator' .
APPEND LS_FCAT TO PT_FIELDCAT .
LS_FCAT-FIELDNAME = 'FRGZU' .
LS_FCAT-INTTYPE = 'C' .
*ls_fcat-outputlen = '8' .
LS_FCAT-COLTEXT = 'Release Status' .
LS_FCAT-SELTEXT = 'Release Status' .
APPEND LS_FCAT TO PT_FIELDCAT .
ENDFORM. "prepare_field_catalog
*& Form update_field_catalog
* text
* -->PT_FIELDCAT text
FORM UPDATE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT.
DATA LS_FCAT TYPE LVC_S_FCAT .
CALL METHOD GR_ALVGRID->GET_FRONTEND_FIELDCATALOG
IMPORTING
ET_FIELDCATALOG = PT_FIELDCAT[].
LOOP AT PT_FIELDCAT INTO LS_FCAT .
IF ZFLAG = '1'.
IF LS_FCAT-FIELDNAME = 'BSART' .
LS_FCAT-EDIT = 'X' .
LS_FCAT-F4AVAILABL = 'X'.
LS_FCAT-REF_TABLE = 'T161T'.
LS_FCAT-REF_FIELD = 'BSART'.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSTYP' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSAKZ' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'LOEKZ' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'STATU' .
LS_FCAT-EDIT = 'X' .
LS_FCAT-F4AVAILABL = 'X'.
* ls_fcat-drdn_hndl = '1'.
* ls_fcat-outputlen = 15.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'ESTKZ' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'FRGKZ' .
LS_FCAT-EDIT = 'X' .
* for laready attcahed search help
LS_FCAT-F4AVAILABL = 'X'.
LS_FCAT-REF_TABLE = 'T161U'.
LS_FCAT-REF_FIELD = 'FRGKZ'.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF.
IF LS_FCAT-FIELDNAME = 'FRGZU' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
* add customise f4 help on feild STATU
CLEAR GT_F4.
GS_F4-FIELDNAME = 'STATU'.
GS_F4-REGISTER = 'X'.
* gs_f4-getbefore = check_be. "§7a
* gs_f4-chngeafter = chn_aft. "§7b
APPEND GS_F4 TO GT_F4.
CALL METHOD GR_ALVGRID->REGISTER_F4_FOR_FIELDS
EXPORTING
IT_F4 = GT_F4.
ELSEIF ZFLAG = '2'.
IF LS_FCAT-FIELDNAME = 'BANFN' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BNFPO' .
LS_FCAT-EDIT = 'X' .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
ELSE.
IF LS_FCAT-FIELDNAME = 'BSART' .
LS_FCAT-EDIT = SPACE.
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSTYP' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'BSAKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'LOEKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'STATU' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'ESTKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'FRGKZ' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
IF LS_FCAT-FIELDNAME = 'FRGZU' .
LS_FCAT-EDIT = SPACE .
MODIFY PT_FIELDCAT FROM LS_FCAT .
ENDIF .
ENDIF.
ENDLOOP .
CALL METHOD GR_ALVGRID->SET_FRONTEND_FIELDCATALOG
EXPORTING
IT_FIELDCATALOG = PT_FIELDCAT[].
ENDFORM. "update_field_catalog
*& Form register_edit
* text
FORM REGISTER_EDIT .
CALL METHOD GR_ALVGRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
ENDFORM. "register_edit -
BW authorization for new field in infocube
hi guys,
I'm still new in using RSECADMIN . There is new field ZUCC_ZREGIOn added in cube zmacola02.
In RSECAUTH , how can i make field ZUCC_ZREGIOn to be an authorized character ? I want to add this field as part of aut. checkmake the object as authorization relevant in RSA! and include the object in RSECADMIN, so that you will make that object as part of authorization check.
-
How to create hyperlink in oaf for particular field
Hi All,
I have another requirment that one of my item should have hyperlink.
How to handle this requirment.
Plz suggest me on this..
Thanks
SuryaHi Gyan,
Once i click on hyperlink field it will open new page and should get the value from that new file.
This is my new requirment.
Plz help me with the code how to implement it.
Thanks
Surya
Edited by: surya karanam on Nov 29, 2011 10:16 PM -
Restrict authorization for particular authorization obj with resp to roles
HI All,
Example: I am having below three release roles for purchase order.
Role 1: Regional Commercial Head
Below objects are assigned to it.
M_BEST_WRK u2013 Plant 1000 with value 02
M_EINK_FRG u2013 with release code A1
Role 2: Regional Commercial Head
Below objects are assigned to it.
M_BEST_WRK u2013 Plant 2000 with value 02
M_EINK_FRG u2013 with release code A1
Role 3: National Commercial Head
Below objects are assigned to it.
M_BEST_WRK u2013 All plants with value 02
M_EINK_FRG u2013 with release code B1
All the roles are for releasing a purchase order. My requirement is I had assigned 1st and 3rd roles to a user. That user should not be able to release a purchase order with release code A1 for plant 2000.
Kindly give a possible solution.
Regards,
Madhu KumarHi,
As per your query you have to copy of role no 3 and mentioned all the plant except plant no 2000 in this role and assign to new user roale no1 and copy of role no 3 which is created newly without plant no. 2000. If you have only one user who have role no 3 and wants to role no 1 also then you edit role no 3 and modify the same where plant no 2000 not to assign.
I hope this is clear to you. If you have any doubt pls mentioned here the error or issue you find.
Anil -
How to calculate Cumulative of Daily for particular field(Actual Meter )
hi,
pls help me in this
thanksHi,
refer the link it may help you
https://forums.sdn.sap.com/click.jspa?searchID=4388506&messageID=3350823
https://forums.sdn.sap.com/click.jspa?searchID=4388506&messageID=3889681
Regards -
Active authorize for field in TCode MIGO
Dear All
In Display material Document (by MIGO), there are field GOITEM-DMBTR (Amt.in loc.cur.)
How to active the authorize for this field
For Example User A can display this field and user B can't display
Would you like help me please
thanks
imronhi...
this can be done by basis consultant...
if u r missing authorization then...run SU53..and note down the object which is giving the authorization issue..
and then ask ur basis consultant that..assign that object to particular user role...
Try this out..
Thanks -
Field level Authorization for IT0002
Hi All,
We have a requirement to control the authorization for the field NI Number/Social Security number from IT0002.
This field is getting displayed in various standard reports which are in use by administrators/Managers etc....
We want to disable the access of this field to every one, even the HR administartor.
Kindly suggest if this is possible using authorizations.
I know that we can hide the field in display access for PA20 or PA30, but I am particularly serching the option for various reports.
Regards,
Umesh Chaudhari.Hi Umesh,
Please see the documentations for authorization profile P_ABAP in the R/3 library and the following:
SU03 -> HR Human resources -> position your cursor to P_ABAP HR: Reporting -> choose button "Docu." -> the pop-up "help - P_ABAP" appears.
There is an example, which describes a similar issue regarding RPTIME00 and the Basic pay infotype (0008).
The standard reports of personnel administration are based on logical database PNP I would recommend to set your authorization as follows:
Object HR: Master data (P_ORGIN) (two authorizations)
Infotype 0002 ' '
Subtype * ' '
Authorization level R ' '
Organizational key ' ' 0001YYYYXXX
Object HR: Reporting (P_ABAP)
Report name SAPDBPNP
Degree of simplification 1
Please note, that if a user has authorization for e.g. the birthday list , (s)he will be able to view the birth date through thisquery, although (s)he cannot access to IT0002 through PA20.
Another possibility would be using Customer-Specific Authorization Object P_NNNNN. I have attached a file with a very comprehensive documentation regarding HR authorizations. P_NNNNN is documented on pages 40 ff.
Hope this help
Sarah
Maybe you are looking for
-
Is Reports6i compatible with Windows Vista?
Hi guys, Currently were using Windows XP as our OS and Oracle Reports6i for our reports. But we have encounter this problem when three of our PC's here was upgraded then used the WIndows Vista. When they started using our system then execute the repo
-
Hello, we have a scanerio which sends proxy message from ECC to PI system. It has been working fine since last 6 years. Since last few days, it has started coming up with following error in ECC system. Its happening in DEV system and is working ok in
-
Burning problem: even after no delay between tracks, still get a noise
I want to burn a CD with no delay between tracks. I have selected 0 seconds in the Burning preferences as the delay. It works except that there is a short "blip" stutter sound at the start of every track...how can I get rid of this? Like if the speec
-
Can one put XP image on the second disk with "img"?
Hi all, We have a requirement to put in two IDE disks in the same machine and image the machines with different XP systems, each hard disk hosting one operating system. I was wondering whether Zen "img" utility allows for putting images on more then
-
How do I know if the post job (AUFK-ARBPL or AUFK-WERKS) has mobility?
Hi, I can not see if a post job has mobility or not. Does anyone know if there is any function or BAPI for this? Post job: AUFK-ARBPL mobility:¿?¿? thank you very much in advance! regards!