cancel
Showing results for 
Search instead for 
Did you mean: 

upload an excel in Event Management

Former Member
0 Kudos

Hello Colleagues,

                              I want to upload an excel doc when reporting an event. Please let me know the config and code requirement for the same.

Thanks,

Shubh.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190756
Active Contributor
0 Kudos
Former Member
0 Kudos

Hello Steffen/ Berthold,

                                      Thanks for your reply. I am reporting an event via Web Interface and my requirement is to access the contents of excel and use the contents of excel for updating other applications.   Please let me know how can i access the contents and not only read the attachment.

                     Other issue is i am getting an error message while upload any attachment. The error is "Error while uploading, the file name is invalid or the file is too large".  Any pointers.

Thanks,

Shubh.

former_member190756
Active Contributor
0 Kudos

Hello Shubh,

you could write your own activity. There you should have the binary data available of the attachment with:

Data:

   *   Event Message Model
    l_evm_model   TYPE REF TO /saptrx/cl_eh_event_msg_model,
*   Event Message Table
    l_evm_tables  TYPE /saptrx/evm_tables.

   * Get All Event Message for this Event Handler
  CATCH SYSTEM-EXCEPTIONS
          move_cast_error = 8.
    l_evm_model ?= i_eai-eh_model.
    l_evm_tables = l_evm_model->get_event_data( ).
  ENDCATCH.

l_evm_tables includes FILE_HEADER and FILE_BIN with the attachment as binary.

But i can't say how you can read an excel file in ABAP. This you should ask in an ABAP forum.

Maybe here:

https://scn.sap.com/thread/1729418

Best regards,

Steffen

Former Member
0 Kudos

Hello Steffen ,

                         Thanks again for your response .  As i mentioned earlier i have another issue while uploading an attachment from web UI i am getting an error message "Error while uploading, the file name is invalid or the file is too large".

      I think the issue is in SCM server i need to place the file which i am trying to upload. But when i click on Browse button it takes me to the local desktop instead of SCM server path.

      Also how do we address such issues ?  Lets say if the customer wants to upload certain file then how will he get the correct path from where he needs to upload the file ?

Thanks,

Shubh.

former_member190756
Active Contributor
0 Kudos

Hello Shubh,

the file upload its thought that someone loads a file from his local pc and sends then a message.

If you want to process files that are already on the SCM server it is a different scenario.

In this case uploading would not be necessary. You could write an activity and use OPEN DATASET and process the file.

What is you exact scenario here? Normally it is much better to store such files in the database and not on file systems.

Best regards,

Steffen

Former Member
0 Kudos

Hello Steffen,

                       I have a  scenario where the EM web UI access is provided to the agent(third party) and he uploads an excel. This excel contains certain information which my program is going to read and update an application server.

             Now when i am uploading the file , i am getting an error message "Error while uploading, the file name is invalid or the file is too large".  Do you know possible reason why this error message is coming?

            I have tried the upload in demo cloud and there i am able to upload the attachment with the same config that i am doing in Customer system.

       

Thanks,

Shubh.

former_member190756
Active Contributor
0 Kudos

Is there any message number available or could you attach a screenshot. I tried to find the message in our system but was not succesfull.

Best regards,

Steffen

Former Member
0 Kudos

Hello Steffen,

                        Please find attached the attacment for the error message.

Thanks,

Shubh.

MarcoFreischlag
Advisor
Advisor
0 Kudos

Hello,

please check SAP Note:

1791729 - FileUpload error: "Error when uploading; the file name is invalid or the file is too large"

Regards Marco

former_member193027
Participant
0 Kudos

Hi,

Following on the same discussion is there any possibility of multiple upload of documents against the events i.e the system should be capable of uploading multiple files for any given event

Former Member
0 Kudos

Hi Dipak,

You should create a custom report (this is doable through major development) and attach to SAP EM WebUI to achieve this or you can create run a report program and upload excel from SAP GUI screen to report the event.

Work with your SAP ABAPer to achieve this.

We have created similar kind of program to report the event through SAP GUI (not through SAP EM WebUI) via Excel and Text files format from local PC.

Regards


GGOPII

former_member193027
Participant
0 Kudos

Hi,

Can you provide some tips on the report development which you are referring here.

Former Member
0 Kudos

Hi Dipak,

Follow the steps to to upload through SAP GUI.

1. Create a custom report

2. Custom report should have upload load file type as Excel and Text file format

3. Custom report can have both local and server to fetch the file.  Local enables to user to upload from the desktop and same program can be used to take the file from server.

4. Custom report should call call_bapi_eh_post and call_bapi_eh_addeventmsg_02 to post the events

You need a good ABAP programmer to perform this job.

Regards

GGOPI

former_member193027
Participant
0 Kudos


Hi,

Thx.

Can we use this report as a link to upload in EM web UI.

former_member193027
Participant
0 Kudos

Hi Gopi,

Will appreciate your response here

Former Member
0 Kudos

Hi Dipak,

The above one which I referred to create via SAP GUI not through SAP EM WebUI.  It would be same concept but you need to work on component controller to report the event and SAP Webdynpro developer require to achieve this.

Go to Tcode SE24 -> Enter /SAPTRX/CL* -> Press F4.  You can see /SAPTRX/CL_EM_WDA_UI or /SAPTRX/CL_EM_FPM_UI (I don't know the version changes name, so check both).

This class helps to execute SAP EM WebUI in Front end.  Ask you developer whether he can check and develop custom to built to report event message upload via excel.

BADI event message:

/SAPTRX/BADI_MESSAGE

Regards


GGOPIII

Berthold_vH
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Shub,

is the customer using the Web UI for reporting the event? If yes you need just to configure a new field using the EM Attrribute ID "Attachment" for sending and displaying the Event Message. Also add this parameter to the respective user profiles.

Best regards

Berthold