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 difference between select statement and provide statement ? : abap hr
How will you link form with the event driven in sap scripts?
What are the aggregate objects in data dictionary? : sap abap data dictionary
What are the basic functions of database utility?
What are two different ways to add fields to sap tables?
where are the passwords for ITS stores?
How do you Export a session ?
State the system field for the current date?
What is the significance of delivery class?
How to convert normal function module to bapi?
What is the collect statement?
Business scenarios related to your objects( In my case -Rulebook and Pricing work flow)
how to modify the standard method as per your requirement
What are the functional areas, user groups? How does abap query work in relation to these?
If your project is support project ? when is your implementation has completed ?