Outbound IDoc using INVOIC01

Interfaces (ALE, IDOC, RFC, EDI etc.)

Moderators: Snowy, thx4allthefish

Post Reply
AndyW
Posts: 70
Joined: Wed Jan 02, 2008 10:27 am
Location: North Norfolk, UK

Outbound IDoc using INVOIC01

Post by AndyW » Thu May 27, 2010 3:44 am

Hi All

Currently we send invoices out as hard copies in the post. We now have a requirement to send invoices for certain customers in XML format to a 3rd Party that will then distribute them electronically.

My plan is to produce the invoices as IDocs in SAP (somehow) and use our XI system to generate the appropriate XML package.

I've found the IDocs INVOIC01 and INVOIC02, either of which appear to suit our needs - even though they appear to have been developed for inbound processing(?). Is anyone aware of a function module that will populate this IDoc for outbound processing from a billing document or is that something I'm going to have to do myself?

If anybody has done soemthing similar or would care to comment on the overall process that would also be greatly appreciated - although I've had some expoure to IDocs I'm not overly familiar with them and for all I know there might be a better way of achieveing the goal!!

Thanks very much

Andy

billb1
Posts: 9
Joined: Mon Jan 12, 2009 11:37 am

Re: Outbound IDoc using INVOIC01

Post by billb1 » Thu May 27, 2010 11:10 am

Andy,

We send out INVOIC01 in XML format through Business Connector. I'm sure you can do the same with XI.

It is set up mostly in WE20. The outputbound message type is INVOIC and the message variant/code is FI. On the Message Control tab, app is V3, message type is ZINV (yours could be different) and the process code is SD09. The function module attached to the process code is IDOC_OUTPUT_INVOIC.

billb

AndyW
Posts: 70
Joined: Wed Jan 02, 2008 10:27 am
Location: North Norfolk, UK

Re: Outbound IDoc using INVOIC01

Post by AndyW » Fri May 28, 2010 6:13 am

Thanks very much for your reply Billb1, that looks to be pretty much what I want to do. In your setup do all invoices go out to Business Connector? In our scenario we will only be sending invoices to the 3rd party system for our customers who are signed up to receive them, for all other customers we will continue to produce hard copies directly from SAP. Just wondering the best way of splitting them out?

Baz
Posts: 4748
Joined: Fri Nov 08, 2002 5:54 am
Location: He's out there! somewhere!!!!
Contact:

Re: Outbound IDoc using INVOIC01

Post by Baz » Fri May 28, 2010 6:47 am

Hi Andy

you can import the idoc into XI/PI and give the xsd or a wsdl to your third party.

you could use a userexit to determine which customers receive the invoices electronically...
Baz

AsPiRiNg tUlY iDiOt Image

http://www.catb.org/~esr/faqs/smart-questions.html

Image

check out my Podcasts http://dj-baz.podomatic.com

AndyW
Posts: 70
Joined: Wed Jan 02, 2008 10:27 am
Location: North Norfolk, UK

Re: Outbound IDoc using INVOIC01

Post by AndyW » Fri May 28, 2010 8:28 am

Hi Baz

Thanks for the reply - I thought you'd moved on to ABAPland :)

The third party have provided me with an XSD which I've imported into XI. I'm now in the process of mapping the data from SAP to that.

Good thought on the userexit - I was thinking of using the output conditions to somehow determine whether to use the electronic or hard copy output type but was struggling with how best to do it. I think in the short term this will be for a small set of our larger customers so we could simply specify in the output conditions the appropriate customers but I think that will pose a maintenance nightmare in the future.

I'll have a think on it over the weekend (or not!) - have a good one.

Cheers

Andy

billb1
Posts: 9
Joined: Mon Jan 12, 2009 11:37 am

Re: Outbound IDoc using INVOIC01

Post by billb1 » Fri May 28, 2010 11:49 am

FWIW... We use output conditions.

Baz
Posts: 4748
Joined: Fri Nov 08, 2002 5:54 am
Location: He's out there! somewhere!!!!
Contact:

Re: Outbound IDoc using INVOIC01

Post by Baz » Tue Jun 01, 2010 5:16 am

AndyW wrote:Hi Baz

Thanks for the reply - I thought you'd moved on to ABAPland :)

The third party have provided me with an XSD which I've imported into XI. I'm now in the process of mapping the data from SAP to that.

Good thought on the userexit - I was thinking of using the output conditions to somehow determine whether to use the electronic or hard copy output type but was struggling with how best to do it. I think in the short term this will be for a small set of our larger customers so we could simply specify in the output conditions the appropriate customers but I think that will pose a maintenance nightmare in the future.

I'll have a think on it over the weekend (or not!) - have a good one.

Cheers

Andy
hahahaha! i am venturing into ABAPland.... but still predominantly PI... happy to learn new things... doing lots of ALE/ABAP development at the moment...
output condition would be the best way of doing this... i had my ABAP head on at the time.. and debugging userexits for ALE today! :D
Baz

AsPiRiNg tUlY iDiOt Image

http://www.catb.org/~esr/faqs/smart-questions.html

Image

check out my Podcasts http://dj-baz.podomatic.com

AndyW
Posts: 70
Joined: Wed Jan 02, 2008 10:27 am
Location: North Norfolk, UK

Re: Outbound IDoc using INVOIC01

Post by AndyW » Tue Jun 01, 2010 7:15 am

And I'm 'venturing' in the other direction - funny how the skillsets begin to merge

Thanks both of you for your replies - so Output Conditions win 2-0.

I can see that it would be relatively straight forward to do if all of our invoices were to be distributed electronically but how do you distinguish between those customers requiring electronic output and those that still require printed copies? I can't believe this scenario is unique to us but the best I have come up with so far is specifiying EDI customer's in the Output Condition but that just seems like a hack rather than an elegant solution!!

I suspect I'm missing something vitally important about EDI/IDocs - we've got an office copy of 'ALE, EDI and IDoc Technologies for SAP' - I'm psyching myelf up to tackle its 700+ pages! :cry:

Cheers
Andy

Post Reply