Skip to Content
0

how to extract first 10 digit data from field(16) to another field(10) in the same internal table

May 02, 2017 at 12:05 PM

64

avatar image

Hi Everyone,scenario: we need to enhance the extractor 0FI_GL_14 from VBAK for customer data.

but in the extractor field is reference has 16 digit and vbeln in vbak. here reference field is combination of vbeln and item number. so, first we needt to extract the first 10 digits data to temporary field then match with vbeln in vbak.

Sample Code :
DATA : S_T_DATA TYPE FAGLPOSBW,
TFIELD TYPE VBELN .

CONCATENATE XBLNR+0(10) INTO TFIELD.
WHEN '0FI_GL_14'.
LOOP AT C_T_DATA INTO S_T_DATA.
SELECT SINGLE KUNNR FROM VBAK INTO S_T_DATA-KUNNR
WHERE VBELN = S_T_DATA-TFIELD.
IF sy-subrc EQ 0.
MODIFY C_T_DATA FROM S_T_DATA.
ENDIF.

10 |10000 characters needed characters left characters exceeded

Consider moving this question to an ABAP forum.

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers