cancel
Showing results for 
Search instead for 
Did you mean: 

Store Filename on a table in PI server.

former_member210091
Participant
0 Kudos

Hey Guys

I have a requirement in which i need to store all the filenames on a table in PI server and then run a ABAP report by the end of the day(every 24 hours) to display list of all the files which passed through PI.

The solution i m thinking of right now is to do an ABAP mapping in which i can read the filename and then store on a table in PI server,then write a ABAP report and schedule it every 24 hours to display the list of all the files.

Just want to know if there are any other better ways to achieve this or i can go ahead with my solution?

Thanx

Saif

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

>

> The solution i m thinking of right now is to do an ABAP mapping in which i can read the filename and then store on a table in PI server,then write a ABAP report and schedule it every 24 hours to display the list of all the files.

> Just want to know if there are any other better ways to achieve this or i can go ahead with my solution?

> Thanx

> Saif

I guess you already have the best solution.

former_member210091
Participant
0 Kudos

Thanx for your prompt response Shabarish .

I m aware of using dynamic configuration to get filename but dont know how this can be achieved in ABAP mapping,do you happen to have some code snippet which can give me some guidance.

Thanx

Saif

Shabarish_Nair
Active Contributor
0 Kudos

it would be something like this;

data: l_dyn_record type MPP_DYNAMIC.
 
l_dyn_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_dyn_record-name = 'FileName'.
l_dyn_record-value = 'myFileName'.
 
CALL METHOD dynamic_configuration->add_record
  EXPORTING
    record = l_dyn_record.

further ref: /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping

former_member210091
Participant
0 Kudos

Thanx Shabarish

I was just wondering if there is any SAP standard table which stores filename in one of its field.

Since we can see the filename in dynamic configuration in sxmb_moni,i asume there should be some table which is storing the filename in it.

i have looked at several sxms* tables but m unable to find a table which stores it.

Thanx

Saif

former_member206760
Active Contributor
0 Kudos

no it is not stored in any table

former_member210091
Participant
0 Kudos

then how does it shows up in sxmb_moni under dynamic configuration?

Thanx

Saif

prateek
Active Contributor
0 Kudos

Dynamic configuration as the name suggest retrieves the values at runtime from the message header. It does not stores the accessed value in a separate table.

Regards,

Prateek

former_member210091
Participant
0 Kudos

Used the following code to store filename in a custom(zfilenames) table


data l_record type mpp_dynamic.
data: itab_file type zfilenames.

call method dynamic_configuration->get_record
  exporting
    namespace = 'http://sap.com/xi/XI/System/File'
    name      = 'FileName'
  receiving
    record    = l_record.

*write : l_record.
itab_file-mandt = sy-mandt.
itab_file-filename = l_record-value.
insert into zfilenames values itab_file.

After storing the filename in table we wrote ABAP report to fetch values from this table and send e-mail in case all the files are not received within the specified period.

Thanx

Saif

Answers (0)