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.
Showing results for 
Search instead for 
Did you mean: 

Send idoc ORDRSP depending on the supplier

0 Kudos

Hello all,

When a sales order is created (VA01) and saved, an idoc message type ORDRSP basic type ORDERS05 is sent. I would like that this idoc will be sent depending on the supplier code.

My problem is that I don’t know if that would be done by customizing or if I should modify some USER EXIT.

I looked for the customizing option but I found nothing. I tried to do it by code but I did not found the USER EXIT that sends ORDRSP/ORDERS05.

Could you kindly help me?

Thanks in advance.

Best regards.



Former Member
0 Kudos

If you are using the process code SD10, the underlying FM used for ORDRSP message type would be IDOC_OUTPUT_ORDRSP.

The first user exit that gets triggered inside this FM is EXIT_SAPLVEDC_004. This FM has the interface parameters which has all the necessary information that you are looking for via XVBPA/XVBAP/XVBAK.

Check the supplier code within this user exit and based on your conditions, if you determine that IDOC should not be processed, raise the exception "data_not_relevant_for_sending".

You can also check with your SD person to see if they can create an access sequence for the output type based on supplier code. If the required conditions records are not maintained for a specific supplier code, the O/P type will not be attached and hence the idoc will not get triggered assuming the idoc creation is based on a O/P type on the sales order.



0 Kudos

Hello Vikram,

First of all, thanks for your prompt reply.

I inserted a break point in the call to the FM EXIT_SAPLVEDC_004 and in the beginning of the FM IDOC_OUTPUT_ORDRSP. After that, I executed transaction VA01 to create a new sales order, I filled all the obligatory fields and saved. The new sales order is created, but program didn’t stop in the break points to check the code in the FM.

How can I stop the code in those break points?

Could you please help me?

Thanks in advance and  best regards.


0 Kudos


First of all can you confirm if you are trying to create an idoc via an O/P attached to the sales order?

If above is the case, you need to have the required partner profile set up. Once this is done, the exit would be triggered but in order to debug the same you should enable update debugging since this process would be called after the commit.


Former Member
0 Kudos


You should be specifying an output requirement on the output type (Transaction NACE), rather than use a user exit.

This output requirement allows you to write code, which will suppress the output determination in the first place.

This means that no record is output to NAST for the order being processing.



Active Contributor
0 Kudos

The standard solution would be to have "supplier" as a partner in the document and then to maintain the output condition records only for those partners that require this output/IDoc.

If "supplier" can't be a partner and/or if there is some more complex business logic involved then, as Martin suggested, you can write a requirement routine to trigger output only when those conditions are met. Google 'VOFM requirement' for the detailed document.

You might want to be more clear though when posting the questions. E.g. what is this "supplier"? In the sales order context it's not self-explanatory. It was not clear whether you're using output. "Sent depending" is a bit fuzzy too. Do you want to send only for the specific suppliers and not for others? Do you want to somehow direct it to different places? Do you want different content? Kindly be more specific. Good question is 80% of the answer.