2006 Jan 25 3:51 PM
Hi,
Uploading the data from flat file to crm using bapi.
In flat file they (legacy) provided country is like INDIA
but i need IN only.
Is there any function module for this conversion.
and also for language:
they provided english.
insted of EN.
please give me suggestions to convert them proper keys to throw into sap crm.
Thx
swathi
Since the legacy data is not standardized within SAP, you will need to do a 1--->1 conversion in your upload program.
IF value = 'INDIA'.
sap_value = 'IN'.
Endif.Regards,
Rich HEilman
2006 Jan 25 3:53 PM
Hi,
have a look to all the T002* tables, you will find all you need.
Frédéric
2006 Jan 25 3:55 PM
2006 Jan 25 3:59 PM
Hi swathi,
You can get the language code in this way:
select single spras
from T002T
where sptxt = 'English'.
You can get the land code in this way:
select single land1
from T005T
where spras = sy-langu
and landx = 'India'.
Unfortunately both whe descriptions are case sensitives
('INDIA' <> 'India')
Regards, Manuel
2006 Jan 25 4:00 PM
Hi,
you can convert manually
like
if country = 'INDIA'.
"then make it to IN
endif.
similarly language also.
i don't think there is a FM for that.
regards
vijay
2006 Jan 25 6:11 PM
what written below is working.but ineed to check the language dynamically. please see the next program.
REPORT YLANGUAGE_CONVERSION2 .
tables t002t.
data: bu_spras like t002t-spras,
bu_land1 like t005t-land1.
data: desc1 type char40.
select single SPRSL from T002T into bu_spras where sptxt = 'English'.
write: bu_spras.
select single land1 from T005T into bu_land1 where spras = sy-langu and landx = 'India'.
write: bu_land1.
second prgram for dynamic checking.
EPORT YLANGUAGE_CONVERSION .
tables t002t.
data: bu_spras like t002t-spras,
bu_land1 like t005t-land1.
parameter: desc type char40.
data desc1 type char15.
data itab like t002t occurs 0 with header line.
select * from t002t into table itab.
loop at itab.
If desc cs itab-SPTXT.
desc1 = itab-SPTXT.
exit.
endif.
endloop.
select single SPRSL from T002T into desc1 where sptxt = desc1.
write: desc1.
select single land1 from T005T into bu_land1 where spras = sy-langu and landx = 'India'.
write: bu_land1.
but it is not working following statement.
If desc cs itab-SPTXT
please is their any statement corresponding to this field.
2006 Jan 25 7:04 PM
Hi,
the following code works..
*&---------------------------------------------------------------------*
*& Report ZDEMOX2 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
report zdemox2.
tables: t500t,t002t.
parameters: p_ltext like t500t-ltext,
p_sptxt like t002t-sptxt.
data: w_molga type molga,
w_intca type intca,
w_laiso type laiso,
w_spras type spras.
select * from t500t.
if t500t-ltext cs p_ltext.
w_molga = t500t-molga.
exit.
endif.
endselect.
if sy-subrc eq 0.
select single intca into w_intca
from t500l
where molga = w_molga.
if sy-subrc eq 0.
write: /5 w_intca.
endif.
endif.
select * from t002t.
if t002t-sptxt cs p_sptxt.
w_spras = t002t-sprsl.
exit.
endif.
endselect.
if sy-subrc eq 0.
select single laiso into w_laiso
from t002
where spras = w_spras.
if sy-subrc eq 0.
write: 10 w_laiso.
endif.
endif.
Regards,
Suresh Datti
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |