cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CSS in HTML Template ....

aayushaggarwal
Active Participant
0 Likes
1,361

Hi experts,

Can you please tell me how to embed CSS file in the HTML Template ??

Below is my Template Code:

`SAP_TopInclude()`

<html>

  <head>

    `SAP_PageTitle()`

    `SAP_Stylesheet()`

    `SAP_JavaScript()`

  </head>

  <body `SAP_BodyAttributes()` onload="`SAP_OnloadJavaScript()`">

    `SAP_TemplateHeader()`

    `SAP_BodyContentBegin()`

    `SAP_FormBegin()`

      `SAP_DynproLayerBegin(004,003,002,001)`

      `SAP_Label("L1")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(015,003,009,001)`

      `SAP_Label("L2")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(026,003,009,001)`

      `SAP_Label("L3")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(037,003,008,001)`

      `SAP_Label("L4")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(002,004,045,005)`

      `SAP_TableControl("%#C_101")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(002,004,001,001)`

      `SAP_InputField("WA_MSEG-RB1")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(002,009,009,001)`

      `SAP_Button("B2")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(012,009,015,001)`

      `SAP_Button("B1")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(044,009,001,001)`

      `SAP_Button("B4")`

      `SAP_DynproLayerEnd()`

      `SAP_DynproLayerBegin(046,009,001,001)`

      `SAP_Button("B3")`

      `SAP_DynproLayerEnd()`

    `SAP_FormEnd()`

    `SAP_BodyContentEnd()`

  </body>

</html>

Regards,

Aayush Aggarwal

View Entire Topic
aayushaggarwal
Active Participant
0 Likes

Hi Utkarsha,

You can see the folder structure and the coding in the attachments. Please provide a solution(required badly).

Regards,

Aayush Aggarwal

former_member194364
Active Contributor
0 Likes

Hi Aayush,

Is the following correct:

<link rel="stylesheet" href="`mimeURL(~service="itsmobile",

should it not be

<link rel="stylesheet" href="`mimeURL(~service="ZWM_ITS_TEST",

so that the "STYLE.CSS" file of 'ZWM_ITS_TEST' is used rather than 'itsmobile'?

Regards,

Oisin

Former Member
0 Likes

Hi Aayush,

In continuation to Oisin's reply, Or you may use:
~service=~current_service

Also, we generally check the original parameter given for the internet service first before adding the CSS link as:

` if ( ~itsmobileCssInclude != "" )

        <!-- customer include from gui settings -->

`       <link rel="stylesheet" href="`mimeURL(~service=~current_service, ~theme=~theme, ~language="", ~name="style.css")`" type="text/css" />

` else <!-- default include from itsmobile --> `

        <link rel="stylesheet" href="`mimeURL(~service="itsmobile", ~theme=09, ~language="", ~name="mobile.css")`" type="text/css" />

` end;`

Let me know if this helps.

Thanks,

Utkarsha

aayushaggarwal
Active Participant
0 Likes

Hi,

Sorry i 've not tried it, but the problem is resolved.

I had to create other template and use it as the css in the application.

Regards,

Aayush

former_member194364
Active Contributor
0 Likes

Hi Aayush,

For other's who are viewing this thread. To confirm your solution can you paste the CSS reference that is now contained in the HTML template? Can you also confirm the ITSMOBILE generation style that was used?

Regards,

Oisin