cancel
Showing results for 
Search instead for 
Did you mean: 

error for cmod code - "Variables Contain Invalid Values"

former_member186160
Contributor
0 Kudos
417

hi all,

i am learning ABAP now.

trying to write code for a customer exit variable in tcode - CMOD.

PFA snapshots for the details.

"zfiscqtr.jpg" - this is the infoobject for which i have created a customer exit var and writing a code

"code.jpg" - this has the code that i have written

"msg-rsrt.jpg" - this has the error msg details , while trying to execute code in rsrt

logic needed:

current fiscal year qtr : say 20133 [means fiscal year is 2013 and fiscal qtr is 3]

i want to output , fiscal year qtr value that is 4quarters prior to currrent date.

so output to be 20123

pls suggest me on how to correct this error

regards,

swetha

Accepted Solutions (1)

Accepted Solutions (1)

former_member186160
Contributor
0 Kudos

hi all,

this problem is solved.

solution below, for those u facing similar issue:

activated the include program.

activated the include program ZXRSRU01 - this is the include pg in the FM in CMOD tcode.

next was able to set breakpoints in cmod code.

next included this variable in a test query and executed that query in rsrt tcode.

the debugger started and finally i could get desired data to my customer exit variable.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

What is the output of the function module Z_BW_FISCQTR or the data type of the parameter FQTR used in the exporting parameter of the Function module.

Prathish

former_member186160
Contributor
0 Kudos

output data type of the function module Z_BW_FISCQTR- FQTR is char 60, but it just returns char of length 5.

anshu_lilhori
Active Contributor
0 Kudos

Hi,

You have not assigned the value your variable.I cannot see the variable name in your code.

Kindly the check the document on step by step cmod code.It will give you insight on how to start and use the same in your query.

Hope that helps.

Regards,

AL

former_member186160
Contributor
0 Kudos

WHEN 'ZPR4QTR'.

   
INCLUDE ZBI_BEX_ZPR4QTR.

hi , i have written above code in cmod, and in the include program , have written my code.

Former Member
0 Kudos

Hi,

Create a Form....Endform subroutine inside the Include program and call the subroutine from your cmod include.

Calling

INCLUDE ZBI_BEX_ZPR4QTR directly will not work.

Regards,

Prathish

Former Member
0 Kudos

Hi,

Can you execute the function module separately in SE37 and provide a screenshot of the output or the value that you obtain there?

Regards,

Prathish

former_member186160
Contributor
0 Kudos

snapshots below:

zfiscqtr.jpg

code.jpg

msg-rsrt.jpg

Former Member
0 Kudos

hi Swetha,

First thing you cant use '/' char and pass it to NUMC.. you can have this infoobject as an char or in ABAP you can have this variable as string or char.. and try using same logic..

thanks,

Bhupesh

former_member186160
Contributor
0 Kudos

yes, i have commented that line.

even while trying to assign value like '20122' directly, getting this error.