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,
Namit
DATA 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
Similar Messages
-
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 -
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] -
Call tcode from alv report and passing group of values
hi all .
i want to call tcode from alv report and passing an internal table or group of values to a selection option of that t code ? how
ex. passing group of GL to fbl3n and display the detials of all .
thank youDear,
You have done a small mistake
--> rspar_line-option = 'EQ'.
rspar_line-HIGH = PDATE-HIGH.
u r passing "high" value and in "option u r passing "EQ" so how it will work!!!
So if u r passing only 1 date or more dates like 01.01.2010 , 15.02.2010 , 10.03.2010 then pass
rspar_line-selname = 'SO_BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-LOW = PDATE-HIGH.
APPEND rspar_line TO rspar_tab.
or if u r passing low & high date means in range like 01.01.2010 to 30.01.2010, then pass
rspar_line-selname = 'SO_BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'BT''.
rspar_line-LOW = PDATE-LOW.
rspar_line-HIGH = PDATE-HIGH.
APPEND rspar_line TO rspar_tab.
try above code , hope it helps...
i think u cannot use "call transaction using bdcdata" in ur case bcoz as u said in ur 1st post u want to display the details of all but still if u want to use then u should pass all parameters in loop.
PROGRAM
DYNPRO
DYNBEGIN
FNAM
FVAL
ex:-
LOOP AT GT_TEMP INTO GS_TEMP.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = 'SAPXXXX'.
bdcdata_DYNPRO = '1000'.
bdcdata_DYNBEGIN = 'X'.
bdcdata_wa-fnam = '''.
bdcdata_wa-fval = ''.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = ''.
bdcdata_DYNPRO = ''.
bdcdata_DYNBEGIN = ''.
bdcdata_wa-fnam = 'SD_SAKNR'.
bdcdata_wa-fval = GS_TEMP-GLACCOUNT.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = ''.
bdcdata_DYNPRO = ''.
bdcdata_DYNBEGIN = ''.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = 'XXX'.
APPEND bdcdata_wa TO bdcdata_tab.
ENDLOOP.
try above code if u r using call transaction...
Edited by: mihir6666 on Jul 9, 2011 3:10 PM
Edited by: mihir6666 on Jul 9, 2011 3:11 PM
Edited by: mihir6666 on Jul 9, 2011 3:13 PM -
Call Transaction in ALV GRID Display
Hi All,
i have an ALV list .( list of Invoices) i want to call trans.
VF03 from clicking the line .
i have also used User Command, events in ALV function .
as mention below , but cant able to call transaction.
in ALV line is selected but not working or moves to another Tcode as VF03 with parameter id .
please help me in this , if any body can ?
thanks in advance
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = G_INTERFACE_CHECK
I_CALLBACK_PROGRAM = GV_REPID
IT_FIELDCAT = GT_FIELDCAT[]
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_LAYOUT = LAYOUT_IN
IS_VARIANT = VARIANT_DETAIL
IT_EVENTS = EVENTCAT
I_CALLBACK_PF_STATUS_SET = 'SET_STATUS'
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_GRID_TITLE = 'Tax Report : GRN'
I_CALLBACK_TOP_OF_PAGE = 'page_header'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
IS_PRINT = ALV_PRINT
IMPORTING
ES_EXIT_CAUSED_BY_USER = LS_EXIT_BY_USER
TABLES
T_OUTTAB = IT_VBRP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-SGV4.
ENDIF.
NitinHI,
check the sample code which call the transaction VA02.
type-pools: slis.
types: BEGIN OF TY_KNA1,
KUNNR TYPE KUNNR,
NAME1 TYPE NAME1,
ORT01 TYPE ORT01,
END OF TY_KNA1.
TYPES: BEGIN OF TY_VBAK,
VBELN TYPE VBELN,
ERNAM TYPE ERNAM,
ERDAT TYPE ERDAT,
NETWR TYPE NETWR,
WAERK TYPE WAERK,
END OF TY_VBAK.
*&--WORK AREA & TABLE DECLARATION--
DATA: W_KNA1 TYPE TY_KNA1.
DATA: T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1.
DATA: W_VBAK TYPE TY_VBAK.
DATA: T_VBAK TYPE STANDARD TABLE OF TY_VBAK INITIAL SIZE 1.
*&--FIELDCAT TABLE & WORK AREA--
DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV.
DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
*&--EVENT TABLE AND WORK AREA--
DATA: W_EVENTS TYPE SLIS_ALV_EVENT.
DATA: T_EVENTS TYPE SLIS_T_EVENT.
DATA: W_EVENTS1 TYPE SLIS_ALV_EVENT.
DATA: T_EVENTS1 TYPE SLIS_T_EVENT.
*&--COMMENT TABLE & WORK AREA--
DATA: W_COMMENT TYPE SLIS_LISTHEADER.
DATA: T_COMMENT TYPE SLIS_T_LISTHEADER.
DATA: W_COMMENT1 TYPE SLIS_LISTHEADER.
DATA: T_COMMENT1 TYPE SLIS_T_LISTHEADER.
APPENDING FCAT -
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'KUNNR'.
W_FCAT-SELTEXT_M = 'CUST. NO'.
W_FCAT-HOTSPOT = 'X'. "HOT SPOT HAND SYMBOL
W_FCAT-EMPHASIZE = 'C119'. "FOR COLORING THE COLUMN 1
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'NAME1'.
W_FCAT-SELTEXT_M = 'CUST. NAME'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'ORT01'.
W_FCAT-SELTEXT_M = 'CITY'.
APPEND W_FCAT TO T_FCAT.
W_FCAT1-COL_POS = 1.
W_FCAT1-FIELDNAME = 'VBELN'.
W_FCAT1-SELTEXT_M = 'ORDER NO'.
W_FCAT1-EMPHASIZE = 'C519'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT.
W_FCAT1-COL_POS = 2.
W_FCAT1-FIELDNAME = 'ERNAM'.
W_FCAT1-SELTEXT_M = 'NAME OF PARTY'.
APPEND W_FCAT1 TO T_FCAT1.
W_FCAT1-COL_POS = 3.
W_FCAT1-FIELDNAME = 'ERDAT'.
W_FCAT1-SELTEXT_M = 'DATE'.
APPEND W_FCAT1 TO T_FCAT1.
W_FCAT1-COL_POS = 4.
W_FCAT1-FIELDNAME = 'NETWR'.
W_FCAT1-SELTEXT_M = 'ORDER VALUE'.
APPEND W_FCAT1 TO T_FCAT1.
W_FCAT1-COL_POS = 5.
W_FCAT1-FIELDNAME = 'WAERK'.
W_FCAT1-SELTEXT_M = 'CURRENCY'.
APPEND W_FCAT1 TO T_FCAT1.
*&--APPEND COMMENTRY--
W_COMMENT-TYP = 'H'.
W_COMMENT-INFO = 'CUSTOMER DETAILS'.
APPEND W_COMMENT TO T_COMMENT.
CLEAR W_COMMENT.
*&--APPEND EVENTS TABLE--
W_EVENTS-NAME = 'TOP_OF_PAGE'.
W_EVENTS-FORM = 'TOPPAGE'.
APPEND W_EVENTS TO T_EVENTS.
W_EVENTS-NAME = 'USER_COMMAND'.
W_EVENTS-FORM = 'SUB2'.
APPEND W_EVENTS TO T_EVENTS.
W_EVENTS1-NAME = 'TOP_OF_PAGE'.
W_EVENTS1-FORM = 'TOPPAGE1'.
APPEND W_EVENTS1 TO T_EVENTS1.
CLEAR W_EVENTS1.
W_EVENTS1-NAME = 'USER_COMMAND'.
W_EVENTS1-FORM = 'SUB3'.
APPEND W_EVENTS1 TO T_EVENTS1.
SELECT-OPTIONS: CUSTNO FOR W_KNA1-KUNNR.
SELECT KUNNR
NAME1
ORT01 FROM KNA1 INTO TABLE T_KNA1
WHERE KUNNR IN CUSTNO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
*I_BACKGROUND_ID =
I_GRID_TITLE = 'CUSTOMER DETAILS'
IT_FIELDCAT = T_FCAT
IT_EVENTS = T_EVENTS
TABLES
T_OUTTAB = T_KNA1 .
FORM TOPPAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_COMMENT
I_LOGO = 'LOGO_ALV'.
ENDFORM. "END OF TOPPAGE SUB.
FORM SUB2 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
READ TABLE T_KNA1 INTO W_KNA1 INDEX FIELDS1-TABINDEX.
SELECT VBELN
ERNAM
ERDAT
NETWR
WAERK
FROM VBAK
INTO TABLE T_VBAK
WHERE KUNNR = W_KNA1-KUNNR.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
*I_BACKGROUND_ID =
I_GRID_TITLE = 'LIST OF ORDERS'
IT_FIELDCAT = T_FCAT1
IT_EVENTS = T_EVENTS1
TABLES
T_OUTTAB = T_VBAK.
ENDFORM. "END OF SUB2.
FORM TOPPAGE1.
*&--APPEND COMMENTRYOF SECONDRY SCREEN--
W_COMMENT1-TYP = 'H'.
W_COMMENT1-INFO = 'LIST OF ORDERS'.
APPEND W_COMMENT1 TO T_COMMENT1.
W_COMMENT1-TYP = 'S'.
W_COMMENT1-KEY = 'CUSTOMER'.
W_COMMENT1-INFO = W_KNA1-KUNNR.
APPEND W_COMMENT1 TO T_COMMENT1.
CLEAR W_COMMENT.
W_COMMENT1-TYP = 'A'.
W_COMMENT1-INFO = W_KNA1-NAME1.
APPEND W_COMMENT1 TO T_COMMENT1.
CLEAR W_COMMENT1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_COMMENT1
I_LOGO = 'LOGO_ALV'
REFRESH T_COMMENT1.
ENDFORM. "END OF TOPPAGE1
FORM SUB3 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
READ TABLE T_VBAK INTO W_VBAK INDEX FIELDS1-TABINDEX.
SET PARAMETER ID 'VBAk' FIELD W_VBAK-VBELN.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
ENDFORM.
reward if useful.
thanks and regards. -
How to add a new button in an ALV using factory method
im using factory method to creat an ALV
The reason why I'm doing this is because I want the ALV and the selection screen in the same screen like exemplified here http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
r_container = lo_cont
container_name = 'DOCK_CONT'
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = me->t_data.
The above code already uses every parameter that method as to offer.
Is it possible to add extra buttons to an ALV using that method?Hi Ann,
The reason you are not able to see any of the new columns as a option to select in your web service block is because when you have published that block, they were not present. Add these two new objects in your block and publish it again. You will be prompted for duplication content. Select the highlighted block for duplicate and now you can see the new added objects in the filter option. Update and this will overwrite your published block. Please note, web services do appear to behave weirdly when used with dashboards so I request you to please try it in a separate test report first.
Hope that helps.
Regards,
Tanisha -
Coloring an single field of an ALV using factory method
how can we color just a single field in ALV using factory method.
Hello Regi you may want to check this sample code, basically what you need is to use the lvc_s_colo structure and the set_color method of the class cl_salv_column_table.
METHOD set_colors.
*.....Color for COLUMN.....
DATA: lo_cols_tab TYPE REF TO cl_salv_columns_table,
lo_col_tab TYPE REF TO cl_salv_column_table.
DATA: ls_color TYPE lvc_s_colo. " Colors strucutre
* get Columns object
lo_cols_tab = co_alv->get_columns( ).
INCLUDE <color>.
* Get ERDAT column & set the yellow Color fot it
TRY.
lo_col_tab ?= lo_cols_tab->get_column( 'ERDAT' ).
ls_color-col = col_total.
lo_col_tab->set_color( ls_color ).
CATCH cx_salv_not_found.
ENDTRY.
*.......Color for Specific Cell & Rows.................
* Applying color on the 3rd Row and Column AUART
* Applying color on the Entire 5th Row
DATA: lt_s_color TYPE lvc_t_scol,
ls_s_color TYPE lvc_s_scol,
la_vbak LIKE LINE OF ct_vbak,
l_count TYPE i.
LOOP AT ct_vbak INTO la_vbak.
l_count = l_count + 1.
CASE l_count.
* Apply RED color to the AUART Cell of the 3rd Column
WHEN 3.
ls_s_color-fname = 'AUART'.
ls_s_color-color-col = col_negative.
ls_s_color-color-int = 0.
ls_s_color-color-inv = 0.
APPEND ls_s_color TO lt_s_color.
CLEAR ls_s_color.
* Apply GREEN color to the entire row # 5
* For entire row, we don't pass the Fieldname
WHEN 5.
ls_s_color-color-col = col_positive.
ls_s_color-color-int = 0.
ls_s_color-color-inv = 0.
APPEND ls_s_color TO lt_s_color.
CLEAR ls_s_color.
ENDCASE.
* Modify that data back to the output table
la_vbak-t_color = lt_s_color.
MODIFY ct_vbak FROM la_vbak.
CLEAR la_vbak.
CLEAR lt_s_color.
ENDLOOP.
* We will set this COLOR table field name of the internal table to
* COLUMNS tab reference for the specific colors
TRY.
lo_cols_tab->set_color_column( 'T_COLOR' ).
CATCH cx_salv_data_error. "#EC NO_HANDLER
ENDTRY.
ENDMETHOD. "set_colors -
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. -
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. -
Calling BRM from UDF using JNDI lookup with @EJB annotation
Hi Experts
I am trying to implement a UDF to invoke my BRM Rules set via JNDI Lookup instead of a SOAP Channel lookup.
I have had a look at the following links/docs:
Calling BRM from UDF using Public API
http://www.gleanster.com/system/resources/W1siZiIsIjIwMTIvMDgvMDcvMjAvNDcvNTAvNDMvVGhpbmdzX1lvdV9TaG91bGRfS25vd19hYm91dF9TQVBfTmV0V2VhdmVyX0JSTS5wZGYiXV0/Things%20You%20Should%20Know%20about%20SAP%20NetWeaver%20BRM.pdf
For item 1 above, the example looks really good, but it doesnt explain how I get access to the following required imports from my UDF:
import com.sap.brms.qrules.ejb.*;
import com.sap.brms.qrules.engine.AbstractProject;
import com.sap.brms.qrules.engine.RuleEngine;
import com.sap.brms.qrules.engine.RulesetContext;
import javax.ejb.EJB;
The second document is really good as well, but I could not figure out how to get it to work from my UDF.
So, can anyone help me to understand specifically what is required to get this to work?
Is is possible to invoke the rule set from my UDF?
How do I give my UDF access to all the required jars/imports?
I have manage to create a new DC (Development Component) with a public part and this enables me to get my code to compile on my local PC but I am not able to activate it due to the server not having access to the same java packages as my local copy.
Any help would be greatly appreciated.You resolve the dependency by importing the required jars with using the dependency tab for the mapping program.
As stipulated before, I have managed to resolve the dependency issue but I have now getting the same error as in the forum: Calling BRM from UDF using Public API
The specific error is:
com.sap.engine.services.cross.PortableRemoteObjectContainer.narrow(PortableRemoteObjectContainer.java:238)
Has anyome manage to get invoke a BRM Ruleset using JNDI? -
Calling a Transaction from ALV Grid Using OO method
Hi,
My requirement is as follows....
I have an ALV grid with columns such as PO no., GR no., Invoice no., etc...
When I double click on any of these cells it should take me to the respective Transaction (say ME23n for PO no.) with the cell content as input in the transaction.
Thanks and Regards,
NavaneethHi,
then u can write the code in HANDLE_DOUBLE_CLICK method
CLASS LCL_EVENT_RECEIVER DEFINITION.
PUBLIC SECTION.
METHODS:
*method used for double click
HANDLE_DOUBLE_CLICK
FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN,
ENDCLASS. "LCL_EVENT_RECEIVER DEFINITION
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
*implementation of the method double click
*when document no is double clicked in ALV GRID , its value is sent to
*transaction FPE3 and the corresponding values of the document are
*displayed
METHOD HANDLE_DOUBLE_CLICK.
CLEAR WA_WRT_OFF_FLDS.
IF E_COLUMN = 'OPBEL'.
READ TABLE ITAB INTO WA_IAB INDEX E_ROW-INDEX.
set parameter....
call transaction...
endif.
ENDMETHOD. "handle_double_click
*method to remove unwanted icons from toolbar
endclass. -
Not able to reload the data from DB using finder methods
Hi all,
<p>
I am facing a weird problem while using finder methods.
I am using weblogic 8.1 SP3 and entity beans are CMP with DB concurrency.DB is oracle
</p>
<h4>Problem Description</h4>
<p>
I am having one session bean which internally interacts with my entity beans,
Now say my transaction is getting initiated in one of the session bean and I use some finder in it.
</p>
<p>
To make the problem more clear lets say my entity bean is loanBean with loanId as primary key.
Now say method A of session bean initiates the transaction and I use something like
<br>
LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
<br>
<b>Note that I am not using findByPrimaryKey method</b>
<br>
now this method A calls some other method B on some session bean which is having Required as its transaction attribute.
<br>
But before the call of B some other thread or background process updates the DB for this loanId and commits,
<br>
now when I fire the same finder in method B I am still getting the old data, ie I am not getting the data which has been modified in DB and committed by some other thread, I still get the old data and when I tried to generate the SQL queries which weblogic is firing, I see
it fires the SQL for every finder other that findByPrimaryKey.
<br>
<b>
Now my problem is I am getting the old data only and I need the new updated data of DB. isolation-level of DB and beans is READCOMMITTED.
Note:: I cant use new transaction to read the data.
</b>
<br>
And I couldn't understand that when weblogic is firing query for every finder then why it should not refresh the data in its cache. Is there any way to disable this kind of caching and say that everytime when i use finder just go to DB and get me the last committed data.
</p>
<br>
Any help in this regard would be very helpful to me.
<br>
Thanks and Regards
<br>
Manish Garg.
</p>Hi,
In my understanding, cache is not involved in this scenario. As you
observed, the container fires sql every time when you invoke this finder.
So, it should just give the result that it got from the DB. Is there a
possibility that the DB is using repeatable_read or serializable for
isolation level?
You can debug further by doing couple of things -
1. Instrument the code in the generated RDBMS java file for the entity bean
(if you use -keepgenerated option for weblogic.ejbc, u can get the source of
this file). This class will have the implementation for ejbFindByLoanId. You
can just print the result set data after the query is fired.
2. Try the same scenario without the ejb container. Like, write a jsp which
will start a user tx and fire the query twice such that there is an update
between the two queries. Note that, you need to use a TxDataSource to get
the JDBC connection so that it will be tx aware.
--Sathish
<Manish Garg> wrote in message news:[email protected]...
Hi all,
<p>
I am facing a weird problem while using finder methods.
I am using weblogic 8.1 SP3 and entity beans are CMP with DB
concurrency.DB is oracle
</p>
<h4>Problem Description</h4>
<p>
I am having one session bean which internally interacts with my entity
beans,
Now say my transaction is getting initiated in one of the session bean and
I use some finder in it.
</p>
<p>
To make the problem more clear lets say my entity bean is loanBean with
loanId as primary key.
Now say method A of session bean initiates the transaction and I use
something like
<br>
LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
<br>
<b>Note that I am not using findByPrimaryKey method</b>
<br>
now this method A calls some other method B on some session bean which is
having Required as its transaction attribute.
<br>
But before the call of B some other thread or background process updates
the DB for this loanId and commits,
<br>
now when I fire the same finder in method B I am still getting the old
data, ie I am not getting the data which has been modified in DB and
committed by some other thread, I still get the old data and when I tried
to generate the SQL queries which weblogic is firing, I see
it fires the SQL for every finder other that findByPrimaryKey.
<br>
<b>
Now my problem is I am getting the old data only and I need the new
updated data of DB. isolation-level of DB and beans is READCOMMITTED.
Note:: I cant use new transaction to read the data.
</b>
<br>
And I couldn't understand that when weblogic is firing query for every
finder then why it should not refresh the data in its cache. Is there any
way to disable this kind of caching and say that everytime when i use
finder just go to DB and get me the last committed data.
</p>
<br>
Any help in this regard would be very helpful to me.
<br>
Thanks and Regards
<br>
Manish Garg.
</p> -
Call transaction in ALV report
Dear Experts,
I want to call transaction HUMO from my ALV report on double click on Handling unit no.
I want to pass the Handling unit through my report and skip the first screen.
I try it using Call Transaction but the filed Handling unit doesn't have a parameter ID.
I also try it using Submit but the program is a function pool.
Can anyone please help me out in solving the issue.
Thanks in advance
Best regards
Ankur G.Hai,
This can be achieved by creating custom parameter id.
1.Go to the table maintenance generator of the table TPARA and go to the Maintain button through the transaction SM30.
Enter the table view name TPARA.
2.Click on the maintain button. The following information will appear. Click on the Tick button or the ENTER button to go to the next screen.
3.Enter the Set/Get parameter id as the parameter ID you want to create. Here, I will be creating the parameter Id as ZNAME_DATA1. Click on ENTER button.
4.It will ask for the text of the parameter Id. Enter the text of the parameter ID and click on the Save button.
5.Now go to the SE11 transaction for creating a data element and enter the parameter id at the Further Characteristics tab at the parameter Id section.
6.Activate the data element and use it with the program. It will act the same good as a standard one. -
Can we call screen from ALV report
Hi All,
I am in the process of creating a stand alone application. However I have stuck up here.
Problem: Can we call any screen from ALV report? If yes then how??? Can anyone give some code snippet??
All your help appreciated.
Thanks,
JigneshHello Jignesh,
Here is an example, when you double click on a line, it pops with with another screen that holds details for the flight information.
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click FOR EVENT double_click
OF cl_gui_alv_grid
IMPORTING e_row
e_column.
ENDCLASS. "lcl_event_handler
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_double_click.
READ TABLE it_flight INTO wa_flight INDEX e_row-index.
IF sy-subrc EQ 0.
SELECT * FROM sbook
INTO TABLE it_book
WHERE carrid EQ wa_flight-carrid AND
connid EQ wa_flight-connid.
CALL SCREEN 101 STARTING AT 10 10.
ENDIF.
ENDMETHOD. "HANDLE_DOUBLE_CLICK
ENDCLASS. "LCL_EVENT_HANDLER
MODULE status_0101 OUTPUT.
Variant to save the layout
gv_repid = sy-repid.
IF g_custom_container2 IS INITIAL.
Create an instance for Custom Container 'ALV_GRID'
CREATE OBJECT g_custom_container2
EXPORTING container_name = gs_container2.
Create an instance for ALV Grid
CREATE OBJECT g_grid2
EXPORTING i_parent = g_custom_container2.
Variant to save the layout
gs_layout-grid_title = 'Flight Bookings'.
CALL METHOD g_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'SBOOK'
is_layout = gs_layout
CHANGING
it_outtab = it_book[].
ELSE.
CALL METHOD g_grid2->refresh_table_display.
ENDIF. "IF grid2 IS INITIAL.
Setting focus for created grid control
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid2.
CALL METHOD cl_gui_cfw=>flush.
ENDMODULE. " status_0101 OUTPUT
Refer to BC_ALV_GRID04 for ALV data declarations used in the above piece of code.
Maybe you are looking for
-
My Safari is no longer working with many sites. However Chrome and Firefox work fine. I would like to re-install Safari in an effort to clear up the problem I can not resolve.
-
SecurityException due to problems with realm
Hi, we try to run our web application (developed and successfully deployed under WebLogic5.1) on the WebLogic6.0. After transforming the weblogic.properties file followed by adjusting the new config.xml and copying the necessary classes, *.jar, *.jsp
-
After upgrading to iOS 7.0.2 I can't update my apps
-
Weblogic _WLS_ADMIN000000.DAT caching issue
Hi all, I have a strange situation here. My intention is to point my application to a new database. My application is deployed using an .ear file in weblogic 11g and reads database connection properties from a properties file placed in the classpath
-
Need help switching Flash slideshow
I admit it, I need help! Here is my problem, I want the links on the left to change the Flash slideshow on the right when clicked. I want to stay on this page, so only the Flash slideshow changes. This is the site I'm working on.... http://www.hwas.c