Multiple Header Line In HIERSEQ ALV
Hi Experts,
Please guide me how to get miltile Header lines in the HIERSEQ Alv , My requirment it develop a genledger for customers in which the Address of customer should be in 3 or four lines then followed by its balances. Please suggest me ...
Regards,
Prakash
Hi,
You need to pass the Row number to the filed catlog in order to display multiple header lines.
For example,
wl_fieldcat-row_pos = 1. " This field will be displayed in first row
wl_fieldcat-col_pos = 1.
wl_fieldcat-fieldname = 'VBELN'.
wl_fieldcat-tabname = 'T_VBAK'.
wl_fieldcat-outputlen = 20.
Append wl_fieldcat to t_fieldcat.
wl_fieldcat-row_pos = 2. " This field will be displayed in Second row
wl_fieldcat-col_pos = 1.
wl_fieldcat-fieldname = 'VBELN'.
wl_fieldcat-tabname = 'T_VBAK'.
wl_fieldcat-outputlen = 20.
Append wl_fieldcat to t_fieldcat.
Regards,
Rajneesh
Similar Messages
-
Multiple Header Lines for the ALV Layout
Hi Experts,
I am working on a ALV report in MM , the output should be like mentioned below, I have tried this by using ALV List , I got it then , but I want the output by using ALV Grid ( Function Modules / Classes ).
Material
Branch
Material No
Created on
Material Type
Plant
Valuation Category
1343 29/06/09 HALB HKM1 01
1342 28/06/09 HALB HKM1 01
1341 27/06/09 HALB HKM1 01
1340 26/06/09 HALB HKM1 01
1339 25/06/09 HALB HKM1 01
1338 24/06/09 HALB HKM1 01
Thanks
V. Venkateshcheck the standard program BALVHD01_GROUP
http://www.geocities.com/mpioud/Z_ALV_HIERSEQ_LIST.html -
Multiple Header line in Receiver File adapter
Hi,
I have an issue in Receiver File adapter with multiple header lines. I am able to get only 1 header lines in the receiver file but not multiple header lines with 'nl' since it is static in file mode
[CommunityTag:Header]
empNo,EmpName,Age
[CommunityTag]
I tried with the below in content conversion one as below with no luck
Root.addHeaderLine=1
Root.headerLine=[CommunityTag:Header] 'nl' empNo,EmpName,Age 'nl' [CommunityTag]
Root.fiedSeparator=,
Root.endSeparator='nl'
I am getting the Header line as same row as static text.
Can you advise this.Hi Gabriel, I suggest to produce the header lines from additional nodes in the message payload. That means you need to modify the data type of the target message in order to generate an extra structure in the payload. Use constants in message mapping to generate the header column names, e.g.
<Header>
<H1>CommunityTag:Header</H1>
<H2>empNo,EmpName,Age</H2>
<H3>CommunityTag</H3>
</Header>
In content conversion you have to convert the Header row with
Header.endSeparator='nl'
You won't need parameter addHeaderLine anymore then.
Regards, Martin -
Check on multiple header line data.
Hi All,
I have one requirement where i need to check the multiple accounting document header line.
Kindly suggest how to check the above requirement.
Thanks in Advance!
Regards,
ChiragHi All,
Sorry for the short description.
Currently i am validating only the one header line data of expense spread sheet file with vendor. but the now requirement has changed and there can be a multiple header line item also.
So i need to check for each header line item whether vendor already exist or not.
I am able to check it for 1 header line item, Kindly suggest how to check it for multiple header line item.
Thankyou.
Chirag -
Hi Guys,
I got an issue , My flat file having multiple header lines
TPS27RPR MOME THRIFT (SAVING) PLAN SYSTEM Page 2
09:54 05 JAN 2014 List of Contributors w/Company Contributions Phase DAY Unit TRE
Company No: xxxxxxxx - xxxxxxxxxxxxx.
Employee/ Employee/
Employee Full Name/ Company Company Allocation
Number ID Number PS PN End Date Contribution Profit Total Balance Percentage
some lines of data and again
TPS27RPR MOME THRIFT (SAVING) PLAN SYSTEM Page 2
09:54 05 JAN 2014 List of Contributors w/Company Contributions Phase DAY Unit TRE
Company No: xxxxxxxx - xxxxxxxxxxxxx.
Employee/ Employee/
Employee Full Name/ Company Company Allocation
Number ID Number PS PN End Date Contribution Profit Total Balance Percentage
in this case how could I separate the header lines from the flat file and update the details to my internal table.
kindly help me on this issue.
Thanks and regards,
M.S.Amirtharajvijay.Hi Amirthraj,
If the flat file is static (if the content within it is same for all) then use the offset concept. First get the contents of the flat file into an internal table and later find the field that has to be in final internal table within the line, calculate the offset for the line and get the value into an workarea. Finally modify/append the work area into an internal table. Also wait for other experts answers for any other hassle free way to achieve the requirement.
With Regards,
Giriesh M -
How to get multiple header lines dynamically and also data hierarchically using ALV
Hi experts,
My requirement is shown below.. I neet to compare prices of service RFQs. So i design as below..
I want to get RFQ number ,Vendor code and vendor name in ALV header and also other headings which static. I think dynamic table is the best way to load RFQ numbers to header.. But problem is i'm unable to load two lines dynamically using ALV.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table = 'X'
it_fieldcatalog = gt_dyn_fcat
IMPORTING
ep_table = gt_dyn_table
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
I use this function and pass RFQ no and vendor code in two rows but it output gt_dyn_table in same row.. How to print them as given image???
Then in data I want to get service items and according to the external service number divide them to groups and get sub totals and also finally total of all sub categories to compare each RFQs price to compare.. There i think ALV hierarch can use. but not sure I can use with dynamic table(in header use it).
What is thee best way to get the output in my image..??
Thanks..
PaviHi experts,
My requirement is shown below.. I neet to compare prices of service RFQs. So i design as below..
I want to get RFQ number ,Vendor code and vendor name in ALV header and also other headings which static. I think dynamic table is the best way to load RFQ numbers to header.. But problem is i'm unable to load two lines dynamically using ALV.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table = 'X'
it_fieldcatalog = gt_dyn_fcat
IMPORTING
ep_table = gt_dyn_table
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
I use this function and pass RFQ no and vendor code in two rows but it output gt_dyn_table in same row.. How to print them as given image???
Then in data I want to get service items and according to the external service number divide them to groups and get sub totals and also finally total of all sub categories to compare each RFQs price to compare.. There i think ALV hierarch can use. but not sure I can use with dynamic table(in header use it).
What is thee best way to get the output in my image..??
Thanks..
Pavi -
Multiple Header Lines in Flat-File read by FileSenderAdapter
Hello XI and File Sender Adapter Species
We have the following file with fixed file lengths:
#H1 F1
#H2 F1
#H3 F1
#H4 F1
#H5 F1
#H6 F1
#D1 Field1 - Fieldn
#D2 Field1 - Fieldm
#D2 Field1 - Fieldm
#D1 Field1 - Fieldn
#D2 Field1 - Fieldm
#D2 Field1 - Fieldm
#F F1
Concrete example as follows:
#H1 150
#H2 ECH150_20070709_026745152.dat
#H3 20070709_1600
#H4 9.0
#H5 8712423010208
#H6 8712423009202
#MDDTD3 146307732 146202845 871687940006178374E70871687910000219120200707090032B 040235031 Noordkant 28 SINT ANTHONIS 5845EW 8716879000004871242300920287124230091962007070909550113533533 8716948000010501000L
#MDDTD4 59664 E10
#MDDTD4 30180 E11
#MDDTD3 146309776 146202839 871694840030212726E70871694830000000309200707090031B 0411 8 Flierakkers 21 VROOMSHOOP 7681XV 8716948000003871242300920287124230091962007070909590113533515 8716948000010503000L
#MDDTD4 3562 E10
#MDDTD4 2422 E11
#F6
This File Should be read via the File Sender Adapter and afterwards mapped into the following idoc structure:
IDOC-Type
ZUECH_010
Header Segment: H1, H2, H3, H4 , H5 ,H6
Detail1Segment: Field1, Field2 . Fieldn
Detail2Segment: Field1, Field2 . Fieldm
Detail2Segment: Field1, Field2 . Fieldm
Detail1Segment: Field1, Field2 . Fieldn
Detail2Segment: Field1, Field2 . Fieldm
Detail2Segment: Field1, Field2 . Fieldm
FooterSegment: Field1
Now my Questions:
1. As far as I know it is not possible to configure in the filesender adapter 2 different Record sets? We need two record sets, one for the header lines whose occurrences are once per File and one for the detail lines? Does anybody know if this is possible?
2. Any other ideas for a simple solution?
Thanks for a soon answer.
Regards MarliesThanks all very much for your answers:
The hint from Praveen was very helpful.
If possible we need a solution with the graphical mapping tool and as far as possible without UDF, because at the moment there is no java developer.
The file adapter now produces the following xml structure:
<ZUECH_0150>
<recordset>
<H1>
<KH1>#H1</KH1>
<H1>150</H1>
</H1>
<H2>
<KH2>#H2</KH2>
<H2>ECH150_20070709_026745152.dat</H2>
</H2>
<H3>
<KH3>#H3</KH3>
<H3>20070709_1600</H3>
</H3>
<H4>
<KH4>#H4</KH4>
<H4>9.0</H4>
</H4>
<H5>
<KH5>#H5</KH5>
<H5>8712423010208</H5>
</H5>
<H6>
<KH6>#H6</KH6>
<H6>8712423009202</H6>
</H6>
<MDDTD3>
<KMDDTD3>#MDDTD3</KMDDTD3>
<MDDTD3>146307732 146202845 </MDDTD3>
</MDDTD3>
<MDDTD4>
<KMDDTD4>#MDDTD4</KMDDTD4>
<MDDTD4>59664 E10</MDDTD4>
</MDDTD4>
<MDDTD4>
<KMDDTD4>#MDDTD4</KMDDTD4>
<MDDTD4>30180 E11</MDDTD4>
</MDDTD4>
</recordset>
</ ZUECH_0150>
I would prefer the following structure, because it fits exactly to the structure of the idoc.
That means the mapping is very simple:
<ZUECH_0150>
<HEADER>
<H1>150</H1>
<H2> ECH150_20070709_026745152.dat</H1>
</HEADER>
<MDDTD3>
<KMDDTD3></KMDDTD3>
<MDDTD3>146307732 146202845</MDDTD3>
<MDDTD4>
<KMDDTD4>#MDDTD4</KMDDTD4>
<MDDTD4>59664 E10</MDDTD4>
</MDDTD4>
<MDDTD4>
<KMDDTD4>#MDDTD4</KMDDTD4>
<MDDTD4>30180 E11</MDDTD4>
</MDDTD4>
</MDDTD3>
</ZUECH_0150>
Now my new questions:
1. Is it possible to configure the file adapter to produce a xml structure which afterwards can be mapped with a simple graphical mapping into the idoc structure?
(I can live with the suggestion from Praveen, that the header information is in each recordset but only has content in the first one.)
2. What about the MDDTD4? It is a substructure from MDDTD3. Is it possible to configure this in the file adapter?
Thanks a lot for your help and a soon answer.
Regards Marlies
Message was edited by:
Marlies Nowotka
Message was edited by:
Marlies Nowotka -
Hi Gurus
When I enter a header condition in the sales order and activate it,system automatically inserts a line for the same condition type but with condition value displayed.. I don't want this to happen.Could you please tell me where I can change the settings.
Thanks
KumarHi kumar,
First as far as i see your header condtion base concept is not clear.
system will automatically divide the value of the header condtion in the line items .
Read the following to gain more insight in to the functionality
Header conditions are those which appear in the header level of any sales order. these conditions are to be entered manually and get distributed automatically and the basis for distribution are taken from the NET VALUE of items mentioned at item level.
When we go to the conditions section in a sales order, where the details of pricing is mentioned, here we add these conditions.
Whenever any Header Condition is used, it overrides the PR00 condition type.
Examples of header condition.
- HA00 - % Based Header Condition.
- RB00 - Absolute or numeric value which applies to all items.
- HB00 - Numeric value or Absolute value.
Usage of this feature is to apply price / discount for a specific group of materials.
1. You maintained a discount based condition record fbased on material group ( = 01 for example). You maintained scales also.
Qty Discount
1 - 10 Rs. 100.00
11 - 50 Rs. 105.00
51 - 150 Rs. 110.00 etc.
2. You are creating a sales order for a customer with five different items with different quantities as below
ITEM 1 - 25 No's
ITEM 2 - 3 No's
ITEM 3 - 12 No's
ITEM 4 - 27 No's
ITEM 5 - 62 No's
All the material is having the material group = 01.
3. While calculating the discount, because of this group condition, system add the quantities of items which have material group = 01. In the above example total quantity is = 109. System apply a discount of Rs. 110.00 to each item irrespective of the individual quantities.
4. If you have not activated the group condition feature, system determines the discount value based on individual item quantity which is as below.
Discount
ITEM 1 - 25 No's Rs. 105.00
ITEM 2 - 3 No's Rs. 100.00
ITEM 3 - 12 No's Rs. 105.00
ITEM 4 - 27 No's Rs. 105.00
ITEM 5 - 62 No's Rs. 115.00
5. Is it clear now. Just try a sales order and see the out come
Procedure to Test:
1. Create 3 materials. Maintain Material Group of each item is same.
2. Activate the condition type as a group condition.
3. Create a condition record for this condition type with scales.
4. Process a sales order for a customer with these three material with different quantities.
5. Check the outcome.
Revert if helpful
Mohit Singh -
Hello All,
Does any one have any idea how to create 2 Header lines in an ALv report
as in 1 cummulative header and under that 2nd detailed header.
Please help me out.
Cheers,
Deepthee KasalHi,
It is not possible to have 2 detailed headers in ALV reports.
Regards,
Satish -
Hello ,
I have a requirement to display Multiple heading in ALV Grid, I am using the Class 'cl_gui_alv_grid'. please let me know if you have Any suggestions.
Ex:
| Divison |
Sub D:1
Sub D: 2
Sub D: 3
Like wise i have few more divisions to display and Under we need to display the Sub Division also .
Thanks in Advance.. Waiting for your suggestions.
With Best Regards
NagsHi,
I had attempted to do it in the object oriented way, but found no ready solution, so I settled for the below solution.
Please use the function REUSE_ALV_COMMENTARY_WRITE.
This allows you to print multiple lines in the header.
I had a requirement of showing 5 lines in the header.
So i went on like:
DATA: it_list_commentary TYPE slis_t_listheader,
wa_list_commentary TYPE slis_listheader.
wa_list_commentary-typ = 'H'.
wa_list_commentary-info = <text>.
APPEND wa_list_commentary TO it_list_commentary.
wa_list_commentary-typ = 'S'.
wa_list_commentary-info = <text>.
APPEND wa_list_commentary TO it_list_commentary.
I fed he internal table with all 5 lines like above.
Finally I called the function.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_list_commentary.
Regards,
Prosenjit.
Edited by: prosenjit chaudhuri on Jan 28, 2009 6:14 AM -
Help on ALV with multiple header/item output
Dear all:
Below is the actual working code on a multiple header/item display. The alv is supposed to output the details differently in each list. But somehow it only display the last i_tab I gave in all the list(they all look the same). Please help me out here how I can change my code to work properly. Thanks...
*& Report ZTEST2
REPORT ZTEST2.
type-pools: slis.
data : NUM1 type I,
NUM type I,
begin of str,
client like mara-mandt,
mat like mara-matnr,
end of str,
tab like standard table of str.
data :wa2 type slis_alv_event ,
tab2 like standard table of wa2,
wa1 type slis_layout_alv,
wa type line of slis_t_fieldcat_alv,
tab1 like standard table of wa.
wa-reptext_ddic = 'Client Num'.
wa-fieldname = 'CLIENT'.
wa-tabname = 'TAB'.
wa-ref_fieldname = 'MANDT'.
wa-ref_tabname = 'MARA'.
wa-seltext_l = 'CLIENT'.
append wa to tab1.
wa-reptext_ddic = 'Mat Number'.
wa-fieldname = 'MAT'.
wa-tabname = 'TAB'.
wa-ref_fieldname = 'MATNR'.
wa-ref_tabname = 'MARA'.
wa-seltext_l = 'MATERIAL'.
append wa to tab1.
wa1-no_colhead = 'X'.
wa2-NAME = SLIS_EV_TOP_OF_PAGE.
wa2-FORM = 'WRITE_TOP_PAGE'.
APPEND wa2 TO tab2.
NUM = 0.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = sy-cprog.
do 2 times.
NUM1 = NUM1 + 10.
refresh: tab.
select mandt matnr up to NUM1 rows from mara into table tab.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = wa1
IT_FIELDCAT = tab1
I_TABNAME = 'TAB'
IT_EVENTS = tab2
TABLES
T_OUTTAB = tab.
enddo.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
FORM WRITE_TOP_PAGE.
NUM = NUM + 1.
WRITE: / ,
/ 'TABLE NUMBER :', NUM.
ENDFORM.Hi Jim,
yes for some reason ALV expects you to be using different tables. It seems that it does not save the contents of the tables at each call of 'append' rather it waits until 'display' to deal with the table contents at that time, which in your case is the 20 items.
What you can do is use dynamic tables. check this out:
REPORT ZNRW_ALV_BLOCK .
type-pools: slis.
data : NUM1 type I,
NUM type I.
types:
begin of str,
client like mara-mandt,
mat like mara-matnr,
end of str.
data
tab type standard table of str.
data :wa2 type slis_alv_event ,
tab2 like standard table of wa2,
wa1 type slis_layout_alv,
wa type line of slis_t_fieldcat_alv,
tab1 like standard table of wa.
wa-reptext_ddic = 'Client Num'.
wa-fieldname = 'CLIENT'.
wa-tabname = 'TAB'.
wa-ref_fieldname = 'MANDT'.
wa-ref_tabname = 'MARA'.
wa-seltext_l = 'CLIENT'.
append wa to tab1.
wa-reptext_ddic = 'Mat Number'.
wa-fieldname = 'MAT'.
wa-tabname = 'TAB'.
wa-ref_fieldname = 'MATNR'.
wa-ref_tabname = 'MARA'.
wa-seltext_l = 'MATERIAL'.
append wa to tab1.
wa1-no_colhead = 'X'.
wa2-NAME = SLIS_EV_TOP_OF_PAGE.
wa2-FORM = 'WRITE_TOP_PAGE'.
APPEND wa2 TO tab2.
NUM = 0.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = sy-cprog.
DATA tabDREF TYPE REF TO DATA.
FIELD-SYMBOLS <tab> TYPE table.
do 2 times.
CREATE DATA tabdref TYPE table of str.
ASSIGN tabDREF->* TO <tab>.
NUM1 = NUM1 + 10.
refresh: tab.
select mandt matnr up to NUM1 rows from mara into table <tab>.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = wa1
IT_FIELDCAT = tab1
I_TABNAME = 'TAB'
IT_EVENTS = tab2
TABLES
T_OUTTAB = <tab>.
enddo.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
FORM WRITE_TOP_PAGE.
NUM = NUM + 1.
WRITE: / ,
/ 'TABLE NUMBER :', NUM.
ENDFORM. -
Two header line in one column of alv grid.
Hi Experts,
My requirement is that I have to create an ALV report with columns having two lines of
headings. Like a main heading called Consultants under which 5 to 10 columns of departments
and then Contractors underwhich there would be 5 to 10 departments. Right now my report has
the depts of contractors and consultants in one line but the headings above that I am not
able to generate.
Will anybody please be able to provide a sample code if this is possible.
like,,,
Heading 1 | Heading 2 | Heading3 | line 1
hed4 | hed5 | hed6 | | hed7 | hed8 | line 2Unfortunately the current ALV framework doesn't support multiple line headers in ALV. There are some nasty hacks available. But none of them are full-proof.
BTW there are many posts related to similar requirements.
BR,
Suhas -
How to print header lines at the top of every page with Alv list display?
Dear all,
I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_pf_status_set = 'ALV_PF_STATUS'
is_layout = ls_layo
it_fieldcat = lt_fcat
i_default = 'X'
i_save = 'A'
is_variant = ls_variant
it_events = lt_events
TABLES
t_outtab = lt_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
and lt_events as below:
ls_event-name = 'END_OF_LIST'.
ls_event-form = 'ALV_END_OF_LIST'.
APPEND ls_event TO lt_events.
ls_event-name = 'END_OF_PAGE'.
ls_event-form = 'ALV_END_OF_PAGE'.
APPEND ls_event TO lt_events.
ls_event-name = 'TOP_OF_LIST'.
ls_event-form = 'ALV_TOP_OF_LIST'.
APPEND ls_event TO lt_events.
ls_event-name = 'TOP_OF_PAGE'.
ls_event-form = 'ALV_TOP_OF_PAGE'.
APPEND ls_event TO lt_events.
So, how can I print header lines for every page?
Best Regards,Hello Saba,
Your point might be very close to solution.
Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
EXPORTING
it_fieldcat_lvc = gt_fcat
IMPORTING
et_fieldcat_alv = lt_fcat
EXCEPTIONS
it_data_missing = 1
it_fieldcat_lvc_missing = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
EXPORTING
it_fieldcat = lt_fcat
IMPORTING
e_width = l_width.
WRITE l_reptx TO l_reptx CENTERED.
NEW-LINE.
WRITE: AT (l_width) l_reptx CENTERED.
SUBTRACT 10 FROM l_width.
WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_header
I_LOGO =
I_END_OF_LIST_GRID =
Do you have other suggestions ? -
Download alv report output to excel format with out header line
Hi experts,
i want to download a alv report output into excel formatt with out the header line but it has to download including field description. as this output will fed into another transaction, the downloaded excel file should be with out header line.
fro eg:
Report : Zabc ABAP Development Page : 1
Run Date : 12/14/06 System: UD400
Run Time : 08:45:37
this header details should not be downloaded into the excel file.
could somebody help me please.
thanks
deepuhi jayanti,
thanks for your response.
i have delclared all the field types as character but still it is not downloading and it 's sy-subrc is 4... the code is as below.
*field names
lt_fieldnames-value = 'Material Number'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Plant'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Group'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Description'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'UOM'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Price Unit'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Type'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'X-Plant Status'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Valuation Class'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avmng.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avntp.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Qty'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'PO Creation Date'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_fcaqt.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Prev. Yr. Std. Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_stcst.
APPEND lt_fieldnames.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'XLSHEET'
CREATE_PIVOT = 0
DATA_SHEET_NAME = ' '
PIVOT_SHEET_NAME = ' '
PASSWORD = ' '
PASSWORD_OPTION = 0
TABLES
PIVOT_FIELD_TAB =
data_tab = t_output1
fieldnames = lt_fieldnames
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_pivot_fields = 6
download_problem = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE e001 WITH 'Data could not be downloaded'.
ENDIF.
ENDFORM. " z_dwn_xl
thanks
deepu -
Two header line in ALV display
Hi ,
I want two header lines in ALV report using reuse_alv_grid_display .
Like
Factory-Sales
Qty Value
10 1000
How to do that please helpHi,
I am giving the example code for 3 header line display. This may help you.
First declare Form,
FORM TOP-OF-PAGE .
FREE TTOP .
FREE HTOP .
CLEAR TTOP .
HTOP-TYP = 'H' .
HTOP-INFO = 'LLYODS STEEL INDUSTRIES LIMITED, WARDHA' .
APPEND HTOP TO TTOP .
CLEAR HTOP .
HTOP-TYP = 'S' .
HTOP-INFO = MAT .
APPEND HTOP TO TTOP .
CLEAR HTOP .
HTOP-TYP = 'S' .
HTOP-INFO = PONO .
APPEND HTOP TO TTOP .
CLEAR HTOP .
HTOP-TYP = 'S' .
HTOP-INFO = item .
APPEND HTOP TO TTOP .
CLEAR HTOP .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = TTOP
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM.
After that declare this form in your Grid or List like below.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = BTAB
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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.
Regards,
Himanshu
Maybe you are looking for
-
How do I turn javascript and cookies on so I can get into my excite homepage and mail?
I received the following message from Excite when trying to log-in to my homepage and email: "Right now, your browser's settings are configured to disable cookies and/or javascript. In order to access your account, you must change your browser's sett
-
Limit on length or # of control points with paintbrush tool?
Often times when I'm drawing a path with the paintbrush, it will just stop after a certain length (or number of points, perhaps). I intially thought this was an issue with my tablet, but I am also able to replicate this using the mouse. What I find o
-
Generate PDF file from oracle Table
We need to populate pdf file into oracle table of column blob through informatica by taking path\name(/path/filename.PDF) as input from source table. The pdf file is on some other server so, we need to create a stored procedure which will give pdf fi
-
Hi, Just a very quick note to say that I am looking for a senior level test engineer to do new product introduction test engineering. Lots of test plan development and handing off to contract manufacturers. Particular emphasis in wireless/RF products
-
All, I am trying to create an around the world map, example path: NYC to LAX to SYD to FCO to NYC. The travel path is west but when I select the "Return to Starting Location" option the map is drawn with an eastward line. I would like the line to con