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

Interactive / Drill down ALV

Former Member
0 Likes
448

Hai all,

I have developed an alv to display credit management data.

on clicking the CREDIT CONTROL AREA field in the alv , it should go to FD32 transaction.

this is the code i am using:

FORM USERCOMMAND USING R_UCOMM LIKE SY-UCOMM

FIELDS TYPE SLIS_SELFIELD.

DATA : CURSOR1(25) TYPE C.

CASE R_UCOMM.

WHEN '&IC1'.

IF FIELDS-FIELDNAME = 'KKBER'.

READ TABLE TB_FINAL INDEX FIELDS-TABINDEX.

GET CURSOR FIELD CURSOR1.

SET PARAMETER ID 'KKB' FIELD TB_FINAL-KKBER.

CALL TRANSACTION 'FD03' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM. "USERCOMMAND

The problem is in FD32 Customer Number (kunnr ) is also a mandatory field.

i am getting the KKBER ( credit control area ) alone.

how to pass kunnr value of the selected line to the transaction.

can any one help me in this .

waiting for your response.

regards.

suki

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
415

Hi Suki

Here u can get the line item number of ur internal table from FIELDS-TABINDEX .so read that line item values of ur internal table.now as u r passing for credit control area like that only pass the value of customer .

CASE R_UCOMM.

WHEN '&IC1'.

IF FIELDS-FIELDNAME = 'KKBER'.

READ TABLE TB_FINAL INDEX FIELDS-TABINDEX.

GET CURSOR FIELD CURSOR1.

SET PARAMETER ID 'KKB' FIELD TB_FINAL-KKBER.

<b>SET PARAMETER ID 'KUN' FIELD value of the customer .</b>

CALL TRANSACTION 'FD03' AND SKIP FIRST SCREEN.

2 REPLIES 2
Read only

Former Member
0 Likes
415

Hi,

you have to find the line number where the user made a double click:

CLASS myevent_receiv_002 DEFINITION DEFERRED.

DATA:

user_event_receiver_002 TYPE REF TO

myevent_receiv_002.

CLASS myevent_receiv_002 DEFINITION.

PUBLIC SECTION.

METHODS handle_double_click

FOR EVENT double_click OF cl_gui_alv_grid

IMPORTING

e_row

e_column.

ENDCLASS.

CLASS myevent_receiv_002 IMPLEMENTATION.

METHOD handle_double_click.

DATA mymessage(50) TYPE c.

CONCATENATE 'Click on line: ' e_row-index

' and column: ' e_column

INTO mymessage.

MESSAGE i100(mj) WITH mymessage.

READ TABLE mytable INDEX e_row-index

INTO aux_table.

CALL METHOD mygrid->refresh_table_display.

ENDMETHOD.

ENDCLASS.

Now that you know what line (e_row-index), you can read your internal table with READ for that information. It´s now only a matter of passing that information:

SET PARAMETER ID 'xxxx' FIELD int_table-field.

Read only

Former Member
0 Likes
416

Hi Suki

Here u can get the line item number of ur internal table from FIELDS-TABINDEX .so read that line item values of ur internal table.now as u r passing for credit control area like that only pass the value of customer .

CASE R_UCOMM.

WHEN '&IC1'.

IF FIELDS-FIELDNAME = 'KKBER'.

READ TABLE TB_FINAL INDEX FIELDS-TABINDEX.

GET CURSOR FIELD CURSOR1.

SET PARAMETER ID 'KKB' FIELD TB_FINAL-KKBER.

<b>SET PARAMETER ID 'KUN' FIELD value of the customer .</b>

CALL TRANSACTION 'FD03' AND SKIP FIRST SCREEN.