FTP Adapter to Flat File - preventing blank lines
Hi,
I have the following D3L file, which I use to create a file of employee details:
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE message SYSTEM "d3l.dtd">
<message name="employeeDetail" type="EmpRec" object="Employee">
<imparray id="AddressArrayType">
<struct>
<field name="EmpID">
<padstring length="8" padchar=" " padstyle="tail"/>
</field>
<field name="StreetName">
<padstring length="20" padchar=" " padstyle="tail"/>
</field>
<field name="EOL"><termstring endchar="\n" /></field>
</struct>
</imparray>
<imparray id="SalArrayType">
<struct>
<field name="EmpID">
<padstring length="8" padchar=" " padstyle="tail"/>
</field>
<field name="Salary">
<padstring length="10" padchar=" " padstyle="tail"/>
</field>
<field name="EOL"><termstring endchar="\n" /></field>
</struct>
</imparray>
<imparray id="EmpArrayType">
<struct>
<field name="EmpAddrArray"> <typeref type="AddressArrayType" /> </field>
<field name="EmpSalArray"> <typeref type="SalArrayType" /> </field>
</struct>
</imparray>
<struct id="EmpRec">
<field name="EmpArray"> <typeref type="EmpArrayType" /> </field>
</struct>
</message>
Basically, an employee can have multiple address entries, and multiple salary entries, and there are multiple employees.
The file produced is what I require, except where an employee has no address, but has a salary, or no salary, but has an address. In these cases, I get a blank line.
How do I prevent a blank line appearing - by changing the D3L file, or by doing a conditional copy when I map from common view to application view?
Anyone help? Thanks.
Hi Soumya,
You need to choose the FTP in the "transport protocol" option. Then in the FTP connection parameters choose the option Connection Security and assign the value "FTPS for control and Data Connection". Then the "Command Order" will show up below that option and you could leave the default value itself. If you are using Public private key certificates of X.509 then you could choose the option "Use x.509 certificate for client authentication" and assign the values to the "keystore" and "certificate & private key" fields.
Note: To use the FTP with SSL you need to add the CA certificate to the TrustedCAs keystore view.
Regards,
Vishnu.
Similar Messages
-
OSB error while generating business service for FTP adapter Sync Get File
Hi All
I am trying to generate a business service from SOA Suite JCA FTP adapter Sync Get File, but i am getting this exception for no reasons (Rest operations list file, get file and put file are working)
Invalid JCA transport endpoint configuration, exception: java.lang.NullPointerException Unknown ALSB Conflict.
Is this a bug in eclipse, can any body help me. Thanks
Sorry Forgot to mention eclipse version...
Eclipse Platform
Version: 3.6.2
Build id: M20110210-1200Ok,
bcoz of this issue, i had to code the entire interface in OSB console. It runs fine in OSB console (i was able to test it successfully).
Is this a bug in eclipse or only i am facing this issue? Has anybody tried to create a business service from JCA FTP Get Synchronous jca file?
<adapter-config name="FTPReadMOMFileOnRMSDB" adapter="FTP Adapter"
wsdlLocation="../wsdl/FTPReadMOMFileOnRMSDB.wsdl"
xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/ftp/RMSDBFtpAdapter" />
<endpoint-interaction portType="SynchRead_ptt"
operation="SynchRead">
<interaction-spec
className="oracle.tip.adapter.ftp.outbound.FTPReadInteractionSpec">
<property name="DeleteFile" value="true" />
<property name="PhysicalDirectory" value="/MOMFiles/output" />
<property name="FileName" value="*" />
<property name="FileType" value="binary" />
</interaction-spec>
</endpoint-interaction>
</adapter-config>
One more doubt? The PhysicalArchiveDirectory path can be on the FTP server something like: /MOMFiles/archive. Or do i have to use the Put operation to move it to /MOMFiles/archive directory. Currently OSB console and eclipse do not accept FTP path for this parameter and want me to specify a local directory on server. Thanks -
Prevent Blank Lines at Top of Column
So I create bi-weekly publications and I had a question that would make my job easer.
I've been messing with widow & orphans, but I have a slightly different problem.
We use hard returns between paragraphs (a blank line between paragraphs), and I was wondering if there was a way to use GREP or something to automatically prevent blank lines from showing at the top of a column.
Right now, I have to delete & re-add returns throughout the editing process, which as you could guess, can get messy and easy to miss.
I'd like to have it where I don't have to do any of that on my own, so the blank lines would "hide" automatically if at the top of a column, but would return if things get shifted around.
Thoughts?
Thanks for the help.I'm an idiot, that makes way more sense.
Thank you for straightening me out.
To think of the months i've been living my life all wrong. . . . . .*puts hands in face*
. . . excuse me while I go rethink all of my life choices. -
File receiver : blank line at end of file
Dear friends,
we are using file receiver with file content conversion , tp : FTP
The file has a flat structure & fixed length (no delimiters) :
reordset parameters used- fieldFixedLengths
each record is in a different line, but at the end of the records a blank line is inserted.
(no endSeparator is used.)
Can you pls advise hot to get rid of this extra blank lineHi Datta,
I am not sure but you can try with follwing parameters...
NameA.fixedLengthTooShortHandling Specify how you want the system to respond when column widths in the actual document exceed those defined in NameA.fieldFixedLengths. The following values are permitted:
· Error
Error means that processing of the document is terminated.
· Cut
Cut means that a value is shortened to the maximum permitted length.
· Ignore
Ignore means that the system applies the value completely, regardless of it being too long. Subsequent columns are moved correspondingly.
U can use ignore in your case.
For more info. plz check
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
Regards
Sachin -
FTP Adapter get complete files question
I'm using the FTP Adapter to poll for incoming files. I'm concerned that it may be possible for the FTP adapter to find a file whilst it's still being written, and therefore load an incomplete file. Does anyone know if the FTP adapter has any built in mechanism to prevent this happening, or do I need to explicitly work around this situation?
Problem solved - I've just found the 'Minimum File Age' parameter on the FTP Adapter wizard.
-
Output csv file with blank line
Hi Fellow PI friend,
I encountered 1 problem where my output csv file always come with 2 blank lines after data line record. Can someone give me some advise or tip how to solve it?
Thanks in advance.Hi ,
Check if this link throws some light on your issue:
Junk character at end of file from sender adapter creating a blank record
Regards,
Ravi -
Not able to display flat file's error line in output
The below Source Code is BDC for XD01 (update Customer Master Record) in CALL TRANSACTION method. This program is written in call transaction method cause as per users requirement, user wants error log to be printed as soon as the BDC process finished in the background mode.
When you execute this below program it will show a selection screen from where you can select your flat file from system.
After executing this code show output like below as soon as it finished processing the FLAT file.
1. Customer Update Summary
2. Successful record with customer number and name.
3. Error Records with 'record number' and 'reason for error'
(For testing you just have to copy-paste-save-active the source code)
And I have encountered an issue over here in 3rd section-Record Number of Error Records.
The Record Number is for display the line number of that flat file line which in which error has occurred.
The Record Number Entries showing only 0 instead of showing line number of error entry .
I have used Function Module FORMAT_MESSAGE to capture the errors. But not able to display line number of that flat file which is containing error.
So please suggest me what changes I should make in below source code to get proper output.
Flat file for your R&D
1000 1000 10 10 0001 Company Chobey & Group1N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
1000 1000 10 10 0001 Company Chobey & Group2N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
1000 1000 10 10 0001 Company Chobey & Group3N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS . A 10 1
1000 1000 10 10 0001 Company Chobey & Group4N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A .. 1
1000 1000 10 10 0001 Company Chobey & Group5N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
And Source Code
*& Report Z_TEST_SAI *
REPORT Z_TEST_SAI no standard page heading line-size 255.
TYPES: BEGIN OF t_cust,
bukrs like rf02d-bukrs,
vkorg like rf02d-vkorg,
vtweg like rf02d-vtweg,
spart like rf02d-spart,
ktokd like rf02d-ktokd,
anred like kna1-anred,
name1 like kna1-name1,
sortl like kna1-sortl,
name2 like kna1-name2,
name3 like kna1-name3,
name4 like kna1-name4,
stras like kna1-stras,
pfach like kna1-pfach,
ort01 like kna1-ort01,
pstlz like kna1-pstlz,
ort02 like kna1-ort02,
pfort like kna1-pfort,
pstl2 like kna1-pstl2,
land1 like kna1-land1,
regio like kna1-regio,
telx1 like kna1-telx1,
telf1 like kna1-telf1,
telfx like kna1-telfx,
telf2 like kna1-telf2,
teltx like kna1-teltx,
stceg like kna1-stceg,
cityc like kna1-cityc,
lzone like kna1-lzone,
niels like kna1-niels,
kukla like kna1-kukla,
akont like knb1-akont,
fdgrv like knb1-fdgrv,
vzskz like knb1-vzskz,
zterm like knb1-zterm,
vkbur like knvv-vkbur,
versg like knvv-versg,
vsbed like knvv-vsbed,
ktgrd like knvv-ktgrd,
taxkd like knvi-taxkd,
END OF t_cust.
TYPES: BEGIN OF t_sucrec,
cnum TYPE kna1-kunnr, "Customer Number
cnam TYPE kna1-name1, "Customer Name
END OF t_sucrec.
TYPES: BEGIN OF t_errrec,
* lineno TYPE i, "Line Number
lineno TYPE string,
message TYPE string, "Error Message
END OF t_errrec.
DATA: v_file TYPE string, "Variable for storing flat file
it_cust TYPE STANDARD TABLE OF t_cust, "Internal table of Customer
wa_cust LIKE LINE OF it_cust, "Workarea of Internal table it_cust
it_sucrec TYPE STANDARD TABLE OF t_sucrec, "Internal table of Success records
wa_sucrec LIKE LINE OF it_sucrec, "Workarea of Internal table it_sucrec
it_errrec TYPE STANDARD TABLE OF t_errrec,
wa_errrec LIKE LINE OF it_errrec,
it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE, "Internal table structure of BDCDATA
it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE, "Tracing Error Messages
v_date LIKE sy-datum, "Controlling of session date
v_index LIKE sy-index, "Index Number
v_totrec TYPE i, "Total Records
v_errrec TYPE i, "Error Records
v_sucrec TYPE i, "Success Records
v_sesschk TYPE c. "Session maintenance
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO INTERVALS.
PARAMETERS: p_file TYPE rlgrap-filename. "rlgrap-filename is a predefined structure
SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO INTERVALS.
PARAMETERS: p_mode LIKE ctu_params-dismode DEFAULT 'N',
p_update LIKE ctu_params-updmode DEFAULT 'A'.
SELECTION-SCREEN END OF BLOCK blk2.
*& INITIALIZATION
INITIALIZATION.
v_date = sy-datum - 1.
*& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_file.
*& START-OF-SELECTION
START-OF-SELECTION.
v_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = it_cust
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc = 0.
*MESSAGE ID sy-msgid
*TYPE sy-msgty
*NUMBER sy-msgno
*WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*& END-OF-SELECTION
END-OF-SELECTION.
v_index = sy-index.
LOOP AT it_cust INTO wa_cust.
perform bdc_dynpro using 'SAPMF02D' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-BUKRS'
wa_cust-bukrs.
perform bdc_field using 'RF02D-VKORG'
wa_cust-vkorg.
perform bdc_field using 'RF02D-VTWEG'
wa_cust-vtweg.
perform bdc_field using 'RF02D-SPART'
wa_cust-spart.
perform bdc_field using 'RF02D-KTOKD'
wa_cust-ktokd.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-TELTX'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-ANRED'
wa_cust-anred.
perform bdc_field using 'KNA1-NAME1'
wa_cust-name1.
perform bdc_field using 'KNA1-SORTL'
wa_cust-sortl.
perform bdc_field using 'KNA1-NAME2'
wa_cust-name2.
perform bdc_field using 'KNA1-NAME3'
wa_cust-name3.
perform bdc_field using 'KNA1-NAME4'
wa_cust-name4.
perform bdc_field using 'KNA1-STRAS'
wa_cust-stras.
perform bdc_field using 'KNA1-PFACH'
wa_cust-pfach.
perform bdc_field using 'KNA1-ORT01'
wa_cust-ort01.
perform bdc_field using 'KNA1-PSTLZ'
wa_cust-pstlz.
perform bdc_field using 'KNA1-ORT02'
wa_cust-ort02.
perform bdc_field using 'KNA1-PFORT'
wa_cust-pfort.
perform bdc_field using 'KNA1-PSTL2'
wa_cust-pstl2.
perform bdc_field using 'KNA1-LAND1'
wa_cust-land1.
perform bdc_field using 'KNA1-REGIO'
wa_cust-regio.
perform bdc_field using 'KNA1-SPRAS'
'EN'.
perform bdc_field using 'KNA1-TELX1'
wa_cust-telx1.
perform bdc_field using 'KNA1-TELF1'
wa_cust-telf1.
perform bdc_field using 'KNA1-TELFX'
wa_cust-telfx.
perform bdc_field using 'KNA1-TELF2'
wa_cust-telf2.
perform bdc_field using 'KNA1-TELTX'
wa_cust-teltx.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-CITYC'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-STCEG'
wa_cust-stceg.
perform bdc_field using 'KNA1-CITYC'
wa_cust-cityc.
perform bdc_field using 'KNA1-LZONE'
wa_cust-lzone.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-KUKLA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-NIELS'
wa_cust-niels.
perform bdc_field using 'KNA1-KUKLA'
wa_cust-kukla.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VZSKZ'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-AKONT'
wa_cust-akont.
perform bdc_field using 'KNB1-FDGRV'
wa_cust-fdgrv.
perform bdc_field using 'KNB1-VZSKZ'
wa_cust-vzskz.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-ZTERM'
wa_cust-zterm.
perform bdc_dynpro using 'SAPMF02D' '0220'.
perform bdc_field using 'BDC_CURSOR'
'KNB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0230'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VRSNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0610'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-AWAHR'
'100'.
perform bdc_field using 'KNVV-VKBUR'
wa_cust-vkbur.
perform bdc_field using 'KNVV-WAERS'
'INR'.
perform bdc_field using 'KNVV-KALKS'
'1'.
perform bdc_field using 'KNVV-VERSG'
wa_cust-versg.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VSBED'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-LPRIO'
perform bdc_field using 'KNVV-KZAZU'
'X'.
perform bdc_field using 'KNVV-VSBED'
wa_cust-vsbed.
perform bdc_field using 'KNVV-ANTLF'
'9'.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-KTGRD'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BOKRE'
'X'.
perform bdc_field using 'KNVV-KTGRD'
wa_cust-ktgrd.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'KNVI-TAXKD(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVI-TAXKD(01)'
wa_cust-taxkd.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
CALL TRANSACTION 'XD01' USING it_bdctab
MODE p_mode
UPDATE p_update
MESSAGES INTO it_messagetab.
IF sy-subrc = 0.
*& reading success records to corresponding internal table
READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
IF sy-subrc = 0.
wa_sucrec-cnum = it_messagetab-msgv1.
wa_sucrec-cnam = wa_cust-name1.
APPEND wa_sucrec TO it_sucrec.
CLEAR wa_sucrec.
ENDIF.
ELSE.
*& reading error records to corresponding internal table
READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
no = it_messagetab-msgnr
v1 = it_messagetab-msgv1
v2 = it_messagetab-msgv2
v3 = it_messagetab-msgv3
v4 = it_messagetab-msgv4
IMPORTING
msg = wa_errrec-message.
wa_errrec-lineno = v_index.
*******wa_errrec-lineno = v_index.
*******wa_errrec-message = it_messagetab-msgv1.
APPEND wa_errrec TO it_errrec.
CLEAR wa_errrec.
ENDIF.
ENDIF.
CLEAR : it_bdctab, it_messagetab.
REFRESH: it_bdctab, it_messagetab.
ENDLOOP.
DESCRIBE TABLE it_cust LINES v_totrec.
DESCRIBE TABLE it_errrec LINES v_errrec.
DESCRIBE TABLE it_sucrec LINES v_sucrec.
PERFORM disp_data.
SKIP 2.
IF v_sucrec > 0.
PERFORM disp_success_data.
ENDIF.
SKIP 2.
IF v_errrec > 0.
PERFORM disp_error_data.
ENDIF.
*& Form bdc_dynpro
*# text
*# -->P_0104 text
*# -->P_0105 text
FORM bdc_dynpro USING program
dynpro.
CLEAR it_bdctab.
it_bdctab-program = program.
it_bdctab-dynpro = dynpro.
it_bdctab-dynbegin = 'X'.
APPEND it_bdctab.
ENDFORM. " bdc_dynpro
*& Form bdc_field
*# text
*# -->P_0109 text
*# -->P_IT_cust_LIFNR text
FORM bdc_field USING fnam
fval.
CLEAR it_bdctab.
it_bdctab-fnam = fnam.
it_bdctab-fval = fval.
APPEND it_bdctab.
ENDFORM. " bdc_field
*& Form disp_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_data .
ULINE (45).
WRITE : / sy-vline,
12 'FAMD CUSTOMER UPDATE SUMMARY'(004) COLOR 1,
45 sy-vline.
ULINE /(45).
WRITE : / sy-vline,
'Total Records Processed'(007),
28 '=',
30 v_totrec,
45 sy-vline,
/ sy-vline,
'Error Records'(005),
28 '=',
30 v_errrec,
45 sy-vline,
/ sy-vline,
'Successful Records'(006),
28 '=',
30 v_sucrec,
45 sy-vline.
ULINE /(45).
ENDFORM. " disp_data
*& Form disp_success_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_success_data .
ULINE (45).
WRITE : / sy-vline,
14 'Successful Records'(012) COLOR 1,
45 sy-vline.
ULINE /(45).
WRITE : / sy-vline ,
'Customer Number'(010) COLOR 2,
17 sy-vline,
25 'Customer Name'(011) COLOR 2,
45 sy-vline.
ULINE /(45).
LOOP AT it_sucrec INTO wa_sucrec.
WRITE: / sy-vline ,
wa_sucrec-cnum,
17 sy-vline,
19 wa_sucrec-cnam,
45 sy-vline.
ENDLOOP.
ULINE /(45).
ENDFORM. " disp_success_data
*& Form disp_error_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_error_data .
ULINE (85).
WRITE : / sy-vline,
35 'Error Records'(013) COLOR 1,
85 sy-vline.
ULINE /(85).
WRITE : / sy-vline,
'Record Number'(008) COLOR 2,
sy-vline,
37 'Reason for error'(009) COLOR 2,
85 sy-vline.
ULINE /(85).
LOOP AT it_errrec INTO wa_errrec.
WRITE : / sy-vline,
wa_errrec-lineno,
17 sy-vline,
wa_errrec-message,
85 sy-vline.
ENDLOOP.
ULINE /(85).
ENDFORM. " disp_error_dataWorked out n found the solution
-
FTP Adapter pickup the file meanwhile the file is transfering
Hello,
we have a follow problem: We transfer some big files manually in a ftp directory. If the adapter connect the directory concurrent as we transfer the file, he'll pick up the incomplete file and processed this. The problem is now, we get an error message in XI Monitoring. After this, we put the file form archive directory (same server) in the "normal" directory and the ftp adapter pick up the file, all is okay. My question is: It is possible, you can create a check or a parameter setting, if the file is complete transferred, first then could start the ftp adapter.
Remark: We increase and decrease the polling parameter and we're teseted with changing the paramter connect mode, without success.
Thanks for your help.Hi,
You can execute a shell script to change the file name of the completed file . So the job of script is to rename the complete file.And then give this file name in the File Adapter configuration.
Did you check the option of Read-Only Files ( if you are using NFS protocol) ? If so uncheck and try it..
Regards,
Moorthy -
FTP Adapter batching multiple files in one send
Hello,
I'd like to set up a process in XI to allow me to group all files into one batch message and send the group all in one send every thirty minutes. This is an FTP adapter.
Do I need to work through a BPM to do this? Is there a good blog or forum topic on this?
Thanks,
MattThat is exactly what I was looking for. Thanks.
I will test with the BPM and if the performance becomes and issue I will try your suggestions.
Thanks,
Matt -
Sender FTP Adapter - Archive faulty files not working
Hello,
We are on SAP PI 7.11 SP 06
We have a scenario where we are reading CSV files from a FTP location.
File Sender Adapter is polling the FTP location for CSV files, if there
is any error during FCC we need to move the faulty file under a
particular directory on FTP server.
Archive faulty files tick is click under the communication channel and
also the required directory is specified, but the functionality is not
working.
If there is a faulty file it is just adding a rejected prefix to the
file and keeping the file in the polling directory. It is not moving
the file in the rejected directory specified in the communication
channel.
Thanks & Regards,
Rahul NawaleAre you trying to archive the file on the same FTP server or a different FTP server? Archiving the faulty file on the FTP server might not have expected results. And if you are trying to archive the file on a separate FTP server, it wouldn't probably be achieved using the simple file adapter functionalities.
The best way would be to archive the faulty files to an NFS location on your PI server (this will certainly work, even if it's FTP mode) and then use a separate script or PI interface (file tunneling) to move these files from PI server File System to FTP archive location.
Regards,
Suddhasatta -
Hi
I trying to get files from a remote FTP server
but the FTP adapter configured is not able to pick up files from the remote folder
using
soa 11.1.1.3
filezilla as FTP server
+<Sep 5, 2011 5:32:56 PM GMT+05:30> <Error> <oracle.soa.b2b.transport> <BEA-00000+
+0> <[IPT_FileRecMonitorError] Error in ftp or file receiver monitor.>+
FINE: Ftp Adapter FTPManagedConnectionFactory::getPasswordCredential using mcf
for credentials
FINE: Ftp Adapter Managed Connection Created
FINE: Ftp Adapter Adding Event Listener
FINE: Ftp Adapter Connection Created
+FINE: Ftp Adapter Using locale=[null] for ftp server+
+FINE: Ftp Adapter FtpTimestampParserImpl::parseTimestamp returned [Wed Aug 31 1+
+9:40:00 GMT+05:30 2011] for [Aug 31 19:40], time offset=[0]+
+FINE: Ftp Adapter Using locale=[null] for ftp server+
+FINE: Ftp Adapter FtpTimestampParserImpl::parseTimestamp returned [Fri Sep 02 1+
+8:23:00 GMT+05:30 2011] for [Sep 02 18:23], time offset=[0]+
+FINE: Ftp Adapter Using locale=[null] for ftp server+
+FINE: Ftp Adapter FtpTimestampParserImpl::parseTimestamp returned [Fri Sep 02 1+
+8:33:00 GMT+05:30 2011] for [Sep 02 18:33], time offset=[0]+
+FINE: Ftp Adapter Using locale=[null] for ftp server+
+FINE: Ftp Adapter FtpTimestampParserImpl::parseTimestamp returned [Mon Sep 05 1+
+3:13:00 GMT+05:30 2011] for [Sep 05 13:13], time offset=[0]+
+FINE: Ftp Adapter Using locale=[null] for ftp server+
+FINE: Ftp Adapter FtpTimestampParserImpl::parseTimestamp returned [Mon Sep 05 1+
+3:45:00 GMT+05:30 2011] for [Sep 05 13:45], time offset=[0]+
FINE: Ftp Adapter Sending event: 1 with: oracle.tip.adapter.ftp.FTPConnection@8
+68852+
can someone help me on this
-Regards
adiKsystimeHey Naresh
thanks for your earlier reply
but I have no luck yet
soa_server logs show
FINE: Ftp Adapter Clearing Event Listeners
FINE: Ftp Adapter FTPManagedConnectionFactory::getPasswordCredential using apps
erver credentials
FINE: Ftp Adapter Managed Connection Created
FINE: Ftp Adapter Adding Event Listener
FINE: Ftp Adapter Connection Created
FINE: Ftp Adapter Sending event: 1 with: oracle.tip.adapter.ftp.FTPConnection@1
+47dc09+
FINE: Ftp Adapter The candidate set size in matchManagedConnection [1]
FINE: Ftp Adapter FTPManagedConnectionFactory::getPasswordCredential using apps
erver credentials
FINE: Ftp Adapter Connection Created
FINE: Ftp Adapter Sending event: 1 with: oracle.tip.adapter.ftp.FTPConnection@1
d469b0
FINE: Ftp Adapter The candidate set size in matchManagedConnection [1]
FINE: Ftp Adapter FTPManagedConnectionFactory::getPasswordCredential using apps
erver credentials
FINE: Ftp Adapter Connection Created
FINE: Ftp Adapter Sending event: 1 with: oracle.tip.adapter.ftp.FTPConnection@1
+040f85+
FINE: Ftp Adapter FTPManagedConnection::destroy called, closing physical socket
and No luck yet in picking up the remote files
regards
adiKsystime -
10.1.3.4 - FTP adapter error while file get
I created an esb service that reads from a remote server and processes the file locally. It works fine in dev. When I migrated my esb flow to a test environment it is now throwing some error.
<AdapterFramework::Inbound> Adapter Framework instance: OraESB - successfully completed endpointActivation for portType=Get_ptt, operation=Get
<FTP Adapter::Inbound> Connection Created
<FTP Adapter::Inbound> Unable to list files from '/apps/EDI/Archive/OutBound/Customer' directory on 'corpapp10' server; FTP command[NLST] returned unexpected reply code : 550
<FTP Adapter::Inbound> Poller raising Alert for exception : ORABPEL-11430
Error in listing files in the remote directory.
Unable to list file in remote directory.
Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
The dev remote server and the test remote server are different. I have done the obvious checks about server name, permissions, directory names etc. I can login to the server using windows ftp however when I go the inbound directory and type in ls, i get the following error - 550 Arguments too long. I have some 37000 files in the directory. ls -l works fine.
I switched the ftp adapter to poll a different directory which only has 1 file, but it still gives the same error. However in this case, the windows ftp is able to list the files using ls command.
any idea how i can make this work ?i undeployed the esb project and deploying it again. Now even worse, nothing happens now. It has stopped polling at all. I just see the following message in the opmn.log, but none of the files get picked up.
<FTP Adapter::Inbound> Connection Created
<FTP Adapter::Inbound> Connection Created
<FTP Adapter::Inbound> Connection Created
To be sure, I deployed it to another environment (DEV) and it works ok there. -
Sender Idoc_AAE Adapter for flat file format
I have been given to develop a Scenario where in an Idoc in a flat file (.txt) format needs to be sent from ECC system to a Bank SFTP server . NO ESR objects are involved ,just pick and place .Kindly Explain the configuration on the Sender Idoc_AAE Adapter .
Hi Srinath,
Please refer the below blogs for IDOC_AAE configuration
How to create and configure Sender Idoc AAE Scenario - PI 7.3
refer the below blog for IDOC to file scenario (with IDOC_AAE)
IDOC_AAE To File with all Configurations
to convert IDOC XML to IDOC flat you need to create JCA in NWA. Please refer the below blog
Converting IDoc XML to Flat File and Vice-Versa
regards,
Harish -
Configuring FTP adapter using .ppk file
Hi:
I am trying to configure FTP adapter in Weblogic for making a secured connection. My destination system provided a .ppk file, username and password to make a connection. I tried using both the Authentication Type PASSWORD as well as PUBLICKEY, but in both cases i am getting this error
<part name="summary">
<summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'FileListing' failed due to: JCA Binding Component connection issue. JCA Binding Component is unable to create an outbound JCA (CCI) connection. FileConsumer:FTP_ListFiles_out [ FileListing_ptt::FileListing(Empty,filelist) ] : The JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue: Error in establishing a session with SSH Server.. Error in establishing a session with SSH Server.. Unable to establish a session with the server. Please ensure hostname and port specified to login to the server are correct. Please make sure that the JCA connection factory and any dependent connection factories have been configured with a sufficient limit for max connections. Please also make sure that the physical connection to the backend EIS is available and the backend itself is accepting connections. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary>
</part>
<part name="detail">
<detail>Too many authentication failures for testuser</detail>
And in SOA logs i am getting this below error
####<Apr 30, 2013 1:46:05 AM EDT> <Warning> <Connector> <[email protected]> <soa_server1> <orabpel.invoke.pool-4.thread-3> <<anonymous>> <BEA1-4A34E1F57560E2DF58E4> <43b21ccaefeebde3:1e7743d9:13dfccfff26:-8000-00000000008dee9f> <1367300765147> <BEA-190032> << eis/sftp/qwer > ResourceAllocationException thrown by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "BINDING.JCA-11447
Error in establishing a session with SSH Server..
Error in establishing a session with SSH Server..
Unable to establish a session with the server.
Please ensure hostname and port specified to login to the server are correct.
">
SOA Version: 11.1.1.6, Weblogic Version: 10.3.6
Regards
RKAs you suggested, you can write a custom adapter where you can do duplicate check, file move to duplicate directory and email notification.
But this is trying to cover many business processes under adapter functionality whose intend purpose is just to
work with a transport, speak the transmission protocol and
transfer the file.
Custom adapter:
But still you can do these functionalities in custom adapter.
For article, white papers and webcast for developing custom adapter refer this MSDN page:
Developing Adapters using the BizTalk Adapter Framework
You can still use BizTalk adapter wizard which gives you the template files including registry key required for registering the custom adapter. This may need Visual Studio
2005 to get the template project created. The export Visual Studio 2005 to your latest version to get the template for your latest version. And write your FTP library code in the placeholders.
Or refer the SDK for sample custom adapter and replace those custom functionalities to yours to make and update SDK samples work for you.
http://biztalkadapterwizard.codeplex.com/releases/view/3892
No to custom pipeline:
Your functionalities are not meant for custom pipeline processing. Pipelines are meant for preparing the received message for further processing or preparing the message/file to be sent out. Custom pipeline is not the correct place to write
your functionalities.
Try to isolate the functionalities and handle it different modules and don’t pack everything in custom adapter. For example, you can just use custom adapter
to FTP the file, if it’s a duplicate file transfer the file to different folder location. You can (or ask the team who own the FTP server) to send an email if the duplicate folder receives a file. This would improve the performance of the adapter.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
FTP adapter should take file path and name at runtime..
Hello All,
I have requirement of getting the file from remote machine into local machine..thinking FTP adapter should help me to do this..
I dont need to poll the remote directory. rather I will pass the exact path and name of the file to be fetched during runtime as an input to the bpel process.
How to configure the FTP Adapter to receive the file path runtiime and gets it to local machine.
Is it doable using ftp adapter..?
Thanks
SaikrishnaHello Anne,
Thank you for the help.
I am not able to call a adapter partner link using invoke activity..I am facing variable type conflicts.
modified the
OutboundFtpHeaderType wsdl to take file name and directory as:
<complexType>
<sequence>
<element name="*fileName*" type="string"/>
<element name="*directory*" type="string"/>
</sequence>
</complexType>
Using Adapters tab of Invoke activity created a variable:
<variable name="outputVariable"
messageType="client:FTPadapterResponseMessage"/>
<variable name="*filePath*" messageType="ns2:OutboundHeader_msg"/>
Using Assign Activity, assigned the input varibales to the ftp outboundHeader variable:
<assign name="Assign_1">
<copy>
<from variable="inputVariable" part="payload"
query="/client:FTPadapterProcessRequest/client:*directory*"/>
<to variable="*filePath*" part="outboundHeader"
query="/ns2:OutboundFTPHeaderType/ns2:directory"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/client:FTPadapterProcessRequest/client:*filename*"/>
<to variable="*filePath*" part="outboundHeader"
query="/ns2:OutboundFTPHeaderType/ns2:fileName"/>
</copy>
</assign>
Used the created variable in the invoke activity as a input paramater to the partner link:
<invoke name="Invoke_1" partnerLink="ftpAdapterTest"
portType="ns1:SynchRead_ptt" operation="SynchRead"
inputVariable="*filePath*" bpelx:inputHeaderVariable="filePath"/>
<reply name="replyOutput" partnerLink="client" portType="client:FTPadapter"
operation="process" variable="outputVariable"/>
I am getting an error in invoke activity:
Variable type does not match the input type.
Thanks
Saikrishna
Maybe you are looking for
-
Partner profile to send Idoc to PI 7.4 system from ECC
Dear Experts , Do we need a partner profile to send Idoc to PI 7.4 system from ECC. or Just Port on TRFC is enough ..? if i need to create a Partner profile ...how to define a logical system and how Assign Logical System to Client... when there is no
-
I am trying to use Face Time in my new MacBook Pro, but it says that the camera is not connected. Can anyone help?
-
2.1 firmware update displays incorrect battery meter
After installing firmware 2.1 on my iphone I started noticing my battery meter displaying the incorrect charge level. I charged it in full yesterday, and this morning I still had more than half the battery meter. I checked 10 minutes later and the me
-
Applet tag and Object tag.
Hi All, My application is hanging which is using Applet.I have specied in IE settings to use Sun's JVM[plug in].Applet tag is now depricated they [W3c] recommend to use Object tag for IE.Is my problem somewhere related to this?what difference does it
-
Pause key not working whilst recording a video demo.
Hello, The title says it all really. I've set the pause key to various different keys and have then pressed them whilst recording a video demo with narration. On video playback, it is clear that the video recording was not paused at any point. What i