cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with processing .csv file

Former Member
0 Kudos

Hi.

I have a simple csv file (multiple rows) which needs to be picked up by the PI File adapter and then processed into a BAPi.

I created a Data type 'Record' which has the column names. Then there is a message type using this particular data type MT_SourceOrder. This message type is mapped to BAPI_SALESORDER_CREATEFROMDAT2. I have done the configuration is the receiver file adapter as well to accept the .csv file

Document Name: MT_SourceOrder

Doc Namespace:....

Recorset Name: Recordset

Recordset Structure: Row,*

Recordset Sequence: Ascending

Recordsets per message: 1000

Key Field Type: Ascending

In the parameter section, the following information has been provided:

Row.fieldNames MerchantID,OrderNumber,OrderDate,Description,VendorSKU,MerchantSKU,Size,UnitPrice,UnitCost,ItemCount,ItemLineNumber,Quantity,Name,Address1,Address2,Address3,City,State,Country,Zip,Phone,ShipMethod,ServiceType,GiftMessage,Tax,Accountno,CustomerPO

Row.fieldSeparator ,

Row.processConfiguration FromConfiguration

However, when the mapping is still not working correctly.

Can anyone please help.

This is very urgent and all help is very much appreciated.

Thanks.

Anuradha SenGupta.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks all - I checked there was an error with the Message type namespace. Initially all the nodes in the Test tab of the message mapping were coming in red. After changing the namespace of the Message type, the 1st node became Green.

However, the remaining nodes are still red now.

Hi allamudi loordh.

I checked the Datatype and there is no such node called Recordset. But the value somehow shows up in the source message type - I changed the Recordset Name from the content conversion to blank right now. Still the value shows up in the source message.

The following is how the source message looks like:

<?xml version="1.0" encoding="utf-8"?>

<ns:MT_SourceOrder xmlns:ns="http://xxx.com/LE/PIISalesOrder">

<Recordset>

<Row>

<MerchantID>PII</MerchantID>

<OrderNumber>ORD-0504703</OrderNumber>

</Row>

</Recordset>

</ns:MT_SourceOrder>

Whereas, the data type is as follows:

Name: Record

<Row>

<MerchantID>I</MerchantID>

<OrderNumber>ORD-0504703</OrderNumber>

</Row>

But how do I get rid of the node Recordset in the source message?

Please help.

Thanks.

Anuradha.

Former Member
0 Kudos

add the parameter ignoreRecordsetName as true in the communication channel

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Edited by: Anu on Sep 19, 2011 11:28 AM

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Anu.

Thanks a ton for your help. It solved my problem.

Anuradha.

Former Member
0 Kudos

Hi

I got similar problem long back. The solution which i found in my scenario is i gave wrong Message type name in File Content Conversion Parameters.

i corrected the Message Type name and my problem resolved. Please check your message type name is it correct in the File content Conversion parameters.

Thanks,

Amar.

Former Member
0 Kudos

HI Santosh.

I have verified the content in the source payload in SXMB_MONI.

<?xml version="1.0" encoding="utf-8"?>

<ns:MT_SourceOrder xmlns:ns="http://xxx.com/LE/PIISalesOrder/">

<Recordset>

<Row>

<MerchantID>PII</MerchantID>

<OrderNumber>ORD-0504703</OrderNumber>

<OrderDate>8/11/2011</OrderDate>

<Description>&quot;Callaway 60&quot;&quot; Women&apos;s Umbrella&quot;</Description>

<VendorSKU>4824S</VendorSKU>

<MerchantSKU>CAL5909002</MerchantSKU>

<Size></Size>

<UnitPrice>25</UnitPrice>

<UnitCost>25</UnitCost>

<ItemCount>2</ItemCount>

<ItemLineNumber>1</ItemLineNumber>

<Quantity></Quantity>

<Name>MARGARET A HAIGHT MARGARET A HAIGHT</Name>

<Address1>15519 LOYALIST PKY</Address1>

<Address2></Address2>

<Address3></Address3>

<City>BLOOMFIELD</City>

<State>ON</State>

<Country></Country>

<Zip>K0K1G0</Zip>

<Phone>(613)399-5615 x5615</Phone>

<ShipMethod>Purolator</ShipMethod>

<ServiceType>Standard</ServiceType>

<GiftMessage>PI Holding this cost-</GiftMessage>

<Tax></Tax>

<Accountno>1217254</Accountno>

<CustomerPO>CIBC00047297</CustomerPO>

</Row>

</Recordset>

</ns:MT_SourceOrder>

It looked as above. However, in the message mapping section it doesnt work - when i do Display Queue on the source field it keeps saying the value as NULL.

Please advice.

Thanks.

Anuradha.

Former Member
0 Kudos

In the test tab of the message mapping ,check the nodes ....if any node is red in color......may be there is a difference between the structure coming in thru channel and the structure defined in data type

former_member609026
Participant
0 Kudos

Hi Anuradha,

please check the mapping as suggested by Anu, i hope there is some issue with your Message Type Namespace.

First step: As suggested by Anu, check if u have any Red nodes present if yes follow second step.

Second Step: if all of your nodes are red, then you have problem with your Message Type namespace else some of the fields are in red then you have to change the field names in your sender communication channel.

Regards,

Pradeep A.

Edited by: PRADEEP AMISAGADDA on Sep 16, 2011 10:31 AM

allamudi_loordh
Active Participant
0 Kudos

Hi ,

can you check once the datatype whether any node is there like " Recordset" ..otherwise show me your datatype till 2 fields enough..

Former Member
0 Kudos

Verify the xml content after content conversion( In SXMB_MONI Pipeline) . verify , if it is correct .

Then, pick the xml file from there & use it in Message Mapping .....

There should be some issue in content conversion or Mapping.....

santosh.