cancel
Showing results for 
Search instead for 
Did you mean: 

getParamIdForComponent

Former Member
0 Kudos

In Java you can call:

String id = pageContext.getParamIdForComponent(H1);

What is the syntax to do the same in ABAP BSPs?

The purpose of the above is to grab the HTMLID for the component to apply a javascript function.

Anyone know of a good Java to ABAP reference for syntax?

Thanks,

Stephen

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Stephen,

I am not familiar with Java, but are you looking for the following?

document.getElementById("text1")

Sudha

Former Member
0 Kudos

Hello Sudha,

Thank you for your response.

Below was my attempt at using the above code. I believe the method call you gave me was javascript and not ABAP. What I am missing to complete the code?

Code:

<% data: textID TYPE STRING. %>

<htmlb:textView id = "H1"

text = "Hello World!"

design = "EMPHASIZED">

<% textID = document.getElementById(H1). %>

</htmlb:textView>

Error:

Field "DOCUMENT" is unknown. It is neither in one of the specified

The provided method call appears to be javascript. I need the ABAP call to tell me what the BSP is about to call the HTML object. SAP was kind enough to not allow the name of the HTMLB id be represented in the HTML for DHTML calls so you have to use ABAP to find out what they are about to call it. Normally in HTML you'll see the object called htmlb_2349_01_124 versus taking on the name you gave it "H1". I know several ways of taking care of this feature of SAP's version of JSPs, I am looking for how this can be taken care of in BSPs.

Regards,

Stephen

Former Member
0 Kudos

moving this to the bsp forum