cancel
Showing results for 
Search instead for 
Did you mean: 

CRM UI Transaction Launcher - fill in selection screen values

prasad_reddy9
Explorer
0 Kudos

Hi,

Added a report to transaction launcher.

Selection Screen as below.

I am going to the transaction launcher from Customer Account.

I can get the BP Number in context

BUT I am unable to pass the BP number to the Customer field.

I have read related tickets & tried the solutions but it is not working.

My Solution ->

Copied TSTC into ZTSTC and created a new execute method with below code.

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = OBJECT-KEY-CODE
EXCEPTIONS
ok = 0
not_ok = 1
others = 2.

IF sy-subrc NE 0.
MESSAGE s059(eu) WITH OBJECT-KEY-CODE.
ELSE.

DATA:
lv_param1 TYPE CPIDLIST,
lv_param2 TYPE CPIDLIST,
lv_param3 TYPE CPIDLIST,
lv_skipscreen TYPE char1.

swc_get_element container 'param1' lv_param1.
swc_get_element container 'param2' lv_param2.
swc_get_element container 'param3' lv_param3.
swc_get_element container 'skipsc' lv_skipscreen.

IF lv_param1 IS NOT INITIAL.
SET PARAMETER ID: lv_param1-pid FIELD lv_param1-value.
ENDIF.

IF lv_param2 IS NOT INITIAL.
SET PARAMETER ID: lv_param2-pid FIELD lv_param2-value.
ENDIF.

IF lv_param3 IS NOT INITIAL.
SET PARAMETER ID: lv_param3-pid FIELD lv_param3-value.
ENDIF.

CALL TRANSACTION OBJECT-KEY-CODE.
ENDIF.

Next in Prepare_data_flow method of Transaction launcher class, I added below code.

data ICWCPROCESSEDOBJECT
type ty_ICWCPROCESSEDOBJECT .
data PARAM1
type ty_PARAM1 .
data PARAM2
type ty_PARAM2 .
data PARAM3
type ty_PARAM3 .
data ICWEBCLIENTBORKEYPARAMETER
type ty_ICWEBCLIENTBORKEYPARAMETER .

PARAM1-PID
=
'BPA'.

PARAM2-value = '11000026'.
me->set_container_data(
iv_name = 'param1'
iv_value = PARAM1 ).

ICWEBCLIENTBORKEYPARAMETER
=
'ZTC1'.

me->set_container_object(
iv_name = '<*MAINOBJ*>'
iv_object_key = ICWEBCLIENTBORKEYPARAMETER
iv_object_type = gv_bortype ).

Anyone has any advise on how to tackle this?

Accepted Solutions (0)

Answers (0)