Application Development 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: 

How to drill down to transaction with two parms

Former Member
0 Kudos

Hi all,

I am using REUSE_ALV_GRID_DISPLAY and I want to drill down to FBL3N when the user clicks on the account number. I can get the account number to be displayed on the FBL3N screen but not the company number. This is my code. I would appreciate any help you can give me.

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

IF RS_SELFIELD-FIELDNAME = 'HKONT'.

CASE R_UCOMM.

WHEN '&IC1'. "Your FCode

SET PARAMETER ID 'SAK' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'FBL3N' AND SKIP FIRST SCREEN.

ENDCASE.

ENDIF.

ENDFORM.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

if u have company code in the internal table being passed into the grid display. then u can just

set parameter id 'sak' field internal_tab-hkont.

set parameter id 'buk'( parameter id ) field internal_Tab-bukrs.

call transaction 'fbl3n' and skip first screen.

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Do you know what the company code is or do you have to get it from the line of the ALV grid. If you know it you should be able to set it using the parameter like you did for the account number.

Is there anyway for you to know the index of the line that you have double clicked on? If so, then you can use it to read that line of the table and then you can find out what the company code is as well as any other field of the row.

Regards,

Rich Heilman

Former Member
0 Kudos

if u have company code in the internal table being passed into the grid display. then u can just

set parameter id 'sak' field internal_tab-hkont.

set parameter id 'buk'( parameter id ) field internal_Tab-bukrs.

call transaction 'fbl3n' and skip first screen.

0 Kudos

I tried this but the data is always the last record that is loaded to my internal table.

0 Kudos

You have to get the index of the row that the user has clicked on, then read it...

READ TABLE itab index row_index.

Regards,

Rich Heilman

0 Kudos

Thank you! I tried that and it worked. You're awesome!

0 Kudos

Thank you DP! I did what you and Rich suggested and I got my problems solved. You're awesome!

0 Kudos

Please be sure to award points accordingly and mark you post as solved. Thanks.

Regards,

Rich Heilman