cancel
Showing results for 
Search instead for 
Did you mean: 

Help Regarding receiver FCC structure

Former Member
0 Kudos

Hi

My sender structure is

<Details>

<Recorder>

   <EGHT>45603</EGHT>

   <EHGD>DA</EHGD>

   <ID>1236A</ID>

   <Value>

      <Values>

        <Seq>1</Seq>

        <Del>10</Del>

     </Values>

     <Values>

       <Seq>2</Seq>

       <Del>11</Del>

     </Values>

  </Value>

</Recorder>

</Details>

I want my target CSV to be

45603;DA;1236A;1;10

45603;DA;1236A;2;11

Recorder segment can occur multiple time. So how to repeat Recorder segment issues w.r.t to Values segment repetition. I tried to use useoneasmany but its copying ther recorder segment fiels first occurance only to all its repetition.

How to acheive this, Any help

Accepted Solutions (1)

Accepted Solutions (1)

zameerf
Contributor
0 Kudos

Hi Prabhas,

First create a target structure like below,

<Recorder> (1..unbounded)

    <EGHT>

   <EHGD>

    <ID>

    <Seq>

    <Del>

</Recorder>

Then, use the below mapping logic.

Source <Values> -----------> Target <Recorder>

For field mapping,

do similar mapping for EHGD and ID field.

then direct mapping for Seq and Del field.

your mapping xml output will be like below,

<Recorder>

     <EGHT>45603</EGHT>

     <EHGD>DA</EHGD>

     <ID>1236A</ID>

     <Seq>1</Seq>

     <Del>10</Del>

</Recorder>

<Recorder>

     <EGHT>45603</EGHT>

     <EHGD>DA</EHGD>

     <ID>1236A</ID>

     <Seq>2</Seq>

     <Del>11</Del>

</Recorder>

Then you have to use FCC for receiver file adapter

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Hope this helps.

Regards,

Zameer

Former Member
0 Kudos

Hi Amit/Zameer

Tried both of your replies. It's copying only the value of first occurance of EGHD and ID  of Recorder. It's ignoring the other values

Here's my payload

<Details>

<Recorder>

   <EGHT>45603</EGHT>

   <EHGD>DA</EHGD>

   <ID>1236A</ID>

   <Value>

      <Values>

        <Seq>1</Seq>

        <Del>10</Del>

     </Values>

     <Values>

       <Seq>2</Seq>

       <Del>11</Del>

     </Values>

  </Value>

</Recorder>

<Recorder>

   <EGHT>324682</EGHT>

   <EHGD>CF</EHGD>

   <ID>16A</ID>

   <Value>

      <Values>

        <Seq>1</Seq>

        <Del>10</Del>

     </Values>

     <Values>

       <Seq>2</Seq>

       <Del>11</Del>

     </Values>

  </Value>

</Recorder>

</Details>

I want output to be

45603;DA;1236A;1;10

45603;DA;1236A;2;11

34682;CF;16A;1;10

34682;CF;16A;2;11

But i am getting

45603;DA;1236A;1;10

45603;DA;1236A;2;11

45603;DA;1236A;1;10

45603;DA;1236A;2;11


Former Member
0 Kudos

Hello,

I am not sure how u r doing ur mapping, but for me it's working fine. Paste your mapping here.

Thanks

Amit Srivastava

Syed1234
Explorer
0 Kudos

I believe you are doing all okay except that you should map

Seq (with selecting Context Details) ---> Recorder (in Target Structure)

Rest follow what Amit is suggesting and it should create target structure for FCC to create required file.

Former Member
0 Kudos

Hi ,

Make sure below things are taken care by you.

1)Source <Values>(Context--> Value) -----------> Target <Recorder>

2)For EGHT,EHGD and ID make sure you followed the context as Zameer said above.

Just use the display queue fn and playing with the contexts  you can easily achieve these kind of requirements.

Regads

Venkat

Syed1234
Explorer
zameerf
Contributor
0 Kudos

Hi Prabhas,

Just follow my earlier reply, except for one change as below.

Source <Values> [raise context to Message Type level]-----------> Target <Recorder>

Hope this would work and create required xml, then you have to just do the receiver FCC config to generate csv file.

Regards,

Zameer

Answers (1)

Answers (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi Prabhas,

create target side as like following  structure.

<Recorder>

   <EGHT>45603</EGHT>

   <EHGD>DA</EHGD>

   <ID>1236A</ID>

   <Value>

        <Seq>1</Seq>

        <Del>10</Del>

     </Value>

</Recorder>

<Recorder>

   <EGHT>45603</EGHT>

   <EHGD>DA</EHGD>

   <ID>1236A</ID>

   <Value>

<Seq>2</Seq>

       <Del>11</Del>

     </Value>

</Recorder>

and then use useoneasmany function and then use fcc at receiver side

Regards

Gagan

Former Member
0 Kudos

Hi Gagan,

Thanks for replying.

But sorry i didn't get you .You mean to say create two recorder segments at target side?

Former Member
0 Kudos

Hello,

Two lines of UDF will help u

for(int i=0;i<var1.length;i++)

{

result.addValue(var2[0]);

}

mapping will be:

values

--------------UDF-----splitby value(each value)---Target_EGHT

Eght

Thanks

Amit Srivastava