03-31-2008 10:57 AM
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
03-31-2008 11:03 AM
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
03-31-2008 11:04 AM
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*
03-31-2008 11:05 AM
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.
03-31-2008 12:35 PM
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
03-31-2008 12:56 PM
03-31-2008 1:43 PM
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