"Creating dynamic internal table to display ALV" Code Answer's
You're definitely familiar with the best coding language SQL that developers use to develop their projects and they get all their queries like "Creating dynamic internal table to display ALV" answered properly. Developers are finding an appropriate answer about Creating dynamic internal table to display ALV related to the SQL coding language. By visiting this online portal developers get answers concerning SQL codes question like Creating dynamic internal table to display ALV. Enter your desired code related query in the search bar and get every piece of information about SQL code related question on Creating dynamic internal table to display ALV.
Creating dynamic internal table to display ALV
REPORT ZSAN_RFCTEST.
DATA : IT_FCAT TYPE LVC_T_FCAT.
PARAMETERS: P_TABLE TYPE DD02L-TABNAME.
DATA : WA_TABLE TYPE DD02L.
AT SELECTION-SCREEN.
IF P_TABLE IS NOT INITIAL.
SELECT SINGLE * FROM DD02L INTO WA_TABLE WHERE TABNAME = P_TABLE AND TABCLASS = 'TRANSP'.
ELSE.
MESSAGE 'Please enter a table' TYPE 'E'.
STOP.
ENDIF.
IF WA_TABLE IS INITIAL.
MESSAGE 'Table Dosent exit or is not transparent table' TYPE 'E'.
STOP.
ENDIF.
START-OF-SELECTION.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = P_TABLE
CHANGING
CT_FIELDCAT = IT_FCAT.
DATA : FS_TAB TYPE REF TO DATA.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
* I_STYLE_TABLE =
IT_FIELDCATALOG = IT_FCAT
* I_LENGTH_IN_BYTE =
IMPORTING
EP_TABLE = FS_TAB.
FIELD-SYMBOLS: <FS_TAB> TYPE STANDARD TABLE.
ASSIGN FS_TAB->* TO <FS_TAB>.
*data : it_tab type TABLE OF p_table.
SELECT * FROM (P_TABLE) INTO CORRESPONDING FIELDS OF TABLE <FS_TAB> UP TO 50 ROWS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = P_TABLE
TABLES
T_OUTTAB = <FS_TAB>.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
Source: www.sapnuts.com
All those coders who are working on the SQL based application and are stuck on Creating dynamic internal table to display ALV can get a collection of related answers to their query. Programmers need to enter their query on Creating dynamic internal table to display ALV related to SQL code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about Creating dynamic internal table to display ALV for the programmers working on SQL code while coding their module. Coders are also allowed to rectify already present answers of Creating dynamic internal table to display ALV while working on the SQL language code. Developers can add up suggestions if they deem fit any other answer relating to "Creating dynamic internal table to display ALV". Visit this developer's friendly online web community, CodeProZone, and get your queries like Creating dynamic internal table to display ALV resolved professionally and stay updated to the latest SQL updates.