09-26-2007 6:12 PM
Hi Gurus,
Can I use three infotypes in a function module.
When i am giving the declaration of infotypes as below
INFOTYPES : 0167 , 0168 , 0170.
Then it is throughing with an error stating p0170 is already declarded.
When I am removing the 0170, it is stating the p0170 is not declared and similar table is p0167. How to solve this issue.
09-26-2007 7:21 PM
Has the infotype 0170 (or the P0170 structure) been declared elsewhere in the function group, such as a different function or in the TOP include?
09-26-2007 7:21 PM
Has the infotype 0170 (or the P0170 structure) been declared elsewhere in the function group, such as a different function or in the TOP include?
09-27-2007 6:50 PM
Kevin,
Yes exactly thats the problem. Cant I use the same infotype in another function module. How to solve this issue.
Please guide me.
Ravi
09-27-2007 6:58 PM
If you need to use it in more than one function, define it in the TOP include of the function group and remove the declaration from the current function that it is defined in. Anything declared in the TOP include is available in all functions in that group.
09-27-2007 7:05 PM
Kevin
I am new to sap. Can you say how to declare include and perform in abap program or function module
Ravi
09-27-2007 7:57 PM
Sure. First, remove the declaration from the function that you found it in. Then, in the menu, Goto-> Global Data. This will take you into the TOP include of the function group. This include should be used <u>only</u> for data declarations that are global to the function group. Put you infotype declaration in there and compile all of the objects at the same time.