‎2009 Feb 26 10:53 AM
Hi,
I have a fields which has differerent characters in length.
EG
Field 1 = 1 values are like this = 1
Field 2 = 3 value = 123
field 4 = 5 Value = 123100
Field 5 = 8 value = 123100900
Field 6 = 11 va;ue 12310090082
Field 7 = 13 value = 1231009008251
field 8 = 18 value = 123100900825110
I have to create the varible which can accept their respoective code
Eg: field 2 = 23
field 3 = 100
field 4 900
where as in the table it is stored as full code that is field 2 = 123 i need to select last 2 character
i can do that but problme is like this we have different selectionfor the field 4 we cna have 123100,123200 etc combination should be picked up correctly
I need to have the abap code for this
help is urgently needed.
~Thanks
Use meaningful Subject
Edited by: Vijay Babu Dudla on Feb 26, 2009 7:53 AM
‎2009 Feb 26 11:04 AM
‎2009 Feb 26 11:04 AM
‎2009 Feb 26 11:16 AM
‎2009 Feb 26 11:29 AM
So how many input fields do you have on the selection screen ?
One for each level or one for all levels?
And what do you mean by setting A12 ?
Is it the default value on the selection screen ?
‎2009 Feb 26 11:33 AM
Yes we need to have each input field seperately apart from this correct combination need to be selected..
A12 i can make it default but they would like to enter evem that also.
Thanks
‎2009 Feb 26 11:58 AM
Ok
well what you may do is this
Let the customer inut those later portions of the values only in the selection screen.
You can use CONCATENATE to have the whole values.
eg field 3 he inputs 100.
So you can use
CONCATENATE '123' field3 INTO field3.
Now field3 will have the value '123100'.
Similarly for all the fields.
Do this before you use these values to read from the table.
is it clear?
Pushpraj
‎2009 Feb 26 12:21 PM
Thanks for this..
Could you guide me for the same if the value exists in the data base .. how to select the last three charaters and store in the other variable...
Thanks
‎2009 Feb 26 12:29 PM
If there's a value like 123100 stored in the database and you want only 100,
then you can truncate it after getting its value.
Say field3 = 123100.
field3 = field3+3. (this would put 100 into field3)
and similarly for other hierarchies.
Pushpraj
‎2009 Feb 26 12:41 PM
pushpa raj singh give u the correct reply.follow this one .
it will leave the 1st 3 characters and store the ;last 3 characters .
field1 = 15487963.
field1 = field1+2(2).... answer is : '48'.
field1 = field1+offset(length).
it will leave the 1st two char and store the 3rd and 4th char .
‎2009 Feb 26 12:42 PM
pushpa raj singh give u the correct reply.follow this one .
it will leave the 1st 3 characters and store the ;last 3 characters .
field1 = 15487963.
field1 = field1+2(2).... answer is : '48'.
field1 = field1+offset(length).
it will leave the 1st two char and store the 3rd and 4th char .
Thanks ,
jowar