Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Table join ekko/ekpo-vbak/vbap

$
0
0

Hi all,

 

I need to join ekko/ekpo with vbak/vbap. The supposed matching field given to me is by using

ekpo-idnlf = vbap-vbeln

 

Problem: field ekpo-idnlf is not consistent in the value. It is entered by end user as SO: SO item no

 

Sample of the vendor material no here:

10086:20     --> valid

11662:10    -->valid

10086:10   --> valid

9953:10    --> not valid

11080:10

11928:10

 

The select query:

 

SELECT

             ekpo~ebeln

             ekpo~ebelp

             vbak~ebeln

             vbap~kwmeng

            vbap~netwr

             INTO TABLE gt_output

             FROM vbak AS vbak

              INNER JOIN vbap AS vbap

             ON vbak~vbeln = vbap~vbeln

             INNER JOIN ekpo AS ekpo

             ON ekpo~idnlf(5) = vbap~vbeln.   --->problem: the first 5 characters only applies to some SO number as shown above

 

I cannot use first 5 characters to match because some SO no like the 9953:10 cannot be retrieved later.

 

Any idea?


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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