Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers