2005 Sep 09 1:46 PM
We have a bespoke transaction that is used to output delivery information in a flat file format. This will be picked up by the partner organisation and processed via their EDI mechanism. They have expressed a desire to send us confirmation that the delivery has been entered and processed via an EDI message. We may choose to populate a new bespoke table with this information so that our customer services can see that it has been processed successfully.
What i would like to know is in how many ways we can realize the solution for this.
If any one can give me the complete and different scenarios and steps involved, it will be of great help.
Regards
Rahul
We have a bespoke transaction that is used to output delivery information in a flat file format. This will be picked up by the partner organisation and processed via their EDI mechanism. They have expressed a desire to send us confirmation that the delivery has been entered and processed via an EDI message. We may choose to populate a new bespoke table with this information so that our customer services can see that it has been processed successfully.
What i would like to know is in how many ways we can realize the solution for this.
If any one can give me the complete and different scenarios and steps involved, it will be of great help.
Regards
Rahul
2005 Sep 09 7:16 PM
The only way you can do it is to have your own EDI subsystem that can translate their EDI message into an IDOC or a flat file for you. If it is IDOC, and you want to insert the confirmations into a custom table, then you need create your own IDoc, processing function, message type etc.
If the EDI subsystem can create a flat file, then you can simply upload it using an ABAP program.
Without the EDI subsytem, you need to have some translator which can interpret and translate EDI messages. To do it in ABAP is very tedious and almost impossible.
Srinivas
2005 Sep 10 2:43 PM
Hello Srinivas. Thanks for the reply.
The EDI system creats a flat file for me so there is need for me to use the translators.
The process i like to use is...
1) The confirmation is sent after every 30 mins.
2)I will be looking for the presence of the file and reading the file every 15 mins using..
'open dataset dsn for input in textmode encoding default'.,
3)After this i would like to update in ZTABLE with the fields in it.
4)Again i will be reading the flat file.
5) If any changes found in the flat file...the Ztable is updated again.
For this it may be the case, the flat file may have dulicate record ( for say with same customer number)..this may not be availabe whn we read the flat file first..but in the second read. Now i like to know how to update the Ztable for that.
If u can provide with ABAP code that would be of great help.
Regards
Rahul.
2005 Sep 10 3:57 PM
So you will get a flat file from them, not a standard EDI message. Remember, even EDI messages are ultimately transferred as flat files.
If you need logic for uploading the file and updating the table, I need to know the structure in which the file comes and the structure of your Z table identifying the key fields.
Regards,
Srinivas
2005 Sep 10 5:10 PM
Thanks for the reply.
As u have rightly pointed out. I receive the EDI message which is then converted into the flat file. My job starts from taking the dat from the file and putting/updating into ztable.
Srinivas rite know i do not have the structure but u can just take any structure for the ztable for the explanation purpose. I wanted to know the logic(code) behind the process.
Regards
Rahul
2005 Sep 10 5:38 PM
OK, if it is the generic logic then it will start with opening the file. The following are the steps.
1. Open the file. To do this you need to know the location of the file, if it is on the application server or desktop and the type of the file, text file, fixed length, tab/comma delimited etc. Read documentation about GUI_UPLOAD(for desktop upload) or OPEN/READ/CLOSE DATASET(for upload from application server).
2. You require an internal table to upload and probably use the same for the processing(if it is fixed length).
3. You will have an internal table of the same format as that of the Z table. You will reformat your file data into this table format after making the necessary validations and transformations.
4. Insert the records from the internal table into the Z table. Look at the documentation and options for INSERT syntax. If you want to modify existing records if the key matches and add if there is no record with the same key, then look at the MODIFY statemetn.
Without the knowledge of the structures, this is what I can tell. If you have further questions please let me know. If not, please reward and close the post.
Srinivas
2005 Sep 10 6:14 PM
Hello Srinivas, Thanks for the reply.
Yes i did understand the logic behind the thing. About the points and closing the post, give me 2 days and i will close the post. No doubt u already earned the points.
Regards
Rahul
2005 Sep 10 6:33 PM
Hi Kasi,
I would like to clarify some of the things here -
1. EDI Subsystem is not the only way to translate EDI message into IDOC, these subsystems are typically very costly. When you are not using heavy duty EDI processing, you can even use ABAP to translate EDI message. This turns out to be more cost effective for low volume.
2. I don't see any value in uploading this information into a Z-Table. If it is an EDI message, chances are there must be a way to post this information into SAP which can be used for adding value to the process.
3. You must pay attention to the naming convention of the files, as you will need to make sure that you are not processing the same message again. Also it is a good practice save the files into another directory (archive directory).
4. You can ask your EDI partner to trigger an event in SAP (You can give them a batch file which runs program <b>sapevt</b> to do that). It helps if you want real time interface, but scheduled job as you are thinking will also do the job.
Hope this helps.
Cheers,
Sanjeev
2005 Sep 16 4:00 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |