on 04-18-2012 9:46 PM
Hi ,
I am mapping GLMAST01 IDOC to a stored procedure to insert into SQL. The scenario is [IDOC to JDBC].
It is working fine except for some missing fields when more than one company codes are present.
The E1SKB1M segment 0-99999 is mapped to the statement_Name in the target which is 0-unbounded.
The E1SKA1M segment 1:1 has the fields KTOPL and SAKNR and ESKA1M segment is not mapped to anything in target. Thus KTOPL and SAKNR appear only once for the first company code XML structure of stored procedure but not for subsequent company code XML structure.
How can I map ESKA1M to make sure these two fields come in other company codes in the XML structure below .
Thanks,
Teresa
<MT_Insert>
<Statement_Name>
<Storedprocedurename action = 'EXECUTE'>
<Table>stored proc name<table>
<BUKRS>1101<BUKRS>
<KTOPL>AAAA<KTOPL
<SAKNR>1222222<SAKNR>
<STEXT>TEST<STEXT>
<Storedprocedurename>
<Statement_Name>
-<Statement_Name>
-<Storedprocedurename action = 'EXECUTE'>
<BUKRS>1201<BUKRS>
<STEXT> TEST INSERT<STEXT>
<Storedprocedurename>
<Statement_Name>
<MT_Insert>
Use below kind mapping logic
use one as many------->splitby value(each value)----->KTOPL
use one as many firrst argument---KTOPL,second argument-E1SKB1M,third argument--E1SKB1M
use one as many------->splitby value(each value)----->SAKNR
use one as many firrst argument---SAKNR,second argument-E1SKB1M,third argument--E1SKB1M
above logic should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might want to try the wiki below to understand node functions.
http://wiki.sdn.sap.com/wiki/display/XI/Explain+node+functions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Teresa,
In this case is interesting to know the source structure where are the fields KTOPL and SAKNR.
I suppose that <Statement_Name> has 0..unbounded ocurrency, and you map this field directly with the BUKRS from source XML.
The problem that you have, probably your source XML the KTOPL and SAKNR fields have different number of contexts than BUKRS in your case only appears once, if undesrtand well.
You do need the copy the same values for all occurrences of <Statement_Name>, do you?, if im right you could use the copyvalue function. See the example here http://wiki.sdn.sap.com/wiki/display/XI/Standard+Functions+in+PI+7.0
Another solution if you are in SAP PI 7.1 or higer is using two Variables in the target mapping and reuse those variables later to respective fields in their target fields.
Regards.
Message was edited by: Iñaki Vila
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Inaki,
The BUKRS in IDOC under segment E1SKB1M is mapped to the target BUKRS field
. The segment E1SKB1M 0-99999 which has the BUKRS field is mapped to Statement_Name 0- unbounded.
The fields KTOPL and SAKNR come under E1SKA1M 1:1 . I need to copy the same value for all occurences of <Statement_Name> .
I am using PI 7.1.
I will follow the link and let you know.
Thanks,
Teresa
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.