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: 

Call transaction on line selection

Karan_Chopra_
Active Participant
0 Kudos

I have dsplayed a table on screen with multipple columns

i want to call diffrent transactions on clicking different columns thru line selection

how can i do that

6 REPLIES 6

Former Member
0 Kudos

Hi Karan,

Use the GET CUESOR FIELD l_field

so that you could find the particular field value in l_field.

you could call the transaction based on the field selected.

1. GET CURSOR FIELD f.

2. GET CURSOR LINE line.

Variant 1

GET CURSOR FIELD f.

Additions:

1. ... OFFSET off

2. ... LINE line

3. ... VALUE g

4. ... LENGTH len

5. ... AREA

Thanks,

Sunil

Former Member
0 Kudos

hi,

write in AT LINE-SELECTION to get the field name of the selected column based on that you can call the TCODE.

ex:

GET CURSOR FIELD v_fname.

case v_fname.

when <field1>

call transaction...

when <field2>

call transaction...

.

.

.

endcase.

-somesh

  • reward if it helpful*

Former Member
0 Kudos

Hi,

Do the Following.

Capture the Current line using.

GET CURSOR FIELD LINE LN FIELD FLD.

IN THE USER COMMAND.

CASE SY-UCOMM.

WHEN 'ENTR'.

IF FIELD = 'FLD1'.
CALL TRANSACTION 'VA01'.
ELSEIF FIELD = 'FLD2'.
CALL TRANSACTION 'VA01'.
ELSE IF ...

ENDIF.
ENDCASE.

Regards,

Morris Bond.

Reward Points if Helpful.

Karan_Chopra_
Active Participant
0 Kudos

it is not field based its column based

i mean it shud call different trans on diff column selected NOT each n every field of column

i mean for column 1 field it shud load same trans for every field in same column

Edited by: Karan Chopra on Mar 31, 2008 5:05 PM

Karan_Chopra_
Active Participant
0 Kudos

plz help

Former Member
0 Kudos

Hi,

Try like this:

WRITE: 'Select a Selection!',

/ '----


'.

SKIP.

FORMAT HOTSPOT COLOR 5 INVERSE ON.

WRITE: 'Selection 1',

/ 'Selection 2'.

AT LINE-SELECTION.

CASE SY-LILLI.

WHEN 6.

CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.

WHEN 7.

CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.

ENDCASE.

Regards,

Bhaskar