ABAP Select data from SAP table PPOITEMPAI6 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 PPOITEMPAI6 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 PPOITEMPAI6. 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 PPOITEMPAI6 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_PPOITEMPAI6 TYPE STANDARD TABLE OF PPOITEMPAI6, WA_PPOITEMPAI6 TYPE PPOITEMPAI6, 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: <PPOITEMPAI6> TYPE PPOITEMPAI6. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_PPOITEMPAI6. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM PPOITEMPAI6 INTO TABLE IT_PPOITEMPAI6. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM PPOITEMPAI6 * INTO TABLE @DATA(IT_PPOITEMPAI62). *--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_PPOITEMPAI6 INDEX 1 INTO DATA(WA_PPOITEMPAI62). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_PPOITEMPAI6 ASSIGNING <PPOITEMPAI6>.*To update a field value using a field symbol simply change the value via the field symbol pointer
<PPOITEMPAI6>-MANDT = 1.
<PPOITEMPAI6>-AVG_PO_AMT = 1.
<PPOITEMPAI6>-AVG_PO_DAYS = 1.
<PPOITEMPAI6>-ACCOUNTASSIGNMENTCATEGORY = 1.
<PPOITEMPAI6>-BASEUNIT = 1.
ENDLOOP. LOOP AT IT_PPOITEMPAI6 INTO WA_PPOITEMPAI6. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_PPOITEMPAI6-CONT_DAYS_LEFT, sy-vline,
WA_PPOITEMPAI6-CONT_LEN, sy-vline,
WA_PPOITEMPAI6-CASHDISCOUNT1DAYS, sy-vline,
WA_PPOITEMPAI6-CASHDISCOUNT1PERCENT, sy-vline,
WA_PPOITEMPAI6-CASHDISCOUNT2DAYS, sy-vline,
WA_PPOITEMPAI6-CASHDISCOUNT2PERCENT, sy-vline.
ENDLOOP. *Add any further fields from structure WA_PPOITEMPAI6 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_PPOITEMPAI6 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_PPOITEMPAI6 INTO WA_PPOITEMPAI6. *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 CUNIT, internal->external for field BASEUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-BASEUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-BASEUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field CUSTOMER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-CUSTOMER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-CUSTOMER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field DELIVERYADDRESSID CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-DELIVERYADDRESSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-DELIVERYADDRESSID.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field EARMARKEDFUNDS CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-EARMARKEDFUNDS IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-EARMARKEDFUNDS.
WRITE:/ 'New Value:', ld_input.
*Conversion exit EXCRT, internal->external for field EXCHANGERATE CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-EXCHANGERATE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-EXCHANGERATE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit EAN11, internal->external for field INTERNATIONALARTICLENUMBER CALL FUNCTION 'CONVERSION_EXIT_EAN11_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-INTERNATIONALARTICLENUMBER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-INTERNATIONALARTICLENUMBER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field INVOICINGPARTY CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-INVOICINGPARTY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-INVOICINGPARTY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field ITEMVOLUMEUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-ITEMVOLUMEUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-ITEMVOLUMEUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field ITEMWEIGHTUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-ITEMWEIGHTUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-ITEMWEIGHTUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ISOLA, internal->external for field LANGUAGE CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-LANGUAGE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-LANGUAGE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field MANUALDELIVERYADDRESSID CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-MANUALDELIVERYADDRESSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-MANUALDELIVERYADDRESSID.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field MANUALSUPPLIERADDRESSID CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-MANUALSUPPLIERADDRESSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-MANUALSUPPLIERADDRESSID.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field MANUFACTURER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-MANUFACTURER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-MANUFACTURER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit MATN1, internal->external for field MANUFACTURERMATERIAL CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-MANUFACTURERMATERIAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-MANUFACTURERMATERIAL.
WRITE:/ 'New Value:', ld_input.
*Conversion exit MATN1, internal->external for field MATERIAL CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-MATERIAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-MATERIAL.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field ORDERPRICEUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-ORDERPRICEUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-ORDERPRICEUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field ORDERQUANTITYUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-ORDERQUANTITYUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-ORDERQUANTITYUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PROFITCENTER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PROFITCENTER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PROFITCENTER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PURCHASECONTRACT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PURCHASECONTRACT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PURCHASECONTRACT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PURCHASEORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PURCHASEORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PURCHASEORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field PURCHASEORDERQUANTITYUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PURCHASEORDERQUANTITYUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PURCHASEORDERQUANTITYUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PURCHASEREQUISITION CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PURCHASEREQUISITION IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PURCHASEREQUISITION.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PURCHASINGCATEGORY CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PURCHASINGCATEGORY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PURCHASINGCATEGORY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PURCHASINGINFORECORD CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-PURCHASINGINFORECORD IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-PURCHASINGINFORECORD.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REFERENCEDELIVERYADDRESSID CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-REFERENCEDELIVERYADDRESSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-REFERENCEDELIVERYADDRESSID.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SERVICEPERFORMER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-SERVICEPERFORMER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-SERVICEPERFORMER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SUBCONTRACTOR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-SUBCONTRACTOR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-SUBCONTRACTOR.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SUPPLIER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-SUPPLIER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-SUPPLIER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SUPPLIERADDRESSID CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-SUPPLIERADDRESSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-SUPPLIERADDRESSID.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SUPPLYINGSUPPLIER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-SUPPLYINGSUPPLIER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-SUPPLYINGSUPPLIER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field VOLUMEUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_PPOITEMPAI6-VOLUMEUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PPOITEMPAI6-VOLUMEUNIT.
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_PPOITEMPAI6_STR,
MANDT TYPE STRING,
AVG_PO_AMT TYPE STRING,
AVG_PO_DAYS TYPE STRING,
ACCOUNTASSIGNMENTCATEGORY TYPE STRING,
BASEUNIT TYPE STRING,
CONT_DAYS_LEFT TYPE STRING,
CONT_LEN TYPE STRING,
CASHDISCOUNT1DAYS TYPE STRING,
CASHDISCOUNT1PERCENT TYPE STRING,
CASHDISCOUNT2DAYS TYPE STRING,
CASHDISCOUNT2PERCENT TYPE STRING,
COMMODITYCODE TYPE STRING,
COMPANYCODE TYPE STRING,
CONFIRMATIONCONTROL TYPE STRING,
CONSUMEDQTY TYPE STRING,
CONTRACTCREATEBYUSER TYPE STRING,
CONTRACTCREATIONDATE TYPE STRING,
CONTRACTLASTCHANGEDATETIME TYPE STRING,
CONTRACTNETPAYMENTDAYS TYPE STRING,
CONTRACTNETPRICEAMOUNT TYPE STRING,
CONTRACTPAYMENTTERMS TYPE STRING,
CORRESPNCEXTERNALREFERENCE TYPE STRING,
CORRESPNCINTERNALREFERENCE TYPE STRING,
CREATEDBYUSER TYPE STRING,
CREATIONDATE TYPE STRING,
CUSTOMER TYPE STRING,
DAYS2GO_QUANT TYPE STRING,
DAYS_INTERVAL TYPE STRING,
DELIVERYADDRESSID TYPE STRING,
DOCUMENTCURRENCY TYPE STRING,
EARMARKEDFUNDS TYPE STRING,
EARMARKEDFUNDSITEM TYPE STRING,
EFFECTIVEAMOUNT TYPE STRING,
EVALDRCPTSETTLMTISALLOWED TYPE STRING,
EXCHANGERATE TYPE STRING,
EXPECTEDOVERALLLIMITAMOUNT TYPE STRING,
GOODSRECEIPTISEXPECTED TYPE STRING,
GOODSRECEIPTISNONVALUATED TYPE STRING,
INCOTERMSCLASSIFICATION TYPE STRING,
INCOTERMSLOCATION1 TYPE STRING,
INCOTERMSLOCATION2 TYPE STRING,
INCOTERMSTRANSFERLOCATION TYPE STRING,
INCOTERMSVERSION TYPE STRING,
INTERNATIONALARTICLENUMBER TYPE STRING,
INTRASTATSERVICECODE TYPE STRING,
INVOICEISEXPECTED TYPE STRING,
INVOICEISGOODSRECEIPTBASED TYPE STRING,
INVOICINGPARTY TYPE STRING,
ISCOMPLETELYDELIVERED TYPE STRING,
ISFINALLYINVOICED TYPE STRING,
ISINFOATREGISTRATION TYPE STRING,
ISINFORECORDUPDATED TYPE STRING,
ISINTRASTATREPORTINGEXCLUDED TYPE STRING,
ISINTRASTATREPORTINGRELEVANT TYPE STRING,
ISORDERACKNRQD TYPE STRING,
ISRETURNSITEM TYPE STRING,
ISSTATISTICALITEM TYPE STRING,
ITEMNETWEIGHT TYPE STRING,
ITEMVOLUME TYPE STRING,
ITEMVOLUMEUNIT TYPE STRING,
ITEMWEIGHTUNIT TYPE STRING,
LANGUAGE TYPE STRING,
LASTCHANGEDATETIME TYPE STRING,
MANUALDELIVERYADDRESSID TYPE STRING,
MANUALSUPPLIERADDRESSID TYPE STRING,
MANUFACTURER TYPE STRING,
MANUFACTURERMATERIAL TYPE STRING,
MANUFACTURERPARTNMBR TYPE STRING,
MATERIAL TYPE STRING,
MATERIALGROUP TYPE STRING,
MATERIALTYPE TYPE STRING,
MULTIPLEACCTASSGMTDISTRIBUTION TYPE STRING,
NETAMOUNT TYPE STRING,
NETPAYMENTDAYS TYPE STRING,
NETPRICEAMOUNT TYPE STRING,
NETPRICEQUANTITY TYPE STRING,
NODAYSREMINDER1 TYPE STRING,
NODAYSREMINDER2 TYPE STRING,
NODAYSREMINDER3 TYPE STRING,
ORDPRICEUNITTOORDERUNITDNMNTR TYPE STRING,
ORDERITEMQTYTOBASEQTYDNMNTR TYPE STRING,
ORDERITEMQTYTOBASEQTYNMRTR TYPE STRING,
ORDERPRICEUNIT TYPE STRING,
ORDERPRICEUNITTOORDERUNITNMRTR TYPE STRING,
ORDERQUANTITY TYPE STRING,
ORDERQUANTITYUNIT TYPE STRING,
OVERALLLIMITAMOUNT TYPE STRING,
OVERDELIVTOLRTDLMTRATIOINPCT TYPE STRING,
PODATE_MONTH TYPE STRING,
PODATE_WEEK TYPE STRING,
PODATE_WEEKDAY TYPE STRING,
PO_ITEMS_NUM TYPE STRING,
PARTIALINVOICEDISTRIBUTION TYPE STRING,
PAYMENTTERMS TYPE STRING,
PLANT TYPE STRING,
PRICEISTOBEPRINTED TYPE STRING,
PRICINGDATECONTROL TYPE STRING,
PRICINGPROCEDURE TYPE STRING,
PRODUCTTYPE TYPE STRING,
PROFITCENTER TYPE STRING,
PURCHASECONTRACT TYPE STRING,
PURCHASECONTRACTITEM TYPE STRING,
PURCHASECONTRACTITEMTEXT TYPE STRING,
PURCHASECONTRACTTARGETAMOUNT TYPE STRING,
PURCHASECONTRACTTYPE TYPE STRING,
PURCHASEORDER TYPE STRING,
PURCHASEORDERCATEGORY TYPE STRING,
PURCHASEORDERDATE TYPE STRING,
PURCHASEORDERITEM TYPE STRING,
PURCHASEORDERITEMCATEGORY TYPE STRING,
PURCHASEORDERITEMTEXT TYPE STRING,
PURCHASEORDERQUANTITYUNIT TYPE STRING,
PURCHASEORDERSUBTYPE TYPE STRING,
PURCHASEORDERTYPE TYPE STRING,
PURCHASEORDERVALIDITYENDDATE TYPE STRING,
PURCHASEORDERVALIDITYSTARTDATE TYPE STRING,
PURCHASEREQUISITION TYPE STRING,
PURCHASEREQUISITIONITEM TYPE STRING,
PURCHASINGCATEGORY TYPE STRING,
PURCHASINGCOMPLETENESSSTATUS TYPE STRING,
PURCHASINGCONTRACTDELETIONCODE TYPE STRING,
PURCHASINGDOCUMENTCATEGORY TYPE STRING,
PURCHASINGDOCUMENTCONDITION TYPE STRING,
PURCHASINGDOCUMENTDELETIONCODE TYPE STRING,
PURCHASINGDOCUMENTISAGED TYPE STRING,
PURCHASINGDOCUMENTITEMCATEGORY TYPE STRING,
PURCHASINGDOCUMENTNAME TYPE STRING,
PURCHASINGDOCUMENTORIGIN TYPE STRING,
PURCHASINGGROUP TYPE STRING,
PURCHASINGINFORECORD TYPE STRING,
PURCHASINGORGANIZATION TYPE STRING,
PURCHASINGPROCESSINGSTATUS TYPE STRING,
PURGCATNAME TYPE STRING,
PURGDOCESTIMATEDPRICE TYPE STRING,
PURGDOCORDERACKNNUMBER TYPE STRING,
PURGDOCPRICEDATE TYPE STRING,
PURGDOCRELEASEORDERQUANTITY TYPE STRING,
QUOTATIONSUBMISSIONDATE TYPE STRING,
RUNNING_PERCENTAGE TYPE STRING,
RUNNING_TOTAL TYPE STRING,
REFERENCEDELIVERYADDRESSID TYPE STRING,
RELEASECODE TYPE STRING,
RELEASEISNOTCOMPLETED TYPE STRING,
REQUIREMENTTRACKING TYPE STRING,
REQUISITIONERNAME TYPE STRING,
SERVICEPACKAGE TYPE STRING,
SERVICEPERFORMER TYPE STRING,
SHIPPINGINSTRUCTION TYPE STRING,
STOCKTYPE TYPE STRING,
STORAGELOCATION TYPE STRING,
SUBCONTRACTOR TYPE STRING,
SUPPLIER TYPE STRING,
SUPPLIERADDRESSID TYPE STRING,
SUPPLIERCONFIRMATIONCONTROLKEY TYPE STRING,
SUPPLIERMATERIALNUMBER TYPE STRING,
SUPPLIERPHONENUMBER TYPE STRING,
SUPPLIERQUOTATION TYPE STRING,
SUPPLIERQUOTATIONEXTERNALID TYPE STRING,
SUPPLIERRESPSALESPERSONNAME TYPE STRING,
SUPPLIERSUBRANGE TYPE STRING,
SUPPLYINGPLANT TYPE STRING,
SUPPLYINGSUPPLIER TYPE STRING,
TARGETAMOUNT TYPE STRING,
TARGETQUANTITY TYPE STRING,
TAXCODE TYPE STRING,
TAXJURISDICTION TYPE STRING,
UNDERDELIVTOLRTDLMTRATIOINPCT TYPE STRING,
UNLIMITEDOVERDELIVERYISALLOWED TYPE STRING,
VALIDITYENDDATE TYPE STRING,
VALIDITYSTARTDATE TYPE STRING,
VALUATIONTYPE TYPE STRING,
VOLUMEUNIT TYPE STRING,END OF T_EKKO_STR. DATA: WA_PPOITEMPAI6_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_PPOITEMPAI6_STR-MANDT sy-vline
WA_PPOITEMPAI6_STR-AVG_PO_AMT sy-vline
WA_PPOITEMPAI6_STR-AVG_PO_DAYS sy-vline
WA_PPOITEMPAI6_STR-ACCOUNTASSIGNMENTCATEGORY sy-vline
WA_PPOITEMPAI6_STR-BASEUNIT sy-vline
WA_PPOITEMPAI6_STR-CONT_DAYS_LEFT sy-vline
WA_PPOITEMPAI6_STR-CONT_LEN sy-vline
WA_PPOITEMPAI6_STR-CASHDISCOUNT1DAYS sy-vline
WA_PPOITEMPAI6_STR-CASHDISCOUNT1PERCENT sy-vline
WA_PPOITEMPAI6_STR-CASHDISCOUNT2DAYS sy-vline
WA_PPOITEMPAI6_STR-CASHDISCOUNT2PERCENT sy-vline
WA_PPOITEMPAI6_STR-COMMODITYCODE sy-vline
WA_PPOITEMPAI6_STR-COMPANYCODE sy-vline
WA_PPOITEMPAI6_STR-CONFIRMATIONCONTROL sy-vline
WA_PPOITEMPAI6_STR-CONSUMEDQTY sy-vline
WA_PPOITEMPAI6_STR-CONTRACTCREATEBYUSER sy-vline
WA_PPOITEMPAI6_STR-CONTRACTCREATIONDATE sy-vline
WA_PPOITEMPAI6_STR-CONTRACTLASTCHANGEDATETIME sy-vline
WA_PPOITEMPAI6_STR-CONTRACTNETPAYMENTDAYS sy-vline
WA_PPOITEMPAI6_STR-CONTRACTNETPRICEAMOUNT sy-vline
WA_PPOITEMPAI6_STR-CONTRACTPAYMENTTERMS sy-vline
WA_PPOITEMPAI6_STR-CORRESPNCEXTERNALREFERENCE sy-vline
WA_PPOITEMPAI6_STR-CORRESPNCINTERNALREFERENCE sy-vline
WA_PPOITEMPAI6_STR-CREATEDBYUSER sy-vline
WA_PPOITEMPAI6_STR-CREATIONDATE sy-vline
WA_PPOITEMPAI6_STR-CUSTOMER sy-vline
WA_PPOITEMPAI6_STR-DAYS2GO_QUANT sy-vline
WA_PPOITEMPAI6_STR-DAYS_INTERVAL sy-vline
WA_PPOITEMPAI6_STR-DELIVERYADDRESSID sy-vline
WA_PPOITEMPAI6_STR-DOCUMENTCURRENCY sy-vline
WA_PPOITEMPAI6_STR-EARMARKEDFUNDS sy-vline
WA_PPOITEMPAI6_STR-EARMARKEDFUNDSITEM sy-vline
WA_PPOITEMPAI6_STR-EFFECTIVEAMOUNT sy-vline
WA_PPOITEMPAI6_STR-EVALDRCPTSETTLMTISALLOWED sy-vline
WA_PPOITEMPAI6_STR-EXCHANGERATE sy-vline
WA_PPOITEMPAI6_STR-EXPECTEDOVERALLLIMITAMOUNT sy-vline
WA_PPOITEMPAI6_STR-GOODSRECEIPTISEXPECTED sy-vline
WA_PPOITEMPAI6_STR-GOODSRECEIPTISNONVALUATED sy-vline
WA_PPOITEMPAI6_STR-INCOTERMSCLASSIFICATION sy-vline
WA_PPOITEMPAI6_STR-INCOTERMSLOCATION1 sy-vline
WA_PPOITEMPAI6_STR-INCOTERMSLOCATION2 sy-vline
WA_PPOITEMPAI6_STR-INCOTERMSTRANSFERLOCATION sy-vline
WA_PPOITEMPAI6_STR-INCOTERMSVERSION sy-vline
WA_PPOITEMPAI6_STR-INTERNATIONALARTICLENUMBER sy-vline
WA_PPOITEMPAI6_STR-INTRASTATSERVICECODE sy-vline
WA_PPOITEMPAI6_STR-INVOICEISEXPECTED sy-vline
WA_PPOITEMPAI6_STR-INVOICEISGOODSRECEIPTBASED sy-vline
WA_PPOITEMPAI6_STR-INVOICINGPARTY sy-vline
WA_PPOITEMPAI6_STR-ISCOMPLETELYDELIVERED sy-vline
WA_PPOITEMPAI6_STR-ISFINALLYINVOICED sy-vline
WA_PPOITEMPAI6_STR-ISINFOATREGISTRATION sy-vline
WA_PPOITEMPAI6_STR-ISINFORECORDUPDATED sy-vline
WA_PPOITEMPAI6_STR-ISINTRASTATREPORTINGEXCLUDED sy-vline
WA_PPOITEMPAI6_STR-ISINTRASTATREPORTINGRELEVANT sy-vline
WA_PPOITEMPAI6_STR-ISORDERACKNRQD sy-vline
WA_PPOITEMPAI6_STR-ISRETURNSITEM sy-vline
WA_PPOITEMPAI6_STR-ISSTATISTICALITEM sy-vline
WA_PPOITEMPAI6_STR-ITEMNETWEIGHT sy-vline
WA_PPOITEMPAI6_STR-ITEMVOLUME sy-vline
WA_PPOITEMPAI6_STR-ITEMVOLUMEUNIT sy-vline
WA_PPOITEMPAI6_STR-ITEMWEIGHTUNIT sy-vline
WA_PPOITEMPAI6_STR-LANGUAGE sy-vline
WA_PPOITEMPAI6_STR-LASTCHANGEDATETIME sy-vline
WA_PPOITEMPAI6_STR-MANUALDELIVERYADDRESSID sy-vline
WA_PPOITEMPAI6_STR-MANUALSUPPLIERADDRESSID sy-vline
WA_PPOITEMPAI6_STR-MANUFACTURER sy-vline
WA_PPOITEMPAI6_STR-MANUFACTURERMATERIAL sy-vline
WA_PPOITEMPAI6_STR-MANUFACTURERPARTNMBR sy-vline
WA_PPOITEMPAI6_STR-MATERIAL sy-vline
WA_PPOITEMPAI6_STR-MATERIALGROUP sy-vline
WA_PPOITEMPAI6_STR-MATERIALTYPE sy-vline
WA_PPOITEMPAI6_STR-MULTIPLEACCTASSGMTDISTRIBUTION sy-vline
WA_PPOITEMPAI6_STR-NETAMOUNT sy-vline
WA_PPOITEMPAI6_STR-NETPAYMENTDAYS sy-vline
WA_PPOITEMPAI6_STR-NETPRICEAMOUNT sy-vline
WA_PPOITEMPAI6_STR-NETPRICEQUANTITY sy-vline
WA_PPOITEMPAI6_STR-NODAYSREMINDER1 sy-vline
WA_PPOITEMPAI6_STR-NODAYSREMINDER2 sy-vline
WA_PPOITEMPAI6_STR-NODAYSREMINDER3 sy-vline
WA_PPOITEMPAI6_STR-ORDPRICEUNITTOORDERUNITDNMNTR sy-vline
WA_PPOITEMPAI6_STR-ORDERITEMQTYTOBASEQTYDNMNTR sy-vline
WA_PPOITEMPAI6_STR-ORDERITEMQTYTOBASEQTYNMRTR sy-vline
WA_PPOITEMPAI6_STR-ORDERPRICEUNIT sy-vline
WA_PPOITEMPAI6_STR-ORDERPRICEUNITTOORDERUNITNMRTR sy-vline
WA_PPOITEMPAI6_STR-ORDERQUANTITY sy-vline
WA_PPOITEMPAI6_STR-ORDERQUANTITYUNIT sy-vline
WA_PPOITEMPAI6_STR-OVERALLLIMITAMOUNT sy-vline
WA_PPOITEMPAI6_STR-OVERDELIVTOLRTDLMTRATIOINPCT sy-vline
WA_PPOITEMPAI6_STR-PODATE_MONTH sy-vline
WA_PPOITEMPAI6_STR-PODATE_WEEK sy-vline
WA_PPOITEMPAI6_STR-PODATE_WEEKDAY sy-vline
WA_PPOITEMPAI6_STR-PO_ITEMS_NUM sy-vline
WA_PPOITEMPAI6_STR-PARTIALINVOICEDISTRIBUTION sy-vline
WA_PPOITEMPAI6_STR-PAYMENTTERMS sy-vline
WA_PPOITEMPAI6_STR-PLANT sy-vline
WA_PPOITEMPAI6_STR-PRICEISTOBEPRINTED sy-vline
WA_PPOITEMPAI6_STR-PRICINGDATECONTROL sy-vline
WA_PPOITEMPAI6_STR-PRICINGPROCEDURE sy-vline
WA_PPOITEMPAI6_STR-PRODUCTTYPE sy-vline
WA_PPOITEMPAI6_STR-PROFITCENTER sy-vline
WA_PPOITEMPAI6_STR-PURCHASECONTRACT sy-vline
WA_PPOITEMPAI6_STR-PURCHASECONTRACTITEM sy-vline
WA_PPOITEMPAI6_STR-PURCHASECONTRACTITEMTEXT sy-vline
WA_PPOITEMPAI6_STR-PURCHASECONTRACTTARGETAMOUNT sy-vline
WA_PPOITEMPAI6_STR-PURCHASECONTRACTTYPE sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDER sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERCATEGORY sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERDATE sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERITEM sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERITEMCATEGORY sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERITEMTEXT sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERQUANTITYUNIT sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERSUBTYPE sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERTYPE sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERVALIDITYENDDATE sy-vline
WA_PPOITEMPAI6_STR-PURCHASEORDERVALIDITYSTARTDATE sy-vline
WA_PPOITEMPAI6_STR-PURCHASEREQUISITION sy-vline
WA_PPOITEMPAI6_STR-PURCHASEREQUISITIONITEM sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGCATEGORY sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGCOMPLETENESSSTATUS sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGCONTRACTDELETIONCODE sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTCATEGORY sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTCONDITION sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTDELETIONCODE sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTISAGED sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTITEMCATEGORY sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTNAME sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGDOCUMENTORIGIN sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGGROUP sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGINFORECORD sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGORGANIZATION sy-vline
WA_PPOITEMPAI6_STR-PURCHASINGPROCESSINGSTATUS sy-vline
WA_PPOITEMPAI6_STR-PURGCATNAME sy-vline
WA_PPOITEMPAI6_STR-PURGDOCESTIMATEDPRICE sy-vline
WA_PPOITEMPAI6_STR-PURGDOCORDERACKNNUMBER sy-vline
WA_PPOITEMPAI6_STR-PURGDOCPRICEDATE sy-vline
WA_PPOITEMPAI6_STR-PURGDOCRELEASEORDERQUANTITY sy-vline
WA_PPOITEMPAI6_STR-QUOTATIONSUBMISSIONDATE sy-vline
WA_PPOITEMPAI6_STR-RUNNING_PERCENTAGE sy-vline
WA_PPOITEMPAI6_STR-RUNNING_TOTAL sy-vline
WA_PPOITEMPAI6_STR-REFERENCEDELIVERYADDRESSID sy-vline
WA_PPOITEMPAI6_STR-RELEASECODE sy-vline
WA_PPOITEMPAI6_STR-RELEASEISNOTCOMPLETED sy-vline
WA_PPOITEMPAI6_STR-REQUIREMENTTRACKING sy-vline
WA_PPOITEMPAI6_STR-REQUISITIONERNAME sy-vline
WA_PPOITEMPAI6_STR-SERVICEPACKAGE sy-vline
WA_PPOITEMPAI6_STR-SERVICEPERFORMER sy-vline
WA_PPOITEMPAI6_STR-SHIPPINGINSTRUCTION sy-vline
WA_PPOITEMPAI6_STR-STOCKTYPE sy-vline
WA_PPOITEMPAI6_STR-STORAGELOCATION sy-vline
WA_PPOITEMPAI6_STR-SUBCONTRACTOR sy-vline
WA_PPOITEMPAI6_STR-SUPPLIER sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERADDRESSID sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERCONFIRMATIONCONTROLKEY sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERMATERIALNUMBER sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERPHONENUMBER sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERQUOTATION sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERQUOTATIONEXTERNALID sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERRESPSALESPERSONNAME sy-vline
WA_PPOITEMPAI6_STR-SUPPLIERSUBRANGE sy-vline
WA_PPOITEMPAI6_STR-SUPPLYINGPLANT sy-vline
WA_PPOITEMPAI6_STR-SUPPLYINGSUPPLIER sy-vline
WA_PPOITEMPAI6_STR-TARGETAMOUNT sy-vline
WA_PPOITEMPAI6_STR-TARGETQUANTITY sy-vline
WA_PPOITEMPAI6_STR-TAXCODE sy-vline
WA_PPOITEMPAI6_STR-TAXJURISDICTION sy-vline
WA_PPOITEMPAI6_STR-UNDERDELIVTOLRTDLMTRATIOINPCT sy-vline
WA_PPOITEMPAI6_STR-UNLIMITEDOVERDELIVERYISALLOWED sy-vline
WA_PPOITEMPAI6_STR-VALIDITYENDDATE sy-vline
WA_PPOITEMPAI6_STR-VALIDITYSTARTDATE sy-vline
WA_PPOITEMPAI6_STR-VALUATIONTYPE sy-vline
WA_PPOITEMPAI6_STR-VOLUMEUNIT sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.