Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding SAPMV45A

Former Member
0 Likes
1,730

HI all,

In <b>SAPMV45A-MV45AFZB-YLOLOQ10</b>.

In <b>TOP include of <b>SAPMV45A</b> i delcared a constant. <b>Y_K_VA01 TYPE SYTCODE VALUE 'VA01',</b>

I written like this in include YLOLOQ10,

IF SY-TCODE EQ Y_K_VA01.

MOVE VBAK-VSBED TO VBAP-YYCVSBED.</b>

PROBLEM: I am getting a syntax error like........

Field "<b>Y_K_VA01</b>" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement . . . . . . . . . .?

But the user-exit is working fine. the problem is how to resolve this error.

I already tried by getting tcode from TSTC also but there is no use. also getting some extra errors.

Thanks & Regards,

Kishore.

1 ACCEPTED SOLUTION
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,200

Hi Kishore!

If you use the t-code only once, then a local variable / eq 'VA01' hardcoded is much easier.

If not, stay with the global definition. Did you try to test the main program (STRG+F7)? Usually this helps in case of many includes.

Is Y_K_VA01 defined in / below MV45ATZZ?

SAP has some problems to find all (inactive) includes in such a huge program. Maybe you just activate anyway. Afterwards all the variables should be available in the whole program. But check immediately, if the program is syntax error free, otherwise change the program immediately again.

Regards,

Christian

HI all,

In <b>SAPMV45A-MV45AFZB-YLOLOQ10</b>.

In <b>TOP include of <b>SAPMV45A</b> i delcared a constant. <b>Y_K_VA01 TYPE SYTCODE VALUE 'VA01',</b>

I written like this in include YLOLOQ10,

IF SY-TCODE EQ Y_K_VA01.

MOVE VBAK-VSBED TO VBAP-YYCVSBED.</b>

PROBLEM: I am getting a syntax error like........

Field "<b>Y_K_VA01</b>" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement . . . . . . . . . .?

But the user-exit is working fine. the problem is how to resolve this error.

I already tried by getting tcode from TSTC also but there is no use. also getting some extra errors.

Thanks & Regards,

Kishore.

6 REPLIES 6
Read only

Former Member
0 Likes
1,200

I do not think you need to declare this variable globaly.

In fact inside YLOLOQ10 itself you can declare the variable and do the IF condition. And I feel, local variables are more preferable to use than a global variable for better programming technique.

Hope this helps you.

~thomas.

Read only

Former Member
0 Likes
1,200

Is the definition of the include for YLOLOQ10 above the definition of the top include in the main program.

If you know what I mean.

Read only

Former Member
0 Likes
1,200

Hi,

Can you please Activate Top Include first, then after activate the include programs.

Regards,

Subbarao

Read only

kanthimathikris
Advisor
Advisor
0 Likes
1,200

While activating..check out all the inactive items, activate the function group and all inactive items in the function group. It should work then.

Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,201

Hi Kishore!

If you use the t-code only once, then a local variable / eq 'VA01' hardcoded is much easier.

If not, stay with the global definition. Did you try to test the main program (STRG+F7)? Usually this helps in case of many includes.

Is Y_K_VA01 defined in / below MV45ATZZ?

SAP has some problems to find all (inactive) includes in such a huge program. Maybe you just activate anyway. Afterwards all the variables should be available in the whole program. But check immediately, if the program is syntax error free, otherwise change the program immediately again.

Regards,

Christian

Read only

Former Member
0 Likes
1,200

I would try:

IF SY-TCODE EQ 'Y_K_VA01'.

Message was edited by:

Florina Cheta