AUTHORITY-CHECK before Selection-screen?
Hi,
i want to check the authority before the selection-screen. I do it in this way:
AT SELECTION-SCREEN OUTPUT.
AUTHORITY-CHECK OBJECT 'Z_REPORT'
ID 'PROGRAM' FIELD SY-REPID
ID 'ACTVT' FIELD '16'. "Ausführen
IF SY-SUBRC <> 0.
MESSAGE E010 WITH 'Keine Berechtigung für Programm: '
SY-REPID.
ENDIF.
But the selection appears without any parameters.
Is there a way to check without the selection-screen?
thanks.
regards, Dieter
Hi Dieter,
Please check the below code for at selection screen authorization check.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
Regards,
Md Ziauddin
Similar Messages
-
Message before selection screen.
Dear Experts,
Kindly help in knowing how to display a message in small pop-up, before a Tcode takes to the selection screen.
Regards
Jogeswara RaoHi,
You just need to add following code in the program associated with your TCODE, i.e. in Load-of-PROGRAM event.
***CODE*****
REPORT ZTEST12.
PARAMETERS a1 .
Load-of-PROGRAM.
CALL FUNCTION 'C102_POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
TEXT_QUESTION = 'POPUP'
TEXT_BUTTON_1 = '1'
ICON_BUTTON_1 = ' '
I_ICON1_INFO = ' '
TEXT_BUTTON_2 = '2'
ICON_BUTTON_2 = ' '
I_ICON2_INFO = ' '
TEXT_BUTTON_3 = '3'
ICON_BUTTON_3 = ' '
I_ICON3_INFO = ' '
TEXT_BUTTON_4 = '4'
ICON_BUTTON_4 = ' '
I_ICON4_INFO = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
START_COLUMN = 25
START_ROW = 6
IMPORTING
ANSWER =
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.
AT SELECTION-SCREEN OUTPUT.
**EndCode***
In the same way, you can call any Popup FM at same position..
It will be called before selection screen appears.
Thanks
Raghav M.
Edited by: Raghav Malhotra on Jun 3, 2011 6:34 AM -
Checking the Selection Screen Parameters
Dear All,
We are uploading data from various excel sheets into SAP tables. Now at selection screen I just want to check if the location specified exists or not ie. if I have created one variant on one system & then if I am running that report from other system using the variants, since the files does not exists it should throw the error and should return to the selection screen to enter the new parameters.
Please help me in the code, I am attaching my code herewith.
Waiting for ur responses,
Nishu
*********************CODE***************************
tables: bseg, zfi_tbl_qty, t001, tgsb.
data:
t_excel like alsmex_tabline occurs 0 with header line,
l_excelfile(128) type c,
l_excelfile1(128) type c,
l_excelfile2(128) type c,
l_excelfile3(128) type c.
data: begin of t_bukrs_tmp occurs 0,
bukrs like t001-bukrs,
end of t_bukrs_tmp.
data: begin of t_gsber_tmp occurs 0,
gsber like tgsb-gsber,
end of t_gsber_tmp.
ranges: r_bukrs_tmp for t001-bukrs,
r_gsber_tmp for tgsb-gsber.
data: begin of t_type,
bukrs like bseg-bukrs,
gsber like bseg-gsber,
count type i,
end of t_type.
data: l_charlen1 type i,
l_charlen2 type i.
data: t_type2 like t_type occurs 0 with header line,
t_type2_tmp like t_type occurs 0 with header line.
data: l_end_row type i,
l_endrow1 type i,
l_count type i,
v_bukrs like bseg-bukrs.
data : q_count type i value 1,
v_flag type i value 0,
v_gsber like t_type2-gsber.
data: l_var type c.
selection-screen begin of block b1 with frame title text-001.
parameter : p_file1 type rlgrap-filename obligatory,
p_file2 type rlgrap-filename obligatory,
p_file3 type rlgrap-filename obligatory,
p_file4 type rlgrap-filename obligatory.
selection-screen end of block b1.
*perform updation_tbl.
*clearing the contents of database table before uploading a new file everytime
delete from zfi_tbl_qty.
*selection-screen
at selection-screen on value-request for p_file1.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file1
changing
file_name = p_file1.
at selection-screen on value-request for p_file2.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file2
changing
file_name = p_file2.
at selection-screen on value-request for p_file3.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file3
changing
file_name = p_file3.
at selection-screen on value-request for p_file4.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file4
changing
file_name = p_file4.
at selection-screen.
l_excelfile = p_file1.
l_excelfile1 = p_file2.
l_excelfile2 = p_file3.
l_excelfile3 = p_file4.
if l_excelfile = l_excelfile1 or l_excelfile = l_excelfile2 or l_excelfile = l_excelfile3
or l_excelfile1 = l_excelfile2 or l_excelfile1 = l_excelfile3 or l_excelfile2 = l_excelfile3.
message e010(zn) with 'Files with the same name found Please enter again. '.
endif.
start-of-selection.
select bukrs
from t001
into corresponding fields of table t_bukrs_tmp.
loop at t_bukrs_tmp.
r_bukrs_tmp-sign = 'I'.
r_bukrs_tmp-option = 'EQ'.
r_bukrs_tmp-low = t_bukrs_tmp-bukrs.
append r_bukrs_tmp.
endloop.
select gsber
from tgsb
into corresponding fields of table t_gsber_tmp.
loop at t_gsber_tmp.
r_gsber_tmp-sign = 'I'.
r_gsber_tmp-option = 'EQ'.
r_gsber_tmp-low = t_gsber_tmp-gsber.
append r_gsber_tmp.
endloop.
perform upload_table using l_excelfile 5 2 6 4000.
perform upload_table using l_excelfile1 5 2 6 4000.
perform upload_table using l_excelfile2 5 2 6 4000.
perform upload_table using l_excelfile3 5 2 6 4000.
if sy-subrc = 0.
message i010(zn) with 'Files Uploaded Successfully.'.
if sy-subrc <> 0.
message e398(00) with 'Files Not Found'.
leave to screen 0.
endif.
************Calling the other program
SUBMIT ZFI_REP_IS_CHARGES_POST1.
*and return.
*******************Calling the subroutine.
form upload_table using filename
i_begin_col type i
i_begin_row type i
i_end_col type i
i_end_row type i.
clear : t_excel.
refresh : t_excel.
v_flag = v_flag + 1.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = filename
i_begin_col = 5
i_begin_row = 2
i_end_col = 6
i_end_row = 4000
tables
intern = t_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
case v_flag.
when '1'.
perform fill_int_tab.
when '2'.
perform fill_int_tab.
when '3'.
perform fill_int_tab.
when '4'.
perform fill_int_tab.
endcase.
endform. "upload_table
*uploading data from internal table into database table
*& Form fill_int_tab
text
--> p1 text
<-- p2 text
form fill_int_tab .
clear : t_type2, q_count.
refresh : t_type2.
describe table t_excel lines l_endrow1.
l_endrow1 = l_endrow1 / 2.
do.
loop at t_excel where row = q_count.
if t_excel-col = 1.
t_type2-gsber = t_excel-value.
elseif t_excel-col = 2.
t_type2-bukrs = t_excel-value.
endif.
endloop.
l_charlen1 = strlen( t_type2-bukrs ).
l_charlen2 = strlen( t_type2-gsber ).
if ( t_type2-bukrs <> ' ' and t_type2-gsber <> ' ' ).
if ( l_charlen1 = 4 and l_charlen2 = 4 ).
append t_type2. clear t_type2.
endif.
endif.
q_count = q_count + 1.
if q_count > l_endrow1.
exit.
endif.
enddo.
t_type2_tmp[] = t_type2[].
clear t_type2.
refresh t_type2.
loop at t_type2_tmp where bukrs in r_bukrs_tmp
and gsber in r_gsber_tmp.
move-corresponding t_type2_tmp to t_type2.
append t_type2.
endloop.
sort t_type2 by bukrs gsber.
loop at t_type2.
clear v_gsber.
l_count = l_count + 1 .
v_gsber = t_type2-gsber.
at end of gsber.
at end of bukrs.
zfi_tbl_qty-company_code = t_type2-bukrs.
zfi_tbl_qty-barea = v_gsber.
zfi_tbl_qty-comb = l_count.
if v_flag = 1.
zfi_tbl_qty-type = 'A'. " Item 1
endif.
if v_flag = 2.
zfi_tbl_qty-type = 'B'. " Item 2
endif.
if v_flag = 3.
zfi_tbl_qty-type = 'C'. " Item 3
endif.
if v_flag = 4.
zfi_tbl_qty-type = 'D'. " Item 4
endif.
insert zfi_tbl_qty from zfi_tbl_qty.
clear l_count.
endat.
endat.
endloop.
endform. " fill_int_tabHi,
After calling this FM:
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = filename
i_begin_col = 5
i_begin_row = 2
i_end_col = 6
i_end_row = 4000
tables
intern = t_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
*-> try following code:
if sy-subrc = '2'.
message 'File not Found' type 'I'.
leave list-processing.
endif.
Regards,
Kalyan -
Pop up before selection screen
hi all,
i need to give a pop up screen before the selection screen which will take the value for the number of records to be displayed. how to do this ?
thanks,
AmitYou could do something like this.
report zrich_0001.
data: value1 type spop-varvalue1.
data: answer type c.
parameters: p_check type c.
load-of-program.
check sy-ucomm = space.
call function 'POPUP_TO_GET_ONE_VALUE'
exporting
textline1 = 'Number of Records:'
* TEXTLINE2 = ' '
* TEXTLINE3 = ' '
titel = 'Number of Records'
valuelength = '5'
importing
answer = answer
value1 = value1.
start-of-selection.
But I really don't understand your requirement. Why not ask for this value on the selection screen itself?
Regards,
Rich Heilman -
Validation check in selection screen
Hi experts,
I have a selection screen in which there are 2 radio buttons S1 n S2, and a text field (Parameter) namely P_PATH.
I am using a method (CALL METHOD cl_gui_frontend_services=>file_save_dialog) for selecting a file to save some
data in the XLS format.
Once the user selects S2, and presses the F4 help in the parameter P_PATH, this method is called.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = p_title
default_file_name = p_filename
file_filter = l_file_filter
initial_directory = p_download_path
CHANGING
filename = p_filename
path = p_download_path
fullpath = p_full_path
user_action = g_user_action "save or cancel
EXCEPTIONS
OTHERS = 1.
The g_user_action given here has a value of 9 in case the user selects the CANCEL button in the pop up that asks for the file name to be given for saving the file.
My req. is that when g_user_action = 9. then the selection screen should be displayed back, with the S1 being selected (instead of the earlier S2).
I have done the below coding, but its not working. Is there something that I am doing incorrect?
SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
PARAMETERS: s1 RADIOBUTTON GROUP rad2 DEFAULT 'X' USER-COMMAND ac,
s2 RADIOBUTTON GROUP rad2.
SELECTION-SCREEN: END OF BLOCK b4.
DATA: g_s1 type c.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
PERFORM get_download_path
AT SELECTION-SCREEN OUTPUT.
if g_s1 = 'X'.
s1 = 'X'.
s2 = ''.
endif.
FORM get_download_path
the above method is called**
IF g_user_action = 9.
g_s1 = 'X'.
exit.
endif.
ENDFORM.Hello Ajay,
As Advait has pointed out already AT SELECTION_SCREEN OUTPUT event (or the PBO) does not trigger after the ON VALUE-REQUEST (or the POV) event.
You have to use the FM: DYNP_VALUES_UPDATE to update the selection-screen value.
FORM get_download_path
** the above method is called**
data: dyname like d020s-prog,
dynumb like d020s-dnum.
data: it_dyfields type standard table of dynpread,
st_dyfields type dynpread.
IF g_user_action = 9.
dyname = sy-repid.
dynumb = sy-dynnr.
CLEAR s2.
s1 = 'X'.
move 'S1' to st_dyfields-fieldname.
move 'X' to st_dyfields-fieldvalue.
append st_dyfields to it_dyfields.
move 'S2' to st_dyfields-fieldname.
CLEAR st_dyfields-fieldvalue.
append st_dyfields to it_dyfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = dyname
dynumb = dynumb
tables
dynpfields = it_dyfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
check sy-subrc eq 0.
endif.
ENDFORM.
Check this out.
BR,
Suhas -
Date interval check on selection-screen
Hello, How can I check on the selection-screen if the s_date (high part) is filled out or not? s_date is an interval. If the high field is not filled, the program don't allowed to run. So I have to check it is a single date or an interval.
if u r referring to a field of date in select options just dont ignore the case that if u r not entering any field in the high interval its value will be '00000000'.
u need to check this .
execute the code .
select-options : s_date for sy-datum.
initialization.
at selection-screen .
if s_date-high eq '00000000'.
message e999(zd) with 'Cannot Run'.
endif.
regards,
vijay -
Grey out the input field as soon as check box checks on selection screen!
HI Experts,
In my report selection screen I have input_field1, input_field2, check_box1. Both input fields are mandatory fileds.
My requireemnt is: If user as soon as checks the check_box1, the first input_field1 must go grey out (not allow allow to enter)!
So I have assigned a user command to check box and assigned a modif-ID to the input_field1
and wrote a LOOP AT SCREEN code as below,
PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1 TYPE c LENGTH 10,
p2 TYPE c LENGTH 10,
p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p4 TYPE c LENGTH 10 MODIF ID bl2,
p5 TYPE c LENGTH 10 MODIF ID bl2,
p6 TYPE c LENGTH 10 MODIF ID bl2.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF show_all <> 'X' AND
screen-group1 = 'BL2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
But,am getting an error message saying "Enter all required fields"
Pls. let me know how to fix this?
Thank youI assume P1, P2 and P3 are marked as obligatory.
You cannot achieve that. But here is an alternative to achieve a similar functionality.
AT SELECTION-SCREEN.
CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm = 'SJOB' OR sy-ucomm = 'PRIN'.
IF p1 is INITIAL or P2 is INITIAL or P3 is INITIAL.
MESSAGE 'Enter all required fields' TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF show_all = 'X' AND
screen-group1 = 'BL2'.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP. -
Issuing of remuneraton statement on the checking of selection screen field
Hi Experts ,
Verify the field XYZ in the selection screen.
- If the field is not checked, the remunerations statements should be issued in this sequence order:
u2022 PA code
u2022 PSA code
u2022 Cost Center code (KOSTL)
u2022 Employee number (PERNR
please help to write code for the above requirement .
thanks
Harishsolved
-
Can we display a message before selection screen
hi experts,
I need to give a message to user's to give information abt the selection screen .
like select values between 1000 to 2000 only.
date must be todays date.
so how i can display a message before the selection screen is displayedtry like this it may be useful for you.
load-of-program.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
TITEL = 'Selection screen info'
TEXTLINE1 = 'Material no should be between 1000 and 2000'
TEXTLINE2 = 'Plant should be 1000'
* START_COLUMN = 25
* START_ROW = 6
start-of-selection.
if you want some more fields to pass then search popup* fn module in se37 which can be useful 4 you.
regards
shiba dutta -
Authority check in hr payroll infotype report
Hi all,
We have developed a report which gives infotypewise employee details.here we are checking authority for reading employee data.we are applying authority check at selection-screen and while reading the data from database tables.following is the sample code.
do .
if s_abkrs-high < s_abkrs-low.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs-high
id 'ACTVT' field '01'
id 'ACTVT' field '02'.
if sy-subrc <> 0.
message id 'ZHR_ERRMSGS' type 'E' number '292' with s_abkrs-low.
endif.
exit.
endif.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs-low
id 'ACTVT' field '01'
id 'ACTVT' field '02'.
if sy-subrc <> 0.
message id 'ZHR_ERRMSGS' type 'E' number '292' with s_abkrs-low.
endif.
s_abkrs-low = s_abkrs-low + 1.
enddo.
my senior says this code is right but it is not checking authority for all infotypes.can anyone suggest what changes are required in this code so that it will check authority for all infotypes.
Thanks in advance.
Regards,
HarshadaHi ,
A select-option will have a structure with four fields (sign , option , low , high) .
So if you want to use your below code : you cannot check authority.
loop at s_abkrs.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs <-- is an internal table
id 'ACTVT' field '01'
id 'ACTVT' field '02'.
if sy-subrc 0.
message id 'ZHR_ERRMSGS' type 'E' number '292' with s_abkrs-low.
endif.
endloop.
The other option is :
If your select option has values only in low ... then you can loop thru it ...
loop at s_abkrs.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs-low
endloop.
Regards,
Srini. -
Hello ppl,
On my selection screen for a report, I have the field Sales Org. SELECT-OPTIONS: s_vkorg FOR gs_selscr-vkorg
OBLIGATORY, "Sales Org.
I need to check whether the user has the authorization for the selected sales organisations. So, I am using:
AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
ID 'VKORG' FIELD s_vkorg
ID 'ACTVT' FIELD '03'.
IF sy-subrc NE 0.
MESSAGE e013. " No authorization
SET CURSOR FIELD 'S_VKORG-LOW'.
ENDIF.
But, will this code handle a range of sales organisations?
Also, how will I be able to display an error message displaying the sales org for which the user has no authorization?
Please help.
Thanks.selection-screen begin of block b1 with frame .
select-options : so_bukrs for bsid-bukrs obligatory,
so_kunnr for bsid-kunnr,
so_hkont for bsid-hkont,
so_prctr for bsid-prctr ,
so_ktokd for kna1-ktokd.
selection-screen end of block b1.
initialization.
*Clearing the work area.
clear gs_bsid.
Refreshing the internal tables.
refresh gt_bsid.
*comm1 = 'Post Dt'.
*comm2 = 'Doc Dt'.
*comm3 = 'Bline Dt'.
*******AUTHORITY-CHECK ***********************************************
at selection-screen .
call function 'ZCAGL_COUNTRYCODE'
exporting
IM_WERKS =
IM_SPART =
IM_PRCTR =
im_bukrs = so_bukrs-low
importing
e_land1 = e_land1.
if e_land1 ne 'IN'.
message i004(yfi02) with 'This Company Code' so_bukrs-low
'doesn''t belong to INDIA'.
leave program.
else.
authority-check object 'ZPRCHK_NEW' :
id 'BUKRS' field so_bukrs-low.
if sy-subrc ne 0.
message e001(yfi02).
leave program.
endif.
endif.
if so_prctr-low is not initial.
call function 'ZCAGL_COUNTRYCODE'
exporting
IM_WERKS =
IM_SPART =
im_prctr = so_prctr-low
IM_BUKRS =
importing
e_land1 = e_land1.
if e_land1 ne 'IN'.
message i004(yfi02) with 'This Profit center'
so_prctr-low 'doesn''t belong to INDIA' .
leave program.
else.
authority-check object 'ZPRCHK_NEW' :
id 'PRCTR' field so_prctr-low.
if sy-subrc ne 0.
message e002(yfi02).
leave program.
endif.
endif.
endif.
this will help u....
Regards
Anbu -
Check box in ALV selection screen
Hi to all
I like to know how to create a checkbox in the input screen of an ALV.What do you mean by ALV check box selection screen?
ALV and selection screen check box( you are mixing two cases in your Question).
You need use the Function moduel in the user command to get the updated data.
in fieldcatalog you have to use INPUT = 'X' and EDIT = 'X' for the columns which ever you want edit.
GET_GLOBALS_FROM_SLVC_FULLSCR
follow the sample code.
REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT TYPE SLIS_LAYOUT_ALV,
X_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
CHK(1),
color(4),
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'CHK'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
X_FIELDCAT-INPUT = 'X'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-CHECKBOX = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-HOTSPOT = 'X'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_LAYOUT-info_fieldname = 'COLOR'.
*L_LAYOUT-ZEBRA = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
I_CALLBACK_PF_STATUS_SET = 'STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form STATUS
text
-->P_EXTAB text
FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
Pf status
SET PF-STATUS 'STATUS'.
ENDFORM. " STATUS
*& Form USER_COMMAND
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
DATA: GD_REPID LIKE SY-REPID, "Exists
REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
IF REF_GRID IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF_GRID.
ENDIF.
IF NOT REF_GRID IS INITIAL.
CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
ENDIF.
loop at itab where chk = 'X'.
itab-color = 'C300'.
modify itab index sy-tabix transporting color.
endloop.
RS_SELFIELD-refresh = 'X'.
break-point.
ENDFORM. "USER_COMMAND
Regards
Vijay Babu Dudla -
Problem in using at selection-screen output
Hai Frnds,
I am using 5 parameters in the selection screen . I am entering data in the 4 input fields. Then I am doing concatenate 4 fileds data into the 5th field in the event AT SELECTION-SCREEN OUTPUT, but my problem is When ever i click ENTER , then only 5th field is updating. With out ENTER key , Is it possible update 5th filed.
Thanks,
Kiran.Hi,
We can restrict the functionality of ENTER.
User the Concatenation in AT SELECTION-SCREEN EVENT
because AT SELECTION-SCREEN OUTPUT is triggered before
selection screen is displayed.Below code will definitly work.
Ex:
Tables:SSCRFIELDS.
At selection-screen.
IF SY-ucomm = ' '.
Clear SSCRFIELDS-UCOMM.
ENDIF.
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
CONCATENATE <FIELDS> INTO PARAMETER5.
ONLI is Function code of F8
' ' is for enter.
The above code will surely work.
Thanks. -
Hi all,
I have a problem with authority check in a report.
I have to access to a field in an infotype and subtype.
I have all authorizations for this subtype and infotype.
I'm trying to retrieve this data from an employee, but this employee has informed another subtype in this infotype where I haven't permisions.
As in the source code there aren't access to this subtype where I haven't permisions, I found that the systems make it's authority check before the START-OF-SELECTION in class CL_HRPAD00AUTH_CHECK_STD, method IF_EX_HRPAD00AUTH_CHECK~CHECK_AUTHORIZATION.
The system takes the employee number, gets all its informed infotypes and subtypes and perform the authority check for my user, so I can't access to this employee information.
I think this authority check is made by the use of PNP logical database.
Is there any way to avoid this authority check?
Regards,
Angel CepaHi Angel Cepa,
first of all: maybe you can use logical database PNPCE, because PNP is obsolet.
Anyway, please refer to the documentation of PNPCE (transaction SE36), that may solve your problem.
PNP/PNPCE knows two ways to check authority:
1. If no authorization exists for even one individual data record of one of the infotypes used, processing of the personnel numbers is terminated by default (switch "PNP_SW_SKIP_PERNR" = Y)
2. If you set this switch (at the INITIALIZATION or START-OF-SELECTION events) to N, no more personnel numbers (without authorization) are skipped. Only the data records for which no authorization exists are rejected (that is, not made available).
So, simply set the switch, mentioned above, to "N" and you will have access to this employee (except the infotype-records, you don't have authority for).
Regards
CHRIS -
Selection screen display after role menu selection
Hi,
I have strange situation:
- running a query on the WEB from Query Designer 3.5 first display a selection screen and then the data - what is OK or expected
- but we created an application in WAD with just role menu - if we pick the same query, from the same role - the query is displayed without selection screen. After that the variable screen can be displayed, but we needed before the query is actually displayed (some variable are filled with user exit on selection screen, ...)
Any idea?
Thanks,
TomazTomaz,
Have you checked the webtemplate properties in WAD where you can check - force selection screen display?
Bob
Maybe you are looking for
-
PSE 8 doesn't see color changes made in Camera Raw
I have just installed PSE 8 and am getting started. I have made changes to an image in Camera Raw through Bridge and when I import it to PSE 8 it doen't have the changes. It shows the original image. What do I do to connect the two? Also Bridge "
-
How to setup the Microsoft communicator
Hi What is Microsoft communicator? Is it a messenger client? Guys could you please tell me how to setup the Microsoft communicator (in details) what to write in the URL field , etc Nokia E72-1 Black firmware : 053.001 of 26 of nov 2010
-
How do you display a portion of a webpage in url iview
Hi all My requirement is just to display login template of yahoomail in my iView.Apart from the connections to webserver and configurations,Can anybody tell me how to display a login screen only.I should not display any Ad's and info except login tem
-
Hello Folks I have a problem in availability check . When i raise a sale order for material A quantity 1500 and when i have 1000 quantity of material A in stock, there are two schedule lines, and on the order creation date there is 0 quantity confirm
-
BI : Mapping tranformations
Hi Gurus , I have created an ODS ZBCKSPLT (target) which should be mapped to two cubes ZPS_C04(Source) & 0PS_C04(Source). There is field ZOPENORSP ,0OPENORDVAL , ZINVSPLT in ZBCKSPLT which should be populated. but the problem is there is no source