Quantcast
Channel: SCN : Discussion List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 6437

ABAP command "SPLIT"

$
0
0

Hi ABAP experts

 

Question to "SPLIT" and "AT" commands:

We need to separate a value with "_" (underline) into two values, feeded to two new fields.

 

Is the coding below correct?

Currently it doesn't work.

 

Thanks!

 

*SELECT statement*

 

SELECT FC_OPBEL /BIC/ZXBLNR FROM /BIC/AZFC_DS0500

        INTO CORRESPONDING FIELDS OF TABLE ITAB

               FOR ALL ENTRIES IN RESULT_PACKAGE WHERE

               FC_OPBEL EQ RESULT_PACKAGE-FC_OPBEL AND

               /BIC/ZXBLNR LIKE  '%_%'.


*READ statement in LOOP*

 

READ TABLE ITAB INTO WA1 WITH TABLE KEY

                  FC_OPBEL = <RESULT_FIELDS>-FC_OPBEL.

 

          IF SY-SUBRC = 0.

 

            SPLIT WA-/BIC/ZXBLNR at  '_'  into

            V_POSTXT_1 V_POSTXT_2.

 

            <RESULT_FIELDS>-/BIC/ZNOCORPS  = V_POSTXT_1+2.

            <RESULT_FIELDS>-/BIC/ZNOGRILLE  = V_POSTXT_2.

 

          ENDIF.


Viewing all articles
Browse latest Browse all 6437

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>