2016 Apr 05 7:48 AM
Hi ,
I have a requirement to capture Weighbridge data into SAP .I was not provided any further info on this by client .
My question here is ..
How to get weighbridge data into system .
How can we read the data into SAP.
Any one worked on Weighbridge integration please let me know how you deal this scenario .
Regards
Vamsee Krishna P
2016 Apr 05 7:55 AM
Hi vamsee,
for your requirement you need that equipment connected to your system via USB or Serial port.
what you need to do is just put your pointer to the location where you wish to enter that data and use your equipment.
by this way equipment will act as keyboard and will enter output in input box.
Same thing is applicable with barcode scanner, I hope this will also applicable to weighbridge.
It is matter of input devices, you don't need to handle it via ABAP side.
Regards,
Saurabh
2016 Apr 05 7:55 AM
Hi vamsee,
for your requirement you need that equipment connected to your system via USB or Serial port.
what you need to do is just put your pointer to the location where you wish to enter that data and use your equipment.
by this way equipment will act as keyboard and will enter output in input box.
Same thing is applicable with barcode scanner, I hope this will also applicable to weighbridge.
It is matter of input devices, you don't need to handle it via ABAP side.
Regards,
Saurabh
2016 Apr 05 8:12 AM
But need to save this data in SAP ,for this we need a ABAP development .Hoe can equipment data is entered into SAP with out any programming
2016 Apr 05 8:36 AM
ofcourse you will need abap screen program.
refer this link.
but you will not need to use any integration for that data to appear on screen input field.
when data appears in screen input field , you can save it in table , via query.
Regards,
saurabh
2016 Apr 05 8:45 AM
Thanks Saurabh
But the scenarion is not like scanning and update in sap through screen.
The scenario is like when ever vehicle came on to the weighbridge , the data should be populated to SAP. may be the software used in weighbrige was creating some file file Say VB file . and we need to convert that into SAP when ever the VB file created in system.
2016 Apr 05 12:04 PM
The weighbridge places a datafile somewhere. You need to readthis file with open dataset statement and then upload in the tables (I guess they need to be custom tables ?)
Where is your problem exactly ?
It will be hard to give you a solution anyway since you state:
"I was not provided any further info on this by client .
I would first go after all the specifications because now it can be done in an infinite amount of ways with no specs 😞
2016 Apr 05 12:27 PM
Thanks Peter .
Going by the approach "The weighbridge places a datafile somewhere." ( I hope irespctive of type of weighbridge file gets created )
1 . Do we need to upload the files into SAP in regular interval by Background programme ?
2 . Is there any way to upload upload data immediately after creating the file in system by weighbridge .
if you have worked same requirement any time before , let me know the approach you followed .
Thanks
Vamsee
2016 Apr 05 12:47 PM
I had this scenario before, but we used SAP PI. In PI the file was translated to a custom Idoc (with just the minimum amount of necessary fields) and then uploaded in SAP through a custom function module to handle the custom IDoc. By using an IDoc you can always reprocess when an error occurred and you can monitor it.
In that way we could have PI poll on the directory with a predefined interval.
If you are not using PI ( or another middleware tool) then I think you need to schedule a job in which a custom program reads the directory where the files will be placed. Then process the file(s) and subsequently delete (or even better archive) the files when they have been succesfully processed.
To read all files in a directory you can use Function Module RZL_READ_DIR_LOCAL
Then loop around the filenames returned by this function module and use open dataset to read them into internal tables for further processing.
One limitation with this function module is that the filenames can be maximum 32 characters long. So now I am looking more into this the Function Module SUBST_GET_FILE_LIST would be a better choice to read the directory. This function module can return filenames of a maximum lenght of 75 characters.
( while fm EPS_GET_DIRECTORY_LISTING, another function module to read files in a given directory can return filenames with max length of 40 characters).
2016 Apr 05 12:58 PM
Thanks Peter ,
In case of PI also do we need a schedule programme or data posted immediately after file creation ?
let me know the steps to follow while using as am not used PI before
2016 Apr 05 12:59 PM
let me know the steps to follow while using PI method as am not used PI before .
2016 Apr 05 1:20 PM
In PI you can define a polling interval ( every second, every 10 secs, minute, hour etcetera) in the file adapter.
If your organization doesn't have PI implemented I think you need to write your own program to read the directory.
starting a program Immediately after the file has been created, I don't know if this is possible or how to do this. But you can schedule your job periodically (e.g. every 5 minutes). It all depends how much maximum time your client allows for the files to be processed.
2016 Apr 05 1:23 PM