Call transaction in new session with the value at hotspot

10-11  Source: Network gathering  Views:2 

Advertisement
Hi all,
As a hotspot functionality I would like to open a new transaction in a new session with the value at hotspot. For that reason, I am using the FM ABAP4_CALL_TRANSACTION with the option STARTING NEW TASK.
This FM is not working because Parameter ID is not Maintained for the field (Hotspoted). So no value is passing to new transaction.
Please suggest any other way to implement this.
Thanks
Hi Anil..
This is the Solution for ur Requirement.   try this program and change as per ur need.
REPORT  ZSEL_CALL_TCODE.
data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
LOOP AT IT_KNA1 .
  WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
  HIDE IT_KNA1-KUNNR .
ENDLOOP.
CLEAR IT_KNA1-KUNNR.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.
IF IT_KNA1-KUNNR IS NOT INITIAL.
REFRESH IT_SPA.
IT_SPA-PARID = 'KUN'.
IT_SPA-PARVAL = IT_KNA1-KUNNR.
APPEND IT_SPA.
  CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
    EXPORTING
      TCODE                         = 'XD02'
     SKIP_SCREEN                   = ' '
    MODE_VAL                      = 'A'
    UPDATE_VAL                    = 'A'
  IMPORTING
    SUBRC                         =
   TABLES
    USING_TAB                     =
     SPAGPA_TAB                    = IT_SPA
    MESS_TAB                      =
  EXCEPTIONS
    CALL_TRANSACTION_DENIED       = 1
    TCODE_INVALID                 = 2
    OTHERS                        = 3
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  ENDIF.
ENDCASE.
<b>Reward if Helpful.</b>
Related articles