cancel
Showing results for 
Search instead for 
Did you mean: 

File transfer to XI sever

Former Member
0 Kudos

Hi Experts ,

I have all the data in my internal table , now i have to place that data in the form of TEXT file and plcae it to the XI server.

Please let me know whta needs to be done to place the file in XI server.

thanks in advance..

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi Sweethu,

You need to use Proxy to File here. In this case it is an Outbound Proxy.

1. First of all in IR of XI, you need to create Data Type, Message Type and Interface Type

for Sender Stucture.

For example, Data Type is 'DT_empdetails_OB', Message Type is 'MT_empdetails_OB' and

Interface Type is 'MI_empdetails_asyn_OB'.

2. Now go to transaction 'SPROXY' in XI Server and right click on Interface Type you have

created and select 'Create'. Provide details like Prefix and save.

Proxy class gets generated with name 'zpi_co_mi_empdetails_asyn_ob'.

You can also find Proxy Stucture, Table Type and Message Type in the Class for Proxy. First please go through those for better understanding.

3. Now go to transaction 'SE38' in ABAP and develop a report that sends data from proxy to

XI.

Find the code below.

After placing data in Internal Table, add the following code to the report.

DATA:

  • Proxy Structure

lw_empdetials_dt TYPE zpi_dt_empdetails_ob,

  • Proxy Table Type

li_empdetials_tab TYPE zpi_dt_empdetails_ob_tab,

  • Message Type

lw_empdetials_mt TYPE zpi_mt_empdetails_ob,

  • Proxy Class

l_empdetials TYPE REF TO zpi_co_mi_empdetials_asyn_ob,

  • Object instance for system exception

l_sys_exception TYPE REF TO cx_ai_system_fault.

  • Create instance of proxy class

TRY.

CREATE OBJECT l_swrdata.

CATCH cx_ai_system_fault INTO l_sys_exception.

MESSAGE S001 WITH l_sys_exception->errortext.

ENDTRY.

  • Refreshing Proxy Table

REFRESH li_empdetials_tab.

  • Refresing Proxy Structure and Message Type.

CLEAR : lw_empdetials_mt,

lw_empdetials_dt,

w_final.

  • Looping at Final Output internal Table i_final

LOOP AT i_final INTO w_final.

lw_empdetials_dt-empno = w_final-empno.

lw_empdetials_dt-empname = w_final-empname.

lw_empdetials_dt-dept = w_final-empdept.

  • Appending Proxy Structure to Proxy Table

APPEND lw_empdetials_dt TO li_empdetails_tab.

  • Assigning Proxy table data to Message Type

lw_empdetials_mt-mt_empdetails-records = li_empdetials_tab.

ENDLOOP.

  • If Message Type is Not Blank

IF lw_empdetials_mt IS NOT INITIAL.

TRY.

  • Calling METHOD mi_empdetials_asyn_ob for CLASS ZPI_CO_MI_empdetials_asyn_OB

CALL METHOD l_empdetials->mi_empdetials_asyn_ob

EXPORTING

  • Exporting Message Type to Class to Process Data to PI

output = lw_empdetials_mt.

  • Catching any Error Messages of Type cx_ai_system_fault.

CATCH cx_ai_system_fault INTO l_sys_exception.

MESSAGE S002 WITH l_sys_exception->errortext.

ENDTRY.

  • Committing Work

COMMIT WORK.

ENDIF.

  • Clearing Proxy Structure.

CLEAR lw_empdetails_dt.

  • Clearing Message Type

CLEAR lw_empdetails_mt.

  • Clearing Proxy Table

REFRESH li_empdetials_tab.

4. Now Create Message Mapping and Interface Mapping in IR.

5. Create Business Scenario in ID, import the Sender and Receiver Systems, create Receiver

Determination, Interface Determination and Receiver Agreement.

We don't have Sender Agreement. As we are using Proxy and Proxy directly communicates with

XI, no need of Communucation Channel and so no need of Sender Agreement.

Any clarifications, please let me know.

Regards,

Ravi Varma.

Former Member
0 Kudos

Hi,

I think what Swetha said is quite easy to do if u Know proxy

u said u have data in the internal table.

steps By steps

1.create IR Objects in Integration repository

2.Generate the ABAP proxy using trancastion SPROXY.

3.then write thet report program where u call the generated proxy class and the method asyn or synchronous according to ur scenario and export the internal table content to the export parameters of that method

for this to work u should have proxy configuration in place

Former Member
0 Kudos

Hi Prateek ,,

Can you explain a little more..if you give me step by step details that what needs to be done ,

to transfer the internal table data as text file to XI server ..

JoelTrinidade
Active Contributor
0 Kudos

Hi sweetu,

Prateeks solution is you best option among all listed over here. I need not repeat his words again but then tat would have been my answ to.

Regards

joel

Former Member
0 Kudos

Hi,

Use Proxy to file scenario. Create SE38 program, read the data you want to palce in the file and send the data to XI using proxy. IN PI/XI use file adapter to create the file and use FCC to convert the data in text format.

Regards,

Shweta.

Former Member
0 Kudos

Use the transaction SE38.

In case you need to create a File to file Scenario use the following blogs

[https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1312] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1345] [original link is broken] [original link is broken] [original link is broken];

madanmohan_agrawal
Contributor
0 Kudos

Please let me know whta needs to be done to place the file in XI server.

You can upload files on XI server via transaction SE38 (and use an ABAP program).

Regards,

Madan Agrawal

Former Member
0 Kudos

Hi,

If you just want to place the file in xi application server, you need to write a abap program which converts the table into text file and transfer the file into XI application server.

You need to write this program in XI backend system.

prateek
Active Contributor
0 Kudos

Are you intending to use file port at SAP system to save the text file? If yes, then you need to create a file to file scenario to place the file on XI server. At sender you may use FTP and at receiver you may use NFS protocol.

Regards,

Prateek