How can we display multiple alv's without using containers?
You can use blocked alv to achieve this.
CALL FUNCTION REUSE_ALV_BLOCK_LIST_INIT
EXPORTING
i_callback_program = l_repid.
*Adding First Block to the List
CALL FUNCTION REUSE_ALV_BLOCK_LIST_APPEND
EXPORTING
is_layout = w_layo
it_fieldcat = it_fcat
i_tabname = text-064
it_events = it_events
it_sort = it_sort
TABLES
t_outtab = it_mainalv
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION REUSE_ALV_BLOCK_LIST_APPEND
EXPORTING
is_layout = w_layo
it_fieldcat = it_fcat1
i_tabname = text-094
it_events = it_events1
it_sort = it_sort1
TABLES
t_outtab = it_field_change
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
- Displaying the list
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF
How many blocks can create in a ALV BLOCK LIST in ABAP
Yes u can append max 19 block:
The fm REUSE_ALV_BLOCK_LIST_APPEND has the exception MAXIMUM_OF_APPENDS_REACHED, it will be triggered as soon as the max (19) will be reached
How to set a button in ALV grid
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = V_REPID I_CALLBACK_PF_STATUS_SET = 'F_SET_PF_STATUS' <--FORM NAME we have to give here I_CALLBACK_USER_COMMAND = C_USER_COMMAND IS_LAYOUT = WA_LAYOUT IT_FIELDCAT = IT_FIELDCAT[] IT_EXCLUDING = IT_EXTAB[] IT_SORT = IT_SORT[] TABLES T_OUTTAB = IT_ZBCAR50[] EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2. *&---------------------------------------------------------------------* *& Form F_SET_PF_STATUS *&---------------------------------------------------------------------* * Set PF_STATUS STANDARD modifying the standard toolbar * by excluding some buttons *----------------------------------------------------------------------* * -->P_IT_EXTAB -- TABLE OF EXCLUDING FUNCTIONS *----------------------------------------------------------------------* FORM F_SET_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB. CLEAR : WA_EXTAB, IT_EXTAB. *--Set the Modified PF status for the ALV. SET PF-STATUS 'STATUS_01' EXCLUDING RT_EXTAB. ENDFORM. " SET_PF_STATUS
Suppose in an ALV report in grid we have to disply matnr, ernam,ebeln,ebelp etc. But when we bring the cursor on that specified field, it will show "material number" for matnr, "purchase Document Number" for ebeln etc. how do you achieve this?
By Using Fieldcat-Seltext_m
No comments:
Post a Comment