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

Which String function to use

$
0
0

Hi Experts,

 

I am new here. Currently trying to build my first program.

 

I would like receive some advise regarding string functions.

 

Program function : To compare specific keys within two tables

 

LT/Rab/KPI_MAPP

 

SELECTION ID

SEL1

SEL2

SEL3

SEL4

SEL5

SEL6

SEL7

SEL8

SEL9

SEL10

 

LT/Rab/KPI_HEAD


Formula

([SEL1])/([SEL2])

(([SEL3]/1000))/([SEL4])

([SEL5])+([SEL6])

([SEL5])-([SEL7])

([SEL8])/([SEL9])

(([SEL10])/([SEL9])*(100))

 

My code looks like this :

 

LOOP AT LT/Rab/KPI_HEAD INTO GWA_/Rab/KPI_HEAD.

       READ TABLE LT/Rab/KPI_MAPP INTO GWA_/Rab/KPI_MAPP with key XX100009 = GWA_/Rab/KPI_HEAD-XX100012.

       IF SY-SUBRC <> 0.

         WRITE: ' no selection ID found in table'.

         endif.

     ENDLOOP.

         ENDLOOP.


In this case the result will be no selection ID found in table because i don't know how to use string functions for LT/Rab/KPI_HEAD since SEL IDs in here are between brackets.


Can anyone advise me how to use strings functions to pick up SEL IDs that are between brackets?


Thanks.


Rabie


Viewing all articles
Browse latest Browse all 8608

Trending Articles