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 ARE THE MANDATORY FIELDS TO BE FILLED FROM TABLES BAPIITEMIN, BAPIPARTNR, BAPIITEMEX, BAPICUCFG, BAPICUINS, BAPICUPRT, AND BAPICUVAL IN BAPI 'BAPI_QUOTATION_CREATEFROMDATA
What is the function of a data element? : abap data dictionary
What is the BAPI_CUSTMATINFO_GETDETAILM used for? what is the input and output of this bapi.
What are the types of views? : sap abap data dictionary
What is PS structure
What is the name of the system variable that holds the contents of the selected line in interactive reporting?
What are function modules?
How do you write manual bdc session method? : abap bdc
What is singleton pattern in OOPS?
What is an abap data dictionary? : abap data dictionary
Do we have to migrate all sapscript forms to smart forms?
What are the two different ways of building a match code object? : abap data dictionary
What are the events used in abap in the order of execution?
What are the features of abap/4 dictionary? : abap data dictionary
What is direct input method ?