Call transaction from mail
Hi;
i want to add a link in mail. when user click the link a transaction or report will run.
Best regards.
mustafa
hi
good
try like this
insert mail description
WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
go through this example
REPORT ZSEND .
TABLES: KNA1.
data for send function
DATA DOC_DATA LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
WRITE:/ KNA1-KUNNR, KNA1-ANRED.
send data internal table
CONCATENATE KNA1-KUNNR KNA1-ANRED
INTO OBJCONT-LINE SEPARATED BY SPACE.
APPEND OBJCONT.
ENDSELECT.
insert receiver (sap name)
REFRESH RECEIVER.
CLEAR RECEIVER.
MOVE: SY-UNAME TO RECEIVER-RECEIVER,
'X' TO RECEIVER-EXPRESS,
'B' TO RECEIVER-REC_TYPE.
APPEND RECEIVER.
insert mail description
WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
if find help ful reward point.
thanks
mrutyun^
Similar Messages
-
Want to call transactions from ALV list output
Hi Guru's,
I have a report which displays Open PR's, open PO's n their details with respect to material. wat i want to do is call transactions from this out put i.e i want a interactive output. if i click on particular PR i want the system to call that PR screen. how can i do this?? Plz help.REFER THIS
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
I_STRUCTURE_NAME =
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
TABLES
T_OUTTAB =
IF SY-SUBRC <> 0.
ENDIF.
AND THEN
rs_lineinfo type slis_lineinfo.
FORM user_command5 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
data : lv_date type char4.
CLEAR : LV_DATE .
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'BELNR'.
read table it_e into wa_e index rs_selfield-tabindex.
if sy-subrc = 0.
lv_date = wa_e-budat(4).
endif.
SET PARAMETER ID 'BLN' FIELD rs_selfield-value.
SET PARAMETER ID 'BUK' FIELD s_bukrs-low.
SET PARAMETER ID 'GJR' FIELD lv_date.
call TRANsaction 'FB03' AND SKIP FIRST SCREEN.
endif.
ENDCASE.
ENDFORM. "user_comm -
Calling Transaction from other system using RFC
Hi ,
I have one button on screen(say Screen-A), in ECC. when its pressed the transaction '/SAPAPO/BOPIN' gets called from APO.
For calling transaction from APO I am using FM - 'ABAP4_CALL_TRANSACTION'.
I want the initial screen of that transaction to retain some values which I fill on the Screen-A(the screen which has that button).
When I call the transaction from ECC itself (ex. C006), the initial screen of C006 retains the value on Screen-A.
I want the same to happen in case of calling transaction from APO.
How to achieve this? Would it need the changes in IMG (SPRO)?
Please note that, Screen-A is initial screen of transaction 'md05' and I want to retain vaules of Material, MRP Area, Plant.
Thanks,
SujeetBuilld a RFC enabled FM () that wrap the call of Smartforms (*) in the other system.
Regards,
Raymond
(*) [Writing Remote Function Modules in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/22/0425f2488911d189490000e829fbbd/content.htm]
(**) [Integrating the Smart Form into the Application|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] -
ESS throwing error while calling transaction from R/3
Whenever u try to pull certain I-view like under ESS > Income tax provisional statement then the portal throws below mentioned error. Portal is not able to call transactions from R/3.
Error:
The requested URL could not be retrieved
While trying to retrieve the URL: http://dev.mglep.com:26000/sap(ZT0yZElaRG5xNDlZdFF4aGcyTDhzMWxRLS1hVUR5bDBMbjBDZ2hWUUcyMlZmcmlBLS0=)/bc/gui/sap/its/webgui?
The following error was encountered:
Connection to 69.43.161.156 Failed
The system returned:
(111) Connection refusedThe remote host or network may be down. Please try the request again.
Your cache administrator is root.
Please helpHi,
Please check the parameters that has been defined in SICF for the transaction you are using.
With Regards,
Kaustuv Goswami. -
i am calling a transaction from alv i want to select the check boxes on th called transaction and go to the next screen how do i do that
Hello Chandan
You have to handle the DOUBLE_CLICK event either in your callback form routine (FM-based ALV) or event handler method for event USER_COMMAND (ABAP-OO based ALV).
If you call the transaction directly you will not have the authority check for this transaction. If you need this, you can use function module <b>ABAP4_CALL_TRANSACTION</b> instead.
If you want to open the transaction in a new window you can use the static method <b>CL_RECA_GUI_SERVICES=>CALL_TRANSACTION</b> (no authority check!).
Regards
Uwe -
Call transaction from the ABAP report
Hi Gurus,
Please help me with suggestion. I would like to access from SAP report with double click transaction FB03. I can access it, but in old transaction view ... How can I get the new transaction view?
Here is the code,
BR
Saso
IF fieldname CS 'BELNR'.
PERFORM bdc_screen USING 'SAPMF05L' '100'.
PERFORM bdc_field USING 'RF05L-BELNR' fieldvalue.
PERFORM bdc_field USING 'RF05L-BUKRS' '0008'.
PERFORM bdc_field USING 'RF05L-GJAHR' int-gjahr.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
CALL TRANSACTION 'FB03' USING bdc_data MODE 'E'.
REFRESH bdc_data.
ENDIFTry this Example:
REPORT ZABHI_TABSTRIP NO STANDARD PAGE HEADING
LINE-SIZE 80 LINE-COUNT 60.
TABLES : sscrfields.
DATA activetab(6) TYPE c .
DATA mat_des TYPE makt-maktx.
DATA pl_des TYPE t001w-name1 .
DATA mat_gro TYPE mara-mbrsh .
DATA mat_typ TYPE mara-mtart .
SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(18) text-010 FOR FIELD matnr.
PARAMETERS matnr TYPE mara-matnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN END OF SCREEN 001.
SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(18) text-020 FOR FIELD matnr.
PARAMETERS werks TYPE t001w-werks.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block2.
SELECTION-SCREEN END OF SCREEN 002.
SELECTION-SCREEN BEGIN OF SCREEN 003 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK block3 WITH FRAME TITLE text-004 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(18) text-030 FOR FIELD matnr.
PARAMETERS mbrsh TYPE mara-mbrsh.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block3.
SELECTION-SCREEN END OF SCREEN 003.
SELECTION-SCREEN BEGIN OF SCREEN 004 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK block4 WITH FRAME TITLE text-005 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(18) text-005 FOR FIELD matnr.
PARAMETERS mtart TYPE mara-mtart.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block4.
SELECTION-SCREEN END OF SCREEN 004.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
DEFAULT SCREEN 002.
SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2 .
SELECTION-SCREEN TAB (15) tabs3 USER-COMMAND ucomm3.
SELECTION-SCREEN TAB (15) tabs4 USER-COMMAND ucomm4.
* DEFAULT SCREEN 002 .
SELECTION-SCREEN END OF BLOCK tabb1.
INITIALIZATION.
tabs1 = text-002.
tabs2 = text-003.
tabs3 = text-004.
tabs4 = text-005.
activetab = 'TABS1'.
AT SELECTION-SCREEN .
CASE sscrfields-ucomm.
WHEN 'UCOMM1'.
tabb1-prog = sy-repid.
tabb1-dynnr = 001.
tabb1-activetab = 'TABS1'.
activetab = 'TABS1' .
WHEN 'UCOMM2'.
tabb1-prog = sy-repid.
tabb1-dynnr = 002.
tabb1-activetab = 'TABS2'.
activetab = 'TABS2'.
WHEN 'UCOMM3'.
tabb1-prog = sy-repid.
tabb1-dynnr = 003.
tabb1-activetab = 'TABS3'.
activetab = 'TABS3'.
WHEN 'UCOMM4'.
tabb1-prog = sy-repid.
tabb1-dynnr = 004.
tabb1-activetab = 'TABS4'.
activetab = 'TABS4'.
ENDCASE.
START-OF-SELECTION.
CASE activetab.
WHEN 'TABS1'.
SELECT SINGLE maktx FROM makt INTO pl_des WHERE matnr = matnr.
WRITE: 'Material ' , matnr , mat_des .
WHEN 'TABS2'.
SELECT SINGLE name1 FROM t001w INTO pl_des WHERE werks = werks.
WRITE: 'Plant ' , werks ,pl_des.
WHEN 'TABS3'.
SELECT SINGLE mbrsh FROM mara INTO mat_gro WHERE mbrsh = mbrsh.
WRITE: 'Material Group ' , mbrsh ,mat_gro.
WHEN 'TABS4'.
SELECT SINGLE mtart FROM mara INTO mat_typ WHERE mtart = mtart.
WRITE: 'Material Type ' , mtart , mat_typ.
ENDCASE.
And let me know. -
Call transaction from RFC?
Hi Experts,
I need to call Different transactions from a RFC.
I am looking for different approaches to achieve this.
One Idea is RFC will take input parameters as
-Transaction name
-Field names to be updated with its values (as a table)
Now in RFC, it should be able to update this transactionu2019s fields with the values provided in table parameter.
RFC will fill up the BDC table with the needed data, and will call the needed transaction to update the data.
Once the execution is complete, RFC will send back the different messages (error, info, and warning) through Table parameter.
Now, I do not have much of ABAP experience so I need your help in following
1) Should I use BDC recording in RFC?
2) Can BDC send back all the messages encountered while calling the transaction?
3) Is there any other way to approach this requirement?
Thank you in advance.
Regards,
Ashish ShahHi Amitava,
This RFC might be called from any WebBased application , like Portal , Visual Composer or WebDynpro for Java.
One more idea , may be an extension to my current idea is:
To add one more input parameter to RFC, a table with single field of type string.
Populate this table with entire BDC recording for one particular transaction, and pass it as an input parameter of RFC.
Once in RFC , this BDC recording can be used to populate BDC table and then pass this table to call transaction statement.
Do you see any sense in this logic?
Regards,
Ashish Shah -
Error calling transaction from a transaction
Hi,
I have created a transaction to batch Measurement Point readings for the PM Module. The batch uses a query to determine the tags required to update and it calls the "MeasurementPointWrite" transaction that I downloaded from SAP. My problem is when I run the batch transaction it reports "TransactionLoadException: Unable to find transaction file specified"
Has anyone seen this issue?
The following shows the relevant log dump:
[DEBUG] [MPWriteCall]: Started action execution
[DEBUG] [MPWriteCall]: Type: TransactionCall, Description: MeasurementPointWrite Transaction Call
[DEBUG] [MPWriteCall]: [Initializing Action][Initializing Parameters: [MPWriteCall.StoreTransactionOutput = MPWriteCall.StoreTransactionOutput=[boolean:false]][MPWriteCall.ResetState = MPWriteCall.ResetState=[boolean:true]][MPWriteCall.Persist = MPWriteCall.Persist=[string:INHERIT]][MPWriteCall.Async = MPWriteCall.Async=[boolean:false]][MPWriteCall.Expiration = MPWriteCall.Expiration=[long:21600000]]]
[DEBUG] [MPWriteCall]: Resolving Input Links
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.Reader, Type [Assign], Time [ <1 ms], Expression: "PCS7 Automatic"
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.DebugFlag, Type [Assign], Time [ <1 ms], Expression: Transaction.DebugFlag
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.MeasurementPoint, Type [Assign], Time [ <1 ms], Expression: PCSTagRepeater.Item{/Row/POINT}
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.Reading, Type [Assign], Time [ <1 ms], Expression: PCSTagRepeater.Item{/Row/Value}
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.Text, Type [Assign], Time [ <1 ms], Expression: "PCS TimeStamp: "&PCSTagRepeater.Item{/Row/TimeStamp}
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.CreateOutputXML, Type [Assign], Time [ <1 ms], Expression: Transaction.CreateOutputXML
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.CreateNotif, Type [Assign], Time [ <1 ms], Expression: Local.Blank
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.NotificaitonType, Type [Assign], Time [ <1 ms], Expression: Local.Blank
[DEBUG] [MPWriteCall]: Link Stats: MPWriteCall.DifferenceFlag, Type [Assign], Time [ <1 ms], Expression: Local.Blank
[DEBUG] Action parameter creating time [ <1 ms]
[DEBUG] Entering action 'MPWriteCall' implementation.
[DEBUG] [] Loading transaction from file.
[FATAL] [] Unable to find transaction in file system: .trx
[DEBUG] Exiting action 'MPWriteCall' implementation
[ERROR] Error found trying to execute action 'MPWriteCall' Exception: [Unable to find transaction file specified]
[WARN] [MPWriteCall] Skipping execution of output links due to action failure.
[ERROR] [MPWriteCall] Action: Runtime threw an exception. Exception: [com.sap.xmii.bls.exceptions.TransactionLoadException: Unable to find transaction file specified]
[DEBUG] [MPWriteCall]: Finished[ <1 ms] Succeeded: falseFor what it's worth, it appears to be a problem at the source. I have the same problem with the same downloaded file. Looking at the xml, there is an error in the self-reference of location. I was unable to figure out how to modify the xml of the export such that a reimport would fix it. (Export it and look at the xml - do a find on MeasurementPointWrite and you will see what I mean).
However, try the following:
Create a new transaction.
Copy the top sequence and include children of the MeasurementPointWrite transaction (basically you are copying the entire transaction contents).
Paste it to the empty sequence in your new transaction.
Save it under some name.
Create another new transaction.
Drag and drop your first new transaction into the empty sequence of your second new transaction.
Now it works...
Go figure.
Regards,
Mike
Edited by: Michael Appleby on Oct 18, 2010 7:44 PM -
Call transaction from java iView (link)
Hi,
I would like to call SAP R/3 transaction from a java iView. I know how to do it using the UrlGenerator service. Is there any other way of doing that ? (better way)
Thanks, Nir.You can Use EPCM.doNavigate() to call R3 Transaction or something like this:
<hbj:link id="r3"
text="R3 Transaction">
<% r3.setOnClientClick("OpenWindow('/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.Transaction?System=SAP_R3&TCode=SE80&GuiType=WinGui');return false;"); %>
</hbj:link>
Regards,
P. -
Call Transaction from Program by Skipping Initial Screen & Pass the Value
Hi All,
Can anybody help me to call a transaction from my program. I do not want to display the initial screen of the transaction but that TCODE should get opened by passing the values to the parameter of the initial screen.
For Example, in my program I want to call 'SE38' and in that, my Program of Name 'ZTEST' should get opened. So I need to call Transaction SE38, but I donot want to display initial screen of that. Instead of that, I want to put the value of Program 'ZTEST' and thus my program should get opened.
SandipHello Sandip,
Since you have not made any references to Batch Processing, I shall tell you the normal way to do it. First look at the code below and execute it.
set parameter id 'DTB' field 'VBAK'.
call transaction 'SE16' and skip first screen.
There are a few things that you need to keep in mind before you use this statement:
1. All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters.
2. For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number. However, if the next screen can be reached from the first screen by just hitting the Enter key, this will work.
The following will not work as you expect, because the next screen in the transaction cannot be reached by just hitting the Enter Key.
set parameter id 'RID' field 'ZTEST'.
call transaction 'SE38' and skip first screen.
Regards,
Anand Mandalika.
Please reward points if this helps. -
Hi,
I'm trying to call a transaction from jco. It is successful till a point - transaction actually start but there is not way to read the resulting screen. Is it possible to achieve this at all?
Here is a little snippet:
JCoFunction function = destination.getRepository().getFunction("ABAP4_CALL_TRANSACTION");
JCoRecordMetaData usingTabMeta = function.getFunctionTemplate().getFunctionInterface().getRecordMetaData("USING_TAB");
JCoTable usingTab = JCo.createTable(usingTabMeta);
JCoRecordMetaData spagpaTabMeta = function.getFunctionTemplate().getFunctionInterface().getRecordMetaData("SPAGPA_TAB");
JCoTable spagpaTab = JCo.createTable(spagpaTabMeta);
JCoRecordMetaData messTabMeta = function.getFunctionTemplate().getFunctionInterface().getRecordMetaData("MESS_TAB");
JCoTable messTab = JCo.createTable(messTabMeta);
function.getImportParameterList().setValue("SKIP_SCREEN", 'X');
function.getImportParameterList().setValue("MODE_VAL", 'E');
function.getImportParameterList().setValue("UPDATE_VAL", 'A');
function.getImportParameterList().setValue("TCODE", name);
function.getTableParameterList().setValue("USING_TAB", usingTab);
function.getTableParameterList().setValue("SPAGPA_TAB", spagpaTab);
function.getTableParameterList().setValue("MESS_TAB", messTab);
try {
function.execute(destination);
} catch (AbapException e) {
System.out.println(e.toString());
return;Hi,
as far as I know, the problem is that the JCo cannot handle UI elements which are sent back as a response. Only responses of type RFCs are handled and any UI elements (which are to be rendered by the SAP GUI, which interestingly acts as a server) are not processed by the Java Connector. This is why you don't see the screen.
I would have actually expected that you get an error from JCo, I find it strange that you say that the transaction is actually started. Are you sure? How do you know?
T00th -
Calling Transaction from ALV using OO Method
Hi,
My requirement is as follows....
I have an ALV grid with columns such as month wise Total of a GL account say JAN, feb etc...
When I double click on any of these cells it should take me to the respective Transaction (say FBL3n for the GL account and the company code) . I am able to track the GL account for which the total is displayed and company code is one of my selection criteria. In the main screen of the FBL3N we have to enter the posting date and i also want the Radio button against "all items', presently default is against 'Open Items'. So how can i proceed.
Thanks and Regards,
NamitDATA gr_event_handler TYPE REF TO lcl_event_handler . .. ..
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
*--Registering handler methods to handle ALV Grid events
SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
CLASS lcl_event_handler IMPLEMENTATION .
*Handle Double Click
METHOD handle_double_click .
PERFORM handle_double_click USING e_row e_column es_row_no .
ENDMETHOD .
CLASS lcl_event_handler DEFINITION
*Double-click control
Methods:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column
i_fieldrows TYPE lvc_t_row.
w_fieldrows LIKE LINE OF i_fieldrows,
CALL METHOD o_alvgrid->get_selected_rows
IMPORTING
et_index_rows = i_fieldrows.
LOOP AT i_fieldrows INTO w_fieldrows.
READ TABLE i_batch INTO w_block INDEX w_fieldrows-index.
if sy-subrc = 0.
* CLASS LCL_EVENT_RECEIVER DEFINITION
CLASS LCL_EVENT_RECEIVER DEFINITION.
* Event receiver definitions for ALV actions
PUBLIC SECTION.
CLASS-METHODS:
* Row Double click for dirll down.
HANDLE_DOUBLE_CLICK
FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW
E_COLUMN
ES_ROW_NO.
ENDCLASS.
* Implementation
* Every event handler that is specified below should also be set after
* the object has been created. This is done in the PBO processing.
* with the following command
* SET HANDLER oEventreceiver->handle_toolbar FOR o_Alvgrid.
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
*& Method handle_double_click
* This method is called when the user double clicks on a line to drill
* down.
* The following are exported from the ALV
* LVC_S_ROW
* LVC_S_COL
* LVC_S_ROID
METHOD HANDLE_DOUBLE_CLICK.
* The double click drill down processing should be
* coded in the form below.
PERFORM F9007_HANDLE_DOUBLE_CLICK USING E_ROW
E_COLUMN
ES_ROW_NO.
ENDMETHOD.
ENDCLASS.
*& Form F9007_HANDLE_DOUBLE_CLICK
* This form is called when the user double clicks on a line to drill
* down.
* -->P_E_ROW_ID - Row ID text
* -->P_E_COLUMN_ID - Column ID
* -->P_ES_ROW_NO - Row number
FORM f9007_handle_double_click USING p_row
p_column
p_row_no.
DATA: lw_output LIKE LINE OF i_output.
* RG:16/11/2004 - Start of Changes
* Need to check that a subtotal or grand total line has not been
* double-clicked, otherwise the report will produce a short dump!
check p_row+0(1) is initial.
* RG:16/11/2004 - End of Changes
READ TABLE i_output INDEX p_row INTO lw_output.
CASE p_column.
WHEN 'KNUMA'.
IF NOT lw_output-knuma IS INITIAL.
SET PARAMETER ID 'VBO' FIELD lw_output-knuma.
CALL TRANSACTION 'VBO3' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'VBAK_VBELN'.
IF NOT lw_output-vbak_vbeln IS INITIAL.
SET PARAMETER ID 'AUN' FIELD lw_output-vbak_vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'VBRK_VBELN'.
IF NOT lw_output-vbrk_vbeln IS INITIAL.
SET PARAMETER ID 'VF' FIELD lw_output-vbrk_vbeln.
CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. " F9007_HANDLE_DOUBLE_CLICK -
Hi experts,
I have a screen where I can call another transaction. My problem is if I call another transaction, how can I know what was the previos program. So I need to pass the program name with call transaction somehow.
I did'nt find the relevant information in syst.Hi
Try like this
call transaction <t-code>
using (bdc table)
mode (display mode)
update ( update mode)
messages into message itab.
The bdc table must be declared like bdcdata
The (display mode) determines how the transaction will be processed: u2018Au2019 (display all), u2018Eu2019 (display errors only), or u2018Nu2019 (no display)
The (update mode) : u2018Su2019 (synchronous) or A (asynchronous).
Regards
ABG. -
Call Transaction from Excel VBA macro and download ALV list object results
I have a situation that must be very common u2013 but I canu2019t find any clear information on how to get it done!
We frequently run SAP transactions, download the results (orders or inventory) into Excel, do some calculations and create a spreadsheet report.
I would like to automate this process using Excel VBA so that a macro will perform these steps:
1. Run our custom SAP report "YSD033" that summarizes orders using the previous day as the [From Date] parameter. (The user already has an active ECC 6 R3 session running.) If possible, can the TC be run using a specific variant "G111BIZ" ?
2. Download the list object that appears in an ALV grid as a table to an empty spreadsheet in the active workbook (export XXL list object)
3. Save the resulting workbook and close Excel.
Should the solution use u201Ccall transactionu201D or a GuiXT script?
Any help would be much appreciated, and some sample VBA code would be great!
Thanks.
GlennGood suggestion, but
I get "permission denied" for SapGuiAuto.GetScriptingEngine
I also tried the method below, but received this RFC error message:
User PPPPPPP has no RFC authorization for function group SYST.
Sub LoginCheck()
If login = False Then
' Setting the necessary variables for R/3 connection
Set objBAPICortrol = CreateObject("SAP.Functions")
Set objConnection = objBAPICortrol.Connection
' Establish a connection
If objConnection.Logon(0, False) Then
login = True
MsgBox "Connection Established"
CommandButton1.Caption = "Disconnect"
End If
Else
CommandButton1.Caption = "Connect 2 SAP"
login = False
objConnection.Logoff
Set objConnection = Nothing
Set objBAPICortrol = Nothing
End If
End Sub
I was told that these kinds of authority open up too big of a window that can't be monitored adequately...
I'm considering an approach like what is below if I can't convince security to grant me permissions...
Application.Wait Now + TimeValue("00:00:01")
SendKeys EnterKey, False
Since blocked RFC security settings are preventing the solution from being installed, I am markgin this question as answered.
I will post different questions about 1. how to convince the security team that it will be safe to allow the use of RFC calls, and /or 2. how use some windows-level scripting code to run the SAP jobs.
Thanks.
Edited by: GlennWebster on Mar 1, 2010 4:34 PM -
Need to call transaction from report
Hi,
I have to create BAPIs to call from webDynpro to realize the functionality of the transactions MI01/MI04 and MI07. I´m working in the SAP cable Solution environment.
Do You know any BAPIs to use instead of calling the transactions? Maybe there are standard ones, which contain cable solution modifications...
Otherwise I thought about building frame BAPIs and calling the transactions inside of it. Do You think it´s possible to realize that by batch-input?
I need some other opinions and ideas to this problem.
Thank You for Your help!
Reward points guaranteedHey Ravi,
ok, I'll try that!
I'm not that deep into the module of material management. Do You have a tipp, how I can find out, if these functions are also working with the cable materials?
When I'm running the function bapi_matphysinv_create_mult, a document has been created. But I'm not sure, if it's using the cable specials...
Thank You
Maybe you are looking for
-
Uninstall to my prior version is not working. I need to go back to the original version for two reasons. First, I can no longer use one of the toolbars that was compatible to previous version, but is no longer supported so it was disabled, and two wh
-
How do I get my phone off the update black screen when it powers on
I tried to do the recent update and when my phone powers on it freezes at this Apple screen with a loading bar,, Its been that way for a few hours
-
SSRS runtime error - The specified operation is not valid
I found a similar post here, but it didn't solve my problem. so i re-post it. i develop a report with vs2008. i have sql 2008 r2 on my local machine. when i preview the report on my local machine all fine. but when i deployed the report to sql 2008 s
-
Was working on tutorial from the: Oracle Database Express Edition 2 Day Plus Application Express Developer Guide Working on the section 4: How to Control Form Layout. Ran into a problem trying to compile the Create HT-EMP Table script. keep getting t
-
Photoshop CS6 smart objects on Mac
I recently upgraded to CS6 Master on Mac Mountain, and noticed that smart objects in Photoshop don't open in their respective applications. For example, when I double-click on the smart object, they open in Preview instead of Illustrator. How do I pr