Hi All,
When configuration outbound iDocs and if you are creating iDoc files though a file port. You should specify the file name format for these outbound files. You may have different outbound iDocs and you should be able to differentiate each type by the file name.
For example Invoice iDocs can be prefixed as "810" and ASNs should be named as "856". Lets assume you need your file to be named as 810_<iDoc Number>_<Date>_<Time>.
You should create a Z function module for this as no standard function module is configured in such a way that it would create the file name as above.
You can find the standard file name creation function modules using se37 and search with key words *EDI*PATH* or from EDI3 function group.
Create the Z function module to assign the file name.
Note that you can only import the iDoc control data records to create the file name. To create the function module you can copy a standard FM and change accordingly.
Function module coding
You can assign upto 3 parameters to the file name. In this example I have assigned the prefix (810 and 856) to the first parameter, iDoc number to the 2nd and date time stamp to the third. These variables will be separated by "_".
Assign the function module to the file name generation configuration.
Transaction we55.
Assign the created function module to outbound port which is assigned to iDoc configuration in we21.
Transaction we20.
Test Results
EDI, iDoc, File Name, port, file port, SAP ABAP, we20, we55, wedi, iDoc configuration, EDI configuration, iDoc file name configuration, EDI file name configuration, SAP port configuration, SAP partner configuration, Function modules, file name creation function module, SAP ABAP EDI configuration, SAP iDoc configuration, SAP ABAP, Isuru Fernando
Labels: ABAP function module, EDI, EDI configuration, EDI file name configuration, File Name, file port, iDoc, iDoc configuration, iDoc file name configuration, port, SAP ABAP, SAP port configuration, we20, we55, wedi