ABAP Select data from SAP table BAPIMAITM into internal table
Get Example source ABAP code based on a different SAP table
Below is a number of ABAP code snippets to demonstrate how to select data from SAP BAPIMAITM table and store it within an internal table, including using the newer @DATA inline declaration methods. It also shows you various ways to process this data using ABAP work area, inline declaration or field symbols including executing all the relevant CONVERSION_EXIT routines specific to BAPIMAITM. See here for more generic Select statement tips.
Sometimes data within SAP is stored within the database table in a different format to what it is displayed to the user. These input/output conversation FM routines are what translates the data between the two formats.
There is also a full declaration of the BAPIMAITM table where each field has a char/string type for you to simply copy and paste. This allows you to use processing that is only available to these field types such as the CONCATENATE statement.
DATA: IT_BAPIMAITM TYPE STANDARD TABLE OF BAPIMAITM, WA_BAPIMAITM TYPE BAPIMAITM, GD_STR TYPE STRING. DATA: lo_typedescr type REF TO cl_abap_typedescr. DATA: lv_fieldname type fieldname. FIELD-SYMBOLS: <FIELD> TYPE any. FIELD-SYMBOLS: <BAPIMAITM> TYPE BAPIMAITM. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_BAPIMAITM. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM BAPIMAITM INTO TABLE IT_BAPIMAITM. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM BAPIMAITM * INTO TABLE @DATA(IT_BAPIMAITM2). *--Further methods of using ABAP code to select data from SAP database tables *You can also declare the header/work area using the in-line DATA declaration method READ TABLE IT_BAPIMAITM INDEX 1 INTO DATA(WA_BAPIMAITM2). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_BAPIMAITM ASSIGNING <BAPIMAITM>.*To update a field value using a field symbol simply change the value via the field symbol pointer
<BAPIMAITM>-SEND_CCTR = 1.
<BAPIMAITM>-SEN_ORDER = 1.
<BAPIMAITM>-SEN_WBS_EL = 1.
<BAPIMAITM>-SEN_NETWRK = 1.
<BAPIMAITM>-SENOPERATN = 1.
ENDLOOP. LOOP AT IT_BAPIMAITM INTO WA_BAPIMAITM. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_BAPIMAITM-SENSALEORD, sy-vline,
WA_BAPIMAITM-SENITEM, sy-vline,
WA_BAPIMAITM-SENCOSTOBJ, sy-vline,
WA_BAPIMAITM-COST_ELEM, sy-vline,
WA_BAPIMAITM-VALUE_TCUR, sy-vline,
WA_BAPIMAITM-QUANTITY, sy-vline.
ENDLOOP. *Add any further fields from structure WA_BAPIMAITM you want to display... WRITE:/ sy-uline. * Aternatively use generic code to Write field values (and NAME) to screen report DO. ASSIGN COMPONENT sy-index OF STRUCTURE wa_BAPIMAITM TO <field>. IF sy-subrc <> 0. EXIT. ENDIF. WRITE:/ 'Field Value', <field>, sy-vline. gd_str = <field> . lo_typedescr ?= CL_ABAP_DATADESCR=>DESCRIBE_BY_DATA( <field> ). lv_fieldname = lo_typedescr->GET_RELATIVE_NAME( ). WRITE:/ 'Field Name', lv_fieldname. ENDDO. *Redo loop but convert all fields from internal to out value LOOP AT IT_BAPIMAITM INTO WA_BAPIMAITM. *Write horizonal line to screen report. WRITE:/ sy-uline. *Convert all fields to display/output versions using conversion routines PERFORM convert_all_field_values CHANGING wa_EKKO. ENDLOOP. *&---------------------------------------------------------------------* *& Form convert_all_field_values *&---------------------------------------------------------------------* FORM convert_all_field_values CHANGING p_EKKO LIKE wa_EKKO. DATA: ld_input(1000) TYPE c, ld_output(1000) TYPE C.
*Conversion exit ALPHA, internal->external for field SEND_CCTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SEND_CCTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SEND_CCTR.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SEN_ORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SEN_ORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SEN_ORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ABPSN, internal->external for field SEN_WBS_EL CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT' EXPORTING input = WA_BAPIMAITM-SEN_WBS_EL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SEN_WBS_EL.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SEN_NETWRK CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SEN_NETWRK IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SEN_NETWRK.
WRITE:/ 'New Value:', ld_input.
*Conversion exit NUMCV, internal->external for field SENOPERATN CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_BAPIMAITM-SENOPERATN IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SENOPERATN.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SENSALEORD CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SENSALEORD IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SENSALEORD.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field COST_ELEM CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-COST_ELEM IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-COST_ELEM.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field POSTQUUN CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BAPIMAITM-POSTQUUN IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-POSTQUUN.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REC_CCTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-REC_CCTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-REC_CCTR.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REC_ORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-REC_ORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-REC_ORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ABPSN, internal->external for field REC_WBS_EL CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT' EXPORTING input = WA_BAPIMAITM-REC_WBS_EL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-REC_WBS_EL.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REC_NETWRK CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-REC_NETWRK IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-REC_NETWRK.
WRITE:/ 'New Value:', ld_input.
*Conversion exit NUMCV, internal->external for field RECOPERATN CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_BAPIMAITM-RECOPERATN IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RECOPERATN.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RECSALEORD CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RECSALEORD IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RECSALEORD.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SENBUSPROC CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SENBUSPROC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SENBUSPROC.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RECBUSPROC CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RECBUSPROC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RECBUSPROC.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SWENR, internal->external for field SRE_BUS_ENT CALL FUNCTION 'CONVERSION_EXIT_SWENR_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_BUS_ENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_BUS_ENT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SGRNR, internal->external for field SRE_PROPERTY CALL FUNCTION 'CONVERSION_EXIT_SGRNR_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_PROPERTY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_PROPERTY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SGENR, internal->external for field SRE_BUILDING CALL FUNCTION 'CONVERSION_EXIT_SGENR_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_BUILDING IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_BUILDING.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SMENR, internal->external for field SRE_RENT_UNIT CALL FUNCTION 'CONVERSION_EXIT_SMENR_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_RENT_UNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_RENT_UNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SRE_LEASE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_LEASE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_LEASE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SRE_MGMT_CON CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_MGMT_CON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_MGMT_CON.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SRE_INC_EXP CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_INC_EXP IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_INC_EXP.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SRE_SETT_UNIT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_SETT_UNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_SETT_UNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SRE_CON_NO CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SRE_CON_NO IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SRE_CON_NO.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SWENR, internal->external for field RRE_BUS_ENT CALL FUNCTION 'CONVERSION_EXIT_SWENR_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_BUS_ENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_BUS_ENT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SGRNR, internal->external for field RRE_PROPERTY CALL FUNCTION 'CONVERSION_EXIT_SGRNR_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_PROPERTY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_PROPERTY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SGENR, internal->external for field RRE_BUILDING CALL FUNCTION 'CONVERSION_EXIT_SGENR_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_BUILDING IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_BUILDING.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SMENR, internal->external for field RRE_RENT_UNIT CALL FUNCTION 'CONVERSION_EXIT_SMENR_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_RENT_UNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_RENT_UNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RRE_LEASE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_LEASE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_LEASE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RRE_MGMT_CON CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_MGMT_CON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_MGMT_CON.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RRE_INC_EXP CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_INC_EXP IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_INC_EXP.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RRE_SETT_UNIT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_SETT_UNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_SETT_UNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RRE_CON_NO CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-RRE_CON_NO IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-RRE_CON_NO.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SEND_GRANT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SEND_GRANT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SEND_GRANT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REC_GRANT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-REC_GRANT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-REC_GRANT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SEN_RSRCE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-SEN_RSRCE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-SEN_RSRCE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REC_RSRCE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_BAPIMAITM-REC_RSRCE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BAPIMAITM-REC_RSRCE.
WRITE:/ 'New Value:', ld_input.
ENDFORM. *&---------------------------------------------------------------------* *& Form process_as_string_field_values *&---------------------------------------------------------------------* FORM process_as_string_field_values CHANGING p_EKKO LIKE wa_EKKO. TYPES: BEGIN OF T_BAPIMAITM_STR,
SEND_CCTR TYPE STRING,
SEN_ORDER TYPE STRING,
SEN_WBS_EL TYPE STRING,
SEN_NETWRK TYPE STRING,
SENOPERATN TYPE STRING,
SENSALEORD TYPE STRING,
SENITEM TYPE STRING,
SENCOSTOBJ TYPE STRING,
COST_ELEM TYPE STRING,
VALUE_TCUR TYPE STRING,
QUANTITY TYPE STRING,
POSTQUUN TYPE STRING,
POSTQUUN_ISO TYPE STRING,
PERSON_NO TYPE STRING,
SEG_TEXT TYPE STRING,
REC_CCTR TYPE STRING,
REC_ORDER TYPE STRING,
REC_WBS_EL TYPE STRING,
REC_NETWRK TYPE STRING,
RECOPERATN TYPE STRING,
RECSALEORD TYPE STRING,
RECITEM TYPE STRING,
RECCOSTOBJ TYPE STRING,
SENBUSPROC TYPE STRING,
RECBUSPROC TYPE STRING,
SRE_COMP_CODE TYPE STRING,
SRE_BUS_ENT TYPE STRING,
SRE_PROPERTY TYPE STRING,
SRE_BUILDING TYPE STRING,
SRE_RENT_UNIT TYPE STRING,
SRE_LEASE TYPE STRING,
SRE_MGMT_CON TYPE STRING,
SRE_INC_EXP TYPE STRING,
SRE_SETT_UNIT TYPE STRING,
SRE_REF_DATE TYPE STRING,
SRE_CON_NO TYPE STRING,
RRE_COMP_CODE TYPE STRING,
RRE_BUS_ENT TYPE STRING,
RRE_PROPERTY TYPE STRING,
RRE_BUILDING TYPE STRING,
RRE_RENT_UNIT TYPE STRING,
RRE_LEASE TYPE STRING,
RRE_MGMT_CON TYPE STRING,
RRE_INC_EXP TYPE STRING,
RRE_SETT_UNIT TYPE STRING,
RRE_REF_DATE TYPE STRING,
RRE_CON_NO TYPE STRING,
SEND_FUND TYPE STRING,
SEND_FUNCTION TYPE STRING,
REC_FUND TYPE STRING,
REC_FUNCTION TYPE STRING,
SEND_GRANT TYPE STRING,
REC_GRANT TYPE STRING,
TRANS_CURR TYPE STRING,
TRANS_CURR_ISO TYPE STRING,
ITEMNO_ACC TYPE STRING,
SEND_FUND_LONG TYPE STRING,
REC_FUND_LONG TYPE STRING,
SEND_BUDGET_PERIOD TYPE STRING,
REC_BUDGET_PERIOD TYPE STRING,
SEN_RSRCE TYPE STRING,
REC_RSRCE TYPE STRING,
REC_WORK_ITM TYPE STRING,
SERV_DATE TYPE STRING,
SEN_WORK_ITM TYPE STRING,
VALUE_TCUR_LONG TYPE STRING,END OF T_EKKO_STR. DATA: WA_BAPIMAITM_STR type T_EKKO_STR. DATA: ld_text TYPE string. LOOP AT IT_EKKO INTO WA_EKKO. MOVE-CORRESPONDING wa_EKKO TO WA_EKKO_STR. CONCATENATE: sy-vline
WA_BAPIMAITM_STR-SEND_CCTR sy-vline
WA_BAPIMAITM_STR-SEN_ORDER sy-vline
WA_BAPIMAITM_STR-SEN_WBS_EL sy-vline
WA_BAPIMAITM_STR-SEN_NETWRK sy-vline
WA_BAPIMAITM_STR-SENOPERATN sy-vline
WA_BAPIMAITM_STR-SENSALEORD sy-vline
WA_BAPIMAITM_STR-SENITEM sy-vline
WA_BAPIMAITM_STR-SENCOSTOBJ sy-vline
WA_BAPIMAITM_STR-COST_ELEM sy-vline
WA_BAPIMAITM_STR-VALUE_TCUR sy-vline
WA_BAPIMAITM_STR-QUANTITY sy-vline
WA_BAPIMAITM_STR-POSTQUUN sy-vline
WA_BAPIMAITM_STR-POSTQUUN_ISO sy-vline
WA_BAPIMAITM_STR-PERSON_NO sy-vline
WA_BAPIMAITM_STR-SEG_TEXT sy-vline
WA_BAPIMAITM_STR-REC_CCTR sy-vline
WA_BAPIMAITM_STR-REC_ORDER sy-vline
WA_BAPIMAITM_STR-REC_WBS_EL sy-vline
WA_BAPIMAITM_STR-REC_NETWRK sy-vline
WA_BAPIMAITM_STR-RECOPERATN sy-vline
WA_BAPIMAITM_STR-RECSALEORD sy-vline
WA_BAPIMAITM_STR-RECITEM sy-vline
WA_BAPIMAITM_STR-RECCOSTOBJ sy-vline
WA_BAPIMAITM_STR-SENBUSPROC sy-vline
WA_BAPIMAITM_STR-RECBUSPROC sy-vline
WA_BAPIMAITM_STR-SRE_COMP_CODE sy-vline
WA_BAPIMAITM_STR-SRE_BUS_ENT sy-vline
WA_BAPIMAITM_STR-SRE_PROPERTY sy-vline
WA_BAPIMAITM_STR-SRE_BUILDING sy-vline
WA_BAPIMAITM_STR-SRE_RENT_UNIT sy-vline
WA_BAPIMAITM_STR-SRE_LEASE sy-vline
WA_BAPIMAITM_STR-SRE_MGMT_CON sy-vline
WA_BAPIMAITM_STR-SRE_INC_EXP sy-vline
WA_BAPIMAITM_STR-SRE_SETT_UNIT sy-vline
WA_BAPIMAITM_STR-SRE_REF_DATE sy-vline
WA_BAPIMAITM_STR-SRE_CON_NO sy-vline
WA_BAPIMAITM_STR-RRE_COMP_CODE sy-vline
WA_BAPIMAITM_STR-RRE_BUS_ENT sy-vline
WA_BAPIMAITM_STR-RRE_PROPERTY sy-vline
WA_BAPIMAITM_STR-RRE_BUILDING sy-vline
WA_BAPIMAITM_STR-RRE_RENT_UNIT sy-vline
WA_BAPIMAITM_STR-RRE_LEASE sy-vline
WA_BAPIMAITM_STR-RRE_MGMT_CON sy-vline
WA_BAPIMAITM_STR-RRE_INC_EXP sy-vline
WA_BAPIMAITM_STR-RRE_SETT_UNIT sy-vline
WA_BAPIMAITM_STR-RRE_REF_DATE sy-vline
WA_BAPIMAITM_STR-RRE_CON_NO sy-vline
WA_BAPIMAITM_STR-SEND_FUND sy-vline
WA_BAPIMAITM_STR-SEND_FUNCTION sy-vline
WA_BAPIMAITM_STR-REC_FUND sy-vline
WA_BAPIMAITM_STR-REC_FUNCTION sy-vline
WA_BAPIMAITM_STR-SEND_GRANT sy-vline
WA_BAPIMAITM_STR-REC_GRANT sy-vline
WA_BAPIMAITM_STR-TRANS_CURR sy-vline
WA_BAPIMAITM_STR-TRANS_CURR_ISO sy-vline
WA_BAPIMAITM_STR-ITEMNO_ACC sy-vline
WA_BAPIMAITM_STR-SEND_FUND_LONG sy-vline
WA_BAPIMAITM_STR-REC_FUND_LONG sy-vline
WA_BAPIMAITM_STR-SEND_BUDGET_PERIOD sy-vline
WA_BAPIMAITM_STR-REC_BUDGET_PERIOD sy-vline
WA_BAPIMAITM_STR-SEN_RSRCE sy-vline
WA_BAPIMAITM_STR-REC_RSRCE sy-vline
WA_BAPIMAITM_STR-REC_WORK_ITM sy-vline
WA_BAPIMAITM_STR-SERV_DATE sy-vline
WA_BAPIMAITM_STR-SEN_WORK_ITM sy-vline
WA_BAPIMAITM_STR-VALUE_TCUR_LONG sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.