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: 

SD items in sales order, how to update the configuration?

jepi_flanders
Participant
0 Kudos
1,512

Hi Experts,

my customer has updated few procedures used for characteristics valuation inside the material configuration, with the result that now the configuration looks a little bit different. Now, in the existing sales orders items using those materials, he needs to update it also. This can be done manually, very simply, just entering, in change mode, each item configuration, and save it: procedures are processed, new values are taken and saved. That's fine, but time consuming, as you can image. I am wondering if there is the possibility to do the same by abap coding. Configuration, as saved before the procedures change, can be read quite simply (for instance, by the methods in CL_CBASE class), the real question being how to get the updated values for those characteristics that are changed with the procedures? Have you already faced a similar issue? Could you please help?
Thank you.
Best Regards.

JFlan

8 REPLIES 8

jepi_flanders
Participant
0 Kudos
320

Hi Friends,

No news on this topic? Can anyone help?

Thank you!

0 Kudos
320

Hi,

Are you doing from non sap.Are you going to change the characteristic values of the item.

Regards,

Madhu.

0 Kudos
320

Hi

Please use below function modules  for updating SO

SD_SALESDOCUMENT_CHANGE

SD_SALESDOCUMENT_CREATE

SD_SALESDOCUMENT_DISPLAY

Thanks,

Chandra

0 Kudos
320

And also for material details search BAPIs using BAPI_MATERIAL* in SE37 for material data retrieval

Thanks,

Chandra

0 Kudos
320

Hi Experts,

Thank you for your mails but actually my problem is not concerning which FM to use for updating the configuration, but instead how to get those values to apply for the configuration update.

I will try to better explain my problem.

Let's take the BIKE example.

Up to yesterday, the object dependency (procedure) for determing the COLOR characteristic was like this:

$SELF.COLOR = 'RED' IF MODEL = 'A'.

while from today, it has been changed into:

$self.COLOR = 'ELECTRIC BLUE' IF MODEL = 'A'.

Now, in existing sales order items, if I read their configuration (for instance, with VC_I_GET_CONFIGURATION_IBASE FM, through the relevant item CUOBJ, or with BAPISDORDER_GETDETAILEDLIST FM, with related sales document reference), I still get 'RED' for the COLOR characteristic.

That's fine, as it is the value saved when item was configured (before the procedure change).

If I enter the item configuration (for instance, with VA03) I *see* 'ELECTRIC BLUE' for COLOR characteristic, but actually, if I look at the configuration changes the latest value stored for that characteristic is 'RED', no matter what I *see* on the screen.

If I enter in change mode instead (VA02), and save, then the new value 'ELECTRIC BLUE' is taken and saved.

It seems to me that the system, when entering the sales order item configuration, is making a sort of re-configuration in accordance with the latest dependencies in the profile.

This is my goal: instead to have the user entering each item configuration in change mode and save, I would like to have an abap program for doing this.

So, the problem is how to run that sort of re-configuration and getting the updated characteristic values to apply when updating the configuration?

I hope to have been a little bit more clear now about my request, and hope to get some help from you.

Thank you.

JFlan

0 Kudos
320

Hello Friends,

Sorry if I am coming back to this subject, but unfortunately I haven't got a solution yet.

Do you think there is any possibility to run a sort of configuration simulation so that to obtain the procedure-dependant value recalculated, and then be able to modify the item configuration accordingly?

Thank you for any suggestion.

Kind regards,

JF

0 Kudos
320

Hello Jepi,

Please ask your ABAPer to take a look on the functions below:

CUCB_CHANGE_CONFIGURATION

CUCB_SET_CONFIGURATION

Those might help you, I hope.

Regards,

Adriano Cardoso

Former Member
0 Kudos
320

Dear Jepi

Why not you are doing it through SPRO

SPRO>Sales and Distribution>Basic Function>Log of Incomplete Items>Define Incompleteness Procedures.

Sit with your SD Functional Consultant and with help you can do it without coding

Thanking you!

Ashish Mishra