Skip to Content
Author's profile photo Joey Yang

C4C Spreadsheet Clipboard Paste Integration

Requirement

User wants to  copy some part from spreadsheet ,and paste them on the table which is in the C4C  system.

This is easy clipboard, the only thing user need to do is to copy the data from spreadsheet , then select the first cell of the part they want to paste in and paste it.

i.e.

spreadsheet:

C4C Sales Quotes →Product ( Before paste):

Please note that the cursor should be in the first cell of the part which is you want to edit.

C4C Sales Quotes →Product(After paste):

Solution

Since user want to do part paste like what is already implemented in the SAP GUI, we choose the simplest implement way as below flow chart.

Flow Chart

1.User copy data from spreadsheet.

2.User select the first cell of the part which is they want to edit.

3.User paste data in it.

4.When user paste some data from clipboard , we will capture this event and replace it with our own logic.

a.Get data from clipboard.

b.Separate data by separator such as ‘tab’ ‘\n’.

c.Get data from table which is editing by user, the editing table is defined by the cursor in which table.

d.Change the data to the table based on cursor and clipboard data.

i.e.

–→ 

e.Do special handle for special scenarios such as currency & unit or checkbox , select list….

5.User need to handle some exception scenarios which cannot be handled by program.

implement

1.Attach an event ‘paste’ to the table(UI5 component) after table rendered.

2.Write handler to do logic which is mentioned above.

Assigned tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Vignesh Dharmaraj
      Vignesh Dharmaraj

      Hi Joey,

      The images in the blog are not visible, can you please correct the issue.

       

      Regards,

      Vignesh

      Author's profile photo Joey Yang
      Joey Yang
      Blog Post Author

      Hi  Vignesh,

       

      now it should be okay.

       

      Thanks,

      Joey

      Author's profile photo Vignesh Dharmaraj
      Vignesh Dharmaraj

      Thanks Joey for the images.

      Now I am not clear on where to add this Java Script codes for the C4C Standard or custom screens.

      As a C4C Developer we have only access to edit the screens in UI Designer of SAP Cloud Application Studio.

      Can you please let me know exactly where this can be done in C4C UI Designer?

       

      Regards,

      Vignesh

      Author's profile photo Joey Yang
      Joey Yang
      Blog Post Author

      Hi  Vignesh,

       

      Actually these changes should be done on product level,which means this is for standard development, there is no way to add these codes via SAP Cloud Application Studio.

      Thanks,

      Joey

       

      Author's profile photo Dhruvin Mehta
      Dhruvin Mehta

      Thanks for this blog, SOothis feature somehow is not working correctly in 20-02 and with this i can debug and raise incident to SAP!

      I have identified that it is currently working for only first 10 Columns of a spreadsheet , there was no such restriction on 1911 : checked idn my production system.

      Mahuya Paul , Anant Acharya , Dhanya KV  > Can you please check! Since you are the admins 🙂

      Author's profile photo Chandrasekar Balan
      Chandrasekar Balan

      Hi Joey / Dhruvin,

      I have created EC which has only one editable column(Amount Field) when i try to paste the data from excel, values gets pasted into single cell instead of different fields. Please provide your suggest.

      Thank you,

      Chandrasekar Balan

       

      Author's profile photo Dhruvin Mehta
      Dhruvin Mehta

      please share screenshot.

      Author's profile photo Chandrasekar Balan
      Chandrasekar Balan

      Hi Dhruvin,

      Here, I want to paste the data from Excel into "List Price" column. But all row cell values gets pasted into single field. Please find the details below. Please suggest how to paste value into each row.

       

      Thank you,

      Chandrasekar Balan