cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancing Standard javascrpit

Former Member
0 Kudos

Hi Experts,

I'm having a javacrpit in one of the web ui Component(UICMP_LTX -> PAGES WITH FLOWLOGIC -> LaunchTransactionAdmin.Js). I'm able to enhance views, but not able to enhance java scrpit. Could anyone please suggest me on how to enhance the standard javascrpit.

Thanks & Regards,

S.Gangireddy

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member207526
Participant
0 Kudos

HI S.Gangireddy ,

I have very urgent requirement to change size of transaction launcher screen .

I will really be very thankful to you if you please share me how you did this requirement .

Thanks & Regards,

Rishi verma

MichaelKatai
Explorer
0 Kudos

Hello Rishi!

Due to a lack of time I had no other possibility than registering the object.

All other possibilities are already discussed in this thread.

Regards,

  Michael

former_member207526
Participant
0 Kudos

HI Michael ,

Thanks for your quick response . It would really very help full if you please explain what you did exactly . I am writing my approach below as well .

1. I have enhance UICMP_LTX component   ( Z Component : ZUICMP_LTX)

2. I have Copy the Java script under page with flow logic : LaucnTransactionAdmin.js in my Z-Component

3. After copying i am able to see at se80 transaction under my package that i used while doing this component enhancement

4. Then i made changes in my JS file but is it not calling then i get idea from "Sigrid" , she told to add JS file path at SPRO .

5. As per her solution , i activate business function to enable "Define file path for JS" under spro

6. Now i am able to write JS file path but now i struct what path i have select from SICF transaction ??

So Michael , did you followed same approach or any other approach ...Please help me...

    HI Sigrid ,Can you please help me , how you get path from SICF transaction .

Please help..i would really be very thankful to you...

Thanks & regards,

Rishi verma

MichaelKatai
Explorer
0 Kudos

Hi Rishi,

I tried all suggestions from this and (many) other threads and did a lot of investigation by myself. But I couldn't resolve the problem 😞

You can find the path by opening the service properties in SICF. The very first line in the window is the path:

Kind regards,

  Michael

Sigrid
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rishi,

as pointed out by Michael, you are able to identify the relative path in SICF (without /default_host/) and your service name.

According to the SPRO documentation of the customizing path "Define Path for JS Files", you can use the following formats to enter the URL for the JavaScript file:

  • relative URL
  • absolute URL

According to the coding identified by Andrew CL_THTMLB_CONTENT, method LOAD_CUSTOMIZED_JS_FILES, it seems as if only an absolute path is considered and customizing with relative pathes are ignored but I am no expert in this area, so I am not sure.

You might open an incident for SAP. There might be a bug.

Best Regards,

Sigrid

former_member207526
Participant
0 Kudos

Thanks Sigrid & Michael for your quick response .

I have follow step to get path ..cab you please check , is am on right track...

Step 1. Open SICF transaction and Enter my Enhanced component name

Step 2. A new window open and i click on last option

Step 3. Then i get the path ,

Step 4 . THen i open SPRO and Define path for JS

I have created new entries and

Priorty  URL

1          /default_host/sap/bc/bsp/sap/ZUICMP_LTX/Pages with Flow  Logic/LaunchTransactionAdmin.js

Please

Please check.. is am on right track...

Thanks & regards,

Rishi verma

former_member207526
Participant
0 Kudos

Thanks

I am looking into it but unable to achieve it , now ..  

If i will able to achieve then i will post my answer ..

Thanks for your support .

Rishi verma

ashik_k2
Contributor
0 Kudos

Hi,

You mean still you are not able to load your custom javascript?

Try to clear server and browser cache once and re launch the Web client

try to check in http trace

Regards,

Ashik

former_member207526
Participant
0 Kudos

No Ashik ,

I am still not able to load my java script . Were you able to achieve it ?

please share your thoughts ?

Regards,

Rishi

former_member208911
Discoverer
0 Kudos

Hi Rishi,

Thank you for your replies on this topic, those are really helpful. But i need one more help after all those replies

I try your way to supress standard JS with my own. I took my JS file with your way but on "CRMCMP_IC_FRAME/HiddenView" for "header_jscripts.js". How can i exclude this JS file from bsp's rendered page?

Thank you.

former_member207526
Participant
0 Kudos

Hi Utku ,

I have followed above approach , but on later stage my requirement got changed so i stopped working on it . I was looking into some of approach that is done on my system by other . I try to reach him and get back to you .

Thanks .....

former_member208911
Discoverer
0 Kudos

Hi Rishi,

Thank you for your reply but we change our way for that issue.

Thank you,

Utku Y.

Former Member
0 Kudos

sloved by myself

Sigrid
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

How did you resolve the enhancing? Did you manage to change the Javascript file without modification?

Thanks a lot

Sigrid

Sigrid
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I just managed to enhance a JS function by using path

     SAP Customizing Implementation Guide

          Customer Relationship Management

               UI Framework

                    UI Framework Definition

                              Define Path for JS Files

by

  • copying JS to Z-Application (of used for enhancing of component) and activate it in SE80
  • Check for path of file in SICF
  • Enter path to customizing mentioned above

Best Regards,

Sigrid

former_member182421
Active Contributor
0 Kudos

Hi Sigrid,

Thanks for sharing, I hate the "solved by myself"  easier asking than answering, I guess...

Cheers!

Luis

MichaelKatai
Explorer
0 Kudos

Hello Sigrid,

have you done anything else? I also did these steps but it still grabs the original file (I have checked this is the JavaScript-Debugger of Firefox).

Have you any advice?

Kind Regards,

  Michael

AndyHowell
Associate
Associate
0 Kudos

Hi Michael,

Based on the class CL_THTMLB_CONTENT->LOAD_CUSTOMIZING_JS_FILES, the full path is required.  'http' 'HTTP' and '.js' '.JS' are checked. By placing a break point in this method will ne able to determine if your javascript is added or not.

Kind regards,

Andy

Former Member
0 Kudos

Hi Gangireddy

I think it is not possible to enhance the standard java script , after enhancing the component you can directly edit the javascript file.

Thanks & Regards

Raj