cancel
Showing results for 
Search instead for 
Did you mean: 

File to IDOC Scenario

Former Member
0 Kudos

Hi,

I need to generate Message type ORDERS (ORDERS02) IDOC with custom segment from a CSV file. The segments in the IDOC (the number of times they occur, whether they occur or not and some of the field values) depend upon some data in the CSV file. There is an intense logic that needs to be implemented to map the file structure to the IDOC as these values in the file determine the exact structure of the IDOC. Can anyone suggest the best mapping approach to achieve this?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Michal,

The source file has the Purchase Order and the IDOC ORDERS02 need to be generated depending upon the values in the source structure. For eg:

Source

ITEMA,ITEMB,ITEMC,ITEMD,ITEME etc.

and multiple records like this. We need to create just one IDOC but the segments would depend on conditions like:

IF ITEMA == x then create SEGMENT ABC,ABC1

ELSEIF ITEMA == Y then

IF ITEMC== d then create segement xyz,xyz1

elseif ITEMD == g then set a constant to something

..........

Quite a complex 4 page logic. Which segments to create, what would be their values, how many times a segment would appear all depends on the input file data ( ITEMA,ITEMB etc..).

Should I try Graphical method first? I fear it may get too complex but I have never used Java or XSLT.

Even if I have to use one of it, which one would be easier and better cosnidering the complex logic?

udo_martens
Active Contributor
0 Kudos

Hi Shubha,

you can choose between 4 kinds of mapping (grafical, Java, XSL, ABAP), all of them have some advantages and some handicaps. In your case you can load the complex target structure into the repository what is reducing manually work. But message mapping is a special science and if you r much better in one of the other mappings you should think about to do your favourite mapping.

Regards,

Udo

Former Member
0 Kudos

Hello -

Have a look at Claus' Blog: /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool

jg

Former Member
0 Kudos

Thanks James

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

try with message mapping

(and user functions if needed)

if not you can always turn to java or abap mapping

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>