Application Development 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: 

from BAPISDORDER_GETDETAILEDLIST to BAPI_SALESORDER_CHANGE

Former Member
0 Kudos

Hello,

I need to use both BAPIs to update some Sales Orders' positions from a report.

I cannot use 'BAPI_SALESORDER_CHANGE' alone, because the field I need to change (Item category -> PSTYV) is blocked in 'VA02' transaction due to customizing. So, I will have to get all positions with 'BAPISDORDER_GETDETAILEDLIST', delete them with a first call to 'BAPI_SALESORDER_CHANGE' and create them again, with the small change, with a second call.

The problem is that the item structure of the table parameters in the two BAPIs is different (one is named 'BAPISDIT' and the other 'BAPISDITM') and, even the names of the fields (and their related data elements!!!) are different too. Therefore I cannot perform a "move-corresponding", nor use some RTTS dynamic progamming (relating them by data type).

I have found some 'MAP2E*' functions related to each one, but none for both (to act as an interface "bridge").

Has anyone faced the same problem?

Thanks a lot!,

Eloi

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

You could build your own MAP2* FM with transaction BDBS.

Or you could  read yourself data from vbap, vbkd, etc to map a VBAPKOM structure (perform some where used to find how SAP does this), then call MAP2E_VBAPKOM_TO_BAPISDITM.

Regards,

Raymond

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

You could build your own MAP2* FM with transaction BDBS.

Or you could  read yourself data from vbap, vbkd, etc to map a VBAPKOM structure (perform some where used to find how SAP does this), then call MAP2E_VBAPKOM_TO_BAPISDITM.

Regards,

Raymond

0 Kudos

Hello Raymond,

First of all, thanks for your answer and sorry for replying you so late.

I cannot use any of your two provided solutions because:

1- Transaction BDBS, with table VBAP, does not fulfill all the necessary fields to be mapped in the BAPI interface.

2- VBAPKOM is the same as VBAP with extra fields, but not all the necessary to BAPI interface (like case 1).

But, anyway, I found the solution by myself. If instead of setting the field BAPISDITMX-UPDATEFLAG of each line to update mode ('U'), we set them to insert ('I'), the line is overwritten.

Thanks again!,

Eloi

0 Kudos

If this is resolved then kindly close the discussion (see this blog).

0 Kudos

I have to admit, I saw that title at first as "BAPIDISORDER...."

Former Member
0 Kudos

Hello Eloi,

I've worked on similar requirement! The only was to fill each field data and append to  BAPI_SALESORDER_CHANGE table parameters.

Thanks,

K Prabhu