Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

interactive report

Former Member
0 Likes
1,300

Dear gurus,

Can i have more than one hotspot in the secondary screen ?

Is there any passing parameters to hotspot?

Kindly let me know.

Regards

R.Rajendran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,281

Hi

U should use the command HIDE in ordert to get the value of the field where it does the doubleclick:

LOOP AT ITAB.
  WRITE: / ITAB-FIELD1 HOTSPOT,
                 ITAB-FIELD2,
                 ITAB-FIELD3 HOTSPOT.
  
  HIDE: ITAB-FIELD1, ITAB-FIELD3.
ENDLOOP.

AT LINE-SELECTTION.

  GET CURSOR FIELD V_FIELD.

  CASE V_FIELD.
    WHEN 'ITAB-FIELD1'. WRITE ITAB-FIELD1.
    WHEN 'ITAB-FIELD2. WRITE ITAB-FIELD2.
  ENDCASE.

Max

11 REPLIES 11
Read only

Former Member
0 Likes
1,282

Hi

U should use the command HIDE in ordert to get the value of the field where it does the doubleclick:

LOOP AT ITAB.
  WRITE: / ITAB-FIELD1 HOTSPOT,
                 ITAB-FIELD2,
                 ITAB-FIELD3 HOTSPOT.
  
  HIDE: ITAB-FIELD1, ITAB-FIELD3.
ENDLOOP.

AT LINE-SELECTTION.

  GET CURSOR FIELD V_FIELD.

  CASE V_FIELD.
    WHEN 'ITAB-FIELD1'. WRITE ITAB-FIELD1.
    WHEN 'ITAB-FIELD2. WRITE ITAB-FIELD2.
  ENDCASE.

Max

Read only

0 Likes
1,281

at line-selection.

get cursor field v_field.

CASE v_field.

when 'mt_tvalaoe'.

perform itab1.

when 'mt_tvalpoe'.

perform form2.

endcase.

I tried triggering is not done in the hotspot.

Regards

R.Rajendran

Read only

0 Likes
1,281

Hi

at line-selection.

get cursor field v_field.

CASE v_field.
  when 'MT_TVALAOE'.   "<---------------------------mt_tvalaoe'.
     perform itab1.
  when 'MT_TVALPOE'.   "<---------------------------mt_tvalpoe'.
     perform form2.
endcase.

Max

Read only

0 Likes
1,281

mt_tvalaoe is a work area variable.

what should i do.

Read only

0 Likes
1,281

U have to put the name of the variable u've written.

Try my sample: it works fine

DATA: BEGIN OF itab OCCURS 0,
        field1,
        field2,
        field3,
      END   OF itab.

DATA: v_field(30).

START-OF-SELECTION.

  itab-field1 = 'A'.
  itab-field2 = 'B'.
  itab-field3 = 'C'.
  APPEND itab.

  itab-field1 = 'D'.
  itab-field2 = 'E'.
  itab-field3 = 'F'.
  APPEND itab.

  itab-field1 = 'G'.
  itab-field2 = 'H'.
  itab-field3 = 'F'.
  APPEND itab.

  LOOP AT itab.
    WRITE: / itab-field1 HOTSPOT,
             itab-field2,
             itab-field3 HOTSPOT.

    HIDE: itab-field1, itab-field3.
  ENDLOOP.

AT LINE-SELECTION.

  GET CURSOR FIELD v_field.

  CASE v_field.
    WHEN 'ITAB-FIELD1'. WRITE: 'FIELD1:', itab-field1.
    WHEN 'ITAB-FIELD3'. WRITE: 'FIELD3:', itab-field3.
  ENDCASE.

Read only

0 Likes
1,281

In my program mt_tvalaoe is a numeric variable.

will hotspot work in these scenario.

Regards

Read only

0 Likes
1,281

This is my program declaring statement.

data : v_field(30).

Data : mt_tvalaoe type p decimals 3.

Data : mt_tvalpoe type p decimals 3.

Loop itab.

At last.

WRITE : /5 '|' no-gap, (32) 'Auto Total ' ,'|',(17) mt_tvalAOE hotspot right-

justified color 5.

WRITE : /5 '|' no-gap,(32) 'Pumps Total ','|',(17) mt_tvalpOE hotspot right-justified color 5.

hide:mt_tvalaoe,mt_tvalpoe.

Endat.

Endloop.

at line-selection.

get cursor field v_field.

CASE v_field.

when 'mt_tvalaoe'.

perform itab1.

when 'mt_tvalpoe'.

perform form2.

endcase.

where i went wrong.

Read only

0 Likes
1,281

Hi

Just as I said in my previuos answer the field name in CASE statament has to be written in UPPER CASE, try this: it works:

DATA : v_field(30).
DATA : mt_tvalaoe TYPE p DECIMALS 3.
DATA : mt_tvalpoe TYPE p DECIMALS 3.

DATA: BEGIN OF itab OCCURS 0,
        mt_tvalaoe TYPE p DECIMALS 3,
        mt_tvalpoe TYPE p DECIMALS 3,
      END   OF itab.

DO 10 TIMES.
  MOVE sy-index TO itab-mt_tvalaoe.
  itab-mt_tvalpoe = itab-mt_tvalaoe * 2.
  APPEND itab.
ENDDO.

LOOP AT itab.

  mt_tvalaoe = mt_tvalaoe + itab-mt_tvalaoe.
  mt_tvalpoe = mt_tvalpoe + itab-mt_tvalpoe.

  AT LAST.
    WRITE : /5 '|' NO-GAP,(32) 'Auto Total ' ,'|',(17) mt_tvalaoe HOTSPOT RIGHT-JUSTIFIED COLOR 5.
    WRITE : /5 '|' NO-GAP,(32) 'Pumps Total ','|',(17) mt_tvalpoe HOTSPOT RIGHT-JUSTIFIED COLOR 5.

    HIDE: mt_tvalaoe, mt_tvalpoe.

  ENDAT.
ENDLOOP.

CLEAR: mt_tvalaoe, mt_tvalpoe.

AT LINE-SELECTION.
  GET CURSOR FIELD v_field.
  CASE v_field.
    WHEN 'MT_TVALAOE'. MESSAGE i208(00) WITH mt_tvalaoe.
    WHEN 'MT_TVALPOE'. MESSAGE i208(00) WITH mt_tvalpoe.
  ENDCASE.

Max

Read only

0 Likes
1,281

Now it is working good.

thanks a lot.

Regards

R.Rajendran

Read only

Former Member
0 Likes
1,281

You can have as many as you like.

You need to use the KEYWORD

DATA: W_CURSOR(20).

GET CURSOR W_CURSOR.

This will give you the fieldname that has been selected.

Read only

Former Member
0 Likes
1,281

Yes there can be any no of Hotspot in the interactive list.

Just need to add the Key word 'HotSpot On"