cancel
Showing results for 
Search instead for 
Did you mean: 

How to Mask URL in Smart forms

former_member450736
Active Participant
0 Kudos

Hi,

i wanted to mask the URL in my smartform so that it is concise and readable, like suppose url is like this http://www.myurl.com/pages/abcd&attr=19093 i wanted to create text which is something like click here on clicking click here it should take me to the desired page which the above mentioned URL ( http://www.myurl.com/pages/abcd&attr=19093 ) actually navigates.

How can i achieve this Smart forms??

Please suggest

Edited by: kranthi kumar on Oct 29, 2010 12:56 PM

Edited by: kranthi kumar on Oct 29, 2010 12:59 PM

Accepted Solutions (1)

Accepted Solutions (1)

aidan_black
Active Contributor
0 Kudos

Hi,

My answer in thread might help.

Regards,

Aidan

former_member450736
Active Participant
0 Kudos

Hi Aidan,

Thanks for your answer, Just got an alternative solution, when i got XSF output from smartform function Module, the same XSF output (me->sf_job_output-xmloutput-trfresult-content) i used in below method to convert to string.

CALL METHOD cl_hrrcf_cs_sf=>convert_xsf_html_to_txtstring
        EXPORTING
          content     = me->sf_job_output-xmloutput-trfresult-content
        IMPORTING
          html_string = me->doc_properties-output_c
          html_tab    = me->doc_properties-output_c_tab.

later i realised that URLs in the smartform has got corresponding HTML code as below in the (me->doc_properties-output_c_tab).

<a href="https://www.google.com">
<span>
<a href="https://www.google.com" TARGET="test_blank">https://www.google.com</a>
</span>
</a>

when i changed the link in the debugger https://www.google.com which was inside

<span> </span>

to "Click Me", the output was as i expected in the E-Mail which showed me Click Me and when i click that it took me to google web site.

so i decided that i would change this table(me->doc_properties-output_c_tab.) for every URL in code, though it did not seem like right solution, as suggested in this forum there is no straight solution for this, i have no other option.

Please comment.

Thanks,

Kranthi.

Edited by: kranthi kumar on Oct 29, 2010 9:43 PM

Edited by: kranthi kumar on Oct 29, 2010 9:44 PM

brad_bohn
Active Contributor
0 Kudos

See my reply to Aidan in that same post - it works for OTF to PDF as well. You must create the function with a CHANGING parameter called DATA, then modify the 'ST' line that is sent...

former_member450736
Active Participant
0 Kudos

Hi Aidan,

that really worked for me.

Thank you very much.

Answers (2)

Answers (2)

brad_bohn
Active Contributor
0 Kudos

Removed incorrect response...

Edited by: Brad Bohn on Oct 29, 2010 12:01 PM

Former Member
0 Kudos

Hi,

In Smartform, under "General Attributes" of your text window, enter the text then select the icon "Insert Link" here you maintain the url.

Regards

GK.