Posts

Showing posts from October, 2022

BAPI for material storage location Add

 We can add material storage location plant wise using third party app or web. BAPI names : BAPI_MATERIAL_MAINTAINDATA_RT Import parameters: HEADDATA: Material Tables: STORAGELOCATIONDATA: Material: Plant: STGE_LOC:   STORAGELOCATIONDATAX: Material: Plant: STGE_LOC:   use below code after completing steps. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.        

Different types of ALV Report in SAP

 Different types of ALV: ALV list: this uses the function module 'REUSE_ALV_LIST_DISPLAY' Hierarchical sequential list: function module 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' Fullscreen grid: this uses the function module 'REUSE_ALV_GRID_DISPLAY' ALV Grid Control: Methods of the class CL_GUI_ALV_GRID ALV Tree: Methods of the class CL_GUI_ALV_TREE In Basis Release 6.40, an object-oriented ALV wrapper is provided.  This can be used for three different types of tables. - for simple, two-dimensional tables using the classCL_SALV_TABLE - for hierarchical sequential tables (class CL_SALV_HIERSEQ_TABLE) - for tree structures (class CL_SALV_TREE)   The methods of the class CL_GUI_ALV_GRID , which are required for an ALV grid that cannot be edited, are released for use in customer-specific programs.  The documentation is accessed in the class documentation. The object-oriented ALV wrapper, which is provided in Basis Release 6.40, is also released for customers.  For more ...

Find Out Read_Text FM Parameter

Image
 Suppose we have a requirement to show long text value in a smartforms. In this case we need to  use ' Read_Text ' FM. In read_text FM we need to provide some field values for: Client,ID, Language,Name,Object. We can find out those value from our desired field. Firstly we need to go desired T-Code, I am showing one example: QA03:  Follow below steps:       DATA :  LINES  TYPE  STANDARD  TABLE  OF  TLINE .   CALL FUNCTION 'READ_TEXT' EXPORTING CLIENT = SY-MANDT OBJECT = 'QPRUEFLOS'                          NAME = 'concatenate of Sy-mandt Insp_lot' ID = 'QALS' LANGUAGE = 'E' ARCHIVE_HANDLE = 0 IMPORTING HEADER = TABLES LINES = LINES EXCEPTIONS ID = LANGUAGE = NAME = NOT_FOUND = OBJECT = REFERENCE_CHECK = WRONG_ACCESS_TO_ARCHIVE =

Create .csv file from ABAP report

 We can use like below: types truxs_t_text_data ( 4096 ) type c occurs 0 . data : csv_converted_table type table of TRUXS_T_TEXT_DATA . START-OF-SELECTION. call function 'SAP_CONVERT_TO_CSV_FORMAT' exporting i_field_seperator = ';' * I_LINE_HEADER = * I_FILENAME = '' * I_APPL_KEEP = ' ' tables i_tab_sap_data = internal_table changing i_tab_converted_data = csv_converted_table exceptions conversion_failed = 1 others = 2 . CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING filename = 'C:\example.csv' tables data_tab = csv_converted_table .