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

SET PARAMETER ID

Former Member
0 Likes
1,571

Hi all,

I had a zprogram which will call transaction IW21

There are 3 radio buttons in input screen. P_M1, P_M2, P_TM

IF P_M1 EQ 'X'.

NOTI = 'M1'.

ELSEIF P_M2 EQ 'X'.

NOTI = 'M2'.

ELSEIF P_TM EQ 'X'.

NOTI = 'TM'.

ENDIF.

SET PARAMETER ID 'PID' FIELD NOTI.

SET PARAMETER ID 'PLA' FIELD WERKS.

START-OF-SELECTION.

CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN.

If P_M1 is executed the notification changes to M1

and if P_M2 is executed the notofication changes to M2

but if P_TM is executed the notification changes to <b>M1</b>

the notification is not changing to TM.

pls. help me on the above issue.

regards

arun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,056

Hi

In which event have you insert the code to set the variable NOTI?

Try:

START-OF-SELECTION.

 IF P_M1 EQ 'X'.
   NOTI = 'M1'.
 ELSEIF P_M2 EQ 'X'. 
  NOTI = 'M2'.
 ELSEIF P_TM EQ 'X'.
  NOTI = 'TM'.
 ENDIF.

 SET PARAMETER ID 'PID' FIELD NOTI.
 SET PARAMETER ID 'PLA' FIELD WERKS.

 CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN.

Max

6 REPLIES 6
Read only

Former Member
0 Likes
1,056

hi,

1.First of all group all the radio buttons.

2. May be u r not clearing the first radio button at the end of ur program. Check it.

Thanks,

Deepti

Read only

0 Likes
1,056

Hi,

Three radio buttons are in one group only.

arun

Read only

Former Member
0 Likes
1,056

U need to declare the all the 3 radio buttons P_M1, P_M2, P_TM

under 1 grp

Read only

Former Member
0 Likes
1,057

Hi

In which event have you insert the code to set the variable NOTI?

Try:

START-OF-SELECTION.

 IF P_M1 EQ 'X'.
   NOTI = 'M1'.
 ELSEIF P_M2 EQ 'X'. 
  NOTI = 'M2'.
 ELSEIF P_TM EQ 'X'.
  NOTI = 'TM'.
 ENDIF.

 SET PARAMETER ID 'PID' FIELD NOTI.
 SET PARAMETER ID 'PLA' FIELD WERKS.

 CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN.

Max

Read only

Former Member
0 Likes
1,056

hi,

if u press P_M1, is executed the notification changes to M1

if u press P_M2 ,is executed the notofication changes to M2 because of you pass the values to CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN.

using SET PARAMETER ID 'PID' FIELD NOTI.

SET PARAMETER ID 'PLA' FIELD WERKS.

but you are forgetting to pass the value to CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN. when ever u press third P_TM radio button, so you need

SET PARAMETER ID <pid > FIELD <fieldvalue>. statement to pass the value to CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN.

regards,

Ashokreddy.

Read only

0 Likes
1,056

Hi Ashok,

I am calling IW21 in start of selection only. Please find below the code, it is working fine for M1 and M2.

DATA : PRIDEST(4) TYPE C,

NOTI(2) TYPE C,

WERKS LIKE T001W-WERKS VALUE '1000'.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS : P_M1 RADIOBUTTON GROUP GRP1.

PARAMETERS : P_M2 RADIOBUTTON GROUP GRP1.

PARAMETERS : P_TM RADIOBUTTON GROUP GRP1.

SELECTION-SCREEN END OF BLOCK B1.

IF P_M1 EQ 'X'.

NOTI = 'M1'.

ELSEIF P_M2 EQ 'X'.

NOTI = 'M2'.

ELSEIF P_TM EQ 'X'.

NOTI = 'TM'.

ENDIF.

SET PARAMETER ID 'PID' FIELD NOTI.

SET PARAMETER ID 'PLA' FIELD WERKS.

START-OF-SELECTION.

CALL TRANSACTION 'IW21' AND SKIP FIRST SCREEN.

FREE MEMORY ID 'PID'.

FREE MEMORY ID 'PLA'.