Wednesday, December 29, 2010
Retrieve the fieldcatalog stored for the variant.
*----------------------------------------------------------------------* * Form GET_FIELDCAT_FROM_VARIANT *----------------------------------------------------------------------* form get_fieldcat_from_variant using disvar like disvariant itab_head type c itab_item type c. data: fieldcat_new type kkblo_t_fieldcat. CALL FUNCTION 'REUSE_ALV_TRANSFER_DATA' EXPORTING it_fieldcat = fieldcat is_layout = layout IMPORTING et_fieldcat = fieldcat_kkb es_layout = layout_kkb. CALL FUNCTION 'LT_VARIANT_LOAD' EXPORTING i_tabname = itab_head i_tabname_slave = itab_item i_dialog = space i_user_specific = 'X' IMPORTING et_fieldcat = fieldcat_new CHANGING ct_default_fieldcat = fieldcat_kkb cs_layout = layout_kkb cs_variant = disvar EXCEPTIONS wrong_input = 1 fc_not_complete = 2 not_found = 3 others = 4. if sy-subrc = 0. refresh fieldcat. CALL FUNCTION 'REUSE_ALV_TRANSFER_DATA_BACK' EXPORTING it_fieldcat = fieldcat_new IMPORTING et_fieldcat = fieldcat. clear: fieldcat_ln. modify fieldcat from fieldcat_ln transporting no_out where no_out <> 'X'. endif. endform. " GET_FIELDCAT_FROM_VARIANT
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.