cancel
Showing results for 
Search instead for 
Did you mean: 

Changing IDOC-Filename to contain the outgoing-Invoice-Numer

0 Kudos
538

We would like to create an IDOC as a file for some outgoing Invoices (e-billing)

The Filename should be change to contain the Invoice-Number instead of the IDOC-No.

The Standard-Routines to change the Filename such as

DX_PATH_CREATE Ermittlung des Dateinamens für die DX-Workbench

EDI_LPATH_CREATE_CLIENT_DOCNUM logisches Verzeichnis, Dateiname im Format T_Mandant_Docnum

EDI_LPATH_CREATE_USERNAME L logisches Verzeichnis, Dateiname im Format SY-UNAME

EDI_PATH_CREATE_CLIENT_DOCNUM Verzeichnis + Dateiname im Format T_Mandant_Docnum

EDI_PATH_CREATE_DATE_TIME Verzeichnis + Dateiname im Format T_CCYYMMDD_HHMMSS

EDI_PATH_CREATE_LENGTH_LE_8 Verzeichnis + Dateiname im Format NTHHMMSS.T

EDI_PATH_CREATE_MESTYP_DOCNUM Verzeichnis +

EDI_PATH_CREATE_USERNAME Verzeichnis + Dateiname im Format SY-UNAME

EDI_PATH_CREATE_USERNAME_DT_TM Verzeichnis + Dateiname im Format T_SY-UNAME_CCYYMMDD_HHMMSS

JBD_EXP_GET_OUTPUT_FILENAME SEM-PA Export Dateinamen

dont work.

How can i get the Invoice-Number, stored in E1EDK01-Belnr to create an new Filename for the IDOC ?

View Entire Topic
rosh
Participant
0 Kudos

Hi Michael,

I just had the same problem and have not found a standard function for that. To create the filename as needed you need to create a custom function that reads the invoice number from the table edid4 using the passed IDoc-number.

simone_beghi1
Explorer
0 Kudos

Hi Robert,

the list of function module to create the filename is customizable.

So, you could try to create a function module custom, that use the tables parameter as EDIDD (content of idoc) as the follow:


FUNCTION zz_idoc_input_name.

*"*"Lokale Schnittstelle:

*"       IMPORTING

*"             VALUE(DATATYPE) LIKE  EDIPO-ACTRIG

*"             VALUE(DIRECTORY) LIKE  EDIPO-OUTPUTDIR

*"             VALUE(FILENAME) LIKE  EDIPO-OUTPUTFILE

*"             VALUE(CONTROL) LIKE  EDIDC STRUCTURE  EDIDC

*"       EXPORTING

*"             VALUE(PATHNAME) LIKE  EDI_PATH-PTHNAM

*"       TABLES

*"              IDOC_DATA STRUCTURE  EDIDD

*"----------------------------------------------------------------------

And then read the idoc's data to complete the pathname.

Simon

rosh
Participant
0 Kudos

yep, that's what I did.