cancel
Showing results for 
Search instead for 
Did you mean: 

Copy control routine is not getting triggered when executing using VL10G tcode in background mode

0 Kudos

Hi,

I was unable to find a helpful blog hence posting the below question.

VOFM Copy control routine is not getting triggered when executing using VL10G tcode in background mode. Could you please help me out here.

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor

Sorry, this whole post is very difficult to follow with multiple answers/comments scattered all over but based on some comments I suspect that in VL10G the delivery is not created exactly the same way as in VL01N. So it's not a question of "background vs. foreground", you just have two different processes.

Again, this is not clear but it looks like in one case delivery is created with reference to an order and in the other with reference to STO. Also it seems the assumption is that STO is created from an order hence when a delivery is created for STO then the routines for order copy control would kick in. But I don't think it works this way. The routines are not "grandfathered", so the SO copy routines will only run when something is created with reference to an order directly.

0 Kudos

Thanks for your comment on this topic. Have debugged in all possible way but no luck hence I think what you are saying is right that routines are not "grandfathered". Only option is to use user exit.

If anyone has any different view please do comment.

Answers (7)

Answers (7)

Lakshmipathi
Active Contributor
0 Kudos
If anyone has any different view please do comment.

Right from my first post, I have been explaining you that what you expect in SAP cannot be met with any standard transaction. Having said that, it also implies to VL10G. What you can do is copy the standard programs VL01N / VL10C (if you want to create delivery in bulk) and club with VL06G program and assign a customized transaction code where you can add the required logic.

Lakshmipathi
Active Contributor
0 Kudos
as per them, they want to create delivery using VL10G using background option.

Not at all possible. Probably, you need to check with some other senior resource internally to get the right direction. If at all, you want to create deliveries in mass, you can consider VL10C where also, you have the option to select the required line items from multiple sale orders.

0 Kudos

Actually it's possible and we are already able to create delivery using VL10G directly. The only requirement we are not able to achieve is to copy some SO data to delivery while using VL10G. And the logic to copy is written in VOFM routine.

Lakshmipathi
Active Contributor
0 Kudos

Not sure whether you discussed with your SD functional consultant before posting here. VL01N is to create a delivery and hence, it is working for you by fetching the required data from sale order; whereas, for VL10G, you should have created delivery already and saved it without posting for goods issue. So now tell me that the delivery is already created and data fetched from sale order but in VL10G, it is blank ?

0 Kudos

We have worked with our SD functional and as per them, they want to create delivery using VL10G using background option.

they don't want to use VL01N first and then use VL10G. They want to only use VL10G to create delivery.

Lakshmipathi
Active Contributor
0 Kudos
3. When we created a outbound delivery manually using VL01N, our custom routine got triggered and were able to copy data.
4. Then we wanted to create delivery using VL10G tcode(for mass 
processing). Since in real time(in our business scenario) delivery will 
be created from a STO which is linked to a SO.

Your above two statements are confusing. When you say system has copied the data in VL01N, you also say, it is not in VL10G. As you should be knowing, delivery creation can happen either be from PO or a sale order or directly and you say it is a STO, in which case, ideally, system would fetch the related data from PO.

0 Kudos

VL01N is to create one delivery at a time which is working fine. But VL10G tcode has a feature to create more than delivery at a go. In real time we can't give solution to create one delivery at a time as it's a tedious job. SO we want to have it as a batch job which will create delivery automatically.

What I am trying to say as I explained earlier is when we use VL10G copy control routine is not copying SO data to delivery.

Also, we know system will copy related data from SO, however there is always a need to copy extra data as per business requirement which won't be part of standard SAP.

Hope this explained your confusion and looking for a valuable feedback on the same.

Lakshmipathi
Active Contributor
0 Kudos

You still have not explained what for that routine is set; only then, it will be clear for me to assist you. For information, in certain cases, deliveries will not be fetched in VL10G

0 Kudos

The routine is set to copy SO data to outbound delivery(as I have mentioned it in the second line in my previous reply)

former_member183501
Active Contributor
0 Kudos
VOFM Copy control routine is not getting triggered when executing using VL10G tcode in background mode.
  • Does it mean that routine is triggering during VL01N?
  • Is it a newly created custom routine or existing one? If new, have you run the report RV80HGEN?
  • Please take help of ABAPer, ask him to put a breakpoint in this routine and execute the t code again.

Regards

Kamlesh

0 Kudos

Hi Kamlesh,

Thanks for your reply.. I am a ABAPer and I have kept breakpoints but still not able to trigger the routine.

1. VOFM routine is getting triggered when I use tcode VL01N to create delivery.

2. It was a newly created custom routine under VOFM->Data Transfer->Delivery. I have also ran the report RV80HGEN to activate the routine..

Problem is, when I use VL10G tcode to create delivery using STO in background.

To elaborate,

1. VOFM->Data Transfer->Delivery->Custom routine is created. Ran the report RV80HGEN to activate the routine.

2. After that the customer routine was assigned to SO to delivery type in VTLA.

3. When we created a outbound delivery manually using VL01N, our custom routine got triggered and were able to copy data.

4. Then we wanted to create delivery using VL10G tcode(for mass processing). Since in real time(in our business scenario) delivery will be created from a STO which is linked to a SO.

5. Went to tcode VL10G->under PO tab gave the STO number and clicked execute.

6. The selected the rows for which delivery should be created. After selecting, there in a menu push button which says "Background" which will create delivery in background and publish the log. When we checked the delivery which was created as a result of execution, in that the desired output of VOFM copy routine was not present.

7. To further investigate, set the global parameter(found from google as direct break-point won't work) to debug and in call stack VOFM routine is not called at anytime during delivery creation.

8. Question is, do we have to do anything extra apart from point 1 and 2 to trigger VOFM routines for VL10G tcode when selecting background option.

Lakshmipathi
Active Contributor
0 Kudos

With the limited information shared by you, I don't think anybody here in SCN would be able to assist you. While executing VL10G, why some copy control routine should trigger?

0 Kudos

Hi Lakshmi,

Thanks for your reply. We are trying to create a outbound delivery using VL10G tcode using STO as reference. The reason being using VL10G we can select multiple line and can create delivery at a time.

The idea was while creating outbound delivery will need to copy some SO data to delivery as per our business requirement.

To do so we followed below steps,

1. VOFM->Data Transfer->Delivery->Custom routine is created. Ran the report RV80HGEN to activate the routine.

2. After that the customer routine was assigned to SO to delivery type in VTLA.

3. When we created a outbound delivery manually using VL01N, our custom routine got triggered and were able to copy data.

4. Then we wanted to create delivery using VL10G tcode(for mass processing). Since in real time(in our business scenario) delivery will be created from a STO which is linked to a SO.

5. Went to tcode VL10G->under PO tab gave the STO number and clicked execute.

6. The selected the rows for which delivery should be created. After selecting, there in a menu push button which says "Background" which will create delivery in background and publish the log. When we checked the delivery which was created as a result of execution, in that the desired output of VOFM copy routine was not present.

7. To further investigate, set the global parameter(found from google as direct break-point won't work) to debug and in call stack VOFM routine is not called at anytime during delivery creation.

8. Question is, do we have to do anything extra apart from point 1 and 2 to trigger VOFM routines for VL10G tcode when selecting background option.