Reg displaying a Field as Drop Down in ALV Grid Display
Hi All,
I have developed an ALV report program with one editable field using FM "REUSE_ALV_GRID_DISPLAY_LVC". My requirement is to make that editable field as dropdown box so that user can choose from the options. If i press SAVE all those will gets saved in a Ztable. Everything is working fine. But no values are getting populated in dropdown box.
Kindly do the needful.
Thanks in advance.
Hi,
Check out follwing subroutines in below programs.
perform build_fieldcat changing pt_fieldcat.
perform set_drdn_table.
BCALV_EDIT_06
BCALV_EDIT_07
Similar Messages
-
How to fill field with test data in alv grid display
hi all,
i m adding field TEXT to the structure for displaying grid.
i m modifying program like this
DATA: ALV_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
TYPES : BEGIN OF FS_OUTPUT .
TEXT(20) TYPE C.
INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
TYPES TEXT(20) TYPE C.
TYPES END OF FS_OUTPUT.
DATA: fs_output like table of alv_output.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TEXT'.
WA_FIELDCAT-seltext_l = 'Abteilungs Struktur'.
wa_fieldcat-tabname = 'ALV_OUTPUT'.
WA_FIELDCAT-COL_POS = '13'.
APPEND WA_FIELDCAT TO P_GT_FIELDCAT.
this is what i have write for diapalying field. but my question is how to fill test data with field TEXT.I m writing like this but not executed in the aboove grid dispaly statement.
loop at alv_output.
*alv_output-text(20) = 'abcdefgh'.
*modify alv_output.
*endloop.
plz tell me how to fill test datahI..,
Your table declaration has to be like this..
TYPES : BEGIN OF FS_OUTPUT .
INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
TYPES TEXT(20) TYPE C.
TYPES END OF FS_OUTPUT.
DATA: ALV_OUTPUT LIKE standard table of fs_output initial size 0.
loop at alv_output <b>into fs_output</b>.
<b>fs</b>_output-text(20) = 'abcdefgh'.
<b>modify alv_output index sy-tabix from fs_output transporting text.</b>
endloop.
Now give this table alv_output to the GRID_DISPLAY function module..
you will get the required output !!
Plz do remember to close the thread when ur problem is solved !!
reward all helpful answers !!
regards,
sai ramesh -
I am able to display the editable ALV. I am able to edit and save into my ztable. now, the issue is in editable cells I am able to enter through keyboard, but I want data for particular field from standard tables i.e. I am not getting dropdown as we get in normal ALV display. if this is solved my entire issue is solved.
Hi,
Create the serach help for the field in the ALV fieldcatalog.
If you were using OO ALV, then you need to register the field for F4.
it_f4-fieldname = 'Field name'
it_f4-register = 'X'.
it_f4-chngeafter = 'X'
APPEND it_f4 .
CALL METHOD grid->register_f4_for_fields
EXPORTING
it_f4 = it_f4[].
Regards,
Satish Kanteti -
The portlet name is not displayed in the portlet drop down list ?
Hi,
I use Sun Java System Portal Server 6 2005Q4 for windows 2000 server , use the following command to deployo portlet,
I am not sure if I successfully deploy the portlet?
pdeploy deploy -u amAdmin -w amadmin -p amadmin -d "cn=amldapuser,ou=DSAME Users,dc=icheng,dc=com" C:\Sun\PortalServer\tmp\portlet\portletsamples.war
The message I got after execute the pdeploy command is =>
Deploys the portlet war file and inserts the provider into display profile..
OPTIONS
--help Help message (false)
-u --runasdn UID Bind DN (none)
-w --password Password (none)
-p --wc_password Password for WebContainer's Admin (none)
-i --instance WebContainer's Instance into which the war file is to be deploye
d (*)
-d --dn LDAP DN of the target node (*)
-g --global Global display profile (false)
-r --rolesfile File containing the DSAME and portlet role mapping (*)
-f --userinfofile File containing the user info mapping (*)
-v --verbose Generate debug messages (false)
-V --version Generate version information (false)
-l --locale Locale information (en_US)
OPERAND
Specifies a path to the war location.
Deploying to IWS
Is this mean that successfully deploy the portlet ?
After I deploy the portlet, I login to Access Manager, select the "service" from view, click the portal desktop,
click "Manage Channels and Containers", click the "New Portlet Channel...", then click the portlet drop down list,
the portlet name is not displayed in the portlet list.
How can I make the portlet name displayed in the portlet drop down list ?
Can someone help me ?
Thanks!Hi
According to your description, since this is SQL Server forum, as Olaf Helper’s post, could you get the correct result if you execute the following query in SQL Server Manager Studio (SSMS)?
select UserName from aspnet_Users where UserId in(select FreindId from myFreinds where UserId in(select UserId from aspnet_Users where UserName = '<your typed name>'))
If you cannot get the correct result in SSMS, I recommend to check the Transact-SQL statement. Apart from the error message, we also need to know the table structure, data, join relationships between tables for further analysis.
However if there is no problem in SQL Server query, it will be an issue that regards ASP.NET and website deployment. I suggest you to post the question in the ASP.NET forums at
http://forums.asp.net/ . It is appropriate and more experts will assist you.
In addition, there is detail about listbox control in asp.net. You can review the following links:
How to Bind/Load/Fill ListBox with Sql Server Database in asp.net:http://www.webcodeexpert.com/2013/07/how-to-bindloadfill-listbox-with-sql.html#.U5f75_6KCM9
How to get multiple selected value in ListBox control - ASP.NET using C#:
http://www.dotnetfox.com/articles/how-to-get-multiple-selected-value-in-listbox-control-Asp-Net-using-C-Sharp-1047.aspx
Thanks
Lydia Zhang -
ALV Grid display Drop down lists
I have a alv grid display with a few records say 5 records which display 5 columns 5 rows. I want to know is it possible to have drop down lists for each column row cell but with different drop down values for each record.
So 5 columns 5 rows 25 cells but each cell have different drop down values.
Any info would be appreciatedHi,
Thanks for the replies.
Currently i do understand how to get the drop down handle per column and add values but this will only show the drop down values for each cell the same for each column.
What i am trying is that each cell of each colum of each row must have different drop down values.
Example below: Where the ; is devider for new value as a drop down value for that cell
Record-- column1---column2 column3 column4 column5
1 -
a;b;c -
d;e;f -
g;h;i -
k;l;m -
o;i
2 -
l;k;j -
i;j;g----
q;e;r -
o;u;g -
g;d;e -
How do I move where a drop-down hotspot's content displays?
I would like to know if there is an easy way to move where a drop-down hotspot's content displays.
Here's an example:
[+] 1) Do this, and make sure you include:
this one
that one
those things
I'm using the [+] as my hotspot before the step like I show above, but when I do that, the screen capture that is almost always my drop-down content displays right after and under the colon in the step, pushing the bullet points below the screen capture when the user clicks the [+]. I would like to leave the hotspot where it is, and have the screen capture display beneath the bullet points.
I can do this by manually moving the code in the HTML view, but it's kind of a pain in the neck to go searching for the code then having to cut/paste it in exactly the right spot.
Thanks!Hi,
A dropdown is always placed at the end of the paragraph that holds the hotspot link. There’s no way to control this behaviour other then going into the HTML.
Greet,
Willam -
How to change the attribute of screen field to drop down list dynamically
Hi All,
Col X Col Y
A input field
B drop down list
This is a tabular disply where the Screen field attribute for Col y is NO DROP DOWN BOX.
My requirement is to change the attribute of COl Y to DROP DOWN list depending on the value of
COL X dynamically.Dear Ajay,
Actually this requirement is to enhance the standard screen for Tcode :EHSVU21.
So depending on the 1st Column(Test no) value ,i have to change the 3rd Column(Low.norm.result)
property either to DROP Down or not.
So in the PBO only the changes to be made and there is no field in SCREEN internal table for changing the attribute to DROP down. I checked SCREEN internal table where the field VALUE_HELP and REQUEST is useful but not suitable for my case.
Any solution available? -
i have made one field as drop down in web ui. there are 3 values in drop down suppose a, b , c.
now i want to make c value as default value in drop down what to do?Hello Bala,
you can find number of discussions regarding this on SCN.
Search and do code in DO_INIT_CONTEXT method of view to set the value in entity.
lr_entity ?= me->typed_context->context_node_name->collection_wrapper->get_current( ).
lr_entity->set_property( iv_attr_name = 'Attribute_name' iv_value = 'value' ).
Regards Harish Kumar -
Drill down capabilities for an alv grid display field using oops concept
Hi All,
could anyone help me in how to achieve the drill down capabilities for an alv grid display field using oops concept.
Thanks & Regards,
padmasri.padmasri,
Hope your requirement is something like, when you click on a sales order number it should display that order (VA03), in a grid output displayed using set_table_for_first_display.
you can acheive it using event double click.
*& L O C A L C L A S S E S - D E F I N I T O N *
class lcl_event_receiver: local class to handle event DOUBLE_CLICK
CLASS LCL_EVENT_RECEIVER DEFINITION.
PUBLIC SECTION.
METHODS:
HANDLE_DOUBLE_CLICK
FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN.
PRIVATE SECTION.
ENDCLASS. "lcl_event_receiver DEFINITION
*& L O C A L C L A S S E S - I M P L E M E N T A T I O N *
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
METHOD HANDLE_DOUBLE_CLICK.
PERFORM HANDLE_DOUBLE_CLICK USING E_ROW
E_COLUMN.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
FORM HANDLE_DOUBLE_CLICK USING E_ROW TYPE LVC_S_ROW
E_COLUMN TYPE LVC_S_COL.
DATA: LS_DETAIL LIKE LINE OF T_OUTPUT.
WHEN 'T_OUTPUT'.
READ TABLE T_OUTPUT INDEX E_ROW-INDEX INTO LS_DETAIL.
If clicked on PO Number or PO Item, call ME23
IF E_COLUMN-FIELDNAME = 'EBELN' OR
E_COLUMN-FIELDNAME = 'EBELP' .
SET PARAMETER ID 'BES' FIELD LS_DETAIL-EBELN.
SET PARAMETER ID 'BSP' FIELD LS_DETAIL-EBELP.
CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
If clicked on sales order number or item, call VA03
ELSEIF E_COLUMN-FIELDNAME = 'VBELN' OR
E_COLUMN-FIELDNAME = 'POSNR'.
SET PARAMETER ID 'AUN' FIELD LS_DETAIL-VBELN.
SET PARAMETER ID 'APO' FIELD LS_DETAIL-POSNR.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
Hope this helps -
Currency field in alv grid display
Hi,
I am using alv grid display.I am having one currency field netprice.I want it to be displayed as blank when i am not passing any value.But it gives 0.00 when it is not having any value.How to make it blank instead of 0.00.
Points will be rewarded.
Regards,
Sowmya.HI,
If itab-curr = '0.00' .
itab-curr = ''.
modify itab.
endif. -
Dump when summing up CURR field in ALV GRID display
Hi All,
I am getting dump when I try to sum the CURR field in my ALV Grid Display. The field is of CURR 23. I am using classes and methods to display alv grid.
I tried passing <fs_fieldcat>-do_sum = 'X'. When I did this, it is dumping without even displaying the alv grid.
Here is the part it is throwing dump:
ls_lvc_data-value = space.
clear ls_lvc_data-style.
loop at it_fcat_local assigning <ls_fcat>
where tech ne 'X' and no_out ne 'X'.
if l_invisible eq 'X'.
clear l_invisible.
if <ls_fcat>-do_sum is initial.
continue.
else.
clear ls_lvc_data-col_pos.
endif.
endif.
add 1 to ls_lvc_data-col_pos.
assign component <ls_fcat>-fieldname
of structure <ls_data> to <l_field_value>.
_if sy-subrc ne 0.
message x000(0k).
endif._
Regards,
GuruThomas,
Here is the dump:
Runtime Errors MESSAGE_TYPE_X
Date and Time 10/22/2010 23:30:53
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Error analysis
Short text of error message:
Long text of error message:
Technical information about the message:
Message class....... "0K"
Number.............. 000
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"SAPLSLVC" or "LSLVCF36"
"FILL_DATA_TABLE"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
Source Code Extract
Line
SourceCde
2708
is_subtottxt_info = ls_subtot_info
2709
ip_subtot_line = lr_data
2710
changing
2711
c_subtottxt = l_subtottxt.
2712
ls_lvc_data-value = l_subtottxt.
2713
2714
append ls_lvc_data to ct_lvc_data.
2715
endif.
2716
2717
2718
Column per Fieldcat Entry
2719
2720
ls_lvc_data-value = space.
2721
clear ls_lvc_data-style.
2722
loop at it_fcat_local assigning <ls_fcat>
2723
where tech ne 'X' and no_out ne 'X'.
2724
if l_invisible eq 'X'.
2725
clear l_invisible.
2726
if <ls_fcat>-do_sum is initial.
2727
continue.
2728
else.
2729
clear ls_lvc_data-col_pos.
2730
endif.
2731
endif.
2732
2733
add 1 to ls_lvc_data-col_pos.
2734
2735
assign component <ls_fcat>-fieldname
2736
of structure <ls_data> to <l_field_value>.
2737
if sy-subrc ne 0.
>>>>>
message x000(0k).
2739
endif.
2740
2741
*... work on average
2742
if <ls_fcat>-do_sum eq 'C'.
2743
Initialize average result and entries
2744
<l_field_value> = 0.
2745
clear l_entries.
2746
2747
retrive unit from fieldcatalog
2748
assign space to <l_unit>.
2749
if not <ls_fcat>-cfieldname is initial.
2750
assign component <ls_fcat>-cfieldname
2751
of structure <ls_data> to <l_unit>.
2752
endif.
2753
if not <ls_fcat>-qfieldname is initial.
2754
assign component <ls_fcat>-qfieldname
2755
of structure <ls_data> to <l_unit>.
2756
endif.
2757 -
Field Catolgue in alv grid display
Hi Abapers,
I need to display the percentage rows with decimals and other rows without decimal . Is their any option in field catalog to do like this. Or tell me any other alternative to achieve this.
sno total col1 col2 col3
1 220 100 20 100
2 320 120 50 150
tot 540 220 70 250
per 40.74 1.87 and so on
or ,
I have two different internal tables how can i put it in one field catalog to pass it to alv grid display.
Regards,
PriyaDon't do total by your self in the Pogram.
in the Fieldcatalog there is an Attribute which will do total & Average .
Enable it so that from one internal table data it self it will do good.
example program
Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
display it using the basic ALV grid functionality(including column total). The example details the main
sections of coding required to implement the ALV grid functionality:
Data declaration
Data retrieval
Build fieldcatalog
Build layout setup
REPORT zdemo_alvgrid .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
form build_fieldcatalog.
* There are a number of ways to create a fieldcat.
* For the purpose of this example i will build the fieldcatalog manualy
* by populating the internal table fields individually and then
* appending the rows. This method can be the most time consuming but can
* also allow you more control of the final product.
* Beware though, you need to ensure that all fields required are
* populated. When using some of functionality available via ALV, such as
* total. You may need to provide more information than if you were
* simply displaying the result
* I.e. Field type may be required in-order for
* the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
* fieldcatalog-do_sum = 'X'.
* fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
* gd_layout-totals_only = 'X'.
* gd_layout-f2code = 'DISP'. "Sets fcode for when double
* "click(press f2)
* gd_layout-zebra = 'X'.
* gd_layout-group_change_edit = 'X'.
* gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
* i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
* i_callback_user_command = 'USER_COMMAND'
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
* IT_EVENTS = GT_XEVENTS
i_save = 'X'
* is_variant = z_template
tables
t_outtab = it_ekko
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.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
gowri
Message was edited by:
Gowri Krishna -
Field symbol has not yet been defined-ALV Grid Display in Report
Hi all,
Iam calling a Function module for ALV grid display in Report programming. Its throwing the Error message Field Symbol has not yet defined. Can any one suggest what i have to do regarding it?Hi,
<li> This is problem with fieldcatalog.
<li> Check field names or table name in small letters in quotes while building fieldcatalog internal table
<li> Check the fieldcatalog internal table , whether it has same fields as in data table which is shown using GRID_DISPLAY function module.
Thanks
Venkat.O -
Error in field catalog in ALV grid display using classes at do_sum = "X'.
Hi,
I'm using classes in ALV Grid display.
the code for the field catalog is going to dump because of the statement in the field catalog for field 'netwr',do_sum = 'X'.
that do_sum = 'X' is not working and going to dump when executed.with out that do_sum it is working fine. the error in dump analysys is showing sap standard incude LSLVCF01.
assign component
<ls_fieldcat>-fieldname of structure rt_data to <g_field>.
if sy-subrc ne 0.
message x000(0k).
endif.
sy-subrc is 4 when the program is being executed.
CODE:
FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
ls_fcat-fieldname = 'VBELN1'.
ls_fcat-ref_field = 'VBELN'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Invoice No'.
ls_fcat-seltext = 'Invoice No'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'BUDAT'.
ls_fcat-ref_table = 'BKPF'.
ls_fcat-coltext = 'Invoice Date'.
ls_fcat-seltext = 'Invoice Date'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'NETWR'.
ls_fcat-ref_field = 'NETWR'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Value of Invoice'.
ls_fcat-seltext = 'Value of Invoice'.
ls_fcat-datatype = 'CURR'.
ls_fcat-do_sum = 'X'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ENDFORM.
can u please look in the code and rectify the error,
would appeciate ur response.
regards,
veera.Hi,
try this..
ls_fcat-fieldname = 'NETWR'.
ls_fcat-ref_field = 'NETWR'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Value of Invoice'.
ls_fcat-seltext = 'Value of Invoice'.
ls_fcat-datatype = 'CURR'.
ls_fcat-do_sum = 'X'.
<b>ls_fcat-cfieldname = 'WAERS'.</b>
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
Regards
vijay -
How change standard field lable in alv grid display
Hi Experts,
How are you doing! I am having some doubts in the alv grid display, I am new to this concepts.
I want to display field lable manually, actually its taking from table field discription but I want to display one field name manually.
example code.
ls_fldcat-fieldname = 'BPKIND'.
ls_fldcat-ref_tabname = 'BUT000'.
ls_fldcat-ref_fieldname = 'BPKIND'.
APPEND ls_fldcat TO lt_fldcat.
ls_fldcat-fieldname = 'PARTNER2'.
ls_fldcat-ref_tabname = 'BUT051'.
ls_fldcat-ref_fieldname = 'PARTNER2'.
Here I dont want to display 'PARTNER2' I need 'KEY ACCOUNT MANAGER'.
Please send me how to do this.
Surya Ramireddy.Hi
Please check out this program.
Type-pools: slis.
Tables: likp.
Data: Begin of i_likp occurs 0,
vbeln like likp-vbeln,
ernam like likp-ernam,
erzet like likp-erzet,
erdat like likp-erdat,
End of i_likp.
Data: it_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type SLIS_FIELDCAT_ALV,
it_events type slis_t_event.
Selection-screen: Begin of block b1 with frame title text-001.
select-options: s_vbeln for likp-vbeln.
Selection-screen: End of block b1.
start-of-selection.
perform get_sales_header_data.
end-of-selection.
perform field_catalogue.
perform modify_field_catalogue.
perform display_alv_grid_display.
*& Form get_sales_header_data
text
--> p1 text
<-- p2 text
form get_sales_header_data .
select vbeln
ernam
erzet
erdat
into table i_likp
from likp
where vbeln in s_vbeln.
endform. " get_sales_header_data
*& Form field_catalogue
text
--> p1 text
<-- p2 text
form field_catalogue .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'I_LIKP'
I_INCLNAME = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
endform. " field_catalogue
*& Form modify_field_catalogue
text
--> p1 text
<-- p2 text
form modify_field_catalogue .
loop at it_fieldcat into wa_fieldcat.
case wa_fieldcat-fieldname.
when 'VBELN'.
wa_fieldcat-col_pos = 1.
wa_fieldcat-seltext_l = 'Sales Doc Header No'.
wa_fieldcat-emphasize = 'C100'.
when 'ERNAM'.
wa_fieldcat-col_pos = 2.
wa_fieldcat-seltext_l = 'Created By'.
wa_fieldcat-emphasize = 'C200'.
when 'ERZET'.
wa_fieldcat-col_pos = 3.
wa_fieldcat-seltext_l = 'Entry Time'.
wa_fieldcat-emphasize = 'C300'.
when 'ERDAT'.
wa_fieldcat-col_pos = 4.
wa_fieldcat-seltext_l = 'Created On'.
wa_fieldcat-emphasize = 'C400'.
endcase.
modify it_fieldcat from wa_fieldcat.
endloop.
endform. " modify_field_catalogue
*& Form display_alv_grid_display
text
--> p1 text
<-- p2 text
form display_alv_grid_display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
IT_FIELDCAT = IT_FIELDCAT
TABLES
t_outtab = i_likp
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
endform. " display_alv_grid_display
Regards
Haritha.
Maybe you are looking for
-
How to look at old text messages
I have a prepaid phone and I was wondering if I could look online at the text messages i received and sent about a month ago. Also too is the number there that i sent and revived too.
-
Allow user to take exams only once?
Is there any way to allow a user to only take an exam once? I have 4 exams, and they are all seperate captivate files (IE: exam 1, exam 2, exam 3, exam 4), they are in no way linked together, but is there any way to see if a user has taken exam 1, an
-
How to identify or track the latest changes in database objects
Hi, I am working in an application which has Oracle 10 g for backend. the application in total has around 30 tables and around 25 packages. I want to track the latest changes made in database. The database is accessible to my team of 20 members and i
-
I'm Not Crazy... Missing the Preferences MobileMe tab?
Ok... I'm trying to figure out how to force sync my changes to my MobileMe Gallery. I've read that I can click on the MobileMe account under the "Web" section on the left navigation to sync, but that does nothing. Apple's own help documentation for i
-
My Windows 8 computer is not recognizing my canon selphy cp400. I had no problem installing it originally then all of a sudden it stoped working and now when I try to reinstall it say to check my cable, make sure the printer is on... Help