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

At line selection event

Former Member
0 Likes
1,091

HI ALL,

IAM USING THE FOLLOWING CODE.

AT LINE-SELECTION.

SET PARAMETER ID : 'BLN' FIELD T_BSIP_belnr,

'BUK' FIELD T_BSIP_bukrs,

'GJR' FIELD T_BSIP_gjahr.

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

this code should pass the belnr,bukrs and gjahr values in the selected line values of the report output to the transaction 'FB03'.

the report ouput data is in table t_bsip.

when ever a line is selected in the output it is not passing the correct values to the "FB03" but it is passing the last line values in the internal table.

plz suggest any solution

HI ALL,

IAM USING THE FOLLOWING CODE.

AT LINE-SELECTION.

SET PARAMETER ID : 'BLN' FIELD T_BSIP_belnr,

'BUK' FIELD T_BSIP_bukrs,

'GJR' FIELD T_BSIP_gjahr.

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

this code should pass the belnr,bukrs and gjahr values in the selected line values of the report output to the transaction 'FB03'.

the report ouput data is in table t_bsip.

when ever a line is selected in the output it is not passing the correct values to the "FB03" but it is passing the last line values in the internal table.

plz suggest any solution

9 REPLIES 9
Read only

Former Member
0 Likes
1,055

hi ,

jst use hide command with the other 2 value which you want to paas ....

priyank dixit

Read only

Former Member
0 Likes
1,055

Hello

After

write: t_bsip-belnr, t_bsip-bukrs, t_bsip-gjahr.

you must do:

hide: t_bsip-belnr, t_bsip-bukrs, t_bsip-gjahr.

Read only

Former Member
0 Likes
1,055

Hi raghu,

After using the line selection method use the statement GET CURSOR (see the doucmentation by using F1 help)

By using this you can get the value of the field selected and then read the internal table by using that value .

you will get your corresponding record pass those record values to the parameter id by using SET PARAMETER ID statement and then use CALL TRANSACTION statement.

I hope this will help you out.

Read only

Former Member
0 Likes
1,055

i didnt get the solution can u plz suggest it

Read only

Former Member
0 Likes
1,055

plz modify the changes in the above code

Read only

Former Member
0 Likes
1,055

Hi,

You Can use GET CURSOR to get the Value to a variable and Pass the Value to the Transaction.

Here is Sample Code for your Understanding-


Data:
w_cursor type fieldtype.

At Line-selection.(Or AT USER-COMMAND)

IF sy-cucol BETWEEN 30 AND 40.
          GET CURSOR FIELD w_cursor.
          IF w_cursor EQ 'FS_SALES-AUFNR'.
            READ LINE sy-lilli FIELD VALUE
            fs_sales-aufnr.
            IF fs_sales-aufnr IS NOT INITIAL.
              SET PARAMETER ID 'AUN' FIELD fs_sales-aufnr.

           Call Transaction 'Tname'.
            ENDIF.
          ENDIF.
      Endif.

Hope it will help you.

Regards,

Sujit

Read only

Former Member
0 Likes
1,055

Hi Raghu,

While writing the fields T_BSIP_belnr,

T_BSIP_bukrs,

T_BSIP_gjahr

on the basic list, just write a Hide statement as follows:

Hide: T_BSIP_belnr,

T_BSIP_bukrs,

T_BSIP_gjahr

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,055

Hi raghu,

make sure you have used HIDE statement while displaying your data in the basic list or you can also go for

AT LINE-SELECTION.

READ CURRENT LINE field value
                   T_BSIP_belnr EQ T_BSIP_belnr
                   T_BSIP_bukrs EQ  T_BSIP_bukrs
                   T_BSIP_gjahr EQ T_BSIP_gjahr.
      
SET PARAMETER ID : 'BLN' FIELD T_BSIP_belnr,
'BUK' FIELD T_BSIP_bukrs,
'GJR' FIELD T_BSIP_gjahr.

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

With luck,

Pritam.

Read only

Former Member
0 Likes
1,055

thank u all