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 while creating a custom FM

Former Member
0 Likes
1,320

Dear Experts ,

        I am creating custom FM to create SO . Taking the reference from standard function module 'BAPI_SALESORDER_CREATEFROMDAT2' .

In import of 'BAPI_SALESORDER_CREATEFROMDAT2' , 'ORDER_HEADER_IN' contain 125 fields but i need only 5 fields. For that i created a structure and giving as import to my custom FM . In the source code of my custom FM i am calling 'BAPI_SALESORDER_CREATEFROMDAT2'  and there i am giving custom structure as input to 'ORDER_HEADER_IN' . Then it is going to dump. Let me use your suggestions to solve this problem.

   

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,142

Thanks for replying

     i know the reason why it is dumped? i am asking solution for that situation okay anyway i created that custom BAPI by using move-corresponding statement .

Thank you.

Dear Experts ,

        I am creating custom FM to create SO . Taking the reference from standard function module 'BAPI_SALESORDER_CREATEFROMDAT2' .

In import of 'BAPI_SALESORDER_CREATEFROMDAT2' , 'ORDER_HEADER_IN' contain 125 fields but i need only 5 fields. For that i created a structure and giving as import to my custom FM . In the source code of my custom FM i am calling 'BAPI_SALESORDER_CREATEFROMDAT2'  and there i am giving custom structure as input to 'ORDER_HEADER_IN' . Then it is going to dump. Let me use your suggestions to solve this problem.

   

Thank you.

4 REPLIES 4
Read only

Former Member
0 Likes
1,142

hi,

  type conflict error is due to import parameter type of bapi is not same as program input,

  declare same type ORDER_HEADER_IN as BAPISDHD1.

Read only

Former Member
0 Likes
1,142

Hello,

of course there is a dump. The Import Parameters you give to the SAP-Standard  BAPI has a specific form.

You Need to wrap your 5 data fields in the much bigger form of the SAP-Standard BAPI.

Greetings from Germany,

Johannes Höhmann

Read only

Former Member
0 Likes
1,142

Hi

You can't use an own structure, but onlu one defined as fm paramenter: so BAPISDHD1 as Vinodh says

All fields you need to transfer to the BAPI have to be indicated in the X paramenter: ORDER_HEADER_INX


Max

Read only

Former Member
0 Likes
1,143

Thanks for replying

     i know the reason why it is dumped? i am asking solution for that situation okay anyway i created that custom BAPI by using move-corresponding statement .

Thank you.