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

ABAP Query

Former Member
0 Likes
545

Hi All,

We have a query that links WLK1-FILIA with MARC-WERKS.

Example:
FILIA = 0001 links with WERKS = 0001
FILIA = 1004 links with WERKS = 1004

But as we undergone business process change the value of WLK1-FILIA changed. It is now like this 'Z' + MARC-WERKS.

Example:
FILIA = Z0001 need to link with WERKS = 0001
FILIA = Z1004 need to link with WERKS = 1004

Now, the challenge is how do I link the two fields with minimal changes. Can I use Table View to transform the value of FILIA and chop off the leading 'Z'?

Please help.

Thanks,

Sid

2 REPLIES 2
Read only

Former Member
0 Likes
457

Maybe it fits your needs if you first issue a select statement to get all the FILIA values you need, place them into an internal table, make use of the proper character manipulation function (maybe Shift, maybe Replace...), then finally issue the original query without referring to FILIA anymore, rather, to the values stored in the internal table - to compare with the WERKS value.

Hope it helps.

Avraham

Read only

0 Likes
457

Hi Avraham,

Thanks for the reply. My requirement is ABAP Query (SQ01). Maybe, I can re-create the functionality of the ABAP Query in a program but as of now I'm exploring the possibility of just changing the Query. Moreover we need the many functionalities of ABAP query that an ABAP program do not provide.