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 transport system and workbench organiser?
What are the types of table fields in the sap abap?
What do you do when the system crashes in the middle of a BDC batch session?
What are local objects?
What is the function of a domain?
What are the problems in processing batch input sessions?
How to upload data using catt ? : abap hr
What is the difference between data elements and domains?
How you attach search help to data element? : sap abap data dictionary
If I want to execute a bdc program only in background not in foreground is there any option for this? : abap bdc
What are the two ways of producing a list within a transaction?
What is the t-code to display batch input sessions? : abap bdc
List the various components of the enterprise structure in systems, applications, and products (sap) in human capital management (him)? : sap abap hr
What are the 3 types of function modules in sap?
What statement will be found in an sap application program that implements a function module exit?