Authorization via selection screen
Hi guys,
is it possible to restrict an user to see just his
authorized values in selection screen variable entry
rather than all values when he uses F4 function.
Thanks,
Your help will be greatly appreciated
Hi,
No, It is possible with Authorization variable also .So, Make sure that the Variable has tick mark for "Rady for input".So there will be prompt for entering values for this variable. If the user selects F4 on this variable, he can see only alloted values through the role. If he typed something other than available in F4, he will get message that he is not authorized.
With rgds,
Anil Kumar Sharma .P
Similar Messages
-
SUBMIT Zxx VIA SELECTION-SCREEN AND RETURN
SUBMIT Zxx VIA SELECTION-SCREEN AND RETURN
and it's dont make f8 whywa_rspar-selname = 'P_DEALNO'.
wa_rspar-kind = 'S'.
wa_rspar-sign = 'I'.
wa_rspar-option = 'EQ'.
wa_rspar-low = T_FORDER-DEAL_No.
APPEND wa_rspar TO rspar.
Submit ZSDR_SALESORDER_DISPLAY
using Selection-screen '1000'
WITH SELECTION-TABLE rspar.
orelse
*submit RSEIDOC2 with docnum-low = docnum with
credat-low = credat
and return. -
SUBMIT via selection screen and return gives dump
Hi Guys,
When i have used SUBMIT via SELECTION SCREEN and RETURN, it gave me the selection screen and subsequent report is executed properly without an error and when i pressed back button, it went to selection screen without any issues but the problem is when i press back from the selection screen it gives me a dump. Could you guys think of what would be the probelm.
Thanks in Advance.
Santosh.Hi Santhosh,
What is the dump u r getting? I tried like this and is working file.
Report1
REPORT Z75694TEST1.
PARAMETERS po_1 TYPE c.
WRITE po_1.
SUBMIT Z75694_TEST VIA SELECTION-SCREEN AND RETURN.
Report2
REPORT Z75694_TEST .
PARAMETERS: po_2 TYPE c.
WRITE po_2.
Thanks,
Vinod. -
Problem in Submit via selection screen statement
Dear Experts,
I have designed selection screen and a dialog screen 100. I am passing the selection screen values to dialog screen using Selection screen via selection screen statement. When i tried to change the values in dialog screen, it is not allowing me to do so and the values are not refreshed.
I have searched the SDN Forum, but not able to find the suitable thread.
Regards,
Ramesh Manoharan
Edited by: ramesh.manoharan on Mar 17, 2010 1:03 PMHi,
I have used the below statement to pass values the values from selection screen to dialog screen (Created as an Executable program)
Submit <pgm> via selection screen
with ...... .
Dialog screen is created as an executable program where i have created two subscreen area and populating the Selection Screen as subscreen by using the below statement:
selection-screen begin of screen <subscreen no.> as subscreen.
selection-screen end of screen <subscreen no.>.
The problem i am facing is that the values of selection screen are getting populated in the dialog screen. But when i tried to change the input values in the dialog selection screen. I am unable to do that and it is not showing the new entered values. Only the previous values are shown (got from selection screen from Submit via selection screen statement).
Kindly let me know where i am going wrong ? Kindly help me to overcome the problem .
Regards,
Ramesh Manoharan -
Prob in Submit Report via Selection screen.
Hi,
I have to submit a report via selection screen.
The report name is detemined at run time.
This i am able to handle easily as we can use SUBMIT (V_PROG)...
WHERE V_PROG contains the name of the report that i get at runtime...
Now the issue :::::::
I have to also populate a select-options on the called report on submit.
usually this is done by :
SUBMIT (V_PROG)
name of select-option in itab...
However in my case the name of the <name of select-option> is also detemined at runtime say PNPPERNR.
Now if i use any variable / field symbol for the name of the select - option (like for the called program), it does not work (the called report does not have the values i populate in ITAB for the particular select-option)
I have also tried Macro but cant find solution...
ANY IDEAS ??Hi Anuj,
When you are getting the report name in runtime, you can also get the report selection screen information during runtime.
Now how are you going to decide which values you will move to which selection screen variables of which report? If you have a way to determine this, then here is a program that works on that assumption.
REPORT ztest1 .
DATA: i_seltab TYPE TABLE OF rsparams WITH HEADER LINE,
i_selections_info TYPE TABLE OF selinfo WITH HEADER LINE.
DATA: v_report LIKE sy-repid,
v_matnr LIKE mara-matnr.
PARAMETERS: p_rep1 RADIOBUTTON GROUP rad DEFAULT 'X',
p_rep2 RADIOBUTTON GROUP rad.
SELECT-OPTIONS: s_matnr FOR v_matnr.
START-OF-SELECTION.
IF p_rep1 = 'X'.
*-- some criteria to determine the name of the report
v_report = 'ZTEST2'.
ELSE.
v_report = 'ZTEST4'.
ENDIF.
*-- get the parameters for the report
CALL FUNCTION 'RS_SELECTIONS_DESCRIPTION'
EXPORTING
report = v_report
TABLES
selections_info = i_selections_info
EXCEPTIONS
no_selections = 1
report_not_existent = 2
subroutine_pool = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT i_selections_info WHERE name = 'S_MATNR'.
*-- some criteria based on which, move the values from this program
* to the called program
CLEAR i_seltab.
i_seltab-selname = i_selections_info-name.
i_seltab-kind = i_selections_info-kind.
i_seltab-sign = 'I'.
i_seltab-option = 'EQ'.
i_seltab-low = s_matnr-low.
i_seltab-high = s_matnr-high.
APPEND i_seltab.
ENDLOOP.
IF NOT i_seltab[] IS INITIAL.
SUBMIT (v_report) VIA SELECTION-SCREEN
WITH SELECTION-TABLE i_seltab .
ENDIF.
If this works for you, please reward and close the post.
Regards,
Srinivas -
Call Program from another Program using varient via Selection Screen
I am calling a standard report from my Z Program via Selection screen.
Is there any way to hide the Execute button that is seen when we see the called program selection screen?Hi Shyam,
Thanks for the quick reply.
But my requirement is to show the selection screen of called program as i need to make some values changes in the selection Screen.
However, the user can accidently click the execute button which i dont want thats why i need to hide the execute button.
My aim is to change values of selection screen but nto execute it.
Is it possible? -
SUBMIT RPCDTCU0_CE VIA SELECTION-SCREEN just wont work
Hi all,
I use SUBMIT RPCDTCU0_CE VIA SELECTION-SCREEN
with PNPTIMED = '1'
with PNPXABKR = 'US'
with PNPPABRP = '8'
with PNPPABRJ = '2009'
with PNPPERNR-LOW = '73265'
with PNPABKRS-LOW = 'US'
with ZLSCH-LOW = 'C'
with TEST = 'X'
with UPD_PCL2 = 'X'
with SW_ADV1 = 'X'
with NEWLOG_D = 'X'.
The moment I run the progrm, it receive "program terminated message"
Any other idea on how I should run the program and get to pass the value into the program?Hi,
Try using extension of selection table instead of wtih parameters..
[WITH SELECTION-TABLE rspar]
Nag -
Submit via selection-screen - Return automatically
Hello so far I have a code ....
<b> SUBMIT (p_pname) EXPORTING LIST TO MEMORY AND RETURN
USING SELECTION-SET p_vname.</b>
Now what this does is self explanatory. Afterwards I just write the list to the program with the submit statment.
However, instead of using a variant. I would like to have an option that it goes to the selection-screen where the user can input the parameters and return back to the original program afterwards.
When I tried this ...
<b>SUBMIT (p_pname) VIA SELECTION-SCREEN
EXPORTING LIST TO MEMORY AND RETUR</b>
What happens is that it goes to the selection-screen, but stays in that program which I submitted and sends the report there. Its only when I press the back button is when it Exports list to memory.
As mentioned my desired process is that after the selection-screen process is done. You return back and the report is generated there. Thank you every one and good day.Chad,
As you need the selection screen of the calling program, unless you exit out of the report, its not going to come out of the program. Once the program is displayed, you will hav explicity come out of it.
Regards,
Ravi
Note : Please mark the helpful answers -
How to set cursor after submit via selection-screen
hi guys,
i would like to set cursor to certain field, after submit via selection-screen.
eg.
SUBMIT z_mm_kbr_gr_label_01
VIA SELECTION-SCREEN
WITH p_mblnr = p_mblnr
WITH p_zeile = p_zeile
WITH p_gjahr = p_gjahr
WITH p_ccode = p_ccode
WITH p_dcode = p_dcode
WITH p_crt = p_crt
WITH p_print = p_print.
i want to set cursor field 'p_ccode' after going back to
z_mm_kbr_gr_label_01. the program always go to the first field on the screen whatever i do.
may i know how to do this?
thanks.Hi,
Please try like below .
at selection-screen output.
SET CURSOR FIELD 'P_CCODE' . -
Export ALV with the current layout to excel via selection screen
Hello,
I want to export my ALV table with my default layout, but from the selection screen. In other words i want the function "List ->export -> spreadsheet" to be done via the selection screen when the user push the "run" button.
Is that possible ?
Thx in advance.Hi,
Provide a Check box or radio button in the Selection Screen.
Then if it is marked then download the content of the internla table into an Excel using the below code.
types : begin of header,
head(30) type C,
end of header.
data : t_header type table of header,
wa_header type header.
wa_header = 'Purchase order'.
append wa_header to t_header.
wa_header = 'Company Code'.
append wa_header to t_header.
(Like this u can add the header names according to the download layout ).
DATA: l_filename TYPE string,
l_filen TYPE string,
l_path TYPE string,
l_fullpath TYPE string,
l_usr_act TYPE I.
l_filename = SPACE.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
DEFAULT_FILE_NAME = l_filename
CHANGING
FILENAME = l_filen
PATH = l_path
FULLPATH = l_fullpath
USER_ACTION = l_usr_act
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF sy-subrc = 0
AND l_usr_act <>
CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = l_fullpath
FILETYPE = 'DAT'
TABLES
DATA_TAB = T_DOWNL
FIELDNAMES = T_header
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Edited by: Sumodh P on Apr 20, 2010 10:09 AM -
Exporting ALV with selected layout to excel via selection screen
Hi All,
I have given an option on my selection screen for layout selection that are there for the report and to download the data in the same layout format when the user Runs the report. I am successful in doing that except for one thing - the field order is not in the right arrangement in the downloaded excel.
Ex - i have fields f1, f2, f3 and f4 in the standard default format and then i set up a layout as f3, f1, f4. Now the downloaded excel has it in the order f1, f3 and f4. So the selected fields are there in the excel but not in the same order as layout.
Please suggest what i am missing here. The code is something like this
*C-- If display variant was selected, read field catalog from variant
IF NOT gs_disvariant-variant IS INITIAL.
*C-- Read field catalog of display variant
LOOP AT gt_fieldcat INTO ls_fieldcat.
MOVE-CORRESPONDING ls_fieldcat TO ls_fcat.
APPEND ls_fcat TO lt_fcat_def.
ENDLOOP.
CALL FUNCTION 'LT_FC_LOAD'
EXPORTING
is_variant = gs_disvariant
i_tabname = 'GT_ITAB'
IMPORTING
et_fieldcat = lt_fcat
CHANGING
cs_layout = ls_layout
ct_default_fieldcat = lt_fcat_def.
LOOP AT lt_fcat INTO ls_fcat.
MOVE-CORRESPONDING ls_fcat TO ls_fieldcat.
APPEND ls_fieldcat TO lt_fieldcat.
ENDLOOP.
ELSE.
lt_fieldcat[] = gt_fieldcat[].
ENDIF.
*C-- Remove fields from output which are hidden in the layout
DELETE lt_fieldcat WHERE no_out = 'X'.
*C-- Create Header Line from field catalog
LOOP AT lt_fieldcat INTO ls_fieldcat.
l_tabix = sy-tabix.
IF l_tabix = 1.
ls_data-text = ls_fieldcat-seltext_l.
ELSE.
CONCATENATE ls_data ls_fieldcat-seltext_l
INTO ls_data-text SEPARATED BY l_tab.
ENDIF.
ENDLOOP.
APPEND ls_data TO lt_data.
*C-- Export Data
LOOP AT gt_itab INTO gs_itab.
CLEAR: ls_data.
LOOP AT lt_fieldcat INTO ls_fieldcat.
CLEAR: l_field.
ASSIGN COMPONENT ls_fieldcat-fieldname OF STRUCTURE
gs_itab TO <fs_field>.
IF sy-tabix = 1.
ls_data-text = <fs_field>.
ELSE.
MOVE <fs_field> TO l_field.
CONDENSE l_field.
CONCATENATE ls_data l_field
INTO ls_data-text SEPARATED BY l_tab.
ENDIF.
ENDLOOP.
APPEND ls_data TO lt_data.
ENDLOOP.Hello All,
This has been solved. I was not doing the sort here on the column position.
SORT lt_fieldcat BY col_pos.
*C-- Create Header Line from field catalog
LOOP AT lt_fieldcat INTO ls_fieldcat.
l_tabix = sy-tabix.
IF l_tabix = 1.
ls_data-text = ls_fieldcat-seltext_l.
ELSE.
CONCATENATE ls_data ls_fieldcat-seltext_l
INTO ls_data-text SEPARATED BY l_tab.
ENDIF.
ENDLOOP.
Regards,
Rakesh -
Report writer Authorization on selection screen
Hi All,
In transaction GR55 (to execute the report group), when the user enters the selection criteria for the report group, I want to validate the
'Profit Center group' and 'Profit center values' fields. The way it should be validated is, it should check the entry for the 'profit center group' or 'values' entered against the 'user name' in a Ztable for that user. If there is no entry in the Ztable matching that 'User name' and 'profit center group or values' , it should give an error message. I have seen that there is a user exit 'EXIT_SAPFGRWX_001' (Authorization check on initial screen).
But my problem is, in this functional module (code is shown below), the table 'I_T_SELSCREEN_PARAMS' has only one filed for both 'Profit center Group' and 'profit center values'.
1. when I enter 'Profit center group' 'ABC' in my selection criteria, I_T_SELSCREEN_PARAMS has following values.
I_T_SELSCREEN_PARAMS - selname = '%8A-PCHI'.
I_T_SELSCREEN_PARAMS-low = '01061000ABC'.
2. When I enter 'Profit Center Values' as some '3001000' to '3001020' inn the selection criteria, I_T_SELSCREEN_PARAMS has following fields,
I_T_SELSCREEN_PARAMS-selname = '%8A-PCHI'
I_T_SELSCREEN_PARAMS-low = '0002$ZSLP&8A-PCHI'.
here ZSLP is the report group name.
I don't understand how to get the values '3001000' to '30001020' into my user-exit in case 2.
Is there any other way of doing this? has anyone used this user-exit? Please help me.
Thanks,
Krishna
FUNCTION EXIT_SAPFGRWX_001.Hi Krishnakumar Ramadoss,
For your requirement to have authorization, SAP provides facility in report writer/painter to give authorization groups.
Go to GR52.
Input your report group name.
Click on Header (Cap symbol) or F5.
At this header screen , you can see a field where you can provide Authorization group.
Try this. It may help you.
As a note:
Report writer / Report painter reports are reports which are created with zero percent coding.
The SAP generated program (E.g: GP3ICYT39FHJLOYBA2025DBAE1V213) cannot be changed or modified.
The only coding that you can do in a report writer are the formula's and logic that you can write in variables of the report writer / painter.
Regards,
Subin John -
Truncation of selection screen field in reports
Hi,
Is there any way to avoid truncation of selection screen fields in ABAP reports? For eg, I declare:
SELECT-OPTIONS: s_test FOR ztest-test_field NO INTERVALS
The length of this field in the table is 30 chars. However, on displaying the field via selection screen, this gets truncated to around 18 or so. How do I avoid this as I need to display the full length of the field?Hi,
Try this
Tables : makt.
select-options maknr for makt-maktx.
now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok
if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the
Screen Attributes
You also get an Information Message just ignore that.
Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.
Regards,
Shirisha -
Passing selection screen values to the next report using CALL TRANSACTION
Hi experts,
I have 2 reports. In the first report i have the 3 input fields in the first report, how do i pass the values to the next report which is transaction: ZKKBC_PKO_2.
I want to display in the next report the selections that the user previously selected.
First report:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: COMP LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
PARAMETERS: PERIOD LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
PARAMETERS: YEAR LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
SELECTION-SCREEN END OF BLOCK b1.
CALL TRANSACTION 'ZKKBC_PKO_2'.
Anyone can help me?
Thanks,
LawrenceHi experts,
What i did is this:
Using SET PARAMETER
in the first report
SET PARAMETER ID 'WRK' FIELD COMP.
SET PARAMETER ID 'VPE' FIELD PERIOD.
SET PARAMETER ID 'GJR' FIELD YEAR.
CALL TRANSACTION 'ZKKBC_PKO_2'.
Second Report
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: WRK LIKE AFRU-WERKS.
PARAMETERS: VPE LIKE COEP-PERIO.
PARAMETERS: GJR LIKE COEP-GJAHR.
SELECTION-SCREEN END OF BLOCK blk1.
Using SUBMIT
First Report
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: COMP LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
PARAMETERS: PERIOD LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
PARAMETERS: YEAR LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
SELECTION-SCREEN END OF BLOCK b1.
SUBMIT ZCO_PRDCOST_ACTUAL_2 VIA SELECTION-SCREEN USING SELECTION-SETS OF PROGRAM 'ZCO_PRDCOST_ACTUAL_1' AND RETURN.
Second Report:
GET PARAMETER ID 'WRK' FIELD comp.
GET PARAMETER ID 'VPE' FIELD COEP-PERIO.
GET PARAMETER ID 'GJR' FIELD YEAR.
Either this 2 ways i still cannot get the first report selection values on the 2nd report. Can someone help me see if my codes is correcT? -
Dynamic check box creation in selection screen
Hello,
I am trying to put up some check boxes dynamically in a selection screen. The number: of check boxes required and the 'checkbox label text' is to be retrieved from a database table. I have retrieved all these values in AT SELECTION-SCREEN OUTPUT event. But, I dont know how to create check box parameters using these dynamic values. Please help..hi Giffin,
Create a program with name 'Z_13317_DYN_CHKBOX' and paste the following code in it. Also make ensure that an include with name 'Z_13317_DYN_INCL' is not existing earlier because this program will be overwritten each and everytime.
Z_13317_DYN_CHKBOX will take an integer as an input. After giving input, click on the button on selection screen.
Suppose, if you have given 3 as input and if you have clicked the button, then 3 checkboxes will be generated on your selection screen.
REPORT Z_13317_DYN_CHKBOX.
types :begin of t_itab1,
line(72),
end of t_itab1.
data: incl type table of t_itab1 with header line.
parameters: p_tab type i,
p_frst type c no-display.
selection-screen begin of line.
selection-screen: pushbutton 2(20) but1 user-command cli1.
selection-screen end of line.
include z_13317_dyn_incl if found.
initialization.
at selection-screen output.
if p_frst = ' '.
p_frst = 'X'.
perform crt_dyn_incl.
endif.
at selection-screen.
case sy-ucomm.
when 'CLI1'.
perform crt_dyn_incl.
endcase.
*& Form crt_dyn_incl
* text
form crt_dyn_incl .
perform populate_incl.
perform del_incl.
insert report 'Z_13317_DYN_INCL' from incl.
commit work.
submit z_13317_dyn_chkbox via selection-screen with p_frst = p_frst.
endform. " crt_dyn_incl
*& Form del_incl
* text
form del_incl .
call function 'RS_DELETE_PROGRAM'
exporting
program = 'Z_13317_DYN_INCL'
suppress_checks = 'X'
suppress_popup = 'X'
with_cua = ' '
with_documentation = ' '
with_dynpro = 'X'
with_includes = ' '
with_textpool = ' '
with_variants = ' '
if sy-subrc <> 0.
endif.
endform. " del_incl
*& Form populate_incl
* text
form populate_incl .
data: v_cnt type n.
do p_tab times.
v_cnt = v_cnt + 1.
incl-line = 'parameters: '.
concatenate incl-line 'p_chk' v_cnt into incl-line.
concatenate incl-line 'as checkbox.' into incl-line separated by space.
append incl.
clear incl.
enddo.
endform. " populate_incl
Regards,
Sailaja.
Maybe you are looking for
-
Best way to edit out a white background and make a transparent gif
I have an image I purchased but need to make it into a gif. It already has a white background but when I use the magic wand it chops little bits of the edge of the images up. Is there an easier way of editing the white out of this background and maki
-
Content Objects or XPATH in Header mapping..!! How to provide??
Hi All, Iam doing B2B scenarios where i need to pass the Party name by based on the content of the message in the header mapping. I think we can do by using Content Objects or XPATH in Header mapping, but the structure is not displaying in the Conten
-
ISight's color is off and has a horrible white-balance
Basically, is there some super secret ninja way of calibrating an iSight? I seem to remember there being one but I've checked Skype, iChat, Photo Booth and looked for a system preference but nothing pops up. It seems the only way I can get it to bala
-
External HD - Power Supply vs Portable
Hi guys, I know this isn't the ideal forum to post in, but I couldn't find a better one - sorry! My question is - what is the advantage to purchasing an external hard drive that utilizes an external power supply, versus just purchasing a portable one
-
Show mail attachments as icons
How to permanently show mail attachments as icons?