Skip to Content
0
Former Member
Dec 13, 2007 at 03:57 PM

How to pass variable from Java to ABAP in BSPs

27 Views

Hello experts,

taking into account the two environments (browser and server) I need to pass information from Java to ABAP.

After seen this link: view-refresh

I have tried the next:

HTMLB: <input type="hidden" name="myFlag" value="">

...

ABAP: DATA: lv_height TYPE STRING.

...

JAVA: var intXo = readCookie("XEix");

JAVA: if ( intXo == 900 )

JAVA: else if (intXo == 725 )

...

ABAP: lv_height = request->get_form_field( 'myFlag' ).

ABAP: IF lv_height EQ 'X'.

ABAP: TRAYTAREAS_P = 'TRUE'.

ABAP: ELSE.

ABAP: TRAYTAREAS_P = 'FALSE'.

ABAP: ENDIF.

"document.all.myFlag.value" gets the correct value according the condition, but the ABAP code does not recover this value (lv_height is always initial).

Can you help me with that? I'm not able to see where is the mistake...

Exist any alternative way to recover in ABAP an JavaScrip value?

thanks in advance.

Arnau

Message was edited by:

Arnau Mustieles