Application Development and Automation 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: 
Read only

How to split the parameter into two parameters and compare the same with other.

Former Member
0 Likes
673

Hi every one i need your valuable help to solve this.

I have the field called "SOBID"  in hrp1001. thing i am having "0000090100US01" inside the sobid. Now i am comparing this with the fileds "KOSTL and KOKRS" in the "CSKT" table for getting the KTEXT for THE "SOBID".

For this i have written the code as below:


SELECT kokrs kostl ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE  itab FOR ALL ENTRIES IN itab4 WHERE kostl = itab4-sobid+0(10) AND   kokrs = itab4-sobid+11(4).

here itab4-sobid= 0000090100US01

But by using the above condition nothing is fetching inside the table itab.

please help me to rectify the problem by checkking the above syntax.

Thanks,

D vishnu

1 ACCEPTED SOLUTION
Read only

SharathYaralkattimath
Contributor
0 Likes
612

SELECT kokrs kostl ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE  itab FOR ALLENTRIES IN itab4 WHERE kostl = itab4-sobid+0(10) AND   kokrs = itab4-sobid+10(4).


Change your condition & check as highlighted...

Hi every one i need your valuable help to solve this.

I have the field called "SOBID"  in hrp1001. thing i am having "0000090100US01" inside the sobid. Now i am comparing this with the fileds "KOSTL and KOKRS" in the "CSKT" table for getting the KTEXT for THE "SOBID".

For this i have written the code as below:


SELECT kokrs kostl ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE  itab FOR ALL ENTRIES IN itab4 WHERE kostl = itab4-sobid+0(10) AND   kokrs = itab4-sobid+11(4).

here itab4-sobid= 0000090100US01

But by using the above condition nothing is fetching inside the table itab.

please help me to rectify the problem by checkking the above syntax.

Thanks,

D vishnu

2 REPLIES 2
Read only

krishna_k19
Contributor
0 Likes
612

Hi Vishnu,

     split the itab4 data into another table like 0(10) and 10(4) and then by using new table fetch the data.

ex : loop itab4.

            itab5-a = itab4+0(10).

            itab5-b = itab+10(4).

         append itab5.

endloop.

select ..... for al entries itab5 ......

Thanks,

Krishna

Read only

SharathYaralkattimath
Contributor
0 Likes
613

SELECT kokrs kostl ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE  itab FOR ALLENTRIES IN itab4 WHERE kostl = itab4-sobid+0(10) AND   kokrs = itab4-sobid+10(4).


Change your condition & check as highlighted...