on 05-01-2006 3:35 PM
Hello experts,
I need to write a transfer/conversion routine at InfoObject level. For example I need to concatenate something to the incoming data.
Is it possible to do at InfoObject Transfer Routine level? If yes, possibly some sample code please...
Thanks
Sri
Hi srivani
Yes it is possible to write transfer routine at Infoobject level. Then it will be a global TR.
It will affect all the Infosources.
sample code to concatenate.
data: abcd type c(20).
abcd = 'abcdefg'.
conactenate "infoobject name" abcd into result.
Cheers
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shiva,
I did similar to that, but when I check the syntax I am getting error. For example the InfoObject name is: Z_IO1
Here is the code:
data: z_ABC(18) type c.
concatenate Z_IO19(7) Z_IO116(2)
into z_ABC separated by '-'.
RESULT = Z_ABC.
When I Check the systax I am getting the following error:
"Z_IO1" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.
Please let me know what I am missing..
Thanks
Sri
HI Sri
In the From you have a changing parameter
Result RESULT TYPE DE_Z_IO1
U have to use this result to do the manipulation
IOBJ_NAME TYPE RSIOBJNM this hold only the obj name not the value.
for example if U have a custom defined COSTCENTER lenth 13 instead of CHAR 10 as provided by standard SAP
suppose U want to append the sourse system ID to it to the valuse commping from R3 this example illustrates it.
PROGRAM CONVERSION_ROUTINE.
Type pools used by conversion program
TYPE-POOLS: RSD, RSARC, RSARR.
TYPES: DE_COSTC91(000013) TYPE C.
Conversion rule for InfoObject COSTC91
Data type = CHAR
ABAP type = C
ABAP length = 000013
FORM CONVERT_COSTC91
USING RECORD_NO LIKE SY-TABIX
SOURCE_SYSTEM TYPE RSA_LOGSYS
IOBJ_NAME TYPE RSIOBJNM
CHANGING RESULT TYPE DE_COSTC91 " InfoObject value
RETURNCODE LIKE SY-SUBRC.
$$ begin of routine - insert your code only below this line -
<b>shift RESULT right by 3 places.
RESULT(3) = SOURCE_SYSTEM.
RESULT = RESULT .
RETURNCODE = 0.</b>$$ end of routine - insert your code only before this line -
ENDFORM.
Hope it help U
Regards
AJAY
Hi Sri,
Is the routine going to be used in all the Infosources where the Info-object exists or only for partuclar datasurces. If it is for particular datasources then you can write the routine in the transfer rules for that datasource.
Bye
Dinesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.