Display two heading in single column using ALV report
Hi Experts,
I got a requirement for displaying 2 rows heading in a single column report. Is it possible that I can perform this task using ALV. How to get this 2 rows in ALV.
This is a criteria that need to be output in ALV REPORT.
MATERIAL CODE--MATERIAL NUMBERSTORAGE LOC----SLOC1 SLOC2
--DATE--DATE1 DATE2
123445--TEST MATERIAL22--
3
As mentioned above storage loc and date will be changing with respect to data dynamically and under this double heading qty will be displayed.
Just want to know how to get double heading. It is clear that how to display dynamically but unaware of double heading using fieldcatalog.
Regards,
Yahya
Hi Yahya,
Please pass row position in fieldcatalogue for the respective columns.
E.g MOVE '2' to w_fieldcat-row_pos. " This will display the field in 2nd row.
Thanks,
Rupali
Similar Messages
-
Display two lines under one column in ALV
Hello Friends,
I have a situation... i need to display two or three lines under single column in ALV report.
example:
col1 col2 col3 col4
AAA 10 456.78 TEST PURPOSE HBDFJEHBEJBE EBDF B EFH
EDEHFKHEKFHEKJCFEKJFHKEJHFKEHFEFJK
DJFHGCGD
AAA 20 121.78 TEST PURPOSE HBDFJEHBEJBE EBDF B EFH
BBB 10 11.78 TEST PURPOSE HBDFJEHBEJBE EBDF B EFH EJ
EFKBEJF KEFHEKJFHEJ KFEHKE HFKEH
MEFBHEJFB EFBEJ EFGJEGF JEGFEGEKJE KEFHK
EFKEFEKLKL
Anyone has idea?
Thanks in advance
Regards
RaghuHi,
You can do this by doing some additional coding..
Ex..
** Let's assume you are using the internal table t_output for displaying the ALV...
** and t_final contains the data..t_text which contains the multiple lines texts...for the
** column col4...
DATA: s_output LIKE LINE OF t_output.
DATA: v_flag TYPE xfeld.
LOOP AT t_final INTO s_final.
* Clear the work areas.
CLEAR: v_flag,
s_output.
* Move all the data.
MOVE ls_final TO s_output.
LOOP AT t_text WHERE col1 = s_final-col1.
* First time move all the columns to the output internal table...for the rest of the records
* just populate the col4..
IF v_flag IS INITIAL. " For the first time.
s_output-col4 = t_text-text. " Move the text.
APPEND s_output TO t_output.
v_flag = 'X'.
ELSE.
clear s_output.
s_output-col4 = t_text-text. " Move the text.
APPEND s_output TO t_output.
ENDIF.
ENDLOOP.
* IF there is no text found just append the output internal table with blank col4.
IF sy-subrc <> 0.
APPEND s_output TO t_output.
ENDIF.
ENDLOOP.
Hope the example is clear...
Thanks
Naren -
Display 2 different structured internal tables in single screen using ALV
Hi,
I have two internal tables. Both has different structures. My requirement is to display both the internal tables in single screen using ALV Grid but NOT using OO ALV Grid display.
Is there any way of spliting the Final ALV display screen into two with two different headers and details as shown below.
Header1 for internal table 1
Data of internal table 1
Header1 for internal table 2
Data of internal table 2
Can anyone suggest a better way to display this.
Regards,
Senthilhi
first think i can say ALV GRID means only for OO ALV it is not possible to display two I.T. data in singr report screen.
better to use of the fm: REUSE_ALV_BLOCK_LIST_DISPLAY
so that u can display both I.T. data in separate report list under single screen
Check the example programs:
BALVBT01 Testprogram ALV: Block list
BCALV_TEST_BLOCK_LIST Program BCALV_TEST_BLOCK_LIST
Regards,
deepak -
Want to display more than 300 charcters in a column using ALV grid display
Hi Guru's,
I am trying to display more than 500 charcters in a column using alv grid display but it in the output it is showing only 128 characters. Can you help me to display all the characters in particular column Or is there any limitation in maximum of no of charcters for a column?
Thanks,
Radha.Hi Paurl,
Define a work area say
wa_layout type slis_layout_alv.
then fill this work area as
wa_layout-zebra = X
wa_layout-colwidth_optimize = X.
wa_layout-max_linesize = 300.
Then in FM 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = wa_layout
etc.
you provided this for the field which is displayed in alv grid will have more than 128 characters.
from this code i want,how it refers to particular field.
when i mentioned field catalog-OUTPUTLEN = '300'.
it is not displayed the field morethan 128 characters.
it only displays 128 characters.
please provide me clear and breif information with suitable code.
i am trying what your sending but it is not displayed more than 128 characters.
if you don't mind please spend for me some time for this and
give me clear and breif information with suitable code.
Thanks & Regards,
Radhakrishna. -
How to Display Sub-Columns using ALV Grid
Hi ,
Could someone tell me how to display sub-columns under a parent column using ALV Grid. Do we have any standard Program which has this scenario. Please let me know.
Thanks,
Abaper.
Message was edited by:
ABAP'eryou can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
check below
BCALV_DND_01 Drag ALV Row to Tree Folder
BCALV_DND_02 Drag Icons from Tree to Rows of the Grid
BCALV_GRID_DND_TREE ALV Grid: Drag and Drop with ALV Tree
BCALV_GRID_DND_TREE_SIMPLE ALV GRID: Drag and drop with ALV tree (simple)
BCALV_TEST_COLUMN_TREE Program BCALV_TEST_COLUMN_TREE
Rewards if useful............
Minal -
How to Display Sub-Columns using ALV
Hi experts,
Could someone tell me how to display sub-columns under a parent column using ALV. Do we have any standard Program which has this scenario. points are guaranteed for the right answer.
Thanks in advance
Sreenivasyou can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
check below
BCALV_DND_01 Drag ALV Row to Tree Folder
BCALV_DND_02 Drag Icons from Tree to Rows of the Grid
BCALV_GRID_DND_TREE ALV Grid: Drag and Drop with ALV Tree
BCALV_GRID_DND_TREE_SIMPLE ALV GRID: Drag and drop with ALV tree (simple)
BCALV_TEST_COLUMN_TREE Program BCALV_TEST_COLUMN_TREE
Rewards if useful............
Minal -
How to display two grids in same screen using SALV Method
Hi Freinds,
Please let me know how to display two grids in same screen using SALV Method.
Thank you
Regards,
SDVUsing the same concept as described in How to dispaly Three Internal Table Data (One below another) in ALV OOPS .
All you need to add is passing your new containers as r_container parementer of factory method.
"1st one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_top_container
"2nd one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_bottom_container
Regards
Marcin -
How to display subtotals in separate column in alv report?
hi,
I am displayed the subtotals for QUantity field BDMNG in Reuse_alv_grid_display in the same column.
but I want to display subtotal in separate column.
How to display subtotals in separate column in alv report?
thanks®ards.
samba.kHi
As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
Best Regards
Yossi -
How to remove dotted lines in a single column using javascript?
Hi,
In InDesign document,i want to remove the dotted lines in a single column using javascript.here i want to remove only the dotted lines has presented at the end of text in a cell.kindly help me if anyone has idea regarding this.
Thanks in advance!
Vimala LHi,
Those dotted lines have added in the document by manually. The dotted lines have presented in all the columns but in a single column i need to remove it.
Thanks,
Vimala L -
How to Splilit The String Into Single Column using Comma As Delimiter ?
How to Splilit The String Into Single Column using Comma As Delimiter ?
using Functionrefer my thread ,code is also available see if that helps you
error while executing the sp ORA-21779: duration not active -
Display concatenad fields under one column in alv.
How can I concatenate three or four fields(Taken from different tables) and can display under one column in ALV report?
I want to display:
final_column = production orderStatusmaterial type+maintenance status (concatenation of four fields).
production order: caufvd-aufnr
status: tj02t-txt04
material type: mara-mtart
maintenance status:mara-pstat
I want to display only final_column in my alv output screen.
Kindly guide.
Thanks and regards.
Thanks and regards.
Message was edited by:
cinthia nazneenPlease go through the below code and do the same for appearing the four fields of different table into One Field catalog at Display by Concatenating .
DATA :v_tmp type string .
Loop at itab1.
Read table itab2 key field1 = itab1-field1 .
Read table itab3 key field1 = itab1-field1 .
Read table itab4 key field1 = itab1-field1 .
Concatenate itab1-field1 itab2-field1 itab3-field1 itab4-field1 into v_tmp.
fieldcatalog-fieldname = 'V_TMP'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endloop.
Reward points if it is usefull .....
Girish -
Hi experts...
I want single row in alv report.
I have use loop for fatch data into internal table using loop when i am passing data in alv report then the data comes according loop. i want onlu one data in alv row.
how can i do such, plz help me.decleare two internal table.
read table itab into wa index 1.
append wa to itab2.
pass itab2 only one record display. -
How to Change the position of Column in ALV report
Hi Follks,
Is is possible to change the position of column in ALV report?.If yes then how?
Basically my requirement is, that user want afacility where , he should be able to change the position
of column aftre he runs the report.
Eg: After running the report , user felt that column 5 should be at position 2 , in that case he should
be able to drag column 5 at position 2 and vice versa.
Please help me, how to solve this issue.
Note : I am using NW 7.0 SP 9
Regards
PG
Edited by: PG on Apr 13, 2009 11:10 AMHI PG,
do below whie filling the filed catlog
wa_fieldcat-fieldname = 'Field1".
wa_fieldcat-COL_POS = '1',
append wa_fieldcat to it_fieldcat.
wa_fieldcat-fieldname = 'Field2".
wa_fieldcat-COL_POS = '2',
wa_fieldcat-fieldname = 'Field3".
wa_fieldcat-COL_POS = '3',
Thanks! -
Add New Column in ALV Report of Standard SAP ME28.
Hi anybody,
I want add new column in alv report of standard SAP Program ME28 Screen.
Add Last PO Price column inside ALV Report ME28 Screen.
Can u please anybody tell me how to add new column in ME28 Screen.
Thanks
S.Muthu.Try to find any BADI for the same
Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
1) Goto se24 (Display class cl_exithandler)
2) Double click on the method GET_INSTANCE.
3) Put a break point at Line no.25 (CASE sy-subrc).
Now
4) Execute SAP standard transaction
5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find all the BADIs called on click of any button in any transaction.
OR
Also one more option is to copy ME28 and, make modifications to the copied program. -
To increase dynamically columns in ALV report
hi everyone,
Could any one give me a sample code ,to increase columns in ALV report output dynamically as record increase, i need to increase columns so that i can keep all the years data of a particular project in one rowPlease refer to the code piece
*& Report ZTEST_DYNAMIC_ALV
REPORT ztest_dynamic_alv.
DATA: gt_fcat TYPE lvc_t_fcat,
gw_grid TYPE REF TO cl_gui_alv_grid.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
PARAMETERS: p_number TYPE i.
SELECTION-SCREEN : END OF BLOCK b1.
** Start of Selection
START-OF-SELECTION.
*1) Create Base Catalog
PERFORM sub_create_base_catalog.
*2) Add additional fields
PERFORM sub_fill_addtional.
*3) Display output data.
PERFORM sub_display_output.
*& Form SUB_CREATE_BASE_CATALOG
* Create Base catalog for display
FORM sub_create_base_catalog .
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ZSTRCT'
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
ENDFORM. " SUB_CREATE_BASE_CATALOG
*& Form SUB_FILL_ADDTIONAL
* text
FORM sub_fill_addtional .
DATA: lw_fcat TYPE lvc_s_fcat,
lw_from TYPE i,
lw_data TYPE REF TO data,
lw_fname TYPE stfna,
lw_index(2) TYPE n.
FIELD-SYMBOLS: <l_output> TYPE table.
DESCRIBE TABLE gt_fcat LINES lw_from.
DO p_number TIMES.
lw_from = lw_from + 1.
lw_index = sy-index.
CONCATENATE 'DYNA' lw_index INTO lw_fname SEPARATED BY '-'.
lw_fcat-col_pos = lw_from.
lw_fcat-fieldname = lw_fname.
lw_fcat-tabname = '1'.
lw_fcat-scrtext_l = lw_fcat-scrtext_m = lw_fcat-scrtext_s = lw_fname.
APPEND lw_fcat TO gt_fcat.
CLEAR lw_fcat.
ENDDO.
** Convert gt_fcat to internal table.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fcat
IMPORTING
ep_table = lw_data
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc = 0.
** Create the internal table form field catalog.
ASSIGN lw_data->* TO <l_output>.
** display the ALV data.
CREATE OBJECT gw_grid
EXPORTING
i_parent = cl_gui_container=>screen0
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc = 0.
CALL METHOD gw_grid->set_table_for_first_display
CHANGING
it_outtab = <l_output>
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc = 0.
MESSAGE s000(zrak) WITH p_number 'DISPLAYED DYNAMICALLY'.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " SUB_FILL_ADDTIONAL
*& Form SUB_DISPLAY_OUTPUT
* text
FORM sub_display_output .
CALL SCREEN '9001'.
ENDFORM. " SUB_DISPLAY_OUTPUT
*& Module STATUS_9001 OUTPUT
* text
MODULE status_9001 OUTPUT.
SET PF-STATUS ' '.
SET TITLEBAR 'MAIN00'.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9001 INPUT
* text
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR
'CANC' OR
'%EX'.
SET SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
Maybe you are looking for
-
Infocube was not uploaded with data in BI 7
Dear One's, Iam trying to upload data from flat file to info cube. It was successfull even in infocube. But contents of infocube does not shows PRICE key figure values, it is showing only MAT_KEY values uploaded successfully. what could be the reason
-
I am having trouble logging into my iTunes Account. When it ask me to verify my payment information. I verify that all the information is correct and press the done tab and get back this error message " Please contact iTunes support to complete this
-
Background Color doesnt changed !
hi everyone, I try to create an image in JSP, the image shows on browser OK, but the background color always is black even I try to set to another color g.setBackground(Color.pink); There is no error. Could anyone explain to me? How can I change the
-
Hello, Is there a possibility to get CREF simulator source codes somewhere? Regards, Kobi
-
CS6 won't run ~ OneCoreFoundation.dll missing
I have reinstalled a number of times now as directed by the notice and the problem persists. If I click through the error message 6 times every time I open the program (64 bit) it will finally run. Solutions?