‎2009 Jan 16 5:34 AM
hi experts.
i am facing a problem, such that,
i have likp-traid(truck no)
likp-erdat in selection screen, both are select-options.
i made select from likp with respect to likp-traid(truck no)
likp-erdat in selection screen,( both are select-options).
based on that i made for all entries in vttk with respect to likp-traid = vttk-signi.
but likp-traid have value in caps (say, WB-32, WB32)
vttk has also the above values , but in lower case(say. wb32,wb-32),
thats why for all entries failed,
how to convert those uppercase to lower case?plz help
‎2009 Jan 16 5:35 AM
‎2009 Jan 16 5:41 AM
hello ,
thanks for ur answer,
but i need to clarify that , my internal table it_likp-traid has multiple values,
how can i convert those vvalues to 'text' , which must be type char,
to use translate statement
‎2009 Jan 16 5:48 AM
Hello Rajdeep,
I will ask you not to select data from VTTK using LIKP-TRAID.
Can you share your code with us? May be then we can help you out.
Suhas
‎2009 Jan 16 5:59 AM
Hi,
See the following code.
Hope this will help u.
TABLES: likp.
types: BEGIN OF x_a,
traid type likp-traid,
END OF x_a.
DATA: it_a TYPE STANDARD TABLE OF x_a,
wa_a like LINE OF it_a.
DATA: it_a1 TYPE STANDARD TABLE OF x_a,
wa_a1 like LINE OF it_a.
DATA: str(20) TYPE c.
select-OPTIONS: van FOR likp-traid LOWER CASE .
SELECT traid from likp into TABLE it_a WHERE traid in van.
LOOP AT it_a INTO wa_a .
str = wa_a-traid.
TRANSLATE str to LOWER CASE.
wa_a1-traid = str.
APPEND wa_a1 to it_a1.
ENDLOOP.
LOOP AT it_a1 INTO wa_a1 .
WRITE:/ wa_a1-traid.
endloop.
Thanks.
‎2009 Jan 16 5:38 AM
Hi,
You can do it through using TRANSLATE.
TRANSLATE "text" to LOWER CASE.
Hope it helps,
Thanks & Regards
‎2009 Jan 16 5:38 AM
hi
frm ur post i assum u r 1st selecting data frm likp n den for all the netires inlikp u get data frm vttk.. so once u get data frm likp before goin to vttk loop on likp selection and use translate to uppercase on tht perticular field n update ur likp table n den go for vttk
if its other way round u can still use the same sequesnce for the respective tables
‎2009 Jan 16 5:39 AM
‎2009 Jan 16 5:56 AM
Hi....
For your issue.....
based on that i made for all entries in vttk with respect to likp-traid = vttk-signi.
but likp-traid have value in caps (say, WB-32, WB32)
vttk has also the above values , but in lower case(say. wb32,wb-32),
thats why for all entries failed,The solution is ...
Based on the select options the records are retrieved from the table likp. Move those records to the internal table say it_table.
Loop at it_table into the wa_table. " wa_table is the work area for the internal table it_table.
transcalte wa_table -traid to lower case.
endloop.now you can select the records from the table vttk using the option for all entries in the
above internal table, in which you have translated them to lower case.
So now your retrieval of records will be successful.
Hope this helps you much,
Thanks and regards
Bhuvana.
‎2009 Jan 16 6:25 AM
you try this FM to translate to uppercase.
Example,
CALL FUNCTION '2054_TRANSLATE_2_UPPERCASE'
EXPORTING
I_STRING = P_V_TEXT
IMPORTING
E_STRING = P_V_TEXT
To translate to lowercase,
TRANSLATE adrc-name1 TO LOWER CASE.
Regards,
Joan
‎2009 Jan 16 6:38 AM
‎2009 Jan 16 6:48 AM
i have done it success fully with all of urs help message,
this fm convert lower case tp upper
TERM_TRANSLATE_TO_UPPER_CASE
but i needed the reverse one,
i did it in this way,
loop at it_likp.
it_main-text = it_likp-traid.( declare text type string)
translate it_main-text to lower case.
endloop.