cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter File to File using ID

Former Member
0 Kudos

Hi Experts,

I started learning PI. How to upload the sender file in Xi system?

Regards,

SK.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
  • the below code is to download the data from the internal table of the application to a file in the application server. u can change the code and make that it will read the file from specified location and copy in the appliaction server*

REPORT ZDOWNLOAD_APPL_DEMO.TYPES : BEGIN OF ST_DEMO,

REG_NO(10) TYPE C,

NAME(20) TYPE C,

ADDR(20) TYPE C,

END OF ST_DEMO.DATA : WA_DEMO TYPE ST_DEMO,

IT_DEMO TYPE TABLE OF ST_DEMO,

L_FNAME TYPE STRING .PARAMETERS: P_FNAME(128) TYPE C DEFAULT '\usr\sap\SRI\SYS\src\DOWN.TXT' OBLIGATORY.

L_FNAME = P_FNAME.

WA_DEMO-REG_NO = '100001'.

WA_DEMO-NAME = 'ANAND'.

WA_DEMO-ADDR = 'NAGARKOVIL'.

APPEND WA_DEMO TO IT_DEMO.WA_DEMO-REG_NO = '100002'.

WA_DEMO-NAME = 'VIKRAM'.

WA_DEMO-ADDR = 'CHENNAI'.

APPEND WA_DEMO TO IT_DEMO. OPEN DATASET L_FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

WRITE :5 'REG NUM',16 'NAME',37 'ADDRESS' .

LOOP AT IT_DEMO INTO WA_DEMO.

IF SY-SUBRC = 0.

TRANSFER WA_DEMO TO L_FNAME.

WRITE :/5 WA_DEMO-REG_NO,16 WA_DEMO-NAME,37 WA_DEMO-ADDR.

ENDIF.

ENDLOOP.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks.

Former Member
0 Kudos

How to place a file in SAP directory (AL11) in Xi system? Will there be any direct transaction code or should we create a program to do that?

Regards,

SK.

prateek
Active Contributor
0 Kudos

AL11 is itself a transaction. You may place place in any directory in which you are authorized to do so.

Regards,

Prateek

prateek
Active Contributor
0 Kudos

May be using AL11. Or get access to your folder system and use some FTP client to connect to it to copy files.

Regards,

Prateek