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

compress issue

Former Member
0 Likes
582

hi experts

is there any way to compress a 35 char field to 10 char fields to compare with in select query and without using any function module .

gaurav

3 REPLIES 3
Read only

Former Member
0 Likes
541

What do you exactly mean by COMPRESS?

You want to extract a Substring?

V_ss = v_val+0(10). "V_val is a 35 char field V_ss is a 10 char field.

Regards,

ravi

Read only

0 Likes
541

hi ravi the problem is as such in code

in this code dfkkop-gpart is 10 char consumer no and selw1-dfkkzp is another 35 char variable and i want to compare these two fields at the time of select query as dfkkzp contains 5 lakhs entries and it will fetch all the entries at the run time and i dont want to use function module into this.

select opbel

augst

gpart

vkont

hvorg

tvorg

bldat

budat

faedn

betrw

blart

xblnr

into table int_dfkkop

from dfkkop

for all entries in int_erch

where augst in ('9','')

and gpart = int_erch-gpartner

and bukrs = '0002'.

sort int_dfkkop by gpart opbel.

select keyz1

posza

selw1

selw2

selw3

betrz

bldat

into table int_dfkkzp

from dfkkzp.

sort int_dfkkzp by selw1 selw2 selw3 bldat descending .

delete int_dfkkzp where selw1 is initial .

loop at int_dfkkzp.

int_dfkkzp-gpart = int_dfkkzp-selw1.

int_dfkkzp-vkont = int_dfkkzp-selw2.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = int_dfkkzp-gpart

IMPORTING

OUTPUT = int_dfkkzp-gpart .

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = int_dfkkzp-vkont

IMPORTING

OUTPUT = int_dfkkzp-vkont .

modify int_dfkkzp.

endloop.

sort int_dfkkzp by gpart vkont .

Read only

Former Member
0 Likes
541

gaurav,

off the rules

declare in ur itab like this

data: begin of itab occurs 0,

f1(35)

---

---

fx(10)

end of itab .

im sure u want to use this in for all entries may be my guess.

loop at itab.

itab-fx = itab-f1.

modify itab index sy-tabix.

endloop.

now ur 35 length is compressed to 10 chars .

with this u can go ..

select '''''''

for all entries

where -


= itab-fx.

itab-fx is a 10 char field ..

regards,

vijay

Message was edited by: Vijay