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
Damu
Damu,
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
Similar Messages
-
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.
Thanksso 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. -
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 -
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. -
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 -
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. -
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 -
Unable to Capture ALV output in an Internal Table, after CALL TRANSACTION
Dear all,
My requirement is to run multiple materials in T-code CK86_99 but as we know CK86_99 is only adequate to one material at a time.
So, I want to capture the Output of the T-code in my Internal table with respect to all the Material Numbers I use in the Select-Options of my Z Program.
Below is the Code I developed so far, but the Class
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lf_ref ).
is not capturing the Ouput...
Please have a look and enlighten me how it could be solved.
TABLES : mara.
DATA : BEGIN OF wa_mara,
matnr TYPE mara-matnr,
END OF wa_mara.
DATA: it_bdcdata TYPE TABLE OF bdcdata,
wa_it_bdcdata LIKE LINE OF it_bdcdata,
it_mara LIKE TABLE OF wa_mara.
* BELNR(10).
FIELD-SYMBOLS:<fs_tab> TYPE ANY TABLE,
<fs_line> TYPE any.
DATA:lf_ref TYPE REF TO data,
lf_ref1 TYPE REF TO data.
SELECT-OPTIONS so_matnr FOR mara-matnr.
PARAMETERS p_werks LIKE t001w-werks.
*BELNR = 'Z92'. " Give Document Number here
SELECT matnr FROM mara INTO TABLE it_mara WHERE matnr IN so_matnr.
DATA opt TYPE ctu_params.
LOOP AT it_mara INTO wa_mara.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-program = 'SAPMKKB0'.
wa_it_bdcdata-dynpro = '0300'.
wa_it_bdcdata-dynbegin = 'X'.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'KKB0-MATNR'.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'KKB0-MATNR'.
wa_it_bdcdata-fval = wa_mara-matnr.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'KKB0-WERKS'.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'KKB0-WERKS'.
wa_it_bdcdata-fval = p_werks.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_OKCODE'.
wa_it_bdcdata-fval = 'OSNY'."'ONLI'."=CRET'.
APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-program = 'SAPLKKRSOO'.
* wa_it_bdcdata-dynpro = '0100'.
* wa_it_bdcdata-dynbegin = 'X'.
* APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-fnam = 'BDC_OKCODE'.
* wa_it_bdcdata-fval = 'BACK'."=CRET'.
* APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-program = 'SAPMKKB0'.
* wa_it_bdcdata-dynpro = '0300'.
* wa_it_bdcdata-dynbegin = 'X'.
* APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-fnam = 'BDC_OKCODE'.
* wa_it_bdcdata-fval = 'EXIT'."=CRET'.
* APPEND wa_it_bdcdata TO it_bdcdata.
opt-dismode = 'N'.
cl_salv_bs_runtime_info=>set(
EXPORTING display = abap_false
metadata = abap_true
data = abap_true ).
CALL TRANSACTION 'CK86_99' USING it_bdcdata OPTIONS FROM opt.
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lf_ref ).
ASSIGN lf_ref->* TO <fs_tab>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'Unable to retrieve ALV data' TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
IF <fs_tab> IS ASSIGNED.
CREATE DATA lf_ref1 LIKE LINE OF <fs_tab>.
ASSIGN lf_ref1->* TO <fs_line>.
ENDIF.
*LOOP AT <FS_TAB> ASSIGNING <FS_LINE>.
*ENDLOOP.Hi Abhay,
If you go to Transaction code SE93, enter the tcode "CK86_99" and click display, you may see the default value for transaction is "KKBB" and the screen field for P_SCREEN = 0300, P_TCODE = ck86_99.
You may need to copy the transaction code "KKBB" and go to SE93 again, enter the tcode for "KKBB" then click display, now you may see the program name is "RKKB1000".
Hope this answer your question.
Thanks
Hock Lin -
Call transaction error handling
how to maintain the log i.e sucess/failures like below.
Line No. Success/ Failure Document No Error Details
1 S Doc 740000001
2 S Doc 740000002
3 F Co- code does not exist
4 F GL Account does not exist
I'm getting only one last document no: but i need all the documents to be displayed i.e either success/failures.
below is my code.
TYPES: BEGIN OF ty_filedata,
bukrs TYPE bukrs, "Company code
blart TYPE blart, "Document type
bldat TYPE char10, "Document Date
budat TYPE char10, "Posting date
xblnr TYPE xblnr, "Reference
bktxt TYPE bktxt, "Document Header text
waers TYPE waers, "Currency
newbs TYPE bschl, "Posting Key for the next line item
wrbtr TYPE char10, "Amount
zuonr LIKE bsik-zuonr, "Assignment
sgtxt TYPE sgtxt, "Text
newko TYPE hkont, "Account for the next line item
END OF ty_filedata.
TYPES: BEGIN OF ty_detail_log,
item_no TYPE i, " Item line no.
status(1) TYPE c, " Status - success/failure
doc_no TYPE bkpf-belnr," Document No.
message TYPE string, " Message
END OF ty_detail_log.
*& DATA declaration of internal tables
Internal Table declaration for excel data
DATA: it_itab TYPE STANDARD TABLE OF alsmex_tabline INITIAL SIZE 0,
Internal Table declaration for upload data
it_upload TYPE STANDARD TABLE OF ty_filedata INITIAL SIZE 0,
Internal Table Declaration for BDCDATA
it_bdcdata TYPE STANDARD TABLE OF bdcdata,
Internal Table Declaration for BDCMSGCOLL
it_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll,
Internal Table Declaration for FILENMAE
lf_fname TYPE rlgrap-filename.
t_err_log TYPE STANDARD TABLE OF ty_err
INITIAL SIZE 0, " table for validation error log
t_DETAIL_LOG TYPE STANDARD TABLE OF TY_DETAIL_LOG.
C_MSGNO TYPE BDC_MNR VALUE '312',
*& DATA declaration of work area
Work Area declaration for Excel Data
DATA: w_itab TYPE alsmex_tabline,
Work Area declaration for upload data
w_upload TYPE ty_filedata,
Work Area declaration for upload data
w_upload_n TYPE ty_filedata,
Work Area declaration for upload data
w_bdcdata TYPE bdcdata,
Work Area declaration for upload data
w_bdcmsgcoll TYPE bdcmsgcoll,
w_detail_log TYPE ty_detail_log.
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
PARAMETERS:p_file TYPE rlgrap-filename. " MODIF ID G1.
SELECTION-SCREEN: END OF BLOCK bk1.
*& AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
dynpro_number = syst-dynnr
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 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.
*& START-OF-SELECTION
START-OF-SELECTION.
DATA: lw_itab TYPE alsmex_tabline.
lf_fname = p_file.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lf_fname
i_begin_col = '1'
i_begin_row = '6'
i_end_col = '12'
i_end_row = '999'
TABLES
intern = it_itab[]
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
*MESSAGE S205(ZF_COMMON_MSGS_FIN1) DISPLAY LIKE C_E.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
IF it_itab IS NOT INITIAL.
SORT it_itab BY row col.
DELETE it_itab WHERE row LT 6.
LOOP AT it_itab INTO lw_itab.
w_itab = lw_itab.
AT NEW row.
CLEAR: w_upload.
ENDAT.
CASE w_itab-col.
WHEN '0001'.
w_upload-bukrs = w_itab-value.
WHEN '0002'.
w_upload-blart = w_itab-value.
WHEN '0003'.
w_upload-bldat = w_itab-value.
WHEN '0004'.
w_upload-budat = w_itab-value.
WHEN '0005'.
w_upload-xblnr = w_itab-value.
WHEN '0006'.
w_upload-bktxt = w_itab-value.
WHEN '0007'.
w_upload-waers = w_itab-value.
WHEN '0008'.
w_upload-newbs = w_itab-value.
WHEN '0009'.
w_upload-wrbtr = w_itab-value.
WHEN '0010'..
w_upload-zuonr = w_itab-value.
WHEN '0011'.
w_upload-sgtxt = w_itab-value.
WHEN '0012'.
w_upload-newko = w_itab-value.
ENDCASE.
AT END OF row.
APPEND w_upload TO it_upload.
CLEAR: w_upload.
ENDAT.
ENDLOOP.
*endif.
ENDIF.
DATA: lw_upload TYPE ty_filedata,
lv_lines TYPE sy-tabix,
lv_index TYPE sy-tabix.
DESCRIBE TABLE it_upload LINES lv_lines.
LOOP AT it_upload INTO lw_upload.
lv_index = sy-tabix.
w_upload = lw_upload.
IF NOT w_upload-bukrs IS INITIAL.
IF lv_index GT 1.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text.
REFRESH: it_bdcdata.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMF05A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BKPF-XBLNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BKPF-BLDAT'
w_upload-bldat.
PERFORM bdc_field USING 'BKPF-BLART'
w_upload-blart.
PERFORM bdc_field USING 'BKPF-BUKRS'
w_upload-bukrs.
PERFORM bdc_field USING 'BKPF-BUDAT'
w_upload-budat.
PERFORM bdc_field USING 'BKPF-WAERS'
w_upload-waers.
PERFORM bdc_field USING 'BKPF-XBLNR'
w_upload-xblnr.
*perform bdc_field using 'FS006-DOCID'
PERFORM bdc_field USING 'RF05A-NEWBS'
w_upload-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO'
w_upload-newko.
ENDIF.
IF lv_index NE lv_lines.
lv_index = lv_index + 1.
READ TABLE it_upload INTO w_upload_n INDEX lv_index.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-WRBTR'
w_upload-wrbtr.
PERFORM bdc_field USING 'RF05A-NEWBS'
w_upload_n-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO'
w_upload_n-newko.
ELSE.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'BSEG-WRBTR'
w_upload-wrbtr.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-ANLN1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDLOOP.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text .
REFRESH: it_bdcdata.
*& Form BDC_DYNPRO
FORM bdc_dynpro USING program dynpro.
CLEAR w_bdcdata.
w_bdcdata-program = program.
w_bdcdata-dynpro = dynpro.
w_bdcdata-dynbegin = 'X'.
APPEND w_bdcdata TO it_bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF fval <> space.
CLEAR w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
APPEND w_bdcdata TO it_bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form fr_format_message_text
FORM fr_format_message_text.
DATA: lf_msg TYPE string.
WRITE:/ sy-uline(125).
FORMAT COLOR 1 INTENSIFIED ON.
WRITE : /1 sy-vline,
2 text-041 , "'record Number',
16 sy-vline,
17 text-042 , " 'success/failure',
35 sy-vline,
36 text-043, " 'document no',
55 sy-vline,
56 text-044, "'Error details',
125 sy-vline.
WRITE:/ sy-uline(125).
LOOP AT it_bdcmsgcoll INTO w_bdcmsgcoll.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = w_bdcmsgcoll-msgid
lang = sy-langu
no = w_bdcmsgcoll-msgnr
v1 = w_bdcmsgcoll-msgv1
v2 = w_bdcmsgcoll-msgv2
v3 = w_bdcmsgcoll-msgv3
v4 = w_bdcmsgcoll-msgv4
IMPORTING
msg = lf_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc EQ 0.
WRITE:/01 sy-vline,
02 sy-tabix,
16 sy-vline,
17 w_bdcmsgcoll-msgtyp,
35 sy-vline,
36 w_bdcmsgcoll-msgv1,
55 sy-vline,
56 lf_msg,
125 sy-vline.
WRITE:/ sy-uline(125).
ENDIF.
ENDLOOP.
ENDFORM. "fr_format_message_text
Thanks in advance.Hi Neelima,
Just put the following code within that LOOP...ENDLOOP statement.
LOOP AT it_upload INTO lw_upload.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text .
REFRESH: it_bdcdata.
ENDLOOP.
Regards,
R.Nagarajan.
We can - -
BDC Call Transaction - Doc.No not getting generated in Message Internal tab
Dear All,
I am using BDC Call Transaction method for uploading data for transaction, Iam able to successfully capture the Error messages, sucess messages and the transaction number is also displayed for the bdc run in Mode A, but in case of scheduling the job in background, the Error messages are displayed but the transaction number is not captured in the message Internal table( BDCMSGCOLL).
Kindly look into the matter and revert back for any further info.
Regards
NareshHi,
Please try using the following kind of code in 'CALL TRANSACTION'
opt-dismode = 'E'. " Exclusive mode
opt-defsize = 'X'.
opt-updmode = 'S'.
opt-nobinpt = ' '.
CALL TRANSACTION transaction_code USING ft OPTIONS FROM opt
MESSAGES INTO t_bdcmsgcoll .
Hope this will work.
Thanks,
Leo -
VALUES not getting passed in t.code 'FMY3' VIA call transaction 'FMY3'
hi guru's,
i have created a ALV report for funds precommitment,when i click the document number,the respective document is not opening
i have coded like this
IF selfield-value IS NOT INITIAL.
READ TABLE final INDEX selfield-tabindex.
SET PARAMETER ID: 'KBL' FIELD final-belnr,
'KBP' FIELD final-blpos.
CALL TRANSACTION 'FMY3' AND SKIP FIRST SCREEN.
ENDIF.
the transaction is called,but with empty value in the field and the document is not opening....please help me with this regard...
thanks in advance,
regards,
Balaji.SHello Venkat.O,
i have a similar problem with the overwrite of the memory ID, when calling transaction FMY3. In the code block you mentioned, the system gets the right value from the memory ID, that i've set before calling the transaction. But i found that after that the system runs in the include LFMFRO01, the code
MODULE init_suppress OUTPUT.
IF status2 = st2_app. "/Genehmigen/Ablehnen
Lesen aus Memory: wird in WF-Methode 'APPROVE' gefüllt
IMPORT wfdata TO g_f_wfdata FROM MEMORY ID con_memid_wf.
IF NOT g_f_wfdata-belnr IS INITIAL.
IF g_f_wfdata-blpos = space.
g_f_wfdata-blpos = con_initial_blpos.
ENDIF.
kbld-belnr = g_f_wfdata-belnr.
and here the system gets the memory of the last document created and overwrites the selecion-screen field KBLD-BELNR with that value. And the value i had stored in the parameter ID 'MRV', and that the system gets it right in the code you show, is overwritten..
This seems like a bug from SAP, don't you think?
This way the system will always show the last doc. when calling transaction, after setting a parameter ID..
Maybe you are looking for
-
Creative Audigy Platinum Installation Help with Pentium 4 3.2GHz HT Enab
:mansad: Dear Fellows,I have recently upgraded to a new Pentium 4 machine. The config is as follows:Pentium 4 3.2eGHz MB cache HT (Hyper-Threading Enabled)Intel Original 865GBF MainboardGB Kingston DDR 400MHz RAM20GB SATA WD HDDSound Blaster Audigy P
-
Ok I read this article and the selection is working. Is it possible to dynamically "Rename Hierarchy After Loading"? http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03c23b1-1cb4-2d10-f1ae-9f5ed92be246?QuickLink=index&overridelayou
-
Popup I need disappears in a microsecond in FF4
I am on a website where a popup is needed to complete the transaction. The popup disappears in a nanosecond. I have allowed this popup in the options but it still won't open. I had to go back to Firefox 3.6 where I didn't have this problem.
-
Adobe reader x has poor rendering. Some few bugs in there.
Adobe Reader X has some few adds and a beautiful interface. The product however has poor rendering especially when i try to copy text that exeeds to the next page not in view. The find box also creates some patches on the screen while scrolling, bloc
-
Tracking and maintaining data about modifications done to Standard SAP code
Hi All, I need your help to know if there is a way to track and maintain the modification changes done to standard SAP code. I have gone through SE95 but not much help. Is there any DB tables which stores these information after a standard SAP code h