Skip to Content
avatar image
Former Member

idoc to jdbc mapping duplicate source node to target structure

Dear all,

I am working on PI 7.1

My sceniro

IDOC to JDBC [sap to mssql ] where the target is a table structure shown below: I execute a stored procedure to insert the below message type into sql table.

http://test.com">

- <Statement_Name>

- <storedProcedureName action="EXECUTE">

<table>spr_test</table>

<BANKS type="Char">BOA</BANKS>

<BANKL type="char">122207</BANKL>

<BANKN type="char">4555--0</BANKN>

<LIFNR type="char">1100000218</LIFNR>

<KOINH type="char">varchar</KOINH>

<BKONT type="char">01</BKONT>

<BANKA type="varchar">S.A.</BANKA>

</storedProcedureName>

</Statement_Name>

</ns0:MT_SP_LFBK>

The mapping is between source CREMAS02 and the above target structure. Everything works fine.

The problem is when the vendor has more than one bank account number the IDOC CREMAS02 replicates the below segment E1LFBKM for each BANK account information. Since target and source are mapped one to one how can i map the second bank account information to the same target structure or genereate a new target Message type for the second bank account information and send it to sql ?

<E1LFBKM SEGMENT="1">

<MSGFN>005</MSGFN>

<LIFNR>110000021</LIFNR>

<BANKS>BOA</BANKS>

<BANKL>122207</BANKL>

<BANKN>4555-0</BANKN>

<BKONT>02</BKONT>

<BANKA>S.A.</BANKA>

<BNKLZ>3000000</BNKLZ>

</E1LFBKM>

Thank you ,

Teresa

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 03, 2011 at 09:47 PM

    Hi Teresa,

    which segment have you mapped with <storedProcedureName action="EXECUTE"> ?

    Because according to me , if you send <E1LFBKM> to <storedProcedureName action="EXECUTE">

    , you will be able to use your stored procedure several times, in fact each times that you have a <E1LFBKM>.

    Reminds: inside <Statement_Name> you can do several SQL actions like execute one or several stored procedures (could be different).

    Of course, after that your table should accept to have several bank account for a same customer.

    So to have something like that:

    <Statement_Name>

    <storedProcedureName action="EXECUTE">

    ....

    </storedProcedureName>

    <storedProcedureName action="EXECUTE">

    ...

    </storedProcedureName>

    <storedProcedureName action="EXECUTE">

    ...

    </storedProcedureName>

    </Statement_Name>

    regards

    mickael

    Add comment
    10|10000 characters needed characters exceeded