in the final display list how can i change rows to columns
and vice versa
Answer / 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 |
What is pseudo comment (#EC) and How it is different from normal comments(i.e. '*' and '"')
how we can take a file from Presentation server to Application server?
What happens if we use leave to list-processing without using suppress-dialog?
Final class
Any once please tell me some interview questions regarding Smartforms?
Persistent class
How does one know that the legacy files have come on to the SAP server you are working on?
What does an exec sql statement do in abap? What is the disadvantage of using it?
Reuse-ALV-grid control?
Explain how many types of tables exist and what are they in data dictionary?
what are diffrences between user-exits and customer-exits?
Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What is the other type of screen painter called?