ALV Grid with Popup Window
Hey @all,
I want to make a ALV Grid with a Popup Window. The idea is that there is a field for notes and when you click on this field a popup window should be opened where you can insert more text or if text already exists only the first column of the text is shown in field until you click on the field.
Is there any possibility to do it this way? Do I have to make a second Grid for this Popup Window? Do anybody have an example how to solve this problem?
Thank you in advance for your answers!
Greetings,
Alexander
*& Report Z_VISHVAS_ALV1
report z_vishvas_alv1.
type-pools: slis.
data: begin of i_outtab occurs 0.
include structure sflight.
data: w_chk type c. "For multiple selection
data: end of i_outtab.
I_OUTTAB TYPE SFLIGHT OCCURS 0,
data: i_private type slis_data_caller_exit,
i_selfield type slis_selfield,
w_exit(1) type c.
parameters: p_title type sy-title.
start-of-selection.
select * from sflight into table i_outtab.
call function 'REUSE_ALV_POPUP_TO_SELECT'
exporting
i_title = p_title
i_selection = 'X'
i_zebra = 'X'
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
i_checkbox_fieldname = 'W_CHK'
I_LINEMARK_FIELDNAME =
I_SCROLL_TO_SEL_LINE = 'X'
i_tabname = 'I_OUTTAB'
i_structure_name = 'SFLIGHT'
IT_FIELDCAT =
IT_EXCLUDING =
I_CALLBACK_PROGRAM =
I_CALLBACK_USER_COMMAND =
IS_PRIVATE = I_PRIVATE
importing
es_selfield = i_selfield
e_exit = w_exit
tables
t_outtab = i_outtab
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE i000(0k) WITH sy-subrc.
endif.
*****the internal table is modified with a cross sign for marking the
***rows selected
loop at i_outtab where w_chk = 'X'.
write: / i_outtab-carrid, i_outtab-price.
endloop.
Similar Messages
-
Display amount in ALV Grid with different Decimal Places based on Currency
HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65
i need to display values like AED : 22.56HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
i need to display values like AED : 22.56
KWD---22.565 but here field is NETWR with 2 decimal.
Need to Display amount in ALV Grid with different Decimal Places based on Currency
Regards,
Dileep Kumar Reddy -
Dear Colleagues,
I develop an ALV grid with OO standard methods. Before the first display of the table I define the editable fields. It works fine.
I have a problem : if the table is empty and I press the standard icons "Append a line" or "Insert a line", the new line don't have the defined editable characteristics.for fields. Is there a standard method which I have forgotten ?
Thanks a lot and kind regards
Petervs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_delete_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_append_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_copy_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_insert_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_copy.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_cut.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_paste.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_undo.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
* Displaying the output in ALV Grid
vs_layout_grid-no_rowmark = 'X'.
vs_layout_grid-zebra = 'X'.
vs_layout_grid-cwidth_opt = 'X'.
vs_layout_grid-edit = 'X'.
vs_layout_grid-ctab_fname = 'CT'.
vs_layout_grid-stylefname = 'CELLTAB'.
CALL METHOD v_grid->set_table_for_first_display
EXPORTING
i_save = 'X'
is_layout = vs_layout_grid
it_toolbar_excluding = i_toolbar_excluding[]
CHANGING
it_outtab = itab[]
it_fieldcatalog = it_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE 'ALV Grid display unsuccessful' TYPE 'I'.
STOP.
ENDIF. " IF sy-subrc NE 0
ELSE. " IF w_custom_container...
* Refresh the container if it already exists
CALL METHOD v_grid->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE 'Refreshing the container is not successful' TYPE 'I'.
STOP.
ENDIF. -
ALV grid with 2 labels on the output
Hi,
I am trying ALV Grid with two labels using Function modules.
in the output, it should appear like...
Header1 | Header2 | Header3 | Header4 |
T21
T22
T31
T32
First line is for Header lable and second line is for item lable under corresponding Header labels.
Pls. can any suggest me a solution for this..
Thanks
PRaUsing the Gird Functions it is not possible, you can get the with the help of ALV list function.
If you use this aproach you will loose some Functionalities, Your Report Output will Distorted.
cehck this image..
http://img100.imageshack.us/img100/3846/output6ef.th.gif
REPORT ZTEST_ALV message-id zz .
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT type slis_layout_alv,
x_events type slis_alv_event,
it_events type SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
MALE type i,
female type i,
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
x_events-NAME = SLIS_EV_TOP_OF_PAGE.
x_events-FORM = 'TOP_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
L_LAYOUT-NO_COLHEAD = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
it_events = it_events
TABLES
T_OUTTAB = ITAB
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 TOP_OF_PAGE.
*-To display the headers for main list
FORMAT COLOR COL_HEADING.
WRITE: / SY-ULINE(103).
WRITE: / SY-VLINE,
(8) ' ' ,
SY-VLINE,
(8) ' ' ,
SY-VLINE,
(19) '***'(015) centered,
sy-vline.
WRITE: / SY-VLINE,
(8) 'VBELN'(013) ,
SY-VLINE,
(8) 'POSNR'(014) ,
SY-VLINE,
(8) 'MALE'(016) ,
sy-vline,
(8) 'FMALE'(017) ,
sy-vline.
FORMAT COLOR OFF.
ENDFORM. -
ALV GRID with own EXCEL-Template
Hallo,
I have Problem with using ALV-Grid with a own created
template.
At First I copy the SAP_OM.XLS template to CUS_OM.XLS.
Then I update it by deleting all sheets, but not RAWDATA.
When I use this template in ALV-GRID, it would be the right one, but it his no Data.
The security settings in Excel are correct.
Can anyone help me to show the data like the normal
ALV-GRID??
thanks DieterHi
Check this link...
How to send data to different tabs of an excel sheet? -
ALV GRID with icon fields. When exports to Excel, icon fields are emtpy.
Hi all,
In our SAP system (6.0 ECC) we've noticed the following behaviour:
In ALV GRID with icons (color lights for example...) when we export the list to Excel format with the standard button bat, the icon column is always empty.
We think that in previous SAP version (4.7), the code corresponding to the icon appeared (For example @08@ for green light).
It's possible to have tha same functionality in this new version like in 4.7?
Regards.
Edited by: Ole ES on Nov 17, 2010 6:05 PMHi,
Check the format in which you export to Excel (MHTML, XML, ...) and try antoher one.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/66/79ad48157f11d2953700a0c930328a/content.htm
I think the integrated Excel mode shows '@08@'.
Best regards,
Guillaume -
OO ALV grid with a header line is this possible?
Howdy!
I have a requirement where I need to produce an ALV grid with the following format:
<b>Text 1 Text 2 Text 3 Text 4
Text 6
Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 Col_7 Col_8 Col_9
Cell conents -
Cell conents -
Cell conents -
Cell conents -
Cell conents -
</b>
Anyone got any idea on how to get the 'TEXT' fields into the ALV grid? These are dynamic texts that would basically display details of data entered in the selection screen.
The ALV title line is limited to 70 characters and I can't think of another way of doing this.
The texts need to appear on the ALV grid becasue the user would like to download them to Excel in addition to the ALV cell contents using the standard ALV functionality.
Any ideas would be appreciated!
Message was edited by: RobertI'm thinking that this may not work because it is not a full screen grid and the grid container does not care about the container on top of it so, it most likely would not print it. Implement this example program, you can see how this would work for you if you were using the FM.
report zrich_0001
no standard page heading.
* Global ALV Data Declarations
type-pools slis.
data: begin of i_alv occurs 0,
matnr type mara-matnr,
end of i_alv.
* Miscellanous Data Declarations
data: fieldcat type slis_t_fieldcat_alv,
events type slis_t_event,
list_top_of_page type slis_t_listheader,
top_of_page type slis_formname value 'TOP_OF_PAGE'.
start-of-selection.
perform initialization.
perform get_data.
perform call_alv.
end-of-selection.
* Form Initialization
form initialization.
clear i_alv. refresh i_alv.
perform eventtab_build using events[].
endform.
* Form Get_Data
form get_data.
select matnr into table i_alv
from mara up to 100 rows.
endform.
* CALL_ALV
form call_alv.
data: variant type disvariant.
data: repid type sy-repid.
repid = sy-repid.
variant-report = sy-repid.
variant-username = sy-uname.
perform build_field_catalog.
perform comment_build using list_top_of_page[].
* Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = fieldcat
i_callback_program = repid
is_variant = variant
it_events = events[]
i_save = 'U'
tables
t_outtab = i_alv.
endform.
* EVENTTAB_BUILD
form eventtab_build using events type slis_t_event.
* Registration of events to happen during list display
data: tmp_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = events.
read table events with key name = slis_ev_top_of_page
into tmp_event.
if sy-subrc = 0.
move top_of_page to tmp_event-form.
append tmp_event to events.
endif.
endform.
* BUILD_FIELD_CATALOG
form build_field_catalog.
clear: fieldcat. refresh: fieldcat.
data: tmp_fc type slis_fieldcat_alv.
tmp_fc-reptext_ddic = 'Material'.
tmp_fc-fieldname = 'MATNR'.
tmp_fc-tabname = 'I_ALV'.
tmp_fc-outputlen = 18.
append tmp_fc to fieldcat.
endform.
* COMMENT_BUILD
form comment_build using list_top_of_page type
slis_t_listheader.
data: tmp_line type slis_listheader.
clear tmp_line.
tmp_line-typ = 'H'.
tmp_line-info = 'Here is a line of text'.
append tmp_line to list_top_of_page.
clear tmp_line.
tmp_line-typ = 'S'.
tmp_line-key = 'Key1'.
tmp_line-info = 'Here is a value'.
append tmp_line to list_top_of_page.
clear tmp_line.
tmp_line-typ = 'S'.
tmp_line-key = 'Key2'.
tmp_line-info = 'Here is another value'.
append tmp_line to list_top_of_page.
endform.
* TOP_OF_PAGE
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = list_top_of_page.
endform.
Regards,
Rich Heilman -
Manipulate Layout on ALV Grid with dynamic table
Dear all
i'm generating a dynamic table depending of a date selection. That means that I show columns for weeks and the quantity of weeky migh change.
Now the users wants to have a specific layout of the ALV grid with totals. When he saves the layout, only the weeks at this selection will show the next time he runs the programm with a larger selection.
a) Is it possible to modify the layout during runtime by programming?
b) Do you have any other ideas how to solve this problem?
Thank youYou don't know the names of your columns? hmm you do, because before you created dynamic table you had to create field catalog, so the structure and column names of newly (dynamically) created table will be the same like defined in the field catalog.
The last loop also does not look good, in my opinion should be something like:
LOOP AT lt_datatable +(my first table)+ ASSIGNING <ls_data4>.
AT NEW pernr.
APPEND initial line to <fs_1> assigning <fs_2>.
<fs_2>-pernr = <ls_data4>-pernr.
ENDAT.
ASSIGN COMPONENT <ls_data4>-wage_type OF STRUCTURE <fs_2> TO <fs_5>.
<fs_5> = <ls_data4>-amount.
ENDLOOP.
also keep in mind that number of calls of method cl_alv_table_create=>create_dynamic_table is limited to 36 (?) calls within one program session because it uses dynamic subroutine pool behind so you will have short dump if you will execute that 37 times. -
Default collapsed view in ALV grid with subtotoal lines
Hallo experts,
I am displaying a ALV grid with subtotals. Now my requirement to display the Grid with only subtotal lines. Means the grid should be displayed in collapsed mode by default.
Can any you help me finding this option.
Thanks.
Matt.Hallo experts,
I am displaying a ALV grid with subtotals. Now my requirement to display the Grid with only subtotal lines. Means the grid should be displayed in collapsed mode by default.
Can any you help me finding this option.
Thanks.
Matt.
Hi Matt,
Whe you call the FM REUSE_ALV_GRID_DISPLAY, you have to fill the table it_sort.
In this table, you have to fill the field FIELDNAME with the field that you can show with susbstotals and fill the field EXPA with 'X'.
W_SORT-SPOS = 1.
W_SORT-FIELDNAME = 'CODIGO'.
W_SORT-SUBTOT = 'X'.
W_SORT-EXPA = 'X'.
APPEND W_SORT TO IT_SORT.
In the fieldcatalog there must be any with the field DO_SUM = 'X'
You can maka this directly in the list by creating a variant with susbtotals, colapse them and save as a default variant for all users.
Regards,
Pepe
Regards,
Pepe -
Binding ALV GRID with Deep Internal Table
Hello all,
I am looking for a way to display ALV Grid with the Deep ITAB.
My ITAB is not too complex.
It has One Structure which gets whole DB table + One extra field.
Therefore my Itab looks as follows.
TYPES: BEGIN OF TY_TRIP,
ZPM_UPLOAD LIKE ZDBTABLE, "ZDBTABLE is custom database table.
TDTIME TYPE STRING,
END OF TY_TRIP.
DATA: ITAB TYPE TABLE OF TY_TRIP,
WA_ITAB LIKE LINE OF ITAB.
Now i am able to populate data into Deep ITAB.
If i call ALV Grid with ITAB then i get error. So how to call 'REUSE_ALV_GRID_DISPLAY' with this ITAB?
Thanks in advance.Hello,
My senior asked me to use the below definition.
TYPES: BEGIN OF TY_TRIP.
INCLUDE STRUCTURE ZDBTABLE.
TYPES: TDTIME TYPE STRING,
END OF TY_TRIP.
DATA: ITAB TYPE TABLE OF TY_TRIP,
WA_ITAB LIKE LINE OF ITAB.
If anyone else is looking to print in ALV, they can use this type of ITAB definition though it gives you the flexiblity to create ITAB and also making it FLAT and not DEEP.
But i am still looking for an answer for my first post.
Thanks. -
Whats the current deal with popup windows in flash?
Hi There,
whats the current deal with popup windows in flash? I'm
trying to include popup windows in a site, and with IE7 (or
whatever the newest version of IE is ..the firefox lookalike) the
popups are not working at all, I have gone out a gotten other
sample popup scripts and I encountering the same problem, which is
the popups aren't working at all?
Is this a problem with just IE7 or am i completely missing
out on something here?
any ideas would be really appreciated! or if anyone has any
scripts for sizeable popup windows that work on IE7 i would really
appreciate it. thanks
:}well i have used a couple of different attempts. I have used
code generated by this:
http://www.flash-db.com/PopUp/
on (release) {
getURL
("javascript:NewWindow=window.open('pants.html','newWin','width=200,height=50,left=0,top= 0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');
void(0);");
I have also tried a couple of other tutorials from
http://www.kirupa.com
link;
http://www.kirupa.com/kirupa.htm'
and I used the javascript supplied and had no luck (I
embedded the html etc) ... i have tried about 5 other tutorials and
I've got to the point where I'm wondering is the problem based
around by browser, I only using IE7 and have no ther browser. I'm
using FlashMX 2004. all the example files .fla and swfs i have
downloaded aren't working either so I'm totaly scartching my head
at this point...
any ideas where i'm going wrong here? any help very much
appreciated
:} -
Issue with displaying ALV in a popup window
Hi Experts,
I am trying to create an popup window with an ALV in it. TO display the ALV i have defined the component usage for SALV_WD_TABLE component.When the ALV is displayed for the first time it shows up correctly with required data. When i try to display ALV popup again only the popup window frame gets displayed the ALV is missing from the popup window.
If i refresh the main component by clicking browser refresh buttion and then click for ALV popup dsplay i get the correct popup display the first time and then agin the same issue.
Has anyone else come across this issue before. All your suggestions, responses are welcome.
Thanks,
VivekHI,
My popup window has only one embedded view, the TABLE view of used component SALV_WD_TABLE hence i cannot modify the TABLE view.
I tired putting the following code for context node initialization in both the the methods WDDOONOPEN and WDDOINIT of the window which has the embedded view. But it dosen't make any difference i face the same issue even with these changes.
types: begin of ty_belnr,
belnr type vbkpf-belnr,
end of ty_belnr.
data: lt_belnr type standard table of ty_belnr,
lo_node type ref to if_wd_context_node,
lo_element type ref to if_wd_context_element.
select belnr
from vbkpf
into table lt_belnr
where ausbk = 'UC'
and bukrs = 'UC'
and gjahr = '2011'
and usnam = sy-uname.
if sy-subrc eq 0.
lo_node = wd_context->get_child_node( 'DOC_NUMBERS').
lo_node->bind_elements( new_items = lt_belnr[] ).
endif.
Edited by: Vivek Priyadarshi on Sep 14, 2010 5:24 PM -
Hi all F4 in alv grid with restricted value -- no solution from forum
hi all
i have developed report using alv grid using FM (important).
i have a field xyz which is input/output enabled in alv grid output. this field is attached with f4 help.
my requirement is to get or read the row in alv grid when user press f4 on that field so that restricted value should come in f4 help i.e. i have to read current line when user presses f4 i.e. the single line data in alv grid.
so how to get or read the current row when user press f4 i.e user will choose any row in alv grid and this output is on alv grid and there are multiple records.
or in other word is it possible to read current row in alv grid when user presses F4, if yes how???.
i hope u understood the query.Hai,
Check the code it may help u.
For F4 Values on Screen:
PROCESS ON VALUE_REQUEST
using module call starting with FIELD i.e FIELD field MODULE module
There are number of function modules that can be used for the purpose, but these
can fullfill the task easily or combination of them.
DYNP_VALUE_READ
F4IF_FIELD_VALUE_REQUEST
F4IF_INT_TABLE_VALUE_REQUEST
POPUP_WITH_TABLE_DISPLAY
DYNP_VALUE_READ
This function module is used to read values in the screen fields. Use of this
FM causes forced transfer of data from screen fields to ABAP fields.
There are 3 exporting parameters
DYNAME = program name = SY-CPROG
DYNUMB = Screen number = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
and one importing TABLE parameter
DYNPFIELDS = Table of TYPE DYNPREAD
The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
to this FM and the values read from the screen will be stored in this table.This
table consists of two fields:
FIELDNAME : Used to pass the name of screen field for which the value is to
be read.
FIELDVALUE : Used to read the value of the field in the screen.
e.g.
DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = SCREEN_VALUES.
READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
F4IF_FIELD_VALUE_REQUEST
This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = table/structure
FIELDNAME = 'field name'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNR
DYNPROFIELD = 'screen field'
IMPORTING
RETURN_TAB = table of type DYNPREAD
F4IF_INT_TABLE_VALUE_REQUEST
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
POPUP_WITH_TABLE_DISPLAY
This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
parameter.The VALUETAB is used to pass the internal table.
A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL =
ENDPOS_ROW =
STARTPOS_COL =
STARTPOS_ROW =
TITLETEXT = 'title text'
IMPORTING
CHOISE =
TABLES
VALUETAB =
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
e.g.
DATA: w_choice TYPE SY-TABIX.
DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
values TYPE I,
END OF i_values.
PARAMETRS : id TYPE I.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
i_values-values = '0001'.
APPEND i_values.
i_values-values = '0002'.
APPEND i_values.
i_values-values = '0003'.
APPEND i_values.
i_values-values = '0004'.
APPEND i_values.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 40
ENDPOS_ROW = 12
STARTPOS_COL = 20
STARTPOS_ROW = 5
TITLETEXT = 'Select an ID'
IMPORTING
CHOISE = w_choice
TABLES
VALUETAB = i_values
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
CHECK w_choice > 0.
READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained
...in the structure i_values.
Other FM that may be used to provide input help is HELP_START .
check this also.
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
regards.
sowjanya.b. -
Back from ALV Grid with multiple refresh
I have a report that from a selection screen shows an editable ALV Grid, and after I save it, it will refresh the grid.
My problem is when I hit the BACK button it returns to the "previous grid" instead of the selection screen
I am using the following:
WHEN 'BACK_C'.
LEAVE to SCREEN '0'.
How can I force it to go back to the selection screen?
sidenote: I have tried using call
selection-screen '1000'
but it adds a new problem as in the selection screen hitting back will return to the grid and I can never exit the report.Neither solution works.
If it helps, I'm refreshing the grid with:
DATA : ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
CALL METHOD ref_grid->refresh_table_display( ).
It seems when I refresh the grid it generates a completely independent grid screen and there's no way to skip them all and return to the selection screen. -
Fieldcontent in field catalog in ALV GRID with leading blanks to be display
Hello,
I want to display the result of a report in an ALV Grid.
There are different columns in the ALV, one of them contains text, sometimes with leading blanks.
The ALV does not display the blanks, cut them and moves the rest to the left.
I have used LVC_S_FCAT-JUST with 'R' but this moves the content of the field only to the right (right justified), so that it looks like there is always a lot of blnks on the left side .
Is there any possibility to display blanks when they appear in the text field?
e.g.
TEXT1 (10)
9991-A
9950-B
9090-T
9675-N
Do´t ask, why there are leading blanks. It is always your customer or manager who determines the results!
Thank you very much for any hint that brings happiness into the face of this customer / manager.
Best regards
DirkHi Sunil,
unfortunately this did not help!
But what can I expect, when the forum works the same.
e.g.
TEXT1 (10)
9991-A
9950-B
9090-T
9675-N
should more look like:
e.g.
TEXT1 (10)
9991-A
_9950-B
___9090-T
__9675-N
but without all the '_'.
Regards
Dirk
Maybe you are looking for
-
My computer's main files became corrupted and I had to "refresh" the system. It kept my files, but erased all of the programs. I had to even re-install Microsoft Word. So it erased my downloaded Lightroom as well. However, all of my files are still o
-
Connecting Cinema Display with mini display port to macbook pro with thunderbolt port
I am trying to connect a 27" cinema display (2010) that has a mini display port cable out of the back, into my macbook pro (2013) with thunderbolt ports. The mini display port cord fits into the thunderbolt port on the Macbook Pro, however the macbo
-
Help deciding whether to Patch, Upgrade or Fresh Install
Soon we will be upgrading one of the Oracle database targets to 11gR1 (11.1.0.7). Here is the existing OEM Grid Control configuration: * RHEL 4 Update 1 * GC 10.2.0.2 * Repository: 10.1.0.5 (single instance) * Agents 10.2.0.3 * 17 Hosts targets * 13
-
CS4 'Licensing for this product has expired'
This problem relates to a new install. Taken just about the entire weekend to get this problem sorted and still no closer. I have the trial DVD and trying to get to grips with it for evaluation. It's loaded fine on my desktop, but my laptop...totally
-
Frames vs. Windows in Acrobat 9
We recently upgraded from Acrobat 7 to Acrobat 9. Users who open multiple PDF documents in Acrobat have reported the default behavior of Acrobat 9 in opening PDFs is to use a new frame for each document that is opened. They report that Acrobat 7 used