in the final display list how can i change rows to columns
and vice versa
Answer Posted / vrushali
This is possible using dynamic internal table.
Declaration
DATA : IFCAT_TAB TYPE LVC_T_FCAT,
FCAT_TAB TYPE LVC_S_FCAT.
DATA : TLINS TYPE I.
FIELD-SYMBOLS : <LIST> TYPE TABLE, <L_LINE> TYPE ANY.
FIELD-SYMBOLS : <FVAL> TYPE ANY, <FPOV> TYPE ANY,
<TFVAL> TYPE ANY.
DATA : IDATA TYPE REF TO DATA,
NEW_LINE TYPE REF TO DATA.
LOOP AT ALV_FLDCAT_T INTO ALV_FLDCAT.
MOVE-CORRESPONDING ALV_FLDCAT TO FCAT_TAB.
APPEND FCAT_TAB TO IFCAT_TAB.
ENDLOOP.
After creating normal alv field catalogue we can add rows
info as column....
DELETE ADJACENT DUPLICATES FROM IFCAT_TAB COMPARING
FIELDNAME.
SORT IFCAT_TAB BY COL_POS ASCENDING. "FIELDNAME
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFCAT_TAB
IMPORTING
EP_TABLE = IDATA.
ASSIGN IDATA->* TO <LIST>.
CREATE DATA NEW_LINE LIKE LINE OF <LIST>.
ASSIGN NEW_LINE->* TO <L_LINE>.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the function of the correction system? : abap data dictionary
Setting up a BDC program where you find information from?
What is difference between check table and value table ?
Explain how do you get output from idoc?
How to combine multiple order in one Delivery ( Step by Step)?
What are Tickets in Realtime ?
What is an abap?
Difference between domain and data element? What are aggregate object?
What are field symbols?
What is the different between abap and ooabap? Why do we use ooabap?
Does every abap/4 have a modular structure? : abap modularization
How will you read from internal table records in a given value range (without using loop)
What is the use of dequeue function module? : sap abap data dictionary
To find the date difference & excude saturday & sunday in between them
Folder types in smatforms? 2)What is Command line?