on 04-24-2012 4:41 AM
Hi experts,
Right now i am entering into SAP PI. I had a chance to work in Seeburger. I am converting XML into EDI. I have to set counter variable for EDI in graphical mapping. I saw some manuals and got a idea. But i not quit sure about it. I ll share what i understood and please guide me same.
I have created Function Libraries for setting a variable, getting the variable and using UNB & UNH counters. The code which i wrote was,
For setCounter,
GlobalContainer myGlobalContainer;
myGlobalContainer = container.getGlobalContainer();
myGlobalContainer.setParameter(b.toUpperCase(), a);
return a;
For getCounter,
GlobalContainer gc = container.getGlobalContainer();
if (gc.getParameter(a) != null) {
return String.valueOf(gc.getParameter(a));
} else {
return "1";
}
For UNBCounter,
try {
CounterBean be = CounterFactory.getCounterInstance();
return "" + be.nextCounter("UNB_CONTRL_" + a);
}
catch (Exception e) {
return "exception_in_UNBCounter" + e;
}
For UNHCounter,
try {
CounterBean be = CounterFactory.getCounterInstance();
return "" + be.nextCounter("UNH_CONTRL_" + a);
}
catch (Exception e) {
return "exception_in_UNHCounter" + e;
}
This are the UDF's i created.
Can you please confirm me whether this same code is used for all the time i.e for inbound flow and outbound flow?
If not how does they differ from flow to flow?
Have i need to alter the code?
Anything else i have to do other than this?
Thanks & Regards,
Jansirani.S
Hi friends,
Thansks for your kind reply.
I had one more query.
Since now we are using EDI Global format and BIC MD standard mapping for converting them into EDI XML. For our next interface we are using Inhouse EDI format. In this case did we have to custom the standard mapping? If it so, how to custmize? Did i have to create a fresh mapping or enhance the standard mapping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when you say inhouse EDI format, what do you mean? a flat or csv file? for those cases I would not use the BIC MD but a regular SAP PI mapping and the file adapter for converting to/from flat/csv format.
if on the other hand you really mean a kind of propietary EDIFACT message, then you have to do quite a lot of work within BIC MD, define the message structure, create the 1:1 mapping (EDI to/from XML) and deploy them to the server.
Hi marcos,
Thanks for your reply..
My scenario is, receiving a EDI flat file in INHOUSE format ( not GLOBAL format ). And i need to convert them into XML using BIC mapping designer. Then i can deploy in SAP PI and i can proceed further.
In this situation, my query is how can i convert INHOUSE into GLOBAL format? Or give me your suggestion kindly please.
Hi Marcos,
Right now i am workingin a implementation that, receiving XML file from SAP R/3 and need to convert into EDI. I convert thru BIC MD standard mapping. Now i need to set counter variable. I set the counter variable in Graphical Mapping. It is fine according to above UDF.
Now my query is this UDF is common for all the inbound and outbound flow?
Hi JansiRani,
AM also working on with the Inhouse X2E conversion,
on that am not able to acheive the "Line feed \n" which needs to be inserted at the End-of-each-Segment.
i have inserted the CRLF at the end of each segment but it gives the "\r\n", which i needs to have only "/n"
If you have resolved the issue, please give me a suggestion
thanks,
harish
Hi,
you need to have these variables UNB_CONTRL_ maintianed in Seeburger workbench also.
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
actually no maintenance is required, the first time you run your code, the counter will be created, starting with 1. Try running your mapping and then go to:
http://server:port/seeburger/index.html -> mapping variables
you should see the counters there.
In the case of counter variables, you need not maintain them manually. If the variable does not exist, Seeburger Functions would create them automatically and then increment them accordingly.
The Key you use for the Counter depends on the EDI Guidelines your organization has. The counter can be a single counter for all EDI messages of a particular type etc. In our case, we set the Counters / ICN Numbers at our Supplier Level.
Regards,
Bhavesh
I am not sure I understand the question about inbound/outbound. You only need to create a UNB/UNH reference/counter when you create an EDI message (i.e. when you are going to send an EDI message to your partner).
In the inbound case (when you receive an EDI message), those 2 fields have been populated by the sender, so you do not need to set them
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.