‎2008 Jul 11 5:38 AM
Hi All,
I want to fetch language based on Region.How to do it.
u201CEu201D u2013 for English for all customers where field Region on ADDR1_DATA / REGION is not equal to 'CT'. Else u201CFu201D.
How to get it.
Regards,
Sai
‎2008 Jul 11 5:43 AM
select single regio from kna1 into zregion where kunnr eq zkunnr.
if zregion ne 'CT'.
zlang = 'E'.
else.
zlang = 'F'.
endif.
‎2008 Jul 11 5:44 AM
Hi Sudha,
Try this way :
Select <field-names>
from <table name>
into <itab name>.
Loop at itab.
if addr1-data/region ne 'CT'.
Write :/ 'English Customers'.
else.
Write :/ 'French Customers'.
endif.
endloop.Reagrds,
Swapna.
‎2008 Jul 11 5:45 AM
Hi Sudha,
Try the following:
Select <language>
from <table>
into table <itab>
for all entries in <itab2>
where region eq 'CT'.
<language> - language field
<table> - database table
<itab> - internal table with language field
<itab2> - internal table with customer numbers
Hope this helps you.
Regards,
Chandra Sekhar
‎2008 Jul 11 5:49 AM
hi,
You can try this.
select distinct <lang> <region>
from <table>
into table <itab>
for all entries in <itab2>
where region EQ <itab2>-region.Hope this will help.
Regards
Sumit Agarwal
‎2008 Jul 11 5:53 AM
Hi Sudha,
Check this out;-
Select language
from dbtab
into table tab2
for all entries in tab1
where region ne 'CT'.Here,
itab1 - internal table with customer number
itab2 - internal table with language
Regards,
Bhumika