Application Development and Automation 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: 
Read only

Interface

Former Member
0 Likes
814

I have to create an outbound interface

It needs to happen at least once a day

The interface will be triggered for all new invoice documents that are issued on the company code

Can some one please help me on how to start off writing the code.

Thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
759

Hi ARS

I am not sure what methodology to use currently. Perhaps you could help me out

The requirement is to

-Issue an outbound file to our partner system through an itnerface. The interface needs to happen at least once a day

-The itnerface will be triggered for all new invoice documents that are issued on the company code

-The content of the file has to respect a format set by our partner.

Any ideas

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
759

What kind of interface you are looking for? file (txt, xml, xls....) or RFC or BAPI or IDoc?

aRs

Read only

Former Member
0 Likes
760

Hi ARS

I am not sure what methodology to use currently. Perhaps you could help me out

The requirement is to

-Issue an outbound file to our partner system through an itnerface. The interface needs to happen at least once a day

-The itnerface will be triggered for all new invoice documents that are issued on the company code

-The content of the file has to respect a format set by our partner.

Any ideas

Read only

0 Likes
759

Megan,

I think you can create a program(Can schedule a batch job to execute daily) which will populate all the New invoice documents issued on the company code and pass to Master_Idoc_distribute to create and Idoc.

You need to set the Partner Profiles for the outbound..

you can use basic type INVOIC01 and message type INVOIC.

Rgds,

Chandra.

Read only

0 Likes
759

Hi,

When you say invoice, do you mean customer invoice ( billing document).

There are multiple solutions

<b>Solution:- 1</b>

<b>----


</b>

If you want to send billing document then you can use the IDOC INVOICE02. For this you have to do followings ( <b>use this option only if the company is using any middleware" )</b>

1. Create a RFC destination - <b>T.code SM59</b>.

2. Create Port - <b>T.code WE21</b>

3. Create partner profile - <b>T.code WE20</b>

value to be entered on the first screen when you create partner profile

- Create a partner profile under partner type 'KU' ( customer )

- Message type = 'I<b>NVOIC</b>"

- receiver port --> give the port name you create in step-2 above

- packet size = "1"

- Output mode - "Transfer idoc immediately"

- IDOC type - Basic type --> "<b>INVOIC02</b>"

value to be entered on tab " message control" while creating partner profile

- Application --> " V3 "

- Message type -->"the message type(output type) you use in billing doc"

- Process code --> 'SD09"

4. setup a "output control" for billing document - <b>T.code " NACE "</b>

- Setup the message type such that, it triggers idoc as soon as you save billing doc.

In this case, the middleware has to store the idoc during the day. At the end of the day ( whenever you want idocs to send to you partner), middleware format data from all the IDOCs in the format acceptable by your partner and send it to them.

<b>Solution:- 2</b>

<b>----


</b>

The other solution is to use file base interface. In this case you will have to write a custom program. This program will be schedule to run at end of the day. In this program, you will have to pull the data required by your partner from SAP tables for the billing documents created on that date. Then format the data as per format set by your partner.

Then you have to drop that file in the server accessed by your partner. For further detail look for "OPEN DATA SET" command in SAP

You can also consider FTP approach to send the file to partner.

Let me know if you need further information.

Regards,

RS

Read only

former_member194669
Active Contributor
0 Likes
759

,

I think for you requirement simple flat is okay.

This triggering this interface on specified time can done done thru program scheduing

if you have access to specific directory , then using "open data set" you can write the file directly into this directory, and other system can read file from this directory,

or

You can consider FTP Process.

Check Function Group: SFTP for FM's related to the same.

aRs

Read only

Former Member
0 Likes
759

Hi RS

I will implement your Solution #2

That solution is perfect for my scenario

Can you forward me to resources on how to implement this. I have not done this before and any help will be greatly appreciated.

Thank you