cancel
Showing results for 
Search instead for 
Did you mean: 

Add an extra line in CSV File

Former Member
0 Kudos

Hello Experts

I have a scenario where I am picking a CSV file and I ll convert it into XML and send it R3 through proxies.

The requirement is ,suppose the CSV file has 5 rows then after converting the rows of data I have to pass EOF in one of the fields in the 6th record to SAP R3.

Can this be achieved through graphical mapping

Thanks in advance

Regards

Advit

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor
0 Kudos

Hello Advit,

In a graphical mapping, you can duplicate a subtree of a target message structure and use duplicated structure to fill in with EOF relevant data. In this way, the original subtree is mapped with data from a polled CSV file and the duplicated subtree is mapped with EOF data.

Here is an example:

Complete mapping for a generated duplicated structure - for example, here I set a fixed value to one of fields (please also don't forget to create parent nodes of that structure, if there are any - for example, in my example, node "Object"):

And here we go with mapping test output - as you can see, object entities were created for every item in the source message, as well as additional entity was created with a fixed value:

Regards,

Vadim

Former Member
0 Kudos

Thank you

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Do you have an example?

I would handle this in the mapping layer by adding the extra record as a recordset so that the output of your mapping has the extra recordset that then gets handled by the File adapter.,

Regards

Bhavesh

nitindeshpande
Active Contributor
0 Kudos

Hello Advit,

Why do you need to end of file character for XML file? XML file works on tags. If the main tag is closed, that means its a end of file.

Can you please specify your requirement in detail? And in R/3 side, when you have proxy it is not a file anymore. Proxy has the data in the specific field.

Regards,

Nitin

Former Member
0 Kudos

Please find the sample CSV file attached .In that you will find 5 rows of data.

The abaper who is processing the data wants EOF in one of the fields as the 6th row at his end as he will be able to identify the end of file .

Regards

Advit