logo

NJP

How To - Integrate SAP ECC RFC to Create a PO and Invoice

Import · Nov 25, 2020 · video

welcome to surface now integration hub demo today i'm going to show you the sap ecc spoke uh the integration we are going to do is to integrate between servicenow the service catalog you can name it as a create a new purchase order from servicenow in the catalog item and then through the servicenow sap ecc spoke you will create a po or the purchase order in sap ecc and then in the sap ecc some financial operation analysts or the account payable and specialists can create an invoice inside sap ecc and once that invoice is created through our servicenow sap ecc spoke and flow designer is able to detect the newly created invoices and pull back from sap into a servicenow and that's the whole round trip integration i'm going to showcase you today in addition i'm going to show you how to extend sap ecc spoke so that you can support more batteries than what is available right outside the box and it's very easy to do and i'm and i'm going to show you how to do it before we jump into the scenario let me give you a very quick intro of how this sap ecc spoke is going to work uh for example so first of all this sap ecc spoke is actually supporting on the ecc6 and then exp8 some of the you know some of the there will be some of the versions beforehand let's say like ehp 7 or ecc you know 4.0 or whatnot so uh this book can be more possibly uh compatible with the previous versions or some other some other ecc version of it but to give your customer the right expectation you stand on the this sap ecc smoke only tested against the ecc6 and ehp package so be precautious if you are selling this sap ecc spoke to some other version that the customer is supporting on we may extend the support to exp7 which means we're going to test against and certify against the ehp 7 later down the road but as of today 2020 we only support the exp8 version of it as you know sap ecc is a is an on-prem uh software which means it's gonna be behind the firewall um of the customer network which means we're gonna have a mid server to connect between the service now which is usually in the public cloud and then connect into behind a firewall sap ecc system so that's how the diagram gonna work we have a servicenow instance right here with the spoke installed and we're going to conflict a bit server and connect into the sap through our sap ecc spoke we support the rfc right now which means the back p synchronous call into a sap ec system and then the you will reply back with some response messages and you will write back into the associated table or custom table for your choice in servicenow so that's how the round trip is going to be done uh through the synchronous integration with uh bappy of sap okay so let's jump into the demo real quick and let me show you the flow i configured right here so this is the creapo right now i'm just gonna use a very very um quick and dirty method to just test against this book so right now we have a list of actions available out of the box create po is one of the um the example what happens is once i clicked on the create pio you will fetch behind the scene and with some of the metadata introspection which would use the dynamic template to do so now of course we assume some of the required fields right here will be pre-fetched or precinct on let's say a batch process by a customer to have the foundational master data uh already synced between sap and servicenow and so we're not going to cover this in this demo but there's an assumption that these data will be um pre-config and up up to date between servicenow and between sap and servicenow so we do also have light and light and other actions that can regularly pull in the list of uh company code from sap to a surface now and you can schedule that on a regular basis so that hey in the in the service catalog of certain service now you have that right uh values to be passed into for this uh subflow tube or flow to work okay so we have a company code we have the purchase stock type which is mb or some other values these are the users right here item number vendors so all these things will need to be populated before you actually hit the sap endpoint okay so i'm gonna scroll through this slowly so you know hey you if you have your own instance to create your poc on you know where to uh or what kind of a value that you need to enter and this is also the mids of the whole call po items which can be a part of your catalog item setup in servicenow and you can pass in those catalog variables into here for example po item number some short text uh the associated plan and storage storage location material group uh how many do they want to order what kind of unit it is okay so these are all blank as you can see sap is a huge system and always come with like a very huge payload is expected and uh just fill all the ones that are necessary or per your company use cases or the customer use cases and do the poc on so these are all the fields i created uh that needs to that can be connected and create a new po in our sap ecc system internally so let's give it a shot okay so let me test this one run the test and uh it will take a while to run this flow and of course you can always click on this run test in the background there's a new feature available in the integration hub platform and once you click on that one and run it then you will you can do some other things right now i just didn't click that uh it's not too bad you can still show up things right here stay in progress let's see how they run so what happens is right now it's gonna creating a new po behind the scene and you should have a new po number that we can uh fetch on so yeah there you go a new po has been created of course in your poc or in your demo you can further hey for this from this flow i can further update the custom record of the catalog or whatnot with that po number as a correlation id or reference id so that further on uh with your you know next steps of the workflow you can retrieve back the value or the the payload uh from from from sap and further build up more your logic based on based on the po number that's generated from sap okay so that's the po right here and let's hop into sap and check it out so these are sap instance and of course depending on how you config the user manual some of them will be hey it's right there for you to get your po and view it but uh right here in our internal instinct it doesn't conflict that way so we're gonna use the something called transaction code in sap uh you can look it up by the transaction code uh in online from google or something like that but from i've compiled a list of some handful uh po or i mean the transaction list that can retrieve the pos yes the sap talks like this it's not straightforward uh it's like back in the 70s or 80s but that's okay it's a very robust system um you will still see sap ecc or becomes like a hana when you still when you retire because like financial operation they love sap ecc it's going to be here to stay so get used to it and then let's learn how to navigate around with it to view a list of pos uh one thing we can do is either buy mg80fn or md23n so what you can do is right here you can type in me adfn and then you can find the po number that is just created for example right here and then you can click here to view the newly created po okay so let's double click on it and see if we can see more information as you can see uh we just created from servicenow to uh sap that's the ipad that we just created right to this 1919 remember the european and many other parts in the world they move the date first and then the the month so just be aware of that and we have all this information right here so what we're gonna do next is we can hey let's create a the invoice in sap to create invoice in sap you can do a mirror right here one one one cool trick is that hey if you're already in some other transaction code uh transactions and you want to let's say i want to create a invoice right from from this page you have two ways to do it once is you move all the way up back to the home page and then type in m-i-r-o in this case or you can have a quick shortcut it's like n and then your transaction code right here i'm gonna do right here like this way and now let's create a new invoice in sap so what happened is you can uh click on the invoice day i always use the day before the one business day before right here and then let's say it's a one dollar right here okay and it also requires a very particular order to entry at least for this instance uh some of them may not need but then this one they need okay right here you can enter the nope okay so here we go yep we have this number right here and then we could create right here let's give it a shot and see if we can create a new po out of this click on the post button right here and now we are created so remember is x64 that is what we are going to do so now nemo has been created in sap and it's time to retrieve it back from sap into servicenow and we do have like out of the box flow just to detect the same or detect the delta of the list of invoices enter between the last successful runtime and the time you you know trigger this integration so uh let's click a shot on pulling back the invoice from sap back to servicenow okay good sp ran awesome so for my last successful runtime so last time we ran it's about maybe a couple weeks ago and uh with today uh sorry about two weeks of invoices uh from our last demo so let's see what we have right here and this is the first one actually this one will be like a much better invoices to see if i can uh so this is a 853 xx4 so you most likely the last one let's hop into the sixth one and click on this one hold this hold on oh they have like the whole list already so let me just go down to the last one yep there you go xx4 is now being pulled back in servicenow okay so that's good and as you can see uh from this flow we can further extend it to uh you know right let's say now you write the the invoice into some kind of like a custom table right here or you can further do whatever action that you like to continue your flow logic for your poc or for your customer requirements uh we have a lot of spokes 100 spokes out there now and you can do a lot of things uh beyond this sap ecc spoke and let me show you the list of actions that currently have in sap ecc so we have the lookup actions material groups journal entry the user suspects the popular ones metadata retrieval that hey we can do the introspection of your dynamic templates so that many of the you know drop down fields you don't have to prefetch it but you can have dynamically uh retrieve it when you have this action going and procurement the usual suspect as well and now let me talk about a little bit of the execute rfc execute rfc is like a very generic record he's like record management oh you can think that way and he's pretty extensible and i'm going to show you uh what happens right right there uh before we jump into that so that concludes uh this this scenario we conclude that hey we can create people right here create an invoice in sap and then pull it back into service now so the round trip has been shown uh with this demo and now let me show you how to extend this spoke let me see the po demo this is the execute rc right here when you when you um when you pull in this uh actions what happened it is is to this action will retrieve the list of a bad p that is stated that you need to be retrieved uh behind the scene so right now out of the box i think we have a handful of uh out of the box back p uh for example let's say uh fixed asset get details get call center uh key balances and things like that it was all out of the box but now let's say hey i want to uh let's say create a pr create or get po details those are not out of the box actually so what you have to do is to um go back to here on the regular platform page and then you go to sap ecc then you can see the list of actions right now the list of on that p that uh that will be retrieved from this rfc drop down okay and from here uh you can find out the list of back piece that is available is you can go to um this sap system go to bappy and the customer will tell you hey what kind of backpack you need uh it's not expected that hey any any person will know hey what papi do i need how can i fill these requests and response message format they will most likely need a sap domain expert to kind of help them out in the first run on how to uh you know get this sr bappy going and once you know the name of it or of the battery that you want to connect into then i just extend this book is very easily you just enter the the name right here which i'm going to show you right now so for this one is most likely the materials management this pretty popular one and then you have a purchasing and a pr which is like that get the purchase order and for the one i'm going to show you is the get po which is the get details right here and what you can do is click on here and that's the back pin name that you need to put in okay so what have you have to do is ctrl c copy it and create a new you can type in the same name right here and then you pick the module that you just picked from sap in for for example in this get po is a materials management and you will just select that click submit and voila there you go there there you there will be your new uh back p extension for your spoke that you can do uh since i already done it already i don't want to mess up my my environment and i'm gonna show you this one right here so once you get that one the new battery name will be showing up so beforehand the drop down will not have the p the p o get details one but after you added this one and then refresh this screen then you will see this new value will show up in the p o get details right here and once you have that then you know hey uh what kind of value i need and you will introspect hey what are all the available fields they need to put in to to call this um the get details of the po and one of the very important one is the purchase document right here and uh we put it for the last the last demo i had let's see what is the latest one we have is it four five one three nine blah blah blah so we can do the same thing right here done and then you can click on the retrieve to get the latest po details from sap back to our servicenow so that's one example sometimes you know depending on the customer direction of the flow uh sometimes you just say you want to create a po within sap and then once the invoice back then you put it in servicenow sometimes they want to create in-service now so we don't limit customers to a very specific direction to support the integration is it's very flexible uh depending on different entry points this flow designer can do whatever that customer is needed uh to get to satisfy their requirements so now i mean both way we support it the get po we have this completed uh you can see hey now is i can see the pr item the description you saw apple ipad we just created and then plan is uh 1000 from that execution and this one is the actual sap payload we render that from sap and we further grab the red date write data and then write it into the surface node table or in this case it's a log table that we um that we display okay so that this the the core meet of this whole uh sap round trip demo um let me show you any other things i want to show you yeah that's about it uh one last thing like to uh maybe mention is the invoice data here we keep we keep track of like the list of invoice data that we retrieve from the last demo and you can see right here so you if you want to extend this flow uh or this sap spoke you feel free to uh you know create a different kind of custom table and then you can just write any data from sap back into our surface now okay yep if you have any questions uh feel free to reach out to our integration hub team and we are here to help thanks for your time take care

View original source

https://www.youtube.com/watch?v=NwgxLv1Ri9Y