05-31-2009 8:57 PM
Hi Guys,
I am implementing Enhancement MEREQ001 and facing problem in declaring the variables and accessing them in the other includes.
Function Pool: SAPLXM02
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LXM02TOP. " Global Data
INCLUDE LXM02UXX. " Function Modules
*******************************************************************
INCLUDE LXM02F00. " SAP-Formpool for Customer-Use
INCLUDE ZXM02ZZZ. " Subprograms and Modules
Include: ZXM02TOP .
*----------------------------------------------------------------------*
***INCLUDE ZXM02TOP .
*----------------------------------------------------------------------*
DATA: g_pramt LIKE eban-preis.
DATA: g_poamt LIKE eban-preis.
Include: ZXM02O01
*----------------------------------------------------------------------*
***INCLUDE ZXM02O01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module STATUS_0111 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0111 OUTPUT.
IF g_poamt GT 2000.
Endif.
ENDMODULE. " STATUS_0111 OUTPUT
When I syntex check (Ctrl+F2) the program, it gives me the following error (RED) message.
The field u201CG_POAMTu201D is unknown, but there is field with similar name G_PRAMT.
When I forward navigate by double clicking g_poamt, it takes me to ZXM02TOP.
But when I try to activate it, the include is activated without giving any error message or warning.
I donu2019t know why system is not seeing G_POAMT. But it is seeing G_PRAMT.
What should I do to rectify this problem.
Thanks in advance.
05-31-2009 11:06 PM
I would try two things (random order):
1. Activate anyway despite of errors, and see at runtime if it works.
2. Update the navigation index via the menu (Utilities I believe).
05-31-2009 11:16 PM
Hi ,
Change to display made and active the main program . I guess you havn't activated the top include
Try this . Its just a try
Thanks
Venki
05-31-2009 11:59 PM
I have already activated TOP include and update navigation INDEX, but same error. I am getting this error only in PAI and PBO includes only, when trying to implement screen exits.
Include ZXM02O01 is PBO include.
Thanks again.
06-01-2009 12:25 AM
well if top include is activated i dont think it shud give u trouble, u just try like this once
DATA: g_pramt LIKE eban-preis,
g_poamt LIKE eban-preis.
also try declaring g_poamt before g_pramt and see wht happens
06-01-2009 12:43 AM
Hi Kartik,
I tried declaring g_poamt before g_pramt, but same error.
Thanks,
10-01-2009 2:20 PM
10-29-2009 4:52 PM
hi minisap,
Could you solve this issue? How?
Edited by: Estacio Stefanini on Oct 29, 2009 6:16 PM
06-18-2013 9:57 PM
After all this time, did anyone find a solution? I had this problem in the past and thought it was specific to that user exit function group, but I'm having it now for a different one.
I suppose it's because of the way includes are structured, but there has to be a solution. As already exposed here, updating navigation index / restructuring object list does no good. It is annoying when syntax checking, because it hides the possible real errors that you only face when activating.
08-12-2021 10:05 PM
Is there a way to fix this issue? re-arranged the includes such that the include which contains all the declarations is placed at the top and udpated the navigation index. Yet the issue is not resolved.
08-13-2021 9:59 AM
ctrl-f7 usually works for syntax checks of objects with many includes. I don't use ctrl-f2 in these cases.