Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8076

How to select by incomplette field?

$
0
0

Hi gurus.

I am trying to do an datasource enhancement via cmode. The idea is: I have data in structure  LS_GLPCW. I need a document number from BKPF where fields AWKEY starts with the same value as LS_GLPCW-REFDOCNR.


Code:

 

LOOP AT C_T_DATA INTO LS_GLPCW.
L_TABIX = SY-TABIX.
*******LS_GLPCW-REFDOCNR is 1352000016
CONCATENATE LS_GLPCW-REFDOCNR '%' INTO LV_AWKEY. – fills LV_AWKEY "1352000016%"

SELECT SINGLE BELNR FROM BKPF – sy-subrc = 4, nothing found, but there is an document with AWKEY 1352000016CSAH2013
INTO LV_BELNR
WHERE AWKEY EQ LV_AWKEY
AND BUKRS EQ LS_GLPCW-RBUKRS
AND GJAHR EQ LS_GLPCW-REFRYEAR.
.....


How to write it that way it should find this document?


Viewing all articles
Browse latest Browse all 8076

Trending Articles



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