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

Type conflict when calling a function module (field length).

Former Member
0 Likes
4,131

Hi Folks,

   I am getting dump 'Type conflict when calling a function module (field length).' when using fm BAPI_PBSRVAPS_CHANGEKEYFIGVAL2

TYPES : BEGIN OF ty_save,
         macro_execution_flag TYPE bapiyesno,
         retry_number TYPE bapi10030retryno,  " type of int4
         retry_waiting_time TYPE bapi10030retrywaittime,  " type of int4
         END OF ty_save.


data:
       wa_save TYPE ty_save,
it_save TYPE STANDARD TABLE OF ty_save.

wa_save-macro_execution_flag = ' '.
wa_save-retry_number = '3'.
wa_save-retry_waiting_time = '30'.
APPEND wa_save TO it_save.
CLEAR wa_save.


share your input how can pass data to that internal table.



Thanks,

Neelima N


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,159

solved by myself.

thanks..

8 REPLIES 8
Read only

Former Member
0 Likes
3,159

Hi,

Here dump clearly saying Type conflict means the input parameters type to the function module is different by comparing to function module parameters type.

Define same types to the input parameters what ever you are passing to Function module by comparing Function module parameters.

Regards

Mani

Read only

0 Likes
3,159

Hi Nagamani ,

  I am passing the same parameters which was used by the function module.

         macro_execution_flag TYPE bapiyesno,
         retry_number TYPE bapi10030retryno,  " type of int4
         retry_waiting_time TYPE bapi10030retrywaittime,  " type of int4


please help how can i pass the values.


Thanks,Smriti

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,159

Don't be creative, use exact same type of definition for the parameters (single and internal table type) than in the BAPI definition.


DATA: lt_bapi_itab TYPE TABLE OF BAPIxxxx,

lt_bapi_parm TYPE BAPyyyy.

Also some "-" are missing in your code, but as this code is not required (and this BAPI is not on my system)...

Regards,

Raymond

Read only

0 Likes
3,159

Hi Raymond,

i have tried like following also

it_save type STANDARD TABLE OF BAPI10030PBSAVEOPTIONS,
wa_save like line of it_save.

since
BAPI10030PBSAVEOPTIONS is a structure.

wa_save-macro_execution_flag = 'X'.
wa_save-retry_number =   .     "lv_retry." '0000000003'.
wa_save-retry_waiting_time = 30 .   "lv_wait. " '0000000030'.
APPEND wa_save TO it_save.
CLEAR wa_save.


same dump.


help will be appreciated.


Thanks,

Smriti

Read only

venkateswaran_k
Active Contributor
0 Likes
3,159

Hi

Can you please share the code.

Also, the dump

Regards,

Venkat

Read only

former_member188219
Participant
0 Likes
3,159

This message was moderated.

Read only

Former Member
0 Likes
3,160

solved by myself.

thanks..

Read only

0 Likes
3,159

As already said please dont put generic comment please provide the detail of the solution. Consider you arealso struck Iin a similar problem and you found some one solved it by myself. How will you feel.

Please document solutipn each threadIif you want to learn and share knowledge

Nabheet