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

REALLY URJENT-set parameter ID

Former Member
0 Likes
1,366

Hi,

I have a alv grid display as the output of a report.this grid displays the buissness partner (bp) id in the first coloumn.

Now if i click on any bp ; it shold direct me to the standard transaction-BP.

My problem is that-when i click on the first row(eg-7401); it links me to the tcode bp with that bp in display; but when i click on second or any other row(first coloumn)bp(eg-22267); then also it links me to the first bp 7401in that tcode.

i hav used the following code-

FORM user_command USING RUCOMM like sy-ucomm

selfield TYPE slis_selfield.

read table i_t_output_final into i_s_output_final index selfield-tabindex.

if sy-subrc eq 0.

case RUCOMM.

when '&IC1'.

SET PARAMETER ID c_id FIELD i_s_output_final-partner.

CALL TRANSACTION c_md AND SKIP FIRST SCREEN.

endcase.

ENDIF.

ENDFORM.

here c_id = 'BPA'

and c_md = 'BP'.

Thanks in advance.

Sumita

Hi,

I have a alv grid display as the output of a report.this grid displays the buissness partner (bp) id in the first coloumn.

Now if i click on any bp ; it shold direct me to the standard transaction-BP.

My problem is that-when i click on the first row(eg-7401); it links me to the tcode bp with that bp in display; but when i click on second or any other row(first coloumn)bp(eg-22267); then also it links me to the first bp 7401in that tcode.

i hav used the following code-

FORM user_command USING RUCOMM like sy-ucomm

selfield TYPE slis_selfield.

read table i_t_output_final into i_s_output_final index selfield-tabindex.

if sy-subrc eq 0.

case RUCOMM.

when '&IC1'.

SET PARAMETER ID c_id FIELD i_s_output_final-partner.

CALL TRANSACTION c_md AND SKIP FIRST SCREEN.

endcase.

ENDIF.

ENDFORM.

here c_id = 'BPA'

and c_md = 'BP'.

Thanks in advance.

Sumita

9 REPLIES 9
Read only

Former Member
0 Likes
1,210

Did you debug and check if the field contents that you are setting, are the same as you require them to be, when you click for the second or third time?

Read only

rahul_kamble2
Participant
0 Likes
1,210

Hi,

please check value of selfield-tabindex in debug mode while clicking on second line item.

check if it changes the value or else try to use get current cell method of ALV Grid.

Regards,

Rahul

Read only

0 Likes
1,210

yes i hav checked on debug mode, the field value is what i select; but i get to see only the first row 7401 on whichever row i click on to.

Read only

Former Member
0 Likes
1,210

Hi Sumita,

Make a little correction :

FORM user_command USING RUCOMM like sy-ucomm

selfield TYPE slis_selfield.

case RUCOMM.

when '&IC1'.

read table i_t_output_final into i_s_output_final index selfield-tabindex.

if sy-subrc eq 0.

SET PARAMETER ID c_id FIELD i_s_output_final-partner.

CALL TRANSACTION c_md AND SKIP FIRST SCREEN.

ENDIF.

endcase.

ENDFORM.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

0 Likes
1,210

CAN YOU pls send the complete code so that i can check from my end?

or else u can try by taking one more variable of type partner and then pass the value of selected partner to that variable and pass that variable to set parameter..

check the below code,

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

DATA invnum TYPE zsdd_pack_hdr-invnumber.

CASE r_ucomm.

WHEN '&IC1'.

READ TABLE it_dispdata INTO wa_dispdata INDEX rs_selfield-tabindex.

invnum = wa_dispdata-invnumber.

SET PARAMETER ID: 'CAR' FIELD invnum.

CALL TRANSACTION 'ZIPACK' AND SKIP FIRST SCREEN.

ENDCASE.

ENDFORM.

Reward if useful.

Edited by: lucky on Apr 30, 2008 12:51 PM

Read only

Former Member
0 Likes
1,210

Hi,

clear the field i_s_output_final-partner then afterv calling the transaction VF03

check with the following code

case RUCOMM.

when '&IC1'.

SET PARAMETER ID c_id FIELD i_s_output_final-partner.

CALL TRANSACTION c_md AND SKIP FIRST SCREEN.

endcase.

CLEAR i_s_output_final-partner.

Regards

Krishna Praneeth

Read only

0 Likes
1,210

hi krishna,

can u suggest me away to clear the default value of parameter id of bp before calling the tcode

Read only

0 Likes
1,210

You dont need to clear the parameter id, it gets overwritten everytime a new one is set.

What you will need to do is, like you said u can only see the first BP selected, you will ahve to use the

Get Cursor field <fieldname> value <fieldval> to capture the currently selected line.

Or if its a Report, you can use At line selection to capture from the basic list.

Do let me know if this worked.

Pranjal.

Read only

0 Likes
1,210

Hi,

Set the value which are assigned to parameter id as initial.

again set the parameter id with the Initial Value.

Regards,

Rahul