Flat File scenario-error
Hi All,
I am trying a Flat File 2 File Scenario ...
my input file is..
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MTYP_name xmlns:ns0="File_File">Mustafa</ns0:MTYP_name>
I am just doing simple mapping of single field, but I am getting the following error..
<SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
<SAP:P1>500</SAP:P1>
<SAP:P2>internal server error: com.sap.aii.messaging.mo.MalformedMessageException: Cannot find Main Header in XMBMessage - check the message version</SAP:P2>
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText><html> <head> <title>Transport Service Error</title> </head> <body> <h1>HTTP/1.0 500</h1> <h3>internal server error: com.sap.aii.messaging.mo.MalformedMessageException: Cannot find Main Header in XMBMessage - check the message version</h3> </body> </html></SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>HTTP response contains status code 500 with the description internal server error: com.sap.aii.messaging.mo.MalformedMessageException: Cannot find Main Header in XMBMessage - check the message version XML tag Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
What is the cause of this error and also how do I change the trace logging levels?
regards,
Mustafa
Hi Raj,
Iam sending the Inbound payload
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_DB2_S_FF xmlns:ns="http://gsll.com/DB2">
- <RSETSTRUCT>
<S1>A</S1>
<S2>A</S2>
<S3>A</S3>
</RSETSTRUCT>
- <RSETSTRUCT>
<S1>B</S1>
<S2>B</S2>
<S3>B</S3>
</RSETSTRUCT>
</ns:MT_DB2_S_FF>
regads,
Jeevan
Similar Messages
-
Reg error in flat file to flat file scenario
Hi techies,
Iam just starting working with XI scenarios.
In base flat file to flat file scenario which is mentioned in wiki.sdn
http://wiki.sdn.sap.com/wiki/display/XI/FLATFILETOFLATFILE
I had completed entire scenario. After generating sender file. Iam getting this error in runtime work bench.
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'CONTACTS.EMP.fieldFixedLengths' or 'CONTACTS.EMP.fieldSeparator' is missing
Please suggest how to resolve this error.
Thanks in advance,
Regards,
KiranHi,
From your error description,
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'CONTACTS.EMP.fieldFixedLengths' or 'CONTACTS.EMP.fieldSeparator' is missing
it is clear that you have missed out either or both the 2 parameters in receiver file adapter content conversion, namely EMP.fieldFixedLengths and EMP.fieldSeparator.
From the example that you followed, use the following values for the 2 parameteres is the output file is a comma separated file:
EMP.fieldFixedLengths: 8,10,10
EMP.fieldSeparator: ,
I have assumed that the lengths of the fields NAME,ADD,MOBILE are 8,10 and 10 respectively. Change them according to your requirement.
Use any other value in place of comma(,) in EMP.fieldSeparator according to the requirement.
Hope it helps you buddy!!!
Thanks
Biswajit
Edited by: 007biswa on Feb 22, 2011 9:25 AM
Edited by: 007biswa on Feb 22, 2011 9:28 AM -
IDOC-XI-FILE Scenario: Error in ABAP Mapping
Dear All,
I am working on IDOC-XI-Flat FIle scenario in which I am using ABAP Mapping as per document "How To Convert an IDoc-XML
structure to a flat file and vice versa in XI 3.0".
I created one customized Idoc for this. The Idoc is reacing XI but its flat file is not getting created. Its giving me following error:
<SAP:Stack>Error in mapping program Z_ABAP_MAPPING_PACKING_LIST (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
I have also gone thru threads posted for the same topic earlier but still I am not been to resolve this error.
Please help me out in resolving this error.
Regards,
N.JainHI,
Log saying that, u have problem in the mapping program.
i.e Z_ABAP_MAPPING_PACKING_LIST
the problem is due declaration of data.
i hope that, you have some methods.
those are declared under intialization section in mapping program.
please use start of selection before the method.
other wise, it will come under intilization section.
warm regards
mahesh. -
Flat File to Flat File scenario
Hi all,
I have a flat file to flat file scenario. I pick up a file in a specific format and produce a flat file in tab delimited format after some mapping.
Everything is ok. All the functionality is working perfectly. However, there is one small error. In case the source file is empty, there is an error message in SXMB_MONI (which is correct as there is no XML content) but I still need to generate an empty output file.
Is this possible ? Can I change something at the 'File Content Conversion' level ?
Any advise will be highly appreciated.
Thanks,
Freddy.Hi Freddy,
>>>Problem while determining receivers using interface mapping: Error while determining root tag of XML: BOM / charset detection failed.
The charset of the XML cannot be determined. That is written clearly in the message.
Is your XML belongs to UTF-16 or UTF-32? Then it needs a BOM which is missing.
Have a look at below link.
http://en.wikipedia.org/wiki/Byte-order_mark
Check, if there is an XML header and which charset is mentioned.
Regards,
P.Rajesh -
XML File to Flat File scenario: Reciver file adaptor content conversion
Hello Friends,
Currently I am working on XML File to Flat File Scenario.
I used receiver side File adaptor with content conversion.
My receiver side adaptor is giving error. Error is given below.
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
My content conversion parameters are as:
row.fieldNames Customer_ID,Name,Address,Phone
row.fieldSeparator ,
row.processConfiguration FromConfiguration
row.endSeparator 'nl'
Can you please suggest me what kind of error is this?
Regards,
NarendraStill I am facing below given issue.
2010-06-08 15:34:25 Error File adapter receiver channel CC_Customer_FlatFile_Distination is not initialized. Unable to proceed: null
2010-06-08 15:34:25 Error Exception caught by adapter framework: Channel has not been correctly initialized and cannot process messages -
How to test the RFC to Flat File scenario
Hi,
How to test the RFC to Flat File scenario
regards,
kiranHi,
After running the RFC it's going Dump.
this is the error message i got.
"Error analysis
An error occurred when executing a Remote Function Call.
"CPI-C error CM_RESOURCE_FAILURE_NO_RETRY"
Status of connection.... "CODE=CM_RESOURCE_FAILURE_NO_RETRY -1 -1 SAPCODE=666
CONV="
Internal error code.... "RFC_IO5"
There is an error in the communication system. To clarify
and resolve the error, contact your system administrator. " -
R/3 46C(IDOC) -- XI -- Flat file scenario
Hi
Is there anyone who could give me information on a R/3 46C(IDOC) --> XI --> Flat file scenario?
Many thanks!
br
GöranHi Manish
We are using a standard IDOC called PROACT.PROACT01
(We are using transaction sa38(Report RSMIPROACT) in R/3 to send our IDOC.)
First we create the technical and business systems in SLD
Second we transfer these to the repository.(I think the only thing you need to do is to update the SLD cache to get them there - Design : Integration builder --> Environment --> clear SLD cache)
Then we just use the configuration wizard(Configuration : Integration builder --> Tools --> configuration wizard) to map everything together - defining sender and receiver etc(You get the configuration wizard tool by patching XI to patch level 4 or 5).
I assume that you have made all the configurations accordingly to the XI configuration guide which you can download from the service marketplace.
This is just a hint but maybe it can give you a start.
br
Göran -
IDoc to Flat file scenario - abap mapping
Hi All,
I have to do some IDOC to Flat file scenarios. In Order to generate the file in required format I will have to add all segments(Nodes) of Idoc in FCC receiver. We also have other option of doing it through ABAP Mapping which I found in one blog.
Now my question is : Is it better way of doing it through FCC or ABAP Mapping?
Ofcourse from development point of view ABAP Mapping looks easier as FCC is very time consuming task.
Is there and performance issues in either of the approach?
Thanks and Regards,
AtulHi VJ and Harald,
Thanks for your replies.
I am not having PI7.1 however the given blog was very informative.
I will try using file port approach as suggested.
Thanks and Regards,
Atul -
Rfc to file scenario error in sm58
rfc to file scenario error in sm58
i get the error as com.sap.aii.afccommunication.RfcAfwException
:look up of alternativehey
>>i have a doubt do we have to use
starting new task or back ground destination
well it depends upon the logic ur gonna implement,both are used for async RFC so u have to see ur requirement and then decide.
have a look at the following
http://help.sap.com/saphelp_nw2004s/helpdata/en/22/042578488911d189490000e829fbbd/frameset.htm
thanx
ahmad -
Flat File Conversion Error: Unable to initialize communication channel
Dear experts.
I have a file to flat file scenario. I just wanted to test this first because it's the first time. I followed this blog: /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
I get this message: Channel has not been correctly initialized and cannot process messages. I looked around on the forum and in other blogs, and it seems something is wrong with my Content Conversion Parameters. Could you please advise?
The message is a small customer test message:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TEST xmlns:ns0="urn://xi/csr/customer">
<Customer_File>
<Customer>
<Name>xxx</Name>
<Last>xxxxxxxx</Last>
</Customer>
</Customer_File>
</ns0:MT_TEST>
The parameters I am using are:
Recordset structure: Customer_File,Customer
Customer.addHeaderLine: 0
Customer.fieldSeparator: #
Customer_File.fieldSeparator: 'nl'
Customer.endSeparator: 'nl'
The mapping I am using is one-to-one.
This is not working for me...
Furthermore, I would like to set the Name and Last tag to set field lengths. Is this possible for these tags??
Thanks in advance.
*Will reward points for helpful answershi
PLz try with the following steps:
chk the occurence of customer.
if the customer occurence is (0-------unbounded) then
ur recordset structure is Customerfile,Customer*
may helful.
THanks
MANas -
hi guys,
I am new to XI.am tryin to configure xml to flat file scenario.i have configured the scenario but the problem is am getting the flat file into my receiver system with no content..what might be the problem.pls do help me outHi,
Please find here with the required parameters for receiver end file to get it as flat file
Please refer below scenarios, this could be used as reference for your scenario
IDOC-XML to flat file
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
XML to Flat file conversion
XML to flat file conversion
File Receiver with Content Conversion
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Configuring the Receiver File/FTP Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
Please see the below links for file content conversion..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
File Content Conversion for Unequal Number of Columns
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
Content Conversion (Pattern/Random content in input file)
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
Thanks
Swarup -
Hi gurus,
I am trying to send IORDER01(pm order) from an R/3 system to a file, which works fine.
but when i try to use some business logic like if order type = 'PM01' then only i have to write to the file, using ccBPM, it fails...
this is my first BPM scenario and am having trouble....have read lot of blogs etc...can u please tell me where i am going wrong...
I have a data type DT_FILE for writing to the file.
I have interfaces:
si_oa_iorder(outbound asynchronous interface for file)
si_aa_iorder(abstract asynchronous interface for idoc)
si_aa_file( abstract asynchronous interface for file)
si_ia_file (inbound asynchronous interface for file)
I have message mapping MM_IORDER2FILE mapping IDoc to flat file structure
I have operation mapping OM_IORDER2FILE where I have mapped si_aa_iorder and si_aa_file
(( Is this right? are both abstract interfaces to be mapped? or do i need to create more mappings like si_oa_iorder to si_aa_iorder etc? please clarify...))
My IP is very simple with just a 'recv step' having container element of type si_aa_iorder and 'send step' having container element of type si_aa_file to start with..i haven't yet put the switch control etc...even such simple IP fails....
I have created Configuration objects like
Business System for file receiver
Business component for Idoc sender with adapter specific details set
Communication channels for Idoc and file adapters
No sender agreement as it is Idoc communication
Receiver agreement between the Integration Process(IP_IORDER2FILE) and the file server
2 Receiver determinations between BC_idoc_send to IP and other from IP to FileRecv system
2 interface determinations , one from si_oa_iorder of BC_idoc_send to IP and other from si_aa_file of IP to file recv system.
This is my setup and this fails....
My question is..is my message mapping and operation mappings correct? and can u see any obvious blunders i am doing?
please bear in mind that with same interfaces and sending and recv components, it runs fine without BPM....so please look at the BPM bit of mappings/config that i might have missed and please advice asap..
Thanks in advance and i am sure there would be lot of gurus for whome it is just a peanut...so please reply...
Regards
JhansiHello,
I am trying to implement one pi scenario :
File -> file adapter -> ccBPM -> soap receiver adapter -> web service request -> web service response -> ccBPM -> output file adapter.
The web service that I call works file from wsnavigator. I have created all the design and configuration objects
needed for the scenario.
I place a file with following contents:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<pns:GetSetNameWS xmlns:pns="urn:file2soap2fileWSVi">
<pns:name1>ajeet</pns:name1>
<pns:name2>phadnis</pns:name2>
</pns:GetSetNameWS>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
When I look at the process monitor I get this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Receiver Determination
-->
- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
<SAP:P1>Problem while determining receivers using interface mapping: No operation with XML root tag http://schemas.xmlsoap.org/soap/envelope/.Envelope exists.</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>Error when determining the receiver: Problem while determining receivers using interface mapping: No operation with XML root tag http://schemas.xmlsoap.org/soap/envelope/.Envelope exists. Problem while determining receivers using interface mapping: No operation with XML root tag http://schemas.xmlsoap.org/soap/envelope/.Envelope exists. No operation with XML root tag http://schemas.xmlsoap.org/soap/envelope/.Envelope exists.</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I have no clue about this error. Can you help me with this ?
If yes I can send you more details, if you liked
Hoping to get help from you,
Cheers,
Ajeet Phadnis -
Hi,
In a simple file to file scenario
I wanted to send a text file (notepad) but i wanted to receive it as a xml file---is it possible ?
I got the following status information in sxmb_moni. I want to what is the error? anybody pls help me out in this ?
During the application mapping
com/sap/xi/tf/_f2xml_mm_ a
com.sap.aii.utilxi.misc.api.BaseRuntimeException
was thrown: RuntimeException in Message-Mapping
transformatio~Hi Pankaj,
XI understands ONLY XML. All messages to and from XI are always XML messages.
Now, if the file being placed by your Legacy System is not going to be an XML file, then you can use the content conversion of your sender File adapter to convert this non XML file to an XML file.
Basic point, all messages that reach the inegration engine of XI need to be in XML format and so you need content conversion to conevrt non xml to xml and vice versa.
Please go thru the links provided by Chandra and also the following links for step by step procedure to do the same:
http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
And in your case once you do the content conversion at the sender side, the rest of the steps are the same as any File to file Scenario... For a sample file to file Scenario go through my reply in thread given,
Re: File To File
I hope I have answered your query.
Regards,
Abhy -
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
-
Flat File to Flat File Scenario using File Adapter
Hi Experts,
In my scenario, requirement is Flat File to Flat file through File Adapter in PI. At sender end, we would need to use Sender File Adapter (NFS) and receiver end we would need to use Receiver File Adapter (FTP). File would be coming as a encrypted format, and the file needs to be sent in encrypted format.
Any idea how to proceed with this requirement would be helpful.
Thanks and Regards
SoumyaHi 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.
Maybe you are looking for
-
Windows 8 bootup crash, cause NVIDIA Driver.
Hello people, it's me again. I just used bootcamp assistant on OS X 10.9.1 and installed Windows 8.1 Pro. I installed the BootCamp 5 drivers and it said to restart, and I did so, but when it restarted back into windows it shows the windows bootup scr
-
How to send *505* via platformrequest()
hi all am progrmming a small prog to send Service Command thatg to send to the number please call me like that *505*0103472290# So i do that platformrequest("tel: "*505*0103472290#"); but in vain and tried also platformrequest("tel: "+*505*0103472290
-
Trying to get endnote to work, I have downloaded the required plugin from Apple website but I still can't open endnote or create a list of references etc. I notice on the webpage it says endnote is sold seperately? Can anybody help with this issue?
-
Backlit keyboard for non backlit laptop
Hey! I have HP Notebook - 15-r204tx laptop.I want to replace its keyboard with backlit (glowing) keyboard. Can you help?how much will it costs? Where can I get that keyboard ? PRODUCT NAME : HP Notebook - 15-r204txPRODUCT ID : K8U04PA#ACJ
-
I'm trying to sign into my iTunes and it won't let me because it's asking me my security questions. I've answered them but it says there wrong. It won't let me sign in how do I change my security questions