Omiting authorizations in a call transaction
Hello,
is there any way to omit the authorizations to execute a call transaction?
I mean, for example i don´t have authorization to modify an infotype but throug a program i have to be able to modify it. With a call transaction authorizations are checked and i want to know if there is some way to execute the program without checking authorizations.
Thanks
so why do you wanna cheat?
if you need an authorization, goto your authorization administrator and ask for it.
If you dont get it though, i hence there are good reasons.
Similar Messages
-
Authorization check in BDC call transaction
Hello gurus,
My requirement is MB1B t-code is not authorized for basis users but only for end user, but when I create a Z-program with a BDC call transaction MB1B it is allowing access.
How is this possible? My boss will ask me this question and I don't know the answer.
Regards,
Krishna
Edited by: Julius Bussche on Dec 2, 2008 10:54 AM
Several errors corrected...
Edited by: Julius Bussche on Dec 2, 2008 2:44 PMHi Krishna Moorthy
To the best of my knowledge you need check the authorization in your program
use AUTHORITY CHECK
for further info take the help of KEY word documentaion
Regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Dec 2, 2008 10:20 AM -
Call transaction authorization
Hello
Sometimes when we did not have the relevant authorisations, we used to create a small ABAP to do a call transaction to that particular transaction and we used to be able to get through the authorization check. For eg if we did not have SM59, the code will be CALL TRANSACTION SM59.
But as I understand there is some way to prevent this as well. Can any security experts shed some light on this?
Thnx in advance
DamuDamu,
We had a similar situation with one of the DMS transactions. Please check note 358122 for a work around.
In short this is what we did
For Call Transaction authorizations. Goto Transaction SE97 and execute change mode for the transaction from which ur call transaction is done. Add the call transaction 'transaction' and set it to check or P
The note is very detailed and explains things better.
Hope this helps
Regards,
Vani -
SolMan 4.0 CHaRM / CRMD_ORDER: Authorize Change Request by CALL TRANSACTION
After creating a Change Request I need to execute the <b>action "Authorize"</b> by some kind of CALL TRANSACTION but until now I have not found a solution for this. There are a few forum questions similar to this one but all I've seen are still not answered.
The problem is caused by the <b>Toolbar Control</b> in screen "Edit: Normal Correction nnn": the dropdown and select actions are not recorded by the Batch Input Recorder and are not executed, the following function code "SAVE" therefore does not work as needed (thus creating the CRM service process and Task List).
To find out what the <b>event handling</b> really does in order to make SAVE work is handicapted by this: I have not been successful in debugging the execution of the event handler.
Before I start to search for more details (which might turn out as a very time consuming advanture) I would like to ask for some help of you. If you have any idea on how to solve the problem, sharing your expertise would be appreciated. Thank you.No further interest in this topic
-
Authorization for call transaction in BDC
Hi,
How can I avoid authorization during call transaction in BDC. Is possible to fullfill data from transaction if user has no authorization to it?
regards,
J.Hi, I found solution to my problem here: http://sap.ittoolbox.com/groups/technical-functional/sap-security/transaction-security-2711921
Thanks everyone for help.
J. -
ABAP prog with Call Transaction to SU01 will not add roles in a CUA client
I am modifying a current ABAP program that works in a non-CUA client to hopefully execute in a CUA client. This program performs a Call Transaction to tcode SU01 and adds roles to an existing user. I used tcode SHDB to identify the new BDC commands needed for CUA when using tcode SU01. When executing the program in the CUA client it does not save the roles to the user. There is no error message or abnormal termination.
When I assign the role to the same user that's referenced in my program directly with tcode SU01 it works fine. Its just when I run the ABAP program the role assigment is not retained. I opened a Customer Message with SAP and they referenced OSS Note 93802 and said this was a consulting question. My program is not abending as referenced in Note 93802, it just does not add the role.
Has anyone been able to get this to work in a CUA client?Hi,
it should be fairly simple to create a new ABAP using the BAPI's related to business object USER. Call BAPI_USER_CREATE1 to create the users, and BAPI_USER_LOCACTGROUPS_ASSIGN to assign roles in a CUA environment. It should go something like this:
[read file with user data into internal table wt_users]
[read file with role assignments into internal table wt_roles]
Loop at wt_users into wa_user.
[create LOGINDATA, ADDRESS and other structures for user in BAPI below, based on the data in wa_user]
call 'BAPI_USER_CREATE1'
exporting
username = [the user name from input file]
NAME_IN =
logondata = [structure for logondata]
password = [initial password value]
DEFAULTS =
address = [address structure created above]
[etc.]
if sy-subrc eq 0.
Assign roles for the user
clear wt_activitygroups. refresh wt_activitygroups.
loop at wt_roles into wa_roles where username = wa_user-username.
[build an internal table, wt_activitygroups, for system/role assignments for the user]
endloop.
call BAPI_USER_LOCACTGROUPS_ASSIGN
exporting
username = [the users name]
tables
activitygroups = wt_activitygroups
return = wt_return.
Endloop.
Ideally, you would have two input files: one with the user data (one record per user), and another one containing the data for the BAPI_USER_LOCACTGROUPS_ASSIGN (on the format USERNAME, SYSTEM, ROLENAME); one entry per line. You'd loop at the first table, containing the user data, then create the user, then loop at all entries in the system/role assignment file for the same username, building an internal table of role assignemnts; then call the second BAPI (provided there were any role assignments to assign for that user!)
Hope this makes sense. It's not rocket science really; you can omit most of the parameters of BAPI_USER_CREATE1, and the second BAPI is even simpler. You could consider validating the input data by checking entries in table USRSYSACT, which contains all valid system/role assignments as seen from the CUA system (this table gets updated every time you do a "text compare" from within SU01.
Regards,
Trond -
Problem with Call transaction method in function module
Dear Frndz,
I am converting its services into webdynpro.
I developed a rfc[function module] for travel management [TRIP] . In that rfc i used call transaction method[BDC] to upload the data. The same rfc will be called from the frontend[portal].It is working fine in development for whome se37 execution authorization was assigned. It is not working for other users. I hope it is something relevant to authorization .If suppose can i create a authorization object for this rfc and assign it to the profile.
Normally users can be given authorization to run the tcode.
similarly i want to give the authorization to be given users to execuste this funtion module.
huv can i do it ?? any suggestion.
Rgds.
sivaUse ST01 transaction to start authorization trace, you will then see what authorizations are missing (if your assumption is right of course, i.e. if it's really an authorization problem)
-
Hi ,
I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) .
Call transaction does gets executed without any error but it does not update any data.But when I run it through my user id it works absolutely fine .
I am not sure what is causing the issue
Security authorization?
RFC through Non Dialog user ?
Paramters missing in RFC ?
Paramatertes missing in call transaction option?
If anyone of you has faced a similiar issue then please let me know the path forward.
Thanks
VikasHi Vikas,
The problem is in Authorization? And check the mode of Process Synchoronus or asynchoronous? Both the RFC and CALL transaction should be Same /
Thanks
MAnju -
Passing select-options values using call transaction method
Hi Experts,
I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
TYPES: BEGIN OF t_tab,
bukrs TYPE bukrs,
werks TYPE werks_d,
matkl TYPE matkl,
END OF t_tab.
DATA: w_tab TYPE t_tab,
i_tab TYPE STANDARD TABLE OF t_tab.
SELECT-OPTIONS: s_matnr FOR marc-matnr.
Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
Thanks a lot.
Regards,
KrishanHi Krishan,
For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
... OPTIONS FROM opt
*Effect*
This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
DISMODE
Processing mode (comparable with the MODE addition)
UPDMODE
Update mode (comparable with the UPDATE addition)
CATTMODE
CATT mode (controlling a CATT procedure)
The CATT mode can have the following values:
' ' No CATT procedure active
'N' CATT procedure without single screen control
'A' CATT procedure with single screen control
DEFSIZE
Use standard window size
RACOMMIT
COMMIT WORK does not end CATT procedure
NOBINPT
No batch input mode, that s SY-BINPT = SPACE.
NOBIEND
No batch input mode after BDC data has been read
The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
'X' Yes
' ' No
If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
DISMODE from the MODE addition
UPDMODE
from the UPDATE addition
CATTMODE
No CATT procedure active
DEFSIZE
Do not use standard window size
RACOMMIT
COMMIT WORK ends procedure successfully
NOBINPT
Batch input mode, that is SY-BINPT =X.
NOBIEND
Batch input mode also active after BDC data has been read
Regards,
Swapna. -
GRC 10 ALERT MONITOR: FALSE/POSITIVES BIAS CALL TRANSACTION
Hi, everybody. I had an Issue related with GRC AC 10 alert monitor that is reporting that some users triggered SoD risks TR54 , TR01 and TR03 originated by transactions: ML81N - service entry against purchase order and FB05 - post with clearing. Both transactions are not available for those users because they don´t have the authorization profiles in the UMR or available in dialog mode.
Nevertheless we observed that both actions (ML81N and FB05) were invoked by a "CALL TRANSACTION" instruction from another program report.
I believe that this is a false positive alarm that were triggered even though the users have not assigned roles or functions of risk.
I will appreciate your comments.
Best Regards.
Victor Sarabia
IT GRC Manager1) How do I not alert on first failure but initiate an immediate retry in 30 seconds and if retry fails then alert. This prevents false positives and is a feature that products such as uptrends performs as default
SCOM has no that kind of feature
2) How do I alert on with just one alert of transaction failure instead of each of the components of the transaction monitor failure. Example our first failure threw 10 alerts encompassing each part of the transaction
a) Right click web application transaction Monitoring object --> View Management Pack Object --> View Monitors
b) Expanse the web application transaction monitor --> entity Health --> Availability --> Web Application XXXX
c) Open the monitor properties of Request X -XXX and uncheck "Generate alerts for this monitor"
3) How do I create an uptime report to show monthly and quarterly uptime for the website based on the transaction monitoring.
a) go to Monitoring workspace --> Web Application Transaction Monitoring --> Web Application State
b) select the web application transaction entity and click Availability Report task on task pane
c) Select the report period and run
Roger
Roger -
How to rectify the errors through call transaction metod in bdc
how to rectify the errors through call transaction metod in bdc
Hi ,
View the highlited part of the below code.
REPORT ygfrivat1 NO STANDARD PAGE HEADING
LINE-SIZE 165
MESSAGE-ID yif_groc.
Program YGFRIVAT1
Function Report to Upload the VAT Adjustment File.
Author ARENAPU
Date 11.05.2007
PMTS AM12810157
Transport G6DK937834
Description:
Modification log:
1. Changed by :
Changed on :
PMTS :
Transport :
Tag :
Description :
T A B L E S D E C L A R A T I O N S
TABLES: edidc, "Control record (IDoc)
edids, "Status Record (IDoc)
t001w.
Internal Tables Declaration.
Internal table to hold data from table EDIDS
DATA: BEGIN OF t_edids OCCURS 0,
docnum LIKE edids-docnum,
logdat LIKE edids-logdat,
logtim LIKE edids-logtim,
countr LIKE edids-countr,
credat LIKE edids-credat,
uname LIKE edids-uname,
END OF t_edids,
Internal table to hold data from table EDIDC
BEGIN OF t_edidc OCCURS 0,
docnum LIKE edidc-docnum,
rcvprt LIKE edidc-rcvprt,
rcvprn LIKE edidc-rcvprn,
credat LIKE edidc-credat,
END OF t_edidc,
Internal table to hold data from upload file
BEGIN OF t_tab OCCURS 0,
cust(10), "site/customer number
date(10), "transaction date
currency(04), "currency
extnbr(15), "external reference number
pos-cont(05), "POS controler
pos-id(25), "POS id
cashier(10), "cashier name
qualif(04), "qualifier of the article
matnr(25), "article number
qty(10), "quantity
sale(16), "sale value
pos-tr(04), "POS transfert type
paymeth(04), "payment method
final(35), "final price
tarcur(04), "target currency
assign(35), "assignment day
error,
END OF t_tab,
Internal table for Report display.
BEGIN OF t_tab1 OCCURS 0,
cust(10), "site/customer number
date(10), "transaction date
currency(04), "currency
extnbr(15), "external reference number
pos-cont(05), "POS controler
pos-id(25), "POS id
cashier(10), "cashier name
qualif(04), "qualifier of the article
matnr(25), "article number
qty(16) TYPE p DECIMALS 2, "quantity
sale(16) TYPE p DECIMALS 2, "sale value
pos-tr(04), "POS transfert type
paymeth(04), "payment method
final(16) TYPE p DECIMALS 2, "final price
tarcur(04), "target currency
assign(35), "assignment day
END OF t_tab1,
t_tab_temp LIKE t_tab OCCURS 0 WITH HEADER LINE,
Internal table to Validate Customer no.
BEGIN OF t_check OCCURS 0,
werks LIKE t001w-werks,
vkorg LIKE t001w-vkorg,
value(40),
END OF t_check,
t_check_temp LIKE t_check OCCURS 0 WITH HEADER LINE.
Internal table to hold data from table ZCS_PARAM.
DATA: BEGIN OF t_zcs_param OCCURS 0.
INCLUDE STRUCTURE zcs_param.
DATA: vkorg LIKE t001w-vkorg,
END OF t_zcs_param.
*Internal table to hold Messages.
DATA: BEGIN OF t_message OCCURS 0,
msgnum TYPE msgnum,
msgtyp TYPE msgtyp,
msgtxt TYPE msgtext,
END OF t_message.
*Work area for table t_message
DATA : w_message LIKE LINE OF t_message.
Internal table to hold BDC data
DATA: t_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE,
Internal table to collect error messages
messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
*Internal table to hold messages from call transaction
DATA: BEGIN OF t_text OCCURS 0,
desc(150),
msgtxt(100),
END OF t_text.
D A T A D E C L A R A T I O N S
DATA: n TYPE i,
gv_status(11) TYPE c, "Shows status, Production or Test
gv_exit TYPE c, "Exit Flag
gv_qty(16) TYPE p DECIMALS 2, "Variable to sum Quantity
gv_sale(16) TYPE p DECIMALS 2, "Variable to sum Amount
gv_final(16) TYPE p DECIMALS 2. "Variable to sum Final Amount
DATA: w_text(100),
gv_mode TYPE c,
error TYPE c. "Flag to Indicate error.
CONSTANSTS DECLARATION
CONSTANTS : gc_fieldname LIKE dynpread-fieldname VALUE 'P_FNAME',
gc_seq_no LIKE zcs_param-seq_no VALUE '00110',
gc_object LIKE zcs_param-object VALUE 'YGFVAT',
gc_paraname LIKE zcs_param-paraname VALUE 'VKORG',
gc_back TYPE c VALUE 'N',
gc_error TYPE c VALUE 'E',
gc_all TYPE c VALUE 'A'.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS : p_fname LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-002 FOR FIELD p_test.
PARAMETERS : p_test AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK a1.
SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-006.
PARAMETERS : rb_back RADIOBUTTON GROUP rb1 DEFAULT 'X',
rb_error RADIOBUTTON GROUP rb1,
rb_all RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF BLOCK a2.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
*Subroutine to provide F4 help for file name
PERFORM fr_get_filename.
I N I T I A L I Z A T I O N
INITIALIZATION.
*Subroutine to check authorization.
PERFORM fr_authority_check.
T O P - O F - P A G E
TOP-OF-PAGE.
*Subroutine to diplay header
PERFORM fr_display_header.
S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
*Subroutine to upload data from presentation server.
PERFORM fr_upload_data.
*Subroutine to validate records from uploaded file.
PERFORM fr_validate_data.
*Subroutine to build report internal table.
PERFORM fr_build_rep.
E N D - O F - S E L E C T I O N
END-OF-SELECTION.
*Subroutine to display report.
PERFORM fr_write_report.
F O R M S U B R O U T I N E S
*& Form fr_get_filename
text
FORM fr_get_filename.
DATA : lv_repid LIKE sy-repid, " Report id
lv_file LIKE ibipparms-path. " File Path
lv_repid = sy-repid.
F4 help for file path.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = lv_repid
dynpro_number = syst-dynnr
field_name = gc_fieldname " p_fname1
IMPORTING
file_name = lv_file.
IF NOT lv_file EQ space.
p_fname = lv_file.
ELSE.
MESSAGE e999 WITH 'Invalid Path'(005).
ENDIF.
ENDFORM. " fr_get_filename
*& Form fr_upload_data
text
FORM fr_upload_data.
DATA: lv_fname TYPE string.
CLEAR lv_fname.
lv_fname = p_fname.
Uploading file from PC or presentation server to internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_fname
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = t_tab
EXCEPTIONS
file_open_error = 1.
IF sy-subrc <> 0.
DESCRIBE TABLE t_message LINES n.
w_message-msgnum = n + 1.
w_message-msgtyp = 'E'.
MOVE text-m01 TO w_message-msgtxt.
APPEND w_message TO t_message.
Subroutine for writing log.
PERFORM fr_write_log.
ENDIF.
ENDFORM. " fr_upload_data
*& Form fr_validate_data
text
FORM fr_validate_data.
DATA : lv_lines1 TYPE i,
lv_lines2 TYPE i.
*Obtain Status depending on Check box selected.
IF p_test IS INITIAL.
gv_status = 'PRODUCTION'.
ELSE.
gv_status = 'TEST RUN'.
ENDIF.
*Batch Mode
CLEAR gv_mode.
IF rb_back EQ 'X'. "No Display
MOVE gc_back TO gv_mode.
ELSEIF rb_error EQ 'X'. "Error Only
MOVE gc_error TO gv_mode.
ELSEIF rb_all EQ 'X'. "All Screens
MOVE gc_all TO gv_mode.
ENDIF.
IF NOT t_tab[] IS INITIAL.
SORT t_tab BY cust.
REFRESH t_tab_temp.
t_tab_temp[] = t_tab[].
SORT t_tab_temp BY cust.
DELETE ADJACENT DUPLICATES FROM t_tab_temp COMPARING cust.
IF NOT t_tab_temp[] IS INITIAL.
SELECT werks vkorg FROM t001w
INTO TABLE t_check
FOR ALL ENTRIES IN t_tab_temp
WHERE werks = t_tab_temp-cust+0(4).
IF sy-subrc = 0.
SORT t_check BY werks.
ENDIF.
LOOP AT t_check.
IF t_check-vkorg <> ' '.
MOVE t_check-vkorg TO t_check-value.
MODIFY t_check TRANSPORTING value.
ENDIF.
ENDLOOP.
ENDIF.
FREE t_tab_temp.
ENDIF.
IF NOT t_check[] IS INITIAL.
REFRESH t_check_temp.
t_check_temp[] = t_check[].
SORT t_check_temp BY value.
DELETE ADJACENT DUPLICATES FROM t_check_temp COMPARING value.
IF NOT t_check_temp[] IS INITIAL.
SELECT * FROM zcs_param INTO TABLE t_zcs_param
FOR ALL ENTRIES IN t_check_temp
WHERE seq_no EQ gc_seq_no
AND object EQ gc_object
AND paraname EQ gc_paraname
AND value EQ t_check_temp-value.
IF sy-subrc = 0.
SORT t_zcs_param BY value.
ENDIF.
ENDIF.
FREE t_check_temp.
ENDIF.
IF NOT t_tab[] IS INITIAL.
LOOP AT t_tab.
READ TABLE t_check WITH KEY werks = t_tab-cust BINARY SEARCH.
IF sy-subrc <> 0.
MOVE 'X' TO t_tab-error.
MODIFY t_tab TRANSPORTING error.
DESCRIBE TABLE t_message LINES n.
w_message-msgnum = n + 1.
w_message-msgtyp = 'E'.
CONCATENATE t_tab-cust text-030
INTO w_message-msgtxt SEPARATED BY space.
APPEND w_message TO t_message.
Subroutine for writing log.
PERFORM fr_write_log.
EXIT.
ELSE.
READ TABLE t_zcs_param WITH KEY value = t_check-vkorg
BINARY SEARCH.
IF sy-subrc <> 0.
MOVE 'X' TO t_tab-error.
MODIFY t_tab TRANSPORTING error.
DESCRIBE TABLE t_message LINES n.
w_message-msgnum = n + 1.
w_message-msgtyp = 'E'.
CONCATENATE text-003 t_tab-cust text-004 t_check-vkorg
INTO w_message-msgtxt SEPARATED BY space.
APPEND w_message TO t_message.
Subroutine for writing log.
PERFORM fr_write_log.
EXIT.
ELSE.
PERFORM fr_format_tab.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
DESCRIBE TABLE t_tab LINES lv_lines1.
IF lv_lines1 <> 0.
DELETE t_tab WHERE error EQ 'X'.
ENDIF.
DESCRIBE TABLE t_tab LINES lv_lines2.
IF lv_lines2 <> 0.
IF lv_lines2 <> lv_lines1.
EXIT.
ELSE.
IF p_test IS INITIAL.
LOOP AT t_tab.
*Subroutine to build BDC table
PERFORM fr_fill_bdctab.
*Subroutine to Post Data into SAP.
PERFORM fr_data_posting.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " fr_validate_data
*& Form fr_write_log
text
FORM fr_write_log.
CLEAR error.
error = 'X'.
WRITE:/1 'Msg No'(027), 10 'Type'(028), 20 'Text'(029).
ULINE:/1(120).
FORMAT RESET.
LOOP AT t_message.
IF t_message-msgtyp = 'E'.
FORMAT COLOR 6 INTENSIFIED .
ELSEIF t_message-msgtyp = 'W'.
FORMAT COLOR 3 INTENSIFIED .
ELSEIF t_message-msgtyp = 'I'.
FORMAT COLOR 5 INTENSIFIED .
ENDIF.
WRITE:/1 t_message-msgnum,
10 t_message-msgtyp,
20 t_message-msgtxt.
FORMAT RESET.
ENDLOOP.
ULINE:/1(120).
ENDFORM. " fr_write_log
*& Form fr_write_report
text
FORM fr_write_report.
CLEAR gv_exit.
LOOP AT t_message.
IF t_message-msgtyp = 'E'.
gv_exit = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF NOT gv_exit IS INITIAL.
EXIT.
ELSE.
PERFORM fr_display_report.
IF NOT t_text[] IS INITIAL.
Subroutine for Display Call Transaction messages.
PERFORM fr_write_msg.
ENDIF.
ENDIF.
ENDFORM. " fr_write_report
*& Form fr_display_report
text
FORM fr_display_report.
IF NOT t_tab1[] IS INITIAL.
CLEAR: gv_qty, gv_sale, gv_final.
LOOP AT t_tab1.
WRITE:/1(10) t_tab1-cust,
13(10) t_tab1-date,
25(05) t_tab1-currency,
32(14) t_tab1-extnbr,
48(09) t_tab1-pos-cont,
60(18) t_tab1-matnr,
80(16) t_tab1-qty RIGHT-JUSTIFIED ,
98(16) t_tab1-sale RIGHT-JUSTIFIED ,
116(07) t_tab1-paymeth,
125(16) t_tab1-final RIGHT-JUSTIFIED,
143(06) t_tab1-tarcur,
152(12) t_tab1-assign.
gv_qty = t_tab1-qty + gv_qty.
gv_sale = t_tab1-sale + gv_sale.
gv_final = t_tab1-final + gv_final.
ENDLOOP.
FORMAT COLOR 3.
ULINE: /(164).
WRITE:/ 'TOTALS',
80(16) gv_qty RIGHT-JUSTIFIED,
98(16) gv_sale RIGHT-JUSTIFIED,
125(16) gv_final RIGHT-JUSTIFIED,
182 ''.
ULINE: /(164).
FORMAT RESET.
ENDIF.
ENDFORM. " fr_display_report
*& Form FR_DISPLAY_HEADER
text
FORM fr_display_header.
IF error IS INITIAL.
FORMAT COLOR 1.
WRITE:/ 'Date upload :'(007), 25 sy-datum, 38 ''.
WRITE:/ 'Production or Test Run:'(008), 25 gv_status, 38 ''.
WRITE:/ 'Upload User Logon :'(009), 25 sy-uname, 38 ''.
ULINE: /(164).
WRITE:/1(04) 'Site'(010),
13(10) 'Date'(011),
25(05) 'Curr.'(012),
32(14) 'Receipt'(013),
48(09) 'Cashier'(014),
60(18) 'Article'(015),
92 'Qty'(016),
102 'Item Amount'(017),
116(7) 'M.o.P.'(018),
128 'Tender Amount'(019),
143(6) 'T.Curr'(020),
152(12) 'Assignment'(021).
ULINE:/(164).
FORMAT RESET.
ENDIF.
ENDFORM. " FR_DISPLAY_HEADER
*& Form fr_newdynpro
text
FORM fr_newdynpro USING program LIKE bdcdata-program
dynpro LIKE bdcdata-dynpro.
t_bdcdata-program = program .
t_bdcdata-dynpro = dynpro.
t_bdcdata-dynbegin = 'X'.
APPEND t_bdcdata.
CLEAR t_bdcdata.
ENDFORM. " fr_newdynpro
*& Form fr_loadfield
text
FORM fr_loadfield USING field LIKE bdcdata-fnam
value.
t_bdcdata-fnam = field.
t_bdcdata-fval = value.
APPEND t_bdcdata.
CLEAR t_bdcdata.
ENDFORM. " fr_loadfield
*& Form fr_fill_bdctab
text
FORM fr_fill_bdctab.
REFRESH t_bdcdata.
PERFORM fr_newdynpro USING 'SAPMWPUK' '100'.
PERFORM fr_loadfield USING 'G_FILIALE' t_tab-cust.
PERFORM fr_loadfield USING 'G_DATUM' t_tab-date.
PERFORM fr_loadfield USING 'BDC_OKCODE' 'BON'.
PERFORM fr_newdynpro USING 'SAPMWPUK' '500'.
PERFORM fr_loadfield USING 'WPSCB01-POSKREIS' t_tab-pos-cont.
PERFORM fr_loadfield USING 'WPSCB01-KASSID' t_tab-pos-id.
PERFORM fr_loadfield USING 'WPSCB01-BELEGWAERS' t_tab-currency.
PERFORM fr_loadfield USING 'WPSCB01-CSHNAME' t_tab-cashier.
PERFORM fr_loadfield USING 'WPSCB01-BONNUMMER' t_tab-extnbr.
PERFORM fr_loadfield USING 'E1WPB02-QUALARTNR(01)' t_tab-qualif.
PERFORM fr_loadfield USING 'E1WPB02-ARTNR(01)' t_tab-matnr.
PERFORM fr_loadfield USING 'E1WPB02-MENGE(01)' t_tab-qty.
PERFORM fr_loadfield USING 'WPSCB03-KONDVALUE(01)' t_tab-sale.
PERFORM fr_loadfield USING 'E1WPB02-VORGANGART(01)' t_tab-pos-tr.
PERFORM fr_loadfield USING 'BDC_OKCODE' 'ZAHL'.
PERFORM fr_newdynpro USING 'SAPMWPUK' '530'.
PERFORM fr_loadfield USING 'WPSCB06-ZAHLART' t_tab-paymeth.
PERFORM fr_loadfield USING 'WPSCB06-SUMME' t_tab-final.
PERFORM fr_loadfield USING 'WPSCB06-WAEHRUNG' t_tab-tarcur.
PERFORM fr_loadfield USING 'WPSCB06-ZUONR' t_tab-assign.
PERFORM fr_loadfield USING 'BDC_OKCODE' 'SAVE'.
PERFORM fr_newdynpro USING 'SAPMWPUK' '530'.
PERFORM fr_loadfield USING 'WPSCB06-ZAHLART' t_tab-paymeth.
PERFORM fr_loadfield USING 'WPSCB06-SUMME' t_tab-final.
PERFORM fr_loadfield USING 'WPSCB06-WAEHRUNG' t_tab-tarcur.
PERFORM fr_loadfield USING 'WPSCB06-ZUONR' t_tab-assign.
PERFORM fr_loadfield USING 'BDC_OKCODE' 'BACK'.
PERFORM fr_newdynpro USING 'SAPLSPO1' '0200'.
PERFORM fr_loadfield USING 'BDC_OKCODE' 'YES'.
PERFORM fr_newdynpro USING 'SAPMWPUK' '100'.
PERFORM fr_loadfield USING 'G_FILIALE' t_tab-cust.
PERFORM fr_loadfield USING 'G_DATUM' t_tab-date.
PERFORM fr_loadfield USING 'BDC_OKCODE' 'BACK'.
ENDFORM. " fr_fill_bdctab
*& Form fr_data_posting
text
FORM fr_data_posting.
IF NOT t_bdcdata[] IS INITIAL.
REFRESH messtab.
CALL TRANSACTION 'WPUK' USING t_bdcdata
MODE gv_mode
UPDATE 'S'
MESSAGES INTO messtab.
IF sy-subrc = 0 .
CLEAR w_text.
LOOP AT messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab-msgid
lang = sy-langu
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
IMPORTING
msg = w_text
EXCEPTIONS
not_found = 1
OTHERS = 2.
MOVE w_text TO t_text-msgtxt.
CONCATENATE 'Site:'(031) t_tab-cust
'Article:'(024) t_tab-matnr
'Posted Sucessfully'(032)
INTO t_text-desc SEPARATED BY space.
APPEND t_text.
CLEAR t_text.
ENDLOOP.
ELSE.
CLEAR w_text.
LOOP AT messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab-msgid
lang = sy-langu
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
IMPORTING
msg = w_text
EXCEPTIONS
not_found = 1
OTHERS = 2.
MOVE w_text TO t_text-msgtxt.
IF messtab-msgnr EQ '213'.
CONCATENATE 'Site:'(031) t_tab-cust
'Article:'(024) t_tab-matnr
'Posted Sucessfully'(032)
INTO t_text-desc SEPARATED BY space.
APPEND t_text.
CLEAR t_text.
EXIT. ELSE.
CONCATENATE 'Site:'(031) t_tab-cust
'Article:'(024) t_tab-matnr
'Not Posted'(033)
INTO t_text-desc SEPARATED BY space.
APPEND t_text.
CLEAR t_text.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM. " fr_data_posting
*& Form fr_authority_check
text
FORM fr_authority_check.
AUTHORITY-CHECK OBJECT 'Y_VATADJ'
ID 'VKORG' FIELD t001w-vkorg
ID 'TCD' FIELD 'YGFVAT'.
IF sy-subrc NE 0.
MESSAGE e999 WITH text-m02.
ENDIF.
ENDFORM. " fr_authority_check
*& Form fr_write_msg
text
FORM fr_write_msg.
SKIP.
ULINE:/(164).
WRITE:/
'Messages encountered while Calling Transaction WPUK'(025),
90 'Message Text'(026).
ULINE:/1(164).
LOOP AT t_text.
WRITE:/1 t_text-desc,
90 t_text-msgtxt,
164 ''.
ENDLOOP.
ULINE:/1(164).
ENDFORM. " fr_write_msg
*& Form FR_BUILD_REP
text
FORM fr_build_rep.
IF error IS INITIAL.
IF NOT t_tab[] IS INITIAL.
LOOP AT t_tab.
MOVE:
t_tab-cust TO t_tab1-cust, "site/customer number
t_tab-date TO t_tab1-date, "transaction date
t_tab-currency TO t_tab1-currency, "currency
t_tab-extnbr TO t_tab1-extnbr, "external reference number
t_tab-pos-cont TO t_tab1-pos-cont, "POS controler
t_tab-pos-id TO t_tab1-pos-id, "POS id
t_tab-cashier TO t_tab1-cashier, "cashier name
t_tab-qualif TO t_tab1-qualif, "qualifier of the article
t_tab-matnr TO t_tab1-matnr, "article number
t_tab-pos-tr TO t_tab1-pos-tr, "POS transfert type
t_tab-paymeth TO t_tab1-paymeth, "payment method
t_tab-tarcur TO t_tab1-tarcur, "target currency
t_tab-assign TO t_tab1-assign.
REPLACE ',' WITH '.' INTO t_tab-qty.
CONDENSE t_tab-qty NO-GAPS.
MOVE t_tab-qty TO t_tab1-qty.
REPLACE ',' WITH '.' INTO t_tab-sale.
CONDENSE t_tab-sale NO-GAPS.
MOVE t_tab-sale TO t_tab1-sale.
REPLACE ',' WITH '.' INTO t_tab-final.
CONDENSE t_tab-final NO-GAPS.
MOVE t_tab-final TO t_tab1-final.
APPEND t_tab1.
CLEAR t_tab1.
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM. " FR_BUILD_REP
*& Form fr_format_tab
text
FORM fr_format_tab.
DATA : lv_qty TYPE string.
IF NOT t_tab-qty IS INITIAL.
IF t_tab-qty+0(1) EQ '-'.
CLEAR lv_qty.
MOVE t_tab-qty TO lv_qty.
CLEAR t_tab-qty.
SHIFT lv_qty LEFT CIRCULAR.
CONDENSE lv_qty NO-GAPS.
MOVE lv_qty TO t_tab-qty.
MODIFY t_tab TRANSPORTING qty.
ENDIF.
ENDIF.
ENDFORM. " fr_format_tab -
Call Transaction execute Unauthorized Transaction.
Dear All,
When i m using call transaction for calling program.
if for that tcode if i don't have authorization then also it is executed.
how to restrict this?
Thanks,
ArpitHi,
If you are using it programatically, you can have the addition,
Authority-check .
Syntax
AUTHORITY-CHECK OBJECT auth_obj [FOR USER user]
ID id1 {FIELD val1}|DUMMY
[ID id2 {FIELD val2}|DUMMY]
[ID id10 {FIELD val10}|DUMMY].
Addition:
... FOR USER user
Effect
This statement checks whether authorization is entered in the user master record of the current user or the user specified in user for the authorization object entered in the field auth_obj, and whether this authorization is sufficient for the request specified in the statement. A flat character-type field that contains the name of an authorization object is expected for auth_obj. Without the addition FOR USER, the authorization of the current user is checked.
With id1 ... id10, you must have at least one and can have a maximum of 10 authorization fields listed for the authorization object specified. With id1 ... id10, "flat", character-type fields are expected that contain the name of the authorization fields in uppercase letters. If an authorization field is specified that does not appear in the authorization object, no check can be executed and sy-subrc is set to 4. For each specified authorization field, you must specify with FIELD either a value to be checked in a flat, character-type field val1 ... val10 or the addition DUMMY.
The authority check is carried out if the check indicator for the specified authorization object for the current context is set to check with any proposal status. If the check indicator is set to no check, no authority check is carried out and sy-subrc is set to 0, as with a successful check.
The authorization check is successful if one or several authorizations are created for the authorization object in the user master record and if - for at least one of the authorizations - each of the value sets defined there for the authorization fields specified using FIELD includes the value val1 ... val10 to be checked. Authorization fields that are not included in the statement or that have DUMMY specified for them are not checked. If the check is successful, sy-subrc is set to 0. Otherwise, it is set to a value not equal to 0 (see below).
Example
Check as to whether the current user has the authorization required for displaying the airline that he specifies on the selection screen. The used authorization object is called S_CARRID and includes the authorization fields CARRID for the name of an airline and ACTVT for the activity. The abbreviation "03" stands for the "Display" activity and is one of the activities that are assigned to the authorization object S_CARRID.
PARAMETERS carr TYPE spfli-carrid.
AT SELECTION-SCREEN.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD carr
ID 'ACTVT' FIELD '03'.
IF sy-subrc <> 0.
MESSAGE 'No authorization' TYPE 'E'.
ENDIF.
Pls reward points if useful.
Regards,
Renjith Michael. -
Alternatine to call Transaction.
Hi All,
Need a Solution to call se38 with a program name 'ZTEST' which skips the first screen.
I tried using
SET PARAMETER ID 'RID' FIELD 'ZTEST'
CALL transaction 'SE38' AND SKIP FIRST SCREEN .
But unable to skip the first screen and display the report.
Thanks & Regards,
SantoshHI ,
i think for call transaction alternative is SUBMIT so
y can;t u try using SUBMIT if any doubt let me know .
SUBMIT
Basic forms:
1. SUBMIT rep.
2. SUBMIT (name).
Extras:
1. ... LINE-SIZE col
2. ... LINE-COUNT line
3. ... TO SAP-SPOOL List output to the SAP spool database
4. ... USING SELECTION-SCREEN scr
5. ... VIA SELECTION-SCREEN
6. ... AND RETURN
7. ... EXPORTING LIST TO MEMORY
8. ... USER user VIA JOB job NUMBER n
9. ...Various additions for passing parameters to rep
10. ... USING SELECTION-SETS OF PROGRAM prog
Effect
Calls report rep.
The system leaves the active program and starts the new report rep. In basic form 2, you can specify the name of the report in the field name. You must specify the name in uppercase, otherwise a runtime error occurs.
Note
· You can only start programs with type '1' using SUBMIT. If the program has a different type, the system triggers a runtime error.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... LINE-SIZE col
Effect
The list generated by the report has the line width col.
Addition 2
... LINE-COUNT line
Effect
The list generated by the report has line lines per page.
Addition 4
... USING SELECTION-SCREEN scr
Effect
When you execute the report, the system uses the selection screen number that you specify in the scr field. This must be a selection screen defined using the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements.If you omit the addition, the system uses the standard selection screen 1000.
This addition allows you to start the same report in different situations, using a different selection screen each time.
Notes
1. The addition VIA SELECTION SCREEN determines whether the report is processed in the foreground or the background.
2. What happens if the required screen does not exist or is not a selection screen?
Screen 1000:
If you want to use the standard selection screen (... USING SELECTION-SCREEN 1000 or do not specify a ... USING SELECTION-SCREEN) addition, the system does not process a selection screen.
Other selection screens:
The system triggers a runtime error.
Addition 5
... VIA SELECTION-SCREEN
Effect
The selection screen is displayed. In this case, the selection screen is displayed again after the report list has been displayed. The values entered by the user remain displayed.
Addition 6
... AND RETURN
Effect
Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal session.
Addition 7
... EXPORTING LIST TO MEMORY
Effect
Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. In addition, you must not assign a function code to the ENTER key in the current GUI status. The saved list is read from the SAP memory using the function module 'LIST_FROM_MEMORY' and can then be saved to the database using EXPORT, for example. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST".
Addition 8
... USER user VIA JOB job NUMBER n
Effect
Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN.
Note
When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment.
SY-SUBRC = 0:
Job scheduled successfully
SY-SUBRC = 4:
Job scheduling terminated by user
SY-SUBRC = 8:
Error in job scheduling (JOB_SUBMIT)
SY-SUBRC = 12:
Error in internal number assignment
Addition 10
... USING SELECTION-SETS OF PROGRAM prog
Effect
Uses variants of the program prog when executing the program rep.
Note
Important
The programs prog and rep must have the same SELECT-OPTIONS and PARAMETERs. Otherwise, variants of the program prog may be destroyed.
Note
When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari. On the other hand, all variant-related actions on the selection screen of rep (Get, Save as variant, Display, Delete) refer to the variants of prog.
Example
SUBMIT REPORT01
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
Effect
Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00.
Exceptions
Non-Catchable Exceptions
· Cause: The specified program was not found.
Runtime Error: LOAD_PROGRAM_NOT_FOUND
· Cause: Invalid value passed to a selection with SIGN.
Runtime Error: SUBMIT_WRONG_SIGN
· Cause: The specified program is not a report.
Runtime Error: SUBMIT_WRONG_TYPE
· Cause: More than one value passed to a report parameter.
Runtime Error: SUBMIT_IMPORT_ONLY_PARAMETER
· Cause: Table passed to a selection with WITH sel IN itab that has an unexpected structure.
Runtime Error: SUBMIT_IN_ITAB_ILL_STRUCTURE
Additional help
Starting Executable Programs (Reports)
THx -
Substitution of FI fields on call transactions for clearing.
Dear collegues,
I need help to configure a substitution for tx. FBWD-returned/paid Bills of exchange were the baseline date of the clearing account for the bill liability at the bank (that has the due date as required) and has to be substituted with the entry in value date field.
FBWD calls tx FB05 to post the cleared BOE and the clearing account for BOE is posted on 2nd position (BSEG-BUZEI= '002') under these tx. That's why I configured the following substitution that it is not working:
Prerequisite
( BKPF-TCODE = 'fbwd' OR BKPF-TCODE = 'zfbw' OR
BKPF-TCODE = 'fb05' ) AND BKPF-BLART = 'AB' AND
BSEG-BUZEI = '002'
Substitution if prerequisite is met:
Field is substituted by:
Baseline Date Field BSEG-VALUT
Why doesn't it work: because of the call transaction, being clearing tx., incorrect code, need for a exit...
Can somebody assist? Thanks in advance.
Regards,
AbdaliHello,
This is a rather complex topic. The general principle is that no one should have authorizations for the complete process, from beginning to the end. Good place to start is [here|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02855c9-2091-2a10-8682-af41abe087ba].
SAP provides report, which can be configured by the customer, namely [RSUSR008_009_NEW|http://help.sap.com/saphelp_nw04s/helpdata/en/f9/558f40f3b19920e10000000a1550b0/content.htm]- Users with critical authorizations.
Regards,
Milen.
Edited by: Milen G on Sep 10, 2010 8:00 AM -
Error :Authorization check for caller assignment to J2EE security role whil
Hi Experts,
i m working as a portal resource .
after the deployment of standered Sap e-rec package .
i m getting some error. i have assigned the recruiter role to one test user.
Now i m getting two issue:
1)All the services are appearing in Detailed Navigation Pannel but not in Portal content area..
2) I m able to see few iview for the test user but those are also in detailed navigation view.
And few ivews are giving following error :
i)Internal error
ii)error 2011-12-19 07:59:57:315 ACCESS.ERROR: Authorization check for caller assignment to J2EE security role [sap.com/com.sap.lcr*sld : LcrInstanceWriterNR] referencing J2EE security role [SAP-J2EE-Engine : administrators].
/System/Security/Audit/J2EE com.sap.engine.services.security.roles.audit n/a EP-DEV-KRT Server 0 0_97989
Full Message Text
ACCESS.ERROR: Authorization check for caller assignment to J2EE security role [sap.com/com.sap.lcr*sld : LcrInstanceWriterNR] referencing J2EE security role [SAP-J2EE-Engine : administrators].
please suggest what can be done or what is pending from my side.Prajakta2602 wrote:
Hi Experts,
>
> the previous issue got solved..
> it was due to servies pack miss match and applying notes
> the Basis guy checked the SLD logs and accordingly found that the base components J2EECORE and JTECHS required paching as per
> notes 1445294 and 1175239 were applied.
> now the issue is:
>
>
> After implemetation and i assigning the standerd sap roles
> 1)Recruiter Administrator
> 2)Recruiter
> to the test user .
> but for few iview it is showing error as in
> 1) you are not a authorized user
> 2) internal error
>
> please help experts.
>
> i m working on portal side have i to assign any role to that test user..
>
>
> Thnaks & Regards,
> Prajakta
You can run a quick check using the below steps:
1. Check in backend whether there is any authorisation errors... you may use transactions SU53 or ST22 for any ABAP errors
2. Also check in NWA -> log viewer -> last 24 hours log for the particular user to see any java related issues.
Regards,
Mahesh
Maybe you are looking for
-
Boot and shutdown time is much slower
Running a MB Pro with 4gb of RAM. The boot and shutdown times are considerably slower. Any ideas?
-
Using Employee numbers in Account Identification Screen
Hi Experts, I have a scenario where I want agents to create complaints for Internal Employees of a company. For this, I want those Employees to be searched in Account Identification Screen, so that after confirming the Account, Agents can create Comp
-
Switching between clients - Integration builder
Hi, I'm trying to set up specific business scenarios between different clients on our R/3 qas server. Using integration builder, each interface was defined as having either sender / receiver clnt100 and clnt401. Tests have been performed successfully
-
HT5312 How do I get a freaking rescue email?
I do not know how to send a rescue email.
-
I can't get my Ipad mini going....no issues till now. Dead...black screen