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: 

BAPI or FM to Create Condition Records (VK11)

former_member185943
Participant
0 Kudos

Hi!

Is there a BAPI or a FM (or something else) to create condition records in the same way as with transaction VK11 (or XK15)?

I am aware of the LSMW program RV14BTCI (althought never have used it).

Thanks!

Kind regards,

Igor

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi Igor,

Have you looked at this FM <b>RV_KONDITION_SICHERN</b> and <b>RV_KONDITION_SICHERN_V13A</b>?

Hope this will help.

Regards,

Ferry Lianto

10 REPLIES 10

Former Member
0 Kudos

Hi Igor,

You can use FM IDOC_INPUT_COND_A to accomplish this. This is the same FM SAP uses when sending condition records from one system to another system using ALE.

Regards,

John.

0 Kudos

Thanks, John!

However, I have never used such functions (I mean IDOCs) and this one seems to have a difficult interface.

Would it be possible for you to post sample code of using the function?

Thanks!

Regards,

Igor

0 Kudos

Hi Igor,

I have used this FM once to create freight conditions; however the coding is by far too large to be posted here and freight conditions are more complicated than the usual sales conditions as the freight conditions can be multi-dimensional.

However there is quiet a good way to get the information you want, if you can set up an ALE connection between 2 SAP systems voor message type COND_A (conditions). By sending one condition from one system to the other you can look into the IDoc being sent and see exactly what data you should supply. Is that an option?

Regards,

John.

0 Kudos

John,

I have no experience with ALE. How complicated is it to acomplish a "hello world" version of what you suggest? I guess it is not trivial.

Thanks,

Igor

0 Kudos

Igor,

For testing purposes, I don't think you would have to setup the entire ALE config. Use WE19 transaction - this is a test tool.

Enter the IDOC type, I am not sure what that would be in this case,(My guess would be ORDERS as that is where you specify the data) and specify this function as the INBOUND function.

However, the tough part would be to figure out the which segments fields need to be filled in. Simple solution for that could be to take a existing IDOC and use that.

Regards,

Ravi

0 Kudos

Hello Igor,

It's not trivial, but let's have a try. Use transaction SALE to get into the ALE business. Then option Modeling and implementing Business Processes -> Maintain distribution model.

Get into change mode and create model view (any name will do). Then selected the newly created node and Add message type. Here you have to enter the sending and receving system and the message type (COND_A).

Afterwards select the node and then via menu Environment->Generate partner profiles execute the partner profile will be generated automatically.

Now you are able to send a condition records from system A to B.

Regards,

John.

0 Kudos

John,

I am getting the message "Local logical system is not defined". I don't know what is local logical system.

Regards,

Igor

0 Kudos

Hi Igor,

Sorry for the delay, the internet connection didn't work for hours.

The logical system can be defined using the same transaction SALE, but a bit higher in the tree.

Regards,

John.

ferry_lianto
Active Contributor
0 Kudos

Hi Igor,

Have you looked at this FM <b>RV_KONDITION_SICHERN</b> and <b>RV_KONDITION_SICHERN_V13A</b>?

Hope this will help.

Regards,

Ferry Lianto

0 Kudos

Hi, guys!

Ferry, do you have a sample code of using the FM RV_KONDITION_SICHERN_V13A? I need to create conditions for WBS elements (Project Management), but I don't see the field for this purpose (usually PS_POSID) in any of the interface tables.

This is getting too complicated. If I don't succeed soon maybe I should use the call transaction.

Thanks all!

Kind regards,

Igor