ALV with multiple headers
Hello All,
i have a requirement where i have to have multiple headers in a single alv.
The exact requirement is like.
Header1----
row1
row2 1 unit
row3
row4----
Header2
row1
row2
row3
row4
Header3
row1
row2
row3
row4
and the number of individual units is not fixed and will be determined at runtime.
Can somebody tell me the steps to achieve it.
actually i tried using block alv in loop but it is showing inconsistent data and moreover it has a limitation of 19 appends.
make you are looking a break page
check this
http://hosteddocs.ittoolbox.com/kk021909.pdf
Similar Messages
-
ABAP list with multiple headers
Hi experts,
i have to display a table with multiple headers. Example:
Header 1 = Sales order header
Header 2 = Sales order items
It's possible to create an ABAP list with 2 headers?
Thanks in advance.Hi Dan,
FYI .
[ALV Grid with Multiple Headers;
Regards
Abhii -
Revision: 949
Author: [email protected]
Date: 2008-03-27 07:12:59 -0700 (Thu, 27 Mar 2008)
Log Message:
Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
QA: Yes - try again with legacy-collection true and false.
Doc: No
Checkintests: Pass
Details: Another try in fixing this bug. When legacy-collection is false, Actionscript Array on the client becomes Java Array on the server and my fix yesterday assumed this case. However, when legacy-collection is true, Actionscript Array becomes Java ArrayList on the server. So added code to handle this case.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-96
Modified Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.javaHi all!
Just to post the solution to this if anyone ever runs accross this thread...
For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
HashMap primaryFile = new HashMap();
primaryFile.put("fileContent", bFile);
primaryFile.put("fileName", uploadedFile.getFilename());
operationBinding.getParamsMap().put("primaryFile", primaryFile);
HashMap customDocMetadata = new HashMap();
HashMap [] properties = new HashMap[1];
HashMap customMetadataPropertyRoom = new HashMap();
customMetadataPropertyRoom.put("name", "xRoom");
customMetadataPropertyRoom.put("value", "SOME ROOM");
properties[0] = customMetadataPropertyRoom;
customDocMetadata.put("property", properties);
operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
Good luck all! -
Revision: 931
Author: [email protected]
Date: 2008-03-26 11:31:01 -0700 (Wed, 26 Mar 2008)
Log Message:
Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
QA: Yes - we need automated tests for this basic case.
Doc: No
Checkintests: Pass
Details: RequestFilter was not handling multiple headers with the same name properly.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-96
Modified Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.javaHi all!
Just to post the solution to this if anyone ever runs accross this thread...
For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
HashMap primaryFile = new HashMap();
primaryFile.put("fileContent", bFile);
primaryFile.put("fileName", uploadedFile.getFilename());
operationBinding.getParamsMap().put("primaryFile", primaryFile);
HashMap customDocMetadata = new HashMap();
HashMap [] properties = new HashMap[1];
HashMap customMetadataPropertyRoom = new HashMap();
customMetadataPropertyRoom.put("name", "xRoom");
customMetadataPropertyRoom.put("value", "SOME ROOM");
properties[0] = customMetadataPropertyRoom;
customDocMetadata.put("property", properties);
operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
Good luck all! -
Smartform with multiple Headers & Respective Item Details and Totals?
Dear All,
Appreciate if anyone clarify my doubt.
My requirement is to develop a smartform for billing with multiple headers & respective items and totals. For more clarity I'm explaining below.
Header Section1
variable1 variable2 variable3 variable4 variable5
variable6 variable7 variable8
variable9 variable10 variable11
Item Details1
s no vebeln verpr col4 col5 col6
total 123.21
total in words -
value 321.21
value 982.98
value some value
footer details
Header Section2
variable1 variable2 variable3 variable4 variable5
variable6 variable7 variable8
variable9 variable10 variable11
Item Details2
s no vebeln verpr col4 col5 col6
total 123.21
total in words -
value 321.21
value 982.98
value some value
footer details
Header Section3
variable1 variable2 variable3 variable4 variable5
variable6 variable7 variable8
variable9 variable10 variable11
Item Details3
s no vebeln verpr col4 col5 col6
total 123.21
total in words -
value 321.21
value 982.98
value some value
footer details
Is this possible using smartforms?
Now they are using a classical report and takes printout in preprinted stationery.
requirement is to develop a smartform for this. there is a selection screen for the print program which accepts billing docs.
Thanks,Rajiv,
Actually for your case you don't need a table inside the Main Window.
1.) First Populate all the data(header + item) in an internal table in the print program itself.
2.) Pass this internal table to the smartform.
3.) In the smartform give exact dimensions to the main window.
4.) In the Main Window Use a Loop on this internal table.
5.) Create a template for the header data giving the exact dimensions.
6.) Create another template for the item data giving exact dimensions to the template.
7.) If there is pre-printed text between these templates, insert a text element between these templates. This text element will have nothing just give a paragraph format to it. Go to smartstyle, create a style in which create a paragraph format setting line spacing parameter of this paragraph format of the same size as that of pre-printed text.
8.) Only 1 page is required since Loop statement will print the second record on the second page if the dimension of templates are exact.
9.) Dimensions you can easily measure from the pre-printed form.
<removed by moderator>
Edited by: Thomas Zloch on Mar 6, 2012 -
Posting an Idoc with Multiple Headers and Multiple Lines
Hi all,
I have a scenario like this fileXIIdoc
Invoice file comes in text file with multiple header and multiple lines like this
111 aaa 13214234 US (header)
09082010 ABC 9999 A (Line)
222 ccc 43454543 US (header)
09082010 XYZ 7777 B (Line)
09082010 PQR 8888 C (Line)
I need to post single Idoc with all the headers and lines
we are planning to use Custom Idoc,Is this possible by having the header segment as unbounded??
Regards
Edited by: Vamsi Krishna on Sep 8, 2010 8:05 PMhi,
lets go again.
you have to edit the custom IDoc and change the ocurrance on the header segment. also modify the details segment adding an addtional field that identify which header that this detail belong.
for this case you cannot change the occurrance in SAP PI because you wont identify what i have told you before. in PI apply to change the occurrance if you could send ONE Idoc Per Header.
now is better clear???
Let us know.
Thanks
Rodrigo P-. -
Hierarchy problem when creating IDoc with multiple headers
Hi,
In general, When you create an inbound IDoc for the IDoc Type FIDCCP02, you have all the data records arranged in hierarchical order (while viewing it in the we02 transaction).
Our requirement is to have m number of headers(E1FIKPF) and in turn it has n number of items(E1FISEG) inside a same IDoc. We have a problem in viewing the hierarchy of them in the data records tab. It comes down in a flat order without hierarchical division.
If we have only one header, we get the hierarchy sorted by default. If we have multiple headers we see the same problem again.
We guess some make-ups in the EDIDD structure which contains segnum, hlevel etc needs to be done.
Let us know the correct method to get this fixed.
Points will be rewarded.Thanks in advance.
Regards,
ReniEvery Idoc segment has a place to put in the parent segment for that Idoc. When you "fill" the Idoc , this tsep might not be executing for some reason.
Is this some customer development?
in EDID4 ,see these fields
PSGNUM-Number of the hierarchically higher SAP segment
HLEVEL Hierarchy level.
Regards -
ALV Grid with Multiple Headers
Dear All ,
I want to know is it possible to display Multiple header in the ALV Grid Display it is possible in List Display that i dne but i want in
My requirment is :
Header 1 | Header 2
SubHeader 1 | SubHeader 2 | SubHeader 3 | SubHeader 4
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
Header line 1 and Header line 2 in this format .
How it could be possible Please suggest or its not at all possible . Please suggest .
Thanks & Regards,
Aryan>
Aryan@sap wrote:
> That i will do in end but i want with ALV Grid . If it wont be possible with ALV grid i will finally do with ALV List .
> If any solution possible through ALV Grid then Please Suggest .
Then go for ALV List. But i am not sure if you can achieve this using the method suggested by Soumyaprakash.
You can give it a try though.
It is possible because that I have seen in standard here i cant paste the screen shot . but how its comming tht i am not able to analysis .
This is news to me now. Which standard code are you referring to?
Good luck !! -
Hello Experts,
Any examples would be highly appreciated.Thank you and take care!Hi,
Check this thread for ALVs -
Interactive ALV
ashish -
ALV with multiple header & dynamic columns
Hello All,
I have a requirement where in I need to print multiple header in alv.
For eg.
User Name : <Name_1>
Channel : <Channel_1>
Sale Org : <Sales Org_1>
Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8
User Name : <Name_2>
Channel : <Channel_2>
Sale Org : <Sales Org_2>
Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8
no of columns (Col1 , col2 ) are dynamic . Which would be the best alv type do I need do use? Is it possible using simple alv grid display. How to handle dynamic column.
Thnx.it is not possible with normal grid or list.
I guess it is possible by using ALV Block list
Modified below program to get mutiple header
REPORT z_alv_block_list.
Type-pools
TYPE-POOLS: slis.
Data declarations.
DATA: BEGIN OF t_vbak OCCURS 0,
vbeln TYPE vbeln,
bstnk TYPE vbak-bstnk,
erdat TYPE vbak-erdat,
kunnr TYPE vbak-kunnr,
END OF t_vbak.
DATA: BEGIN OF t_vbap OCCURS 0,
vbeln TYPE vbeln,
matnr TYPE vbap-matnr,
netpr TYPE vbap-netpr,
waerk TYPE vbap-waerk,
kwmeng TYPE vbap-kwmeng,
meins TYPE vbap-meins,
END OF t_vbap.
DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
DATA: v_repid TYPE syrepid.
DATA: s_layout TYPE slis_layout_alv.
DATA: v_tabname TYPE slis_tabname.
DATA: t_events TYPE slis_t_event.
start-of-selection event.
START-OF-SELECTION.
v_repid = sy-repid.
Get the fieldcatalog for the first block
PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.
Get the fieldcatalog for the second block
PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.
Get the data for the first block
SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
INTO TABLE t_vbak
FROM vbak WHERE vbeln > '0060000100'.
Get the data for the second block
SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10
ROWS
INTO TABLE t_vbap
FROM vbap WHERE vbeln > '0060000100'.
init
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = v_repid.
First block
v_tabname = 'ITAB1'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = s_layout
it_fieldcat = t_fieldcatalog1
i_tabname = v_tabname
it_events = t_events
TABLES
t_outtab = t_vbak.
Second block
v_tabname = 'ITAB2'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = s_layout
it_fieldcat = t_fieldcatalog2
i_tabname = v_tabname
it_events = t_events
TABLES
t_outtab = t_vbap.
*Display
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
FORM GET_FIELDCAT1
Get the field catalog for the first block
FORM get_fieldcat1 CHANGING lt_fieldcatalog TYPE
slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Order number
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'VBELN'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Customer purchase order.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'BSTNK'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'BSTNK'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Creation date.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'ERDAT'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Customer
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'KUNNR'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'KUNNR'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
ENDFORM.
FORM GET_FIELDCAT2
Get the field catalog for the second block
FORM get_fieldcat2 CHANGING lt_fieldcatalog TYPE
slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Order number
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'VBELN'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Material number
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'MATNR'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'MATNR'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Net price
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'NETPR'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'NETPR'.
s_fieldcatalog-cfieldname = 'WAERK'.
s_fieldcatalog-ctabname = 'T_VBAP'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Currency.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'WAERK'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'WAERK'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Quantity
s_fieldcatalog-col_pos = '5'.
s_fieldcatalog-fieldname = 'KWMENG'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'KWMENG'.
s_fieldcatalog-qfieldname = 'MEINS'.
s_fieldcatalog-qtabname = 'T_VBAP'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
UOM
s_fieldcatalog-col_pos = '6'.
s_fieldcatalog-fieldname = 'MEINS'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'MEINS'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
ENDFORM. -
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. -
Seperating data with multiple headers
Hello,
I have a data set that has 6 columns with headers containing information for one cycle of a part (Data File is Attached). About 200 rows later I have another set of data with 6 columns for cycle 2 with a space and a new header, and at about another 400 rows later I have the data for cycle 5 with a space and a new header. This pattern repeats throughout the data set.
I need a way to seperate this data so that I can plot the individual cycles. When I import this data set into Diadem with the DataPlugin Wizzard it does not recognize the spaces and new headers. It labels the spaces and headers as "NO VALUE", so there are discontinuities in the data. Is there a way to seperate the cycles in this data set in Diadem?
For example, I would like to have rows 6 thru 215, rows 220 thru 630, rows 635 thru 1046, rows 1051 thru 1462, etc. This way I can plot the individual cycles against the running time.
Solved!
Go to Solution.
Attachments:
Sample_Data2.csv 774 KBHi wils01,
Here's a DataPlugin I created that loads your posted data file with each cycle in a separate Data Portal Group.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Attachments:
wils01_Cycles_CSV.uri 9 KB -
ALV With Multiple Header information
Hi Friends,
I have the following requirement.
Company Header Information 1
Company Header Information 2
Company Header Information 3
Company Header Information 4
Company Header Information 5
Operator1 Details1
Operator1 Details2
Customer Information A
Sales InformationA1
Sales InformationA2
Sales InformationA3
Sales InformationA4
Operator1 Information2
Customer Information B
Sales InformationB1
Sales InformationB2
Sales InformationB3
Sales InformationB4
Is this possible through any ALV?
Thanks & Regards,
Lijo Josephhi,
Execute this program nad check if this helps in ur requirement.
*& Report ZKEERTHI_ALV3 *
REPORT ZKEERTHI_ALV3 LINE-COUNT 100 .
*& tables declaration
TABLES: MARA.
*& type-pools declaration
TYPE-POOLS: SLIS.
*& data declaration
DATA: G_REPID TYPE SY-REPID.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, "mara
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA : IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV, "makt
WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA : IT_FIELDCAT2 TYPE SLIS_T_FIELDCAT_ALV, "marc
WA_FIELDCAT2 TYPE SLIS_FIELDCAT_ALV.
DATA: GT_PRINT TYPE SLIS_PRINT_ALV,
WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
XS_EVENT TYPE SLIS_ALV_EVENT,
GT_XEVENTS TYPE SLIS_T_EVENT,
GT_YEVENTS TYPE SLIS_T_EVENT,
GT_ZEVENTS TYPE SLIS_T_EVENT,
WA_SORT TYPE SLIS_SORTINFO_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: BEGIN OF IT_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MATKL LIKE MARA-MATKL,
MEINS LIKE MARA-MEINS,
NTGEW LIKE MARA-NTGEW,
END OF IT_MARA.
DATA: BEGIN OF IT_MAKT OCCURS 0,
MATNR LIKE MAKT-MATNR,
SPRAS LIKE MAKT-SPRAS,
MAKTX LIKE MAKT-MAKTX,
MAKTG LIKE MAKT-MAKTG,
END OF IT_MAKT.
DATA: BEGIN OF IT_MARC OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
LADGR LIKE MARC-LADGR,
MTVFP LIKE MARC-MTVFP,
DISPR LIKE MARC-DISPR,
DISMM LIKE MARC-DISMM,
DISPO LIKE MARC-DISPO,
END OF IT_MARC.
*& initialisation
INITIALIZATION.
G_REPID = SY-REPID.
*& selection screen
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR,
S_MTART FOR MARA-MTART.
SELECTION-SCREEN END OF BLOCK B.
*& start of selection
START-OF-SELECTION.
PERFORM GET_MARADETAILS.
PERFORM GET_MAKTDETAILS.
PERFORM GET_MARCDETAILS.
*& Form get_maradetails
text
--> p1 text
<-- p2 text
FORM GET_MARADETAILS .
SELECT MATNR
MTART
MATKL
MEINS
NTGEW FROM MARA
INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR AND
MTART IN S_MTART.
ENDFORM. " get_maradetails
*& Form get_maktdetails
text
--> p1 text
<-- p2 text
FORM GET_MAKTDETAILS .
SELECT MATNR
SPRAS
MAKTX
MAKTG FROM MAKT INTO TABLE IT_MAKT
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR..
ENDFORM. " get_maktdetails
*& Form get_marcdetails
text
--> p1 text
<-- p2 text
FORM GET_MARCDETAILS .
SELECT MATNR
WERKS
LADGR
MTVFP
DISPR
DISMM
DISPO FROM MARC
INTO TABLE IT_MARC
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR.
ENDFORM. " get_marcdetails
*& end of selection
END-OF-SELECTION.
PERFORM SORT_LIST.
PERFORM MODIFY_FIELDCAT.
PERFORM EVENT_LIST.
PERFORM BLOCK_LIST.
*& Form modify_fieldcat
text
--> p1 text
<-- p2 text
FORM MODIFY_FIELDCAT .
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NUM'.
WA_FIELDCAT-COL_POS = 1.
WA_FIELDCAT-OUTPUTLEN = 18.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MTART'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'MAT TYPE'.
WA_FIELDCAT-COL_POS = 2.
WA_FIELDCAT-OUTPUTLEN = 5.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATKL'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'MAT GROUP'.
WA_FIELDCAT-COL_POS = 3.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'UNIT'.
WA_FIELDCAT-COL_POS = 4.
WA_FIELDCAT-OUTPUTLEN = 5.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'NTGEW'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-DO_SUM = 'X'.
WA_FIELDCAT-SELTEXT_L = 'QUANTITY'.
WA_FIELDCAT-COL_POS = 5.
WA_FIELDCAT-OUTPUTLEN = 15.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'MATNR'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUM'.
WA_FIELDCAT1-COL_POS = 1.
WA_FIELDCAT1-OUTPUTLEN = 18.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'SPRAS'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'LANGUAGE'.
WA_FIELDCAT1-COL_POS = 2.
WA_FIELDCAT1-OUTPUTLEN = 2.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'MAKTX'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'MAT DESC'.
WA_FIELDCAT1-COL_POS = 3.
WA_FIELDCAT1-OUTPUTLEN = 40.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'MAKTG'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'GRP DESC'.
WA_FIELDCAT1-COL_POS = 4.
WA_FIELDCAT1-OUTPUTLEN = 40.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'MATNR'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MATERIAL NUM'.
WA_FIELDCAT2-COL_POS = 1.
WA_FIELDCAT2-OUTPUTLEN = 18.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'WERKS'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'PLANT'.
WA_FIELDCAT2-COL_POS = 2.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'LADGR'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'LOAD GRP'.
WA_FIELDCAT2-COL_POS = 3.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'MTVFP'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'GRP CHK'.
WA_FIELDCAT2-COL_POS = 4.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'DISPR'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MRP PROFILE'.
WA_FIELDCAT2-COL_POS = 5.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'DISMM'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MRP TYPE'.
WA_FIELDCAT2-COL_POS = 6.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'DISPO'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MRP CON'.
WA_FIELDCAT2-COL_POS = 7.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
ENDFORM. " modify_fieldcat
*& Form BLOCK_LIST
text
--> p1 text
<-- p2 text
FORM BLOCK_LIST .
CLEAR WA_LAYOUT.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-TOTALS_TEXT = 'TOTAL'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'user_command'.
IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
I_TABNAME = 'IT_MARA'
IT_EVENTS = GT_XEVENTS
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
T_OUTTAB = IT_MARA
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT1
I_TABNAME = 'IT_MAKT'
IT_EVENTS = GT_YEVENTS
IT_SORT =
I_TEXT = ' '
TABLES
T_OUTTAB = IT_MAKT
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT2
I_TABNAME = 'IT_MARC'
IT_EVENTS = GT_ZEVENTS
IT_SORT =
I_TEXT = ' '
TABLES
T_OUTTAB = IT_MARC
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
IS_PRINT = GT_PRINT
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 =
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. " BLOCK_LIST
*& Form EVENT_LIST
text
--> p1 text
<-- p2 text
FORM EVENT_LIST .
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'XTOP_OF_PAGE'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
XS_EVENT-FORM = 'XEND_OF_PAGE'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
XS_EVENT-FORM = 'XTOP_OF_LIST'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
XS_EVENT-FORM = 'XEND_OF_LIST'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
XS_EVENT-FORM = 'YEND_OF_PAGE'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'YTOP_OF_PAGE'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
XS_EVENT-FORM = 'YTOP_OF_LIST'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
XS_EVENT-FORM = 'YEND_OF_LIST'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
XS_EVENT-FORM = 'ZEND_OF_PAGE'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'ZTOP_OF_PAGE'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
XS_EVENT-FORM = 'ZTOP_OF_LIST'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
XS_EVENT-FORM = 'ZEND_OF_LIST'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
ENDFORM. " EVENT_LIST
FORM XTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MARA'.
ENDFORM.
FORM YTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MAKT'.
ENDFORM.
FORM ZTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MARC'.
ENDFORM.
FORM XEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MARA'.
ENDFORM.
FORM YEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MAKT'.
ENDFORM.
FORM ZEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MARC'.
ENDFORM.
FORM XTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MARA'.
ENDFORM.
FORM YTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MAKT'.
ENDFORM.
FORM ZTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MARC'.
ENDFORM.
FORM XEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MARA'.
ENDFORM.
FORM YEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MAKT'.
ENDFORM.
FORM ZEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MARC'.
ENDFORM.
*& Form sort_list
text
--> p1 text
<-- p2 text
FORM SORT_LIST .
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'MTART'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'MATKL'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
ENDFORM. " sort_list
regards,
keerthi -
Hi All,
I have the following requirement, need to display multiple headers in ALV display(not multiple lines in alv header).
Header1.
Row1
Row2
Row3
Footer 1.
Header2.
Row1
Row2
Row3
Footer 2.
Header3.
Row1
Row2
Row3
Footer 3.
To display this in hierarchal ALV the above given tables does not have header item relationship. To use Blocked ALV the number of blocks are not constant, Sometimes there can be only 2 blocks sometimes there can be 10 blocks and some times even more, there is no cap on Maximum number of blocks.
I have searched in SDN N google but couldnt found suitable answer. If anyone has solved this type of issue before, can please through some light.
Thanks in Advance.Hi All,
I'm able to solve the above issue somewhat by using split technique. I want to know how to trigger top of page event in split. I want to trigger top of page event in same container where data is being displayed.
I have created container on screen and splitted that container into 3 parts, as I need to display data in each container. Now I want to display top of page for each container.
I have searched over internet and SDN but I'm able to find examples like split the containers into 2 parts and use 1 part for top of page and second part for data display.
My case is little different. I need to display data in each container with separate header for each container. If the header is only single line I could have used Layout-Title, but the header for each container is multiple lines. So I must use top of page.
If any body handled such kind of scenario, please provided some inputs.
Thanks in advance. -
Revision: 889
Author: [email protected]
Date: 2008-03-21 13:08:05 -0700 (Fri, 21 Mar 2008)
Log Message:
Add test case for BLZ-82 where HttpService should return multiple headers with the same name.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-82
Added Paths:
blazeds/trunk/qa/apps/qa-regress/remote/MultipleHeadersTest.jsp
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/proxyService/httpservice/MultiHe aderTest.mxmlHi again,
this may be old news to some people, but I just realized we can have the desired benefits I originally listed (encapsulation, reuse, maintainability, security) TODAY by using pipelined functions and using the table() function in Apex report region queries.
So the report query basically becomes, for example (if get_employees is a pipelined function)
select * from table(my_package.get_employees(:p1_deptno))
The only downside compared to a (weakly typed) sys_refcursor is that you have to define the type you are returning in your package spec (or as an SQL type). So it's a bit more coding, but it's still worth it for the other benefits it provides.
I like Apex even better now! :-)
- Morten
Maybe you are looking for
-
Message split on adapter engine for the java based IDoc adapter
Hi Guys, Do you know if message split on adapter engine is available for the java based IDoc adapter on the single stack (PI 7.31)? I'm getting such exception when I try to post 3 IDocs Transmitting the message to endpoint <local> using connection Fi
-
Hi All, Im able to display a hgrid in page, but when i modified the hgrid to display inner hgrid Im unable to display the second level hgrid. please correct me where Im wrong. Please find the following VL, AM, PG. And I have 2 VOs for master record a
-
InDesign CS4 Interactive swf?
Hi there, Well when I export my E-magazine to swf I get the following message: "Some button actions will not be preserved. The following actions are supported in pdf only Close, Exit, Movie, Open File, Sound . . ." and so on and so forth. Sure enough
-
Cascade Filter for Hierarchy dimension
Hi experts, I try to develop a design Studio Dashboard with BW DS. I would like to create a cascade filter for the same dimension but in different levels from hierarchy. First filter would have upper level node of the dimension that will filter same
-
Is it possible to pause a for loop?
Hi all! I wonder if it's possible in anyway, without using any timelines, to "pause" a for loop.for a couple of second if some statement returns true during the loop? I.e. like this sketch up of a code example: Thanks for any help :)