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

Private methods Importing parameter cannot be changed error

Former Member
0 Likes
1,149

Hi Guys,

I have this scenario where I have a private method inside a class which is having an error "Field SAPMF02K cannot be changed".

here is the code for the private method call.

call method create_bdc_dynpro

importing IM_PROGRAM = 'SAPMF02K'

IM_DYNPRO = '0100'.

code of the method

data: wa_bdcdata type bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-program = im_program.

wa_bdcdata-dynpro = im_dynpro.

wa_bdcdata-dynbegin = at_true.

APPEND wa_bdcdata to at_bdcdata.

Hope you can help

Thanks!

1 ACCEPTED SOLUTION
Read only

alex_cook
Active Participant
0 Likes
803

Howdy,

I think you have your importing/exporting the wrong way round.

The method call should be:

call method create_bdc_dynpro

exporting IM_PROGRAM = 'SAPMF02K'

IM_DYNPRO = '0100'.

And of course in the method definition they should be importing parameters.

Cheers

Alex

3 REPLIES 3
Read only

alex_cook
Active Participant
0 Likes
804

Howdy,

I think you have your importing/exporting the wrong way round.

The method call should be:

call method create_bdc_dynpro

exporting IM_PROGRAM = 'SAPMF02K'

IM_DYNPRO = '0100'.

And of course in the method definition they should be importing parameters.

Cheers

Alex

Read only

Former Member
0 Likes
803

Thanks Alex. That solved the problem

Is this also the case for Public Methods?

Read only

alex_cook
Active Participant
0 Likes
803

Howdy,

Yep that applies regardless of the visibility.

Cheers

Alex