cancel
Showing results for 
Search instead for 
Did you mean: 

Error in code: CMOD using Badi

swati_gawade
Contributor
0 Kudos

Hi all,

I am trying to implement the CMOD using BADI using below blog.

http://scn.sap.com/docs/DOC-31271

However, I am facing 2 issues in code syntax.

In the CMOD code when I have entered following code as per the blog, I get error as follows.

and in BADI I get that I_STEP is unknown.

Please help.

-Swati.

Accepted Solutions (1)

Accepted Solutions (1)

swati_gawade
Contributor
0 Kudos

Resolved this by posting same question in ABAP space.

Answers can be checked at below link.

Former Member
0 Kudos

Hi Swati, please can you share how you were able to resolve this? For some reason I'm not authorised to view the link you have posted in the ABAP focused forum. Thanks in advance.

impraveen0192
Participant
0 Kudos

Hi swati,

i could not access the blog.

can you please help me on this.

Regards

Praveen Kumar

Loed
Active Contributor
0 Kudos

Hi Robin and Praveen,

Try replacing the word ENHANCE with USEREXIT..

CALL BADI badi_glob ->userexit

Regards,

Loed

impraveen0192
Participant
0 Kudos

Hi,

I am   getting an error  I_step not found

Loed
Active Contributor
0 Kudos

Hi,

Did you follow correctly this blog?

Because the only problem that you will encounter with the blog is the ENHANCE part..

Regards,

Loed

impraveen0192
Participant
0 Kudos

i have followed the entire steps from that doc. but it seems something is missing.

Answers (1)

Answers (1)

yasemin_kilinc
Active Contributor
0 Kudos

Hi Swati,

Did you use this exit with any code before? Are you sure that it works for other variables filled in this exit? What does it write when you click on the red colored error?

I didnot use any enhancement spot in cmod before, but what you can do is add a breakpoint with your username in the beginning of the code (something like: break swati.)  Then comment the outlines for your new code. Run your query with analyzer and see if i_step exists.

Hope it gives an idea

Regards

Yasemin..

swati_gawade
Contributor
0 Kudos

Hi Yasemin,

This is a new implementation and this is the first CMOD being written in the system. I have also never worked with BADI before hence I have been following various threads on SCN for creating an exit for a BeX variable.

The code is currently giving syntax error so I am not sure how the break-point will help.

Please let me know if any other solution.

-Swati.

yasemin_kilinc
Active Contributor
0 Kudos

Hi Swati,

I think there is something wrong with how you have defined the enhancement project. As I said in my previous post, try to comment the lines you have added. Don't use the badi, just try to write a simple code for a variable, add a code such as

break your_username.

if i_step = 1.

case i_vnam.

when 'YOUR_VARIABLE_NAME_IN_BEX'

l_s_range-opt = 'EQ'.

l_s_range-low = 'ANY_VALUE_SUIABLE_FOR_YOUR_VARIABLE'

l_s_range-sign = 'I'.

append l_s_range to e_t_range.

endcase.

endif.

Try this very simple code in the include. When you run your query it will come to the breakpoint. there, check if there exist i_step.

Regards

Yasemin...