Add a parameter in an ALV screen
Hi,
I'd like to add a parameter in the screen of an ALV GRID (I use REUSE_ALV_GRID_DISPLAY NOT OO ALV): the target is having the alv grid and this parameter in the same screen, so when I give a particular user command, I can read the input of the parameter and update the itab used by the alv.
Is it possible to do it?
Thanks in advance for your help.
Hi Umby79,
Since you are using the ALV functions I do not believe that this possible what you are asking for. The only way I can think of addressing this with ALV functions is to create your own user-command displaying a popup for the user to input the requested value and process the user-command with the value as such.
Your requirement could only be addressed by using the ALV gui control framework, which works with containers in your own screens.
Kind regards,
Robert
Similar Messages
-
How to Add a parameter of currency exchange rate in the selection screen
Dear Friends,
How to Add a parameter of currency exchange rate in the selection screen with format (9999.99999). wich field i need to take.
Thanks,
SridharTCURR-UKURS.
~Suresh -
How to add push buttons in out put screen of ALV
Hai,
How to add push buttons in out put screen of ALV (tool bar) with out using classes or methods .I want to know using normal ALV .
Thanks in advance .
kiranHi Kiran,
Here is the sample code.If you are using reuse_alv_grid_display, no need to write code in PBO.
Just double click the 'TEST' which is written in code.Then create a GUI Status.In Application toolbar,type the name of the button you want(say BUTTON).Then double click that name.Then enter the ICON name and function text.Activate it.This itself will work.If you want all the functionalities,then try to do as Vinod told.
TYPE-POOLS: slis.
DATA: i_qmel LIKE qmel OCCURS 0.
data v_repid type repid.
SELECT * FROM qmel INTO TABLE i_qmel.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
i_structure_name = 'QMEL'
TABLES
t_outtab = i_qmel
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-MSGV4.
ENDIF.
form set_pf_status using rt_extab type slis_t_extab.
set pf-status '<b>TEST</b>'.
endform.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
data lv_ucomm type sy-ucomm.
lv_ucomm
= sy-ucomm.
CASE lv_ucomm.
WHEN 'BUTTON'. "Double Click line Item
call transaction 'MM01'.
endcase.
endform. -
How to add check box in the ALV list
dear Experts,
i have a requirement.
i want show the check boxes in my ALV list.
can u please give the solution.
thanksTYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
SEL, " add a single character field in the final output table
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort type slis_t_sortinfo_alv,
wa_sort like line of it_sort.
DATA: BEGIN OF it_flight_sel OCCURS 0,
SEL,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight_sel.
data: wa_flight like it_flight.
In the layout set give the name of the field
whose checkbox will be created ( SEL as it has 1 char only )
layout-box_fieldname = 'SEL'.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
wa_sort-fieldname = 'CARRID'.
wa_sort-group = 'UL'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
loop at it_flight into wa_flight.
if wa_flight-Sel EQ 'X'.
collecting records in table it_flight_sel to process further
append wa_flight to it_flight_sel.
clear wa_flight.
TYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
SEL, " add a single character field in the final output table
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort type slis_t_sortinfo_alv,
wa_sort like line of it_sort.
DATA: BEGIN OF it_flight_sel OCCURS 0,
SEL,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight_sel.
data: wa_flight like it_flight.
In the layout set give the name of the field
whose checkbox will be created ( SEL as it has 1 char only )
layout-box_fieldname = 'SEL'.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
wa_sort-fieldname = 'CARRID'.
wa_sort-group = 'UL'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
loop at it_flight into wa_flight.
if wa_flight-Sel EQ 'X'.
collecting records in table it_flight_sel to process further
append wa_flight to it_flight_sel.
clear wa_flight.
Please follow the code. -
Requirement to add new parameter in selection in report painter report
Hi Gurus,
I have a requirement to add an extra field in Cost center:Act/Plan/Comm CC Cur report.This is otherwise a Z report in report painter with 0% code (T-code : GR55-> Report group->Report).But,when we go to technical information of this report,it has four standard sap programs,which contains code for this selection screen.It does not even have a modification scope.
Selection screen of this report contains following parameters:
Selection values:
Controlling Ar
Fiscal Year
From Period
To Period
Plan Version
Selection Groups:
Cost Center Group
Or value(s)
Cost Element Group
Or value(s)
My requirement is to add one more parameter : Purchase oeder in new block:
Is there any way to achieve it.
Note: Copying the standard progs into custom prog is not working,i already tried that.
Please let me know your suggestions,if any one of you came across such requirement before.it is very impoertant for me.
Thanks in advance,
MeenakshiHi,
This report (and all generic reports which are based on the same library) looks on CCSS structure. This structure extracts data from totals tables. Therefore, it's not possible to add the parameter of purchase order, as it's a detail line attribute.
Regards,
Eli -
How can we add a button on our ALV Grid
Hello,
I need to add a button on the ALV Grid and write a code on that button to download a file on the desktop of the user's machine.
How can we write a code for the same and what would be the syntax of that code.Hi,
you should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
ENTER SAPLKKBL PROGRAM
STATUS STANDARD.
exexute.
select standard check box. copy to your zprogram and your gui status.
Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
then go to se 38 double click on pf status .it goes to me41 screen .
there you can add your button along with predefined buttons on application toolbar.
then write code for button using user command event.
Code:
Form Set_pf_status
Notes: Called by FM REUSE_ALV_GRID_DISPLAY
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTANDARD'.
ENDFORM. "Set_pf_status
In the above case the GUI status copied was named ZSTANDARD and adjusted accordingly, adding and removing the desired buttons. A button was added called '%DELETE'.
3). Create the following report:
Code:
Form User_command
Notes: Called by FM REUSE_ALV_GRID_DISPLAY
Detects whether the icon/button for
'Return Tag Deletion' has been pressed. If it has then
detect whether any rows have been highlighted and then
set the delete flag.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: li_count TYPE I.
IF r_ucomm EQ '%DELETE'.
LOOP AT %g00 WHERE mark EQ 'X'.
ADD 1 TO li_count.
ENDLOOP.
IF li_count GT 0.
gc_delete_flag = 'X'.
r_ucomm = '&F03'. "Back arraow
ELSE.
MESSAGE W000 WITH 'Please highlight the rows to be deleted!'.
ENDIF.
ENDIF.
ENDFORM. "User_command
*reward points if usefull -
How can I add search parameter "Partner Function" to the inbox in ICweb?
Hello
I need to add search parameter "Partner Function" to the inbox ICweb search.
Today I can search for My open transaction.
The meaning of "My" in the EM Responsible parameter is that my BP number assign to any transaction in any partner function.
I wont to limit the search to look in a particular partner function. for example: 00000014 Employee responsible.
I mean in hardcode and not as a parameter selection screen.
I know that this functionality exist in CRM5 but i am in CRM4
Thanks
MeravHi Darren,
I have implemented this BAdi and when I am trying to activate this it is giving me short dump saying 'SYSTEM_CORE_DUMPED', please help.
During the course of my actions I implemeted this BAdi using transaction SE19, the activated this it is activated correctly, then I did some changes in method 'CUSTOM_HIT_LIST_SORT' but then whenever I try activate either the metod or the implemetation it is gives me a pop up saying 'Work Process restarted, session terminated' and the session terminates. On ERMS web page I see the Rabex error and in ST22 I see the SYSTEM_CORE_DUMPED error with following dump details
Runtime Errors SYSTEM_CORE_DUMPED
Occurred on 07/21/2006 at 09:07:51
Process terminated by signal 0.
What happened?
The current ABAP program had to be terminated because the
ABAP processor detected an internal system error.
The current ABAP program "ZCL_IM_TTT_IC_INBOX_BADI_2====CP " had to be
terminated because the ABAP
processor discovered an invalid system state.
Information on where termination occurred
The termination occurred during generation of the ABAP program
"ZCL_IM_TTT_IC_INBOX_BADI_2====CP ".
The point of termination was in line 5 of the ABAP source code of the
(Include) program "CL_CRM_AUI_ENTITY=============CU ".
of the program "CL_CRM_AUI_ENTITY=============CU " (when calling the editor
50).
Source code extract
000010 class CL_CRM_AUI_ENTITY definition
000020 public
000030 inheriting from CL_CRM_BOL_ENTITY
000040 abstract
> create public .
000060
000070 " public components of class CL_CRM_AUI_ENTITY
000080 " do not include other source files here!!!
000090 public section.
000100
000110 interfaces IF_CRM_IC_CONTACT .
000120
000130 methods ACCEPT
000140 abstract
000150 importing
000160 !IR_ENTITY type ref to CL_CRM_BOL_ENTITY
Please help.
Regards,
Tarun Goel -
Restrict Height of Header in ALV screen
Hi,
I have created ALV Tree using custom container. Now i want to rstrict the Height of the top of page as top of page containes too many rows hence in the whole report only the Header is displayed.
Can you tell me the method for to rstrict the Height of Header on Tree ALV screen.
CREATE OBJECT l_custom_container
EXPORTING
container_name = l_tree_container_name
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc <> 0.
MESSAGE e003 WITH 'ERROR'. "#EC NOTEXT
ENDIF.
ENDIF.
create tree control
CREATE OBJECT obj_tree1
EXPORTING
parent = l_custom_container
node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
item_selection = 'X'
no_html_header = ''
no_toolbar = ''
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc <> 0.
MESSAGE e003 WITH 'ERROR'. "#EC NOTEXT
ENDIF.
create Hierarchy-header
DATA l_hierarchy_header TYPE treev_hhdr.
PERFORM ztest_buildhhead CHANGING l_hierarchy_header.
create info-table for html-header
DATA: lt_list_commentary TYPE slis_t_listheader.
PERFORM f7800_build_comment CHANGING
lt_list_commentary.
repid for saving variants
DATA: ls_variant TYPE disvariant.
ls_variant-report = sy-repid.
create emty tree-control
CALL METHOD obj_tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = l_hierarchy_header
it_list_commentary = lt_list_commentary
i_background_id = 'ALV_BACKGROUND'
i_save = 'A'
is_variant = ls_variant
CHANGING
it_outtab = i_final2
it_fieldcatalog = i_fieldcat. "table must be empty !!
*& Form f7800_build_comment
text
<--P_LIT_LIST_COMMENTARY text
FORM f7800_build_comment CHANGING pt_list_commentary TYPE slis_t_listheader.
DATA: lt_line TYPE slis_listheader,
lwa_date TYPE t_date .
CLEAR lt_line.
Heading
lt_line-typ = c_h.
lt_line-info = 'Cash Position Report'(024).
APPEND lt_line TO pt_list_commentary.
Current Date
CLEAR lt_line.
lt_line-typ = c_s.
lt_line-key = 'Date:'(022).
lwa_date = sy-datum .
CONCATENATE lwa_date-month '/' lwa_date-date '/' lwa_date-year
INTO lt_line-info .
CLEAR lwa_date .
APPEND lt_line TO pt_list_commentary.
Current Time
lt_line-key = 'Time:'(023).
lt_line-info = sy-timlo.
APPEND lt_line TO pt_list_commentary.
Forest City Name
CLEAR lt_line.
lt_line-typ = c_a.
lt_line-info = 'Forest City'(021).
APPEND lt_line TO pt_list_commentary.
Selection Parameters
CLEAR lt_line.
lt_line-typ = c_s.
lt_line-key = 'For Selection :'(010).
APPEND lt_line TO pt_list_commentary.
LOOP AT s_bukrs .
CLEAR lt_line.
lt_line-typ = c_s.
lt_line-key = 'Facilitator Company Code :'(001).
IF NOT s_bukrs-high IS INITIAL .
CONCATENATE s_bukrs-low ' TO ' s_bukrs-high
INTO lt_line-info
SEPARATED BY space .
ELSE .
lt_line-info = s_bukrs-low.
ENDIF .
APPEND lt_line TO pt_list_commentary.
ENDLOOP .
CLEAR lt_line.
lt_line-typ = c_s.
lt_line-key = 'Run Date :'(013).
lwa_date = p_zfbdt .
CONCATENATE lwa_date-month '/' lwa_date-date '/' lwa_date-year
INTO lt_line-info .
APPEND lt_line TO pt_list_commentary.
LOOP AT s_prctr .
CLEAR lt_line.
lt_line-typ = c_s.
lt_line-key = 'Profit Center :'(014).
IF NOT s_prctr-high IS INITIAL .
CONCATENATE s_prctr-low ' TO ' s_prctr-high
INTO lt_line-info
SEPARATED BY space .
ELSE .
lt_line-info = s_prctr-low .
ENDIF.
APPEND lt_line TO pt_list_commentary.
ENDLOOP .
ENDFORM. " f7800_build_comment
Regards,
Deepthi.Hi ,
no_html_header = 'X'
Use this option to hide html header. Than use cl_gui_splitter to split screen into 2 parts.
For the upper part of the screen , use cl_dd_document class to add your necessary top of page content. The other one contains alv tree.
Set the height of splitter by thids method ;
call method splitter->set_row_height
exporting
id = 1
height = 13. -
Add a parameter to HR report (LDB driven)
Hi,
I need to add a new parameter on the selection screen of a HR report (LDB driven). I did look at the 'report category' but it only has limited parameters/selection options. I need to add one field from IT171 so that user could select based on the field from IT171. Is this possible? I mean if I add a parameter of my own do I need to filter the infotypes already read by the LDB?
I don;t know if my question is clear...
Thanks in advance.Hi,
I don't think you have an option to create or change the report category with the new field from PA0171.
Declare the parameter/select option in your program and write the logic to filter the data (P0171) based on the
values entered in the new field. Using LDB does not filter the new parameters included in program , it has to be written.
tables : pernr.
infotypes : 0171.
parameters : p_field like pa0171-<field>.
start-of-selection.
get pernr.
*filter the record(s) in P0171 based on the above p_field
end-of-selection.
Regards,
Srini. -
How to 'Exit' OO ALV screen type 'Model Dialog Box' using 'X' on the top?
HI Experts,
I have the below issue in my OO ALV screen type 'Model Dialog Box'...
The main screen is OO ALV and displays rows of data,
When select a line(row) and push any buttons
( u201CAdd Materialu201D, u201CAdd Binu201D, u201CModify Binu201D, u201CMove Materialu201D, u201CDisplay Batchesu201D)
the program will take you to next screen and it is a u201CModal dialog boxu201D type.
That screen has two buttons to exit ( u201CSAVEu201D and u201CCancelu201D ) on the bottom of the screen.
User would like to exit the screen using u201CXu201D on the top line right corner.
That u201CXu201D is not on for the u201CModal dialog boxu201D type screen.
How do I add event to close that screen using u201CXu201D?
Thanks in advance,
John.data :GR_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER,
GR_DIALOG_CONTAINER TYPE REF TO CL_GUI_DIALOGBOX_CONTAINER,
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS :
HANDLE_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
IMPORTING E_UCOMM,
HANDLE_ON_DIALOGBOX_CLOSE FOR EVENT CLOSE OF CL_GUI_DIALOGBOX_CONTAINER
IMPORTING SENDER,
ENDCLASS. "lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
METHOD HANDLE_USER_COMMAND.
CASE E_UCOMM.
WHEN 'DBCON'.
PERFORM DIALOG_DISPLAY.
ENDCASE.
ENDMETHOD. "HANDLE_USER_COMMAND
METHOD HANDLE_ON_DIALOGBOX_CLOSE.
IF NOT SENDER IS INITIAL.
CALL METHOD SENDER->FREE
EXCEPTIONS
OTHERS = 1.
FREE GR_DIALOG_CONTAINER.
CLEAR GR_DIALOG_CONTAINER.
ENDIF.
ENDMETHOD. "handle_on_dialogbox_close
ENDCLASS. "lcl_event_handler IMPLEMENTATION
FORM DIALOG_DISPLAY .
DATA : L_TEXT(255),
L_LIN TYPE I.
IF GR_DIALOG_CONTAINER IS INITIAL.
CREATE OBJECT GR_DIALOG_CONTAINER
EXPORTING
PARENT =
WIDTH = 400
HEIGHT = 150
STYLE = CL_GUI_CONTROL=>WS_SYSMENU
REPID =
dynnr = '100'
LIFETIME = lifetime_default
TOP = 100
LEFT = 350
CAPTION = 'Error Dialog Box'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
EVENT_ALREADY_REGISTERED = 6
ERROR_REGIST_EVENT = 7
OTHERS = 8.
ENDIF.
SET HANDLER GR_EVENT_HANDLER->HANDLE_ON_DIALOGBOX_CLOSE FOR GR_DIALOG_CONTAINER.
REFRESH IG_INDEX_ROWS.
CLEAR WG_SELECTED_ROW.
CALL METHOD GR_ALVGRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = IG_INDEX_ROWS.
DESCRIBE TABLE IG_INDEX_ROWS LINES L_LIN.
IF L_LIN GT 0.
READ TABLE IG_INDEX_ROWS INTO WG_SELECTED_ROW INDEX 1.
READ TABLE IG_SAL INTO WG_SAL INDEX WG_SELECTED_ROW-INDEX.
CONCATENATE 'Item' WG_SAL-POSNR 'of Sales Order' WG_SAL-VBELN 'has been selected' INTO L_TEXT
SEPARATED BY SPACE.
ELSE.
L_TEXT = 'Enter Netvalue greater than 500'.
ENDIF.
CALL METHOD GR_HTMLD->ADD_GAP
EXPORTING
WIDTH = 1.
CALL METHOD GR_HTMLD->ADD_TEXT
EXPORTING
TEXT = L_TEXT.
CALL METHOD GR_HTMLD->NEW_LINE.
Display the data
CALL METHOD GR_HTMLD->DISPLAY_DOCUMENT
EXPORTING
PARENT = GR_DIALOG_CONTAINER.
ENDFORM. " DIALOG_DISPLAY -
How to change the layout of the ALV screen
Hi,
I need to have a parameter in the selection screen. If I change the layout name on the selection-screen, the layout of the ALV needs to be changed.
Thanks,
srinivas.Pass the layout (and report name) to the ALV. parameter IS_VARIANT of function module [REUSE_ALV_GRID_DISPLAY|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_grid_display&adv=false&sortby=cm_rnd_rankvalue] or method [SET_TABLE_FOR_FIRST_DISPLAY|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=set_table_for_first_display&adv=false&sortby=cm_rnd_rankvalue]
You may also use the following function modules in your selection screen :
- [REUSE_ALV_VARIANT_F4|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_variant_f4&adv=false&sortby=cm_rnd_rankvalue] to select the layout/variant name. (in AT SELECTION-SCREEN ON VALUE-REQUEST FOR <variant>.)
- [REUSE_ALV_VARIANT_EXISTENCE|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_variant_existence&adv=false&sortby=cm_rnd_rankvalue] to check existence of the layout/variant name. (in AT SELECTION-SCREEN ON <variant>)
- [REUSE_ALV_VARIANT_DEFAULT_GET|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_variant_default_get&adv=false&sortby=cm_rnd_rankvalue] to get the default variant (to fill <variant> in the INITIALIZATION)
Regards -
Is there any way to add dynamic parameter in sql without breaking Server Behavior
Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
For example:
mysql_select_db($database_dxc_conn, $dxc_conn);
$query_Recordset1 = "SELECT article.articleName, article.articleDesc FROM article";
$Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
will become something like this:
$additionalSQL=", article.articleName_en";
mysql_select_db($database_dxc_conn, $dxc_conn);
$query_Recordset1 = "SELECT article.articleName, article.articleDesc $additionalSQL FROM article";
$Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
this is just an example, my real scenarion is far more complicated than this... however this kind of approach break the server behavior and force to do hand-coding...
i would like to know if there's better way to do such thing like this...viktor.iwan wrote:
Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
Server behaviors are simply bits of boilerplate code automatically generated by Dreamweaver. Editing the code doesn't "break" it (unless your edits are badly written). However, once you edit the code, Dreamweaver no longer recognizes it, so you lose the ability to drag recordset results from the Bindings panel.
If you want to edit server behavior code, the best way to handle it is to lay out your page as you want, using the Bindings panel. Once everything has been done, only then edit the server behavior code. -
How do I add actual email accounts to home screen-not just HUB?
How do I add actual email accounts to home screen-not just HUB? Can anyone give me the steps?
Essentially the Hub area is a home screen dedicated to your communication. Tap on the lower left icon and each of your messaging sections has its own dedicated 'icon.' As JC mentioned, it is new and it may take a while to get used to it.. but once you do it really is a great way to deal with the unified messaging idea and it also allows you to break down what you are looking at very quickly. Just need to learn a few new tricks. I've been on the Z for just over 3 months now and I could never go back...
-
Add a button choice on alv toolbar in wd4a
Hy everyone i've to add a button choice on alv toolbar. I create a node 'MY_TOOLBAR_FUNCTIONS' where add node and attributes to bind in external mapping in function_elements of alv interface controller.For button_choice I made a node 'CHOICE' and attribute 'WA_VALUE' type string. But the application dumps when create object lr_choice ; the error is WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set .
May you help me? Thanks in advance.
data: ls_choice TYPE ig_componentcontroller=>element_choice,
nd_choice TYPE REF TO if_wd_context_node,
nd_choice = nd_my_functions->get_child_node( name = wd_this->wdctx_choice ).
el_choice = nd_choice->get_element( ).
ls_choice-wa_value = '01'.
APPEND ls_choice TO lt_choice.
nd_choice->bind_table( lt_choice ).
DATA:lr_button_choice TYPE REF TO cl_salv_wd_fe_button_choice.
DATA:lr_choice TYPE REF TO cl_salv_wd_menu_action_item.
lr_function = l_value->if_salv_wd_function_settings~create_function_right( id = 'MYBUTTONCHOICE' ).
CREATE OBJECT lr_button_choice.
EXPORTING
sel_action_item_elementname = 'CHOICE.WA_VALUE'.
lr_button_choice->set_text( value = 'Filter' ).
lr_button_choice->set_tooltip( value = 'Filter').
lr_button_choice->set_sel_action_itm_elementname( 'CHOICE.WA_VALUE' ).
CREATE OBJECT lr_choice
EXPORTING
id = ls_CHOICE-WA_VALUE.
lr_choice->set_text( 'Esito Positivo' ).
lr_choice->set_image_source( value = 'ICON_GREEN_LIGHT').
lr_button_choice->add_choice( lr_choice ).
lr_function->set_editor( lr_button_choice ).in CREATE OBJECT lr_choice the object id have to refer to name of node.
CREATE OBJECT lr_choice
EXPORTING
id = 'CHOICE'. -
How to capture changed data at ALV screen
Hi ALV Experts,
I am using Following method for ALV display :-
CALL METHOD g_alv_grid_0200->set_table_for_first_display
EXPORTING
i_bypassing_buffer = 'X'
is_layout =
it_toolbar_excluding =
CHANGING
it_outtab =
it_fieldcatalog =
CALL METHOD g_alv_grid_0200->set_ready_for_input
EXPORTING
i_ready_for_input = '1'.
Now I am changing few values in ALV screen and capturing through following Method :-
CALL METHOD g_alv_grid_0200->check_changed_data
IMPORTING
e_valid = l_valid.
THIS ABOVE METHOD STRANGELY CAPTURES CHANGES IN QUANTITY AND DATE FIELDS ONLY AND NOT IN CHARATER FIELDS.
Can somebody suggest how to capture changes of character fields also.
Thanks in Advance,
ChandanHi,
Check whether the following logic helps.
p_er_data_changed TYPE REF TO cl_alv_changed_data_protocol.
DATA :
lwa_mod_cell TYPE lvc_s_modi,
lwa_mod TYPE ty_mod.
LOOP AT p_er_data_changed->mt_good_cells INTO lwa_mod_cell.
lwa_mod-row = lwa_mod_cell-row_id.
APPEND lwa_mod TO i_mod.
ENDLOOP.
Regards,
Lohitha
Maybe you are looking for
-
How can i change my e-mail address from old provider to new
How can I change my e-mail address on my iphone to a new internet provider that I just got. I already went to appleid.apple.com, and then changed to new e-mail there, but for some reason when I pressed the save button, it seemed like it wouldn't wan
-
HT204053 Can you merge multiple Apple IDs?
I have somehow collected 3 IDs over the years and want to merge them so I don't keep having to log out and resign in every time I need to update my apps on my iPhone and iPad. Any thoughts? Thanks!
-
How do I find the password for my iMac on version 10.7.4?
How do I find the password for my iMac on version 10.7.4?
-
Is there and apple software package similar to BES?
I currently work for a large organisation in the Health industry and we are gradually using more and more ipads and ipods for staff and patients and i was wondering if Apple had some server software to manage the devices in a similar way to the BES s
-
Rotate images in photo viewer possible?
I have the Pre and was wondering if there is a way to rotate images you are viewing in the photo viewer app. I have some saved from MMS sent to me via a blackberry (Pictures saved sideways). I would like to rotate. Is this possible? If not can we pos