ICON with field contents in case of ALV GRID
please have a look at the program. the output of the program display ICONS with the field contents.
I wanted the same functionality in case of GRID layout.
But in case of GRID layout I am only getting ICON without field contents.
In this Example
if I use ALV LIST the ouput will be STACk ICON with X
IF I use ALV GRID the output will be STACK ICON.
REPORT ZTEST_SO1 .
type-pools : slis.
data : result(25).
types : BEGIN OF Ty_MARA,
gv_flag type char25,
end of ty_mara.
data : gt_mara type standard table of ty_mara,
wa_mara type ty_mara.
DATA : gt_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type slis_fieldcat_alv.
wa_fieldcat-fieldname = 'GV_FLAG'.
APPEND WA_FIELDCAT TO GT_FIELDCAT.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = '@3B@'
TEXT = 'X'
INFO = 'YY'
ADD_STDINF = 'X'
IMPORTING
RESULT = wa_mara-gv_flag.
IF sy-subrc EQ 0.
APPEND WA_MARA TO GT_MARA.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 'ZTEST_SO1'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
IT_FIELDCAT = GT_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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = GT_MARA
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.
Read the documentation of FM ICON_CREATE, the purpose of the Function module is entirely different from what you are using it for.
To print Icons in ALV (Using FMs ) all you need to do is to send the Icon name in the field.
Also parameters TEXT and INFO of FM ICON_CREATE seem to be flags, that are appended to the icon name so that when you set it on the screen the appropriate info or Text is shown.
Similar Messages
-
Set a field to blank in an ALV grid control
Hi,
Does anyone know how to set a field to blank using an ALV grid control?
Currently, my program displays 0.000 in a field patterned after EKPO-MENGE, but i want it to just display a blank field.
Thanks!HI
GOOD
HOW CAN YOU KNOW THAT WHICH FILED VALUE IS 0.000 ,IF YOU CAN KNOW THIS THAN STORE THAT VALUE INTO A BLANK STRING AND PASS THROUGH THE FIELD CATALOG.I HOPE IT WILL WORK.
THANKS
MRUTYUN -
To have a list in a field of a row in ALV Grid
Dear Colleagues,
My question is that in an ALV Grid we have a number of rows.
Now in the row suppose i want one field as a drop down list with definite values is it possible..??
If so is there a function module to do this..??
Thanks and Regards
VarunThat was very helpful, But unfortunately that only allows only a pre defined list to be displayed....
I want a new drop down list for each record..??
Would that be possible..???
Is there any module for that...???? -
Adding custom fields to notifications-approval tab alv grid
Transaction IW21 - Create PM Notifications.
on the Approval Tab - there is an ALV grid that contains lots of fields. I know that i can click on the upper right hand corner and modifiy the layout by hidding fields. I want to add some custom fields to this grid.
I added my fields to view QMSM and now when I look at the database table using SE16 - i can see my new fields.
But how do I add them to this ALV grid?
Please and Thank you,
Julia Ramos
Orange County Public Schools.I have read SAP OSS NOTE: 586523 Customer-defined fields in list editing. This note helped me add these same fields to many of the standard reporting transactions. IQS8, IW28, IW29, IW38, IW39
I added my fields to
QMEL - Quality Notification
RIHQMEL_LIST - Display structure reporting for QMEL
RQMQMEL - Quality notification - header data
RQMQMSM - Quality notification - measures (reporting)
Then i ran SAP program BALVBUFDEL. This program refreshs the alv buffer. This was very cool in that it allows us to access and report on all of my custom fields thru the standard reporting transactions!
I thought this same logic might work for transaction IW21. I found the structure used by the approval tab alv program, QMSM, and created an append structure, ZAQMSM with my fields - ran the balvbufdel program to refresh the alv buffers - but i still can not see my fields in the approval tab. I believe that there must be a way to do this - i will keep trying different things and read thru move OSS notes. If you have any sugestions or ideas - they would be greatly appreciated.
Thanks -
F4 field is called first in ALV Grid
Hello All,
I have a strange issue where in I have 4 fields in alv grid.
Last field is having the F4 help facility.
When clicking on creating new row in the grid, automatically the control is going on to the last field (f4 field) and is getting called first and showing an error to fill in the values.
I want the control to go from first field to the last field.
Can you please help me out from this situation?
Thanks and Regards,
Kumar.Hi ,
Try to pass the column position via Fieldcatalog table.Please find the below code for reference.
Perform build_fieldcatalog.
*-ALV Funtion module
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = it_layout
it_fieldcat = st_fieldcat2[]
it_events = it_events[]
TABLES
t_outtab = it_disp[].
Form build_fieldcatalog.
data: l_fieldcat type slis_fieldcat_alv.
data: l_numc type i.
clear l_fieldcat.
l_fieldcat-fieldname = 'VBELN'.
l_fieldcat-ref_fieldname = 'VBELN'.
l_fieldcat-seltext_m = text-t01.
l_numc = l_numc + 1. " This will be used for generating Position Number
l_fieldcat-col_pos = l_numc. "ALV Column Position Number ( i.e Col_pos = '1'.)
append l_fieldcat to st_fieldcat2.
clear l_fieldcat.
l_fieldcat-fieldname = 'POSNR'.
l_fieldcat-ref_fieldname = 'POSNR'.
l_fieldcat-seltext_m = text-t02.
l_numc = l_numc + 1.
l_fieldcat-col_pos = l_numc. "ALV Column Position Number ( i.e Col_pos = '2'.)
append l_fieldcat to st_fieldcat2.
clear l_fieldcat.
endform. " BUILD_FIELDCATALOG
Hope this will be helpful.
Regards,
Srinivas -
Problem with same layout (variant) for two ALV Grid and ALV Tree
Hello!
I have two docking containers on the screen. On the left i have cl_gui_alv_tree, on the right cl_salv_table.
When a user set a default layout for ALV Grid (or ALV Tree), raport starts and sets this layout in both objects (tree and grid).
How to avoid this?Hi,
Take Two radio buttons.
First radion button display the two containers in grid format,
second radio button display the two containers in tree format base on user selection.
CREATE OBJECT G_DOCING_CONTAINER
EXPORTING PARENT = G_CUSTOM_CONTAINER."G_CONTAINER.
DISPLAY THE DATA IN GRID FORMATA
CREATE OBJECT r_grid
EXPORTING
i_parent = G_DOCING_CONTAINER
CALL METHOD g_docing_container->set_width
EXPORTING
width = 1300.
DISPLAY THE GRID DATA IN SECOND CONTAINER
CREATE OBJECT r_grid1
EXPORTING
i_parent = G_DOCING_CONTAINER
CALL METHOD g_docing_container->set_width
EXPORTING
width = 1300.
OTHERWISE WE CAN DISPLAY THE TWO CONTAINERS DATA IN A GRID FORMAT
CREATE OBJECT g_tree
EXPORTING
parent = g_docing_container"g_custom_container
IF R1 = 'X'. "FOR GRID DISPLAY
CALL METHOD r_grid1->set_table_for_first_display
CALL METHOD r_grid2->set_table_for_first_display
ELSE.
************TREE DISPLAY
ENDIF.
regards,
muralii -
Dump when changing the value for a field (of 13 decimals) in alv grid.
Hi Group,
Its giving a dump when user is trying to change the value.
dump description: Unable to interpret "70,000 " as a number.
what is happening here is, the original value is 50,000 and he is deleting 5 and replacing it with 7, here its throwing the dump.
If he removes the complete number 50,000 and then gives 70000 its taking the value.
I tried to use, the decimals options in alv field catalog but to no joy.
Please can you give me an advice on this.
Many Thanks.the problem is the comma in the 70,000....that's an alpha character.... Normally, we expect SAP to display numeric fields in a appropriate format, based upon their numeric type, but trying to forcibly insert '70,000' into a true numeric-type field can generate an 'unable to interpret xxx,xxxx as number' error.
You could experiment with changing your ALV column to a char17 (or appropriate width) and putting your numeric value into that to display, then converting back to type P, or other field type in the table, in a column that is not displayed, when the user changes the value.... essentially two columns, one not displayed with a routine to copy/convert the numeric field into the alpha field and the reverse when the field is changed.
But, the better solution is probably for the user to understand that they're seeing a formatted numeric field, and that they need to replace the entire value with the only possible punctuation being a decimal and (if necessary) a negative sign. -
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 -
Populate a field on TAB press in ALV Grid (OOPs)
Hi Experts,
I have an ALV(oops) with cl_gui_alv_grid. I have a field MATNR as empty and when i input a value and i press TAB key d anit should go to next field (next coulmn) to fill the old material# which can be got from MARA.
I am not able to get the sy-ucomm or e_ucomm for TAB press.
Q) WHERE should i write my query logic to fill the OLD MAtnr field.
code sample : I have data change event as below.
class lcl_event_handler definition
PUBLIC SECTION .
METHODS:
changed_data for event data_changed of cl_gui_alv_grid importing er_data_changed
e_ucomm sender,
ENDCLASS.
in Implemntation class...
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
METHOD changed_data.
clear: ls_stable-row, ls_stable-col.
loop at er_data_changed->mt_mod_cells into ls_modified.
clear wa_outdisp.
READ TABLE gt_outdisp INTO wa_outdisp INDEX ls_modified-row_id.
CHECK sy-subrc EQ 0.
lv_field = ls_modified-fieldname.
if lv_field = 'MATNR'.
wa_outdisp-MATNR = ls_modified-value.
wa_outdisp-bismt = '123'.
endif.
MODIFY gt_outdisp FROM wa_outdisp INDEX ls_modified-row_id.
ls_stable-row = 'X'.
ls_stable-col = 'X'.
grid->refresh_table_display( exporting is_stable = ls_stable ).
endloop.
ENDMETHOD. "changed_data
ENDCLASS.
How can i do this?
Thanks
DanMax,
Yes i am using that event. I am using it before grid -> set_first_display method.
The debugger is not stopping inside the data change method when i placed a break point.
I am using refresh method also.
My code for sy-ucomm is as below.
when'NEWROW '
when others.
CALL METHOD cl_gui_cfw=>dispatch
IMPORTING
return_code = w_return_code.
CALL METHOD grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified. -
F4 Help icon is displaying left hand side in ALV Grid
Hi,
For only one field, F4 Help icon is displaying left hand side in editable ALV of custom report which is using custom table. other fields f4 on same report is showing right hand side. The difference i see for the field F4 showing left side has domain values maintained and f4 showing right hand side has value table maintained. Please help me to display the F4 on right side.
Thanks,
Kumaruse f4if_int_table_value_request for particular field in the alv.
Regards,
Mohammed Rasul.S -
New field in ME28 output in ALV grid
Dear All,
In ME28 - PO release transection code, when we run in ALV gird, we have a TAX code field but not the tax code description.
Can we have this, if yes let me know the procedure.
Thanks,
SAmir BhattHi,
As per my knowledge, system will not allow to add the " Description of Tax Code". Plz check in customization for Reporting.
Regards,
Raghunath -
Is there any standard ptogram/tcode to download idoc contents with fields.
Hello All,
Is there any standard ptogram/tcode to download idoc contents with fields?
Thanks,
Devaraj.Hi Patil,
I dont think there is standard program or t-code.
But u can down load the IDOC with field contents by following way
Goto t-code WE62- give the basic idoc name- press display button then it shows all filed contents with description.
Now select 'SYSTEM' LISTSAVE--LOCAL FILE from menu bar .
Here select the file type ie spread sheet,html, etc and give the file name and directory where u need to place it.
<b>Rewards with points if helpful.</b>
Regards,
Vijay. -
Color change of a field in ALV Grid Control
Hi,
One small help needed....
My req is explained below:
I have 3 fields empno, ename and deptno. and the records of these fields would be displayed in ALV grid control.
When I hover the mouse on ename field, the color of the complete field should change to other color, say "RED".
How do I get this. Are there any Mouse events in SAP?
KalyanHi,
Once i changed the color of a field in a alv (not grid alv), i suspose that the same in alv grid. Also i used an mouse event.
To manage the color:
TYPE-POOLS : SLIS, and check this type: SLIS_T_SPECIALCOL_ALV.
when you call the function to display the alv, there is a parameter in which you should pass an internal table that references the type SLIS_T_SPECIALCOL_ALV.
To manage the mouse:
1.- You should add the event user command:
for example:
DATA: I_EVENT TYPE SLIS_ALV_EVENT.
Llamo al la función que obtiene los eventos validos para el ALV
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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.
ELSE.
agrega evento user command
READ TABLE P_EVENTS INTO I_EVENT
WITH KEY NAME = SLIS_EV_USER_COMMAND.
IF SY-SUBRC EQ 0.
I_EVENT-FORM = SLIS_EV_USER_COMMAND.
MODIFY P_EVENTS FROM I_EVENT INDEX SY-TABIX.
ENDIF.
ENDIF.
2.- you work with the user command event:
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD .
CASE R_UCOMM.
WHEN C_DOBLE_CLICK.
here you do the things that you need when the mouse * bottom it's pressed
PERFORM xxxxxxx.
ENDCASE.
ENDFORM.
3.- you can change the form of the mouse, but i don't remember exactly how to do that... try to check that, it's helpfull in order to display the fields that can execute a funtion in your alv.
I hope this help you, and sorry for my english.
Albio.- -
Display value and description of one field in alv grid
Hi Folks,
I want to display value and description of one field as one column in alv grid.
for example iam having Xfield = 01,02,03.
and 01 iam having text value as xxx,
01 xxx
02 yyy
03 zzz
Im report display the values are displaying as 01,02,03..
but i want to display it as 01 xxx,02 yyy, 03 zzz.
Please do needful.
Thx.Hi, swetha
You can do this with "concatenate".
example:
In you code check where you final internal table is getting filled up before that do this concatenate and then append it.
data t_text type string.
t_text = textfield
CONCATENATE 'Xfield'
t_text
INTO wa_workarea SEPARATED BY space.
cheers,
Bhavana -
BOM where-used list with Phantom item ( Special procurement ) - ALV grid
Hi Gurus,
I have a request with tcode CS15 when we use alv-grid.
We have a component with phantom item indicator because we use the special procurement type 50.
When we run the transaction we don't use the variable list but we use the alv-grid.
I change the layout but we haven't the field "Special procurement" or "Phantom item" in the column set
Thanks in advance
Marco Ferraridear friend
you could build a query (t-code SQ01) and make visible any relevant fields.
before run SQ02 and create an info-set based on a standard logical databse CMC.
you even do not need an abaper. just try yourself. play in DEV system
good luck.
Maybe you are looking for
-
Photoshop CS6 won't open new or existing files
I've had Photoshop CS6 for several months now and never had any problems. Until today; I can no longer open files or create a new one using either method: (File -> New) or (File -> Open). I restarted my computer this afternoon and am wondering if an
-
Capturing from non-controllable device doesn't give a signal in FCE
I have the same problem as in http://discussions.apple.com/thread.jspa?messageID=9458819 but I only have Final Cut Express. If I use the DV Pal setting, there is no problem, I can capture the video (from VHS connected with a Canopus ADVC-55), but it
-
When can consumer expect the price of photoshop to start going down?
WHen can consumer expect the price of photoshop to start going down.i want to buy it, but it is still to expensive for me, i went to Bestbuy and it was still to expensive for me as a an high school students to buy..
-
What is the alternative to adobe flash on macbook air?
What kind of alternative do I have to view certain sites? I realize that Adobe Flash is not the best option. Any good and safe alternatives for MacBook Air? Thank you.
-
How do I eliminate the recent searches pop-up on an I-Pad 2?
How do I eliminate the "Recent Searches" pop-up on an I-Pad 2?