10-21-2015 4:21 PM
Hello Experts,
I have to map an edifact file to IDOC . My problem is that i want to split file everytime field that holds edifact code is BGM. For Example if I have a file like this :
BGM 11111111111111
LIN 22222222222222
LIN 33333333333333
BGM 44444444444444
LIN 55555555555555
I will map this file to a message like this :
code: BGM
mes: 1111111111111
So I need to create a split to create one IDOC everytime code is BGM. In this Example I'll have to create 2 IDOCS . First will have first three lines and second will have the remaining two.
Regards
10-21-2015 4:26 PM
Are you using any middleware? It is very simple in Middleware.
e.G for SAP PI/PO in graphical mapping you can map the BGM segment to IDOC node in target structure for this.
R
10-21-2015 4:28 PM
10-21-2015 4:30 PM
The heading of the post says you are using SAP PI.
Anyway how you are receiving the file? via FTP or you are placing it the local PC/Application server and then trying to read it?
R
10-21-2015 4:31 PM
10-21-2015 4:37 PM
Then as I said. It is very easy in XI graphical mapping. Only thing you might need to do is to change the XSD of the IDOC to accept multiple occurrence( 1 to unbounded). So you can manually edit the XSD of the Idoc or create an external message and use that as the target structure.
10-21-2015 4:40 PM
I've already done this . My problem is splitting lines everytime code is BGM and place them in IDOC.
10-21-2015 4:54 PM
Oh I see. BGM is not a segment(My bad : I thought you are using EDIFACT) rather a value in segment. Then I don't think them it is possible via graphical mapping. You may want to explore ABAP(If not single stack PO)/Java/XSLT mapping .
10-21-2015 5:00 PM
10-21-2015 5:05 PM