cancel
Showing results for 
Search instead for 
Did you mean: 

file to file mapping without xml

Former Member
0 Kudos

Hello,

is there a possible way to use a PI7.1 file to file mapping (one static-positioned field must be mapped) without storing the file in xml format ?

We are having a flatfile and have to send this flatfile through our jms receiver adapter(as flatfile structure) but there is one important field which has to be mapped/changed(static value for all files).

Our SAP Applikation (File sender) would avoid to change this during or after creating the flatfiles in the R/3 System.

Thanks,

Gordon

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

> Our SAP Applikation (File sender) would avoid to change this during or after creating the flatfiles in the R/3 System.

Is there a specific reason for this?

It seems to be just one line of code to be changed, that is nothing compared to the effort you have doing this in PI.

udo_martens
Active Contributor
0 Kudos

Hi Gordon,

yes, you can achieve that with a non parsing mappping, that must be ABAP or Java.

The way for an ABAP mapping is pretty easy:

Call FM ECATT_CONV_XSTRING_TO_STRING, replace the value with standard ABAP string operations (REPLACE, FIND, regular expressions, ...) and finally call ECATT_CONV_STRING_TO_XSTRING. Ready!

Regards,

Udo

Former Member
0 Kudos

HI Udo,

great idea!

- Do you have an example for that abap mapping ? I think i have to use some entry parameters for my interface right ?

- Is it possible to use that within the integrated configuration ?

udo_martens
Active Contributor
0 Kudos

Hi Gordon,

>- Do you have an example for that abap mapping ?

DATA g_str TYPE string.

  CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
    EXPORTING
      im_xstring  = source
      im_encoding = 'UTF-8'
    IMPORTING
      ex_string   = g_str.

  REPLACE 'ABC' WITH 'XYZ' INTO g_str.

  CALL FUNCTION 'ECATT_CONV_STRING_TO_XSTRING'
    EXPORTING
      im_string   = g_str
      im_encoding = 'UTF-8'
    IMPORTING
      ex_xstring  = result.

>I think i have to use some entry parameters for my interface right ?

?? no..

>- Is it possible to use that within the integrated configuration ?

?? yes..

Regards,

Udo

Former Member
0 Kudos

@Stefan: no! They don´t wan´t to change it (there are a lot of process using this file in R/3) ... strange

@Udo: I thought i have to create an ABAP class with "IF_MAPPING" Interface and I have to use the EXECUTE method with his own parameters like (source, param, trace, dynamic_configuration, result) ?

udo_martens
Active Contributor
0 Kudos

Hi Gordon,

just create a class using the IF IF_MAPPING. You will get the empty method with the right parameters automaticly.

[SAP help: ABAP Mappings|http://help.sap.com/saphelp_nw2004s/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm]

Regards,

Udo

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

if you want to do mapping ,then you have to convert your FLAT File structure to XML , because PI understands only XML(SOAP_messages .

if there is no mapping then you can dumbt one system to other system with IR/ESR objects,

Regards,

Raj

Former Member
0 Kudos

what about file content conversion ?

Can i use this to convert a field in the header of the flatfile and leave the complete message as it is(flatfile structure) ?

rajasekhar_reddy14
Active Contributor
0 Kudos

When ever you pick the data using File adapter it will pick up the entire file or one record(if you record set per message),i dont think it is possible to pick up one specific field .

so i am thinking it is not possible.

Regards,

Raj