on 09-30-2016 10:23 AM
Hi Friends,
I have added a new info Object in a DSO, I have to populate this newly added info object with an existing info object.
However, my issue is the existing info object is of length 45 and my new info object is of length is 26. Now my issue is I have to read bit of existing IO into the new one.
ex: existing info object contains the following
000000010000000000200011021511075816072414
my new IO should be populated with 4 values from 6th position and 2 values from position 19, 4 values from 23rd position.
My abap knowledge is very basic, can some one please suggest me how to achieve this in the end routine?.
Regards
Naveen
Hi PJ anf Francis,
Thanks a lot for your reply and help. I will try this and will let you know.
Regards
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this
say your long value is in <source_field>-char45 and your target is RESULT.
* assuming <source_field>-char45 has value '000000010000000000200011021511075816072414',
This is the code for the transformation field update rule
CONCATENATE <source_field>-char45 +6(4)
<source_field>-char45 +19(2)
<source_field>-char45 +23(4)
into RESULT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Naveen,
You have to use Field Routine and in that you have to use the CP* ( Contains pattern) to achieve your requirement
you have to declare 3 local variables in the field routine which can store the values as per your requirement
IF SOURCE_FIELDS-(YOUR EXISTING FIELD NAME) CP '00000*'.
xxx = source_fields-Existing Field+6(4).
yyy = source fields-existing Field+19(2).
zzz = source fields-existing field+23(4).
then concatenate all 3 into another one then finally
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.