ABAP Select data from SAP table P_CONSPELIMGRDER 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 P_CONSPELIMGRDER 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 P_CONSPELIMGRDER. 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 P_CONSPELIMGRDER 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_P_CONSPELIMGRDER TYPE STANDARD TABLE OF P_CONSPELIMGRDER,
      WA_P_CONSPELIMGRDER TYPE P_CONSPELIMGRDER,
      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: <P_CONSPELIMGRDER> TYPE P_CONSPELIMGRDER.

*Process all fields in table header/work area as string values
  PERFORM process_as_string_field_values CHANGING wa_P_CONSPELIMGRDER.

SELECT *
*restrict ABAP select to first 10 rows
 UP TO 10 ROWS      
  FROM P_CONSPELIMGRDER
  INTO TABLE IT_P_CONSPELIMGRDER.

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM P_CONSPELIMGRDER
*  INTO TABLE @DATA(IT_P_CONSPELIMGRDER2).
*--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_P_CONSPELIMGRDER INDEX 1 INTO DATA(WA_P_CONSPELIMGRDER2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_P_CONSPELIMGRDER ASSIGNING <P_CONSPELIMGRDER>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<P_CONSPELIMGRDER>-MANDT = 1.
<P_CONSPELIMGRDER>-RCLNT = 1.
<P_CONSPELIMGRDER>-RLDNR = 1.
<P_CONSPELIMGRDER>-RDIMEN = 1.
<P_CONSPELIMGRDER>-RYEAR = 1.
ENDLOOP.

LOOP AT IT_P_CONSPELIMGRDER INTO WA_P_CONSPELIMGRDER.
*Write horizonal line to screen report.
  WRITE:/ sy-uline.

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_P_CONSPELIMGRDER-DOCNR, sy-vline,
WA_P_CONSPELIMGRDER-DOCLN, sy-vline,
WA_P_CONSPELIMGRDER-RRCTY, sy-vline,
WA_P_CONSPELIMGRDER-RVERS, sy-vline,
WA_P_CONSPELIMGRDER-STRVS, sy-vline,
WA_P_CONSPELIMGRDER-RTCUR, sy-vline.
ENDLOOP. *Add any further fields from structure WA_P_CONSPELIMGRDER 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_P_CONSPELIMGRDER 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_P_CONSPELIMGRDER INTO WA_P_CONSPELIMGRDER. *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 RLDNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RLDNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RLDNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit GJAHR, internal->external for field RYEAR CALL FUNCTION 'CONVERSION_EXIT_GJAHR_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RYEAR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RYEAR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field DOCNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-DOCNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-DOCNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RVERS CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RVERS IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RVERS.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field STRVS CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-STRVS IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-STRVS.
WRITE:/ 'New Value:', ld_input.

*Conversion exit CUNIT, internal->external for field RUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RUNIT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RCOMP CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RCOMP IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RCOMP.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AFIMC, internal->external for field RBUNIT CALL FUNCTION 'CONVERSION_EXIT_AFIMC_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RBUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RBUNIT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit BFIMC, internal->external for field RITEM CALL FUNCTION 'CONVERSION_EXIT_BFIMC_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RITEM IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RITEM.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AFIMC, internal->external for field RBUPTR CALL FUNCTION 'CONVERSION_EXIT_AFIMC_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RBUPTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RBUPTR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AFIMC, internal->external for field RCONGR CALL FUNCTION 'CONVERSION_EXIT_AFIMC_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RCONGR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RCONGR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit GJAHR, internal->external for field YRACQ CALL FUNCTION 'CONVERSION_EXIT_GJAHR_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-YRACQ IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-YRACQ.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AFIMC, internal->external for field COICU CALL FUNCTION 'CONVERSION_EXIT_AFIMC_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-COICU IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-COICU.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AC172, internal->external for field TSL CALL FUNCTION 'CONVERSION_EXIT_AC172_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-TSL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-TSL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AC172, internal->external for field HSL CALL FUNCTION 'CONVERSION_EXIT_AC172_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-HSL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-HSL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit AC172, internal->external for field KSL CALL FUNCTION 'CONVERSION_EXIT_AC172_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-KSL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-KSL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field REFDOCNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-REFDOCNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-REFDOCNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit GJAHR, internal->external for field REFRYEAR CALL FUNCTION 'CONVERSION_EXIT_GJAHR_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-REFRYEAR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-REFRYEAR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RVSDOCNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RVSDOCNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RVSDOCNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field ORNDOCNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-ORNDOCNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-ORNDOCNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field COINR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-COINR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-COINR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit GJAHR, internal->external for field REVYEAR CALL FUNCTION 'CONVERSION_EXIT_GJAHR_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-REVYEAR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-REVYEAR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field LOGSYS CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-LOGSYS IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-LOGSYS.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RACCT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RACCT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RACCT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RCNTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RCNTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RCNTR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field PRCTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-PRCTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-PRCTR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field SEGMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-SEGMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-SEGMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field SCNTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-SCNTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-SCNTR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field PPRCTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-PPRCTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-PPRCTR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RASSC CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RASSC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RASSC.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field PSEGMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-PSEGMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-PSEGMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field AUFNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-AUFNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-AUFNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field KUNNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-KUNNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-KUNNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field LIFNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-LIFNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-LIFNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATN1, internal->external for field MATNR CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-MATNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-MATNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATN1, internal->external for field MATNR_COPA CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-MATNR_COPA IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-MATNR_COPA.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field KUNRE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-KUNRE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-KUNRE.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field KUNWE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-KUNWE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-KUNWE.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field RLDNR_FIN CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_P_CONSPELIMGRDER-RLDNR_FIN IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_P_CONSPELIMGRDER-RLDNR_FIN.
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_P_CONSPELIMGRDER_STR,
MANDT TYPE STRING,
RCLNT TYPE STRING,
RLDNR TYPE STRING,
RDIMEN TYPE STRING,
RYEAR TYPE STRING,
DOCNR TYPE STRING,
DOCLN TYPE STRING,
RRCTY TYPE STRING,
RVERS TYPE STRING,
STRVS TYPE STRING,
RTCUR TYPE STRING,
RHCUR TYPE STRING,
RKCUR TYPE STRING,
RUNIT TYPE STRING,
DRCRK TYPE STRING,
POPER TYPE STRING,
FISCYEARPER TYPE STRING,
POPER_POSTING TYPE STRING,
DOCCT TYPE STRING,
RCOMP TYPE STRING,
RBUNIT TYPE STRING,
RITCLG TYPE STRING,
RITEM TYPE STRING,
RBUPTR TYPE STRING,
RCONGR TYPE STRING,
ROBUKRS TYPE STRING,
SITYP TYPE STRING,
SUBIT TYPE STRING,
PLEVL TYPE STRING,
RPFLG TYPE STRING,
RTFLG TYPE STRING,
DOCTY TYPE STRING,
YRACQ TYPE STRING,
PRACQ TYPE STRING,
COICU TYPE STRING,
TSL TYPE STRING,
HSL TYPE STRING,
KSL TYPE STRING,
MSL TYPE STRING,
SGTXT TYPE STRING,
AUTOM TYPE STRING,
ACTIV TYPE STRING,
BVORG TYPE STRING,
BUDAT TYPE STRING,
WSDAT TYPE STRING,
REFDOCNR TYPE STRING,
REFRYEAR TYPE STRING,
REFDOCLN TYPE STRING,
REFDOCCT TYPE STRING,
REFACTIV TYPE STRING,
TIMESTAMP TYPE STRING,
CPUDT TYPE STRING,
CPUTM TYPE STRING,
USNAM TYPE STRING,
RVSDOCNR TYPE STRING,
ORNDOCNR TYPE STRING,
COIAC TYPE STRING,
COINR TYPE STRING,
REVYEAR TYPE STRING,
AWTYP TYPE STRING,
AWORG TYPE STRING,
LOGSYS TYPE STRING,
KTOPL TYPE STRING,
RACCT TYPE STRING,
XBLNR TYPE STRING,
ZUONR TYPE STRING,
RCNTR TYPE STRING,
PRCTR TYPE STRING,
RFAREA TYPE STRING,
RBUSA TYPE STRING,
KOKRS TYPE STRING,
SEGMENT TYPE STRING,
SCNTR TYPE STRING,
PPRCTR TYPE STRING,
SFAREA TYPE STRING,
SBUSA TYPE STRING,
RASSC TYPE STRING,
PSEGMENT TYPE STRING,
AUFNR TYPE STRING,
KUNNR TYPE STRING,
LIFNR TYPE STRING,
MATNR TYPE STRING,
MATKL_MM TYPE STRING,
WERKS TYPE STRING,
RMVCT TYPE STRING,
PS_PSP_PNR TYPE STRING,
PS_POSID TYPE STRING,
PS_PSPID TYPE STRING,
FKART TYPE STRING,
VKORG TYPE STRING,
VTWEG TYPE STRING,
SPART TYPE STRING,
MATNR_COPA TYPE STRING,
MATKL TYPE STRING,
KDGRP TYPE STRING,
LAND1 TYPE STRING,
BRSCH TYPE STRING,
BZIRK TYPE STRING,
KUNRE TYPE STRING,
KUNWE TYPE STRING,
KONZS TYPE STRING,
CNSLDTNJRNLENTRYITEMORIGIN TYPE STRING,
FINANCIALPLANNINGREQTRANSSQNC TYPE STRING,
FINANCIALPLANNINGDATAPACKET TYPE STRING,
FINANCIALPLANNINGENTRYITEM TYPE STRING,
RLDNR_FIN TYPE STRING,
ADHOCITEM TYPE STRING,
ADHOCSET TYPE STRING,
ADHOCSETITEM TYPE STRING,
RCODE TYPE STRING,
ORIG_TYPE TYPE STRING,
ORIG_REF TYPE STRING,END OF T_EKKO_STR. DATA: WA_P_CONSPELIMGRDER_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_P_CONSPELIMGRDER_STR-MANDT sy-vline
WA_P_CONSPELIMGRDER_STR-RCLNT sy-vline
WA_P_CONSPELIMGRDER_STR-RLDNR sy-vline
WA_P_CONSPELIMGRDER_STR-RDIMEN sy-vline
WA_P_CONSPELIMGRDER_STR-RYEAR sy-vline
WA_P_CONSPELIMGRDER_STR-DOCNR sy-vline
WA_P_CONSPELIMGRDER_STR-DOCLN sy-vline
WA_P_CONSPELIMGRDER_STR-RRCTY sy-vline
WA_P_CONSPELIMGRDER_STR-RVERS sy-vline
WA_P_CONSPELIMGRDER_STR-STRVS sy-vline
WA_P_CONSPELIMGRDER_STR-RTCUR sy-vline
WA_P_CONSPELIMGRDER_STR-RHCUR sy-vline
WA_P_CONSPELIMGRDER_STR-RKCUR sy-vline
WA_P_CONSPELIMGRDER_STR-RUNIT sy-vline
WA_P_CONSPELIMGRDER_STR-DRCRK sy-vline
WA_P_CONSPELIMGRDER_STR-POPER sy-vline
WA_P_CONSPELIMGRDER_STR-FISCYEARPER sy-vline
WA_P_CONSPELIMGRDER_STR-POPER_POSTING sy-vline
WA_P_CONSPELIMGRDER_STR-DOCCT sy-vline
WA_P_CONSPELIMGRDER_STR-RCOMP sy-vline
WA_P_CONSPELIMGRDER_STR-RBUNIT sy-vline
WA_P_CONSPELIMGRDER_STR-RITCLG sy-vline
WA_P_CONSPELIMGRDER_STR-RITEM sy-vline
WA_P_CONSPELIMGRDER_STR-RBUPTR sy-vline
WA_P_CONSPELIMGRDER_STR-RCONGR sy-vline
WA_P_CONSPELIMGRDER_STR-ROBUKRS sy-vline
WA_P_CONSPELIMGRDER_STR-SITYP sy-vline
WA_P_CONSPELIMGRDER_STR-SUBIT sy-vline
WA_P_CONSPELIMGRDER_STR-PLEVL sy-vline
WA_P_CONSPELIMGRDER_STR-RPFLG sy-vline
WA_P_CONSPELIMGRDER_STR-RTFLG sy-vline
WA_P_CONSPELIMGRDER_STR-DOCTY sy-vline
WA_P_CONSPELIMGRDER_STR-YRACQ sy-vline
WA_P_CONSPELIMGRDER_STR-PRACQ sy-vline
WA_P_CONSPELIMGRDER_STR-COICU sy-vline
WA_P_CONSPELIMGRDER_STR-TSL sy-vline
WA_P_CONSPELIMGRDER_STR-HSL sy-vline
WA_P_CONSPELIMGRDER_STR-KSL sy-vline
WA_P_CONSPELIMGRDER_STR-MSL sy-vline
WA_P_CONSPELIMGRDER_STR-SGTXT sy-vline
WA_P_CONSPELIMGRDER_STR-AUTOM sy-vline
WA_P_CONSPELIMGRDER_STR-ACTIV sy-vline
WA_P_CONSPELIMGRDER_STR-BVORG sy-vline
WA_P_CONSPELIMGRDER_STR-BUDAT sy-vline
WA_P_CONSPELIMGRDER_STR-WSDAT sy-vline
WA_P_CONSPELIMGRDER_STR-REFDOCNR sy-vline
WA_P_CONSPELIMGRDER_STR-REFRYEAR sy-vline
WA_P_CONSPELIMGRDER_STR-REFDOCLN sy-vline
WA_P_CONSPELIMGRDER_STR-REFDOCCT sy-vline
WA_P_CONSPELIMGRDER_STR-REFACTIV sy-vline
WA_P_CONSPELIMGRDER_STR-TIMESTAMP sy-vline
WA_P_CONSPELIMGRDER_STR-CPUDT sy-vline
WA_P_CONSPELIMGRDER_STR-CPUTM sy-vline
WA_P_CONSPELIMGRDER_STR-USNAM sy-vline
WA_P_CONSPELIMGRDER_STR-RVSDOCNR sy-vline
WA_P_CONSPELIMGRDER_STR-ORNDOCNR sy-vline
WA_P_CONSPELIMGRDER_STR-COIAC sy-vline
WA_P_CONSPELIMGRDER_STR-COINR sy-vline
WA_P_CONSPELIMGRDER_STR-REVYEAR sy-vline
WA_P_CONSPELIMGRDER_STR-AWTYP sy-vline
WA_P_CONSPELIMGRDER_STR-AWORG sy-vline
WA_P_CONSPELIMGRDER_STR-LOGSYS sy-vline
WA_P_CONSPELIMGRDER_STR-KTOPL sy-vline
WA_P_CONSPELIMGRDER_STR-RACCT sy-vline
WA_P_CONSPELIMGRDER_STR-XBLNR sy-vline
WA_P_CONSPELIMGRDER_STR-ZUONR sy-vline
WA_P_CONSPELIMGRDER_STR-RCNTR sy-vline
WA_P_CONSPELIMGRDER_STR-PRCTR sy-vline
WA_P_CONSPELIMGRDER_STR-RFAREA sy-vline
WA_P_CONSPELIMGRDER_STR-RBUSA sy-vline
WA_P_CONSPELIMGRDER_STR-KOKRS sy-vline
WA_P_CONSPELIMGRDER_STR-SEGMENT sy-vline
WA_P_CONSPELIMGRDER_STR-SCNTR sy-vline
WA_P_CONSPELIMGRDER_STR-PPRCTR sy-vline
WA_P_CONSPELIMGRDER_STR-SFAREA sy-vline
WA_P_CONSPELIMGRDER_STR-SBUSA sy-vline
WA_P_CONSPELIMGRDER_STR-RASSC sy-vline
WA_P_CONSPELIMGRDER_STR-PSEGMENT sy-vline
WA_P_CONSPELIMGRDER_STR-AUFNR sy-vline
WA_P_CONSPELIMGRDER_STR-KUNNR sy-vline
WA_P_CONSPELIMGRDER_STR-LIFNR sy-vline
WA_P_CONSPELIMGRDER_STR-MATNR sy-vline
WA_P_CONSPELIMGRDER_STR-MATKL_MM sy-vline
WA_P_CONSPELIMGRDER_STR-WERKS sy-vline
WA_P_CONSPELIMGRDER_STR-RMVCT sy-vline
WA_P_CONSPELIMGRDER_STR-PS_PSP_PNR sy-vline
WA_P_CONSPELIMGRDER_STR-PS_POSID sy-vline
WA_P_CONSPELIMGRDER_STR-PS_PSPID sy-vline
WA_P_CONSPELIMGRDER_STR-FKART sy-vline
WA_P_CONSPELIMGRDER_STR-VKORG sy-vline
WA_P_CONSPELIMGRDER_STR-VTWEG sy-vline
WA_P_CONSPELIMGRDER_STR-SPART sy-vline
WA_P_CONSPELIMGRDER_STR-MATNR_COPA sy-vline
WA_P_CONSPELIMGRDER_STR-MATKL sy-vline
WA_P_CONSPELIMGRDER_STR-KDGRP sy-vline
WA_P_CONSPELIMGRDER_STR-LAND1 sy-vline
WA_P_CONSPELIMGRDER_STR-BRSCH sy-vline
WA_P_CONSPELIMGRDER_STR-BZIRK sy-vline
WA_P_CONSPELIMGRDER_STR-KUNRE sy-vline
WA_P_CONSPELIMGRDER_STR-KUNWE sy-vline
WA_P_CONSPELIMGRDER_STR-KONZS sy-vline
WA_P_CONSPELIMGRDER_STR-CNSLDTNJRNLENTRYITEMORIGIN sy-vline
WA_P_CONSPELIMGRDER_STR-FINANCIALPLANNINGREQTRANSSQNC sy-vline
WA_P_CONSPELIMGRDER_STR-FINANCIALPLANNINGDATAPACKET sy-vline
WA_P_CONSPELIMGRDER_STR-FINANCIALPLANNINGENTRYITEM sy-vline
WA_P_CONSPELIMGRDER_STR-RLDNR_FIN sy-vline
WA_P_CONSPELIMGRDER_STR-ADHOCITEM sy-vline
WA_P_CONSPELIMGRDER_STR-ADHOCSET sy-vline
WA_P_CONSPELIMGRDER_STR-ADHOCSETITEM sy-vline
WA_P_CONSPELIMGRDER_STR-RCODE sy-vline
WA_P_CONSPELIMGRDER_STR-ORIG_TYPE sy-vline
WA_P_CONSPELIMGRDER_STR-ORIG_REF sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.