Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unique value from work area of Internal table.

Former Member
0 Kudos

Hello Everyone,

Need Quick help from you.

I have one internal table and i have put it into loop.

---------LOOP AT it_tab into wa_tab.

FIND ALL OCCURRENCES OF  'INC0000IN  
wa_tab RESULTS result_tab.


IF SY-SUBRC = 0.
wa_tab_1 = '???'.
APPEND wa_tab_1 to it_tab_1.   (Another Inter)


CLEAR wa_tab_1.
ENDIF.

---------ENDLOOP.



Work area contain following data-

wa_tab --> ##<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">##########<!-- 17 -->######<html>##<head>##<meta http-equiv="INC00001231314321" content="10"> ##<meta http



If SY-SUBRC =0  (i.eINC0000 is available)


I want to fetch INC00001231314321  and put it into wa_tab_1.


Thanks in Advance.






1 ACCEPTED SOLUTION

pranay570708
Active Contributor
0 Kudos

Try below code:

DATA: L_VAR  TYPE STRING,

          L_INT  TYPE I.

FIND FIRST OCCURRENCE OF  'INC0000'  IN   WA_TAB MATCH OFFSET L_INT.

IF SY-SUBRC = 0.

   L_VAR = WA_TAB+L_INT(17).

ENDIF.

2 REPLIES 2

pranay570708
Active Contributor
0 Kudos

Try below code:

DATA: L_VAR  TYPE STRING,

          L_INT  TYPE I.

FIND FIRST OCCURRENCE OF  'INC0000'  IN   WA_TAB MATCH OFFSET L_INT.

IF SY-SUBRC = 0.

   L_VAR = WA_TAB+L_INT(17).

ENDIF.

0 Kudos

Hey You Magician - It works

Thanks a lot 🙂