‎2007 Feb 07 11:17 AM
hellow friends ,
to use both at line-selection and at user-command in the same report.
‎2007 Feb 07 11:21 AM
Hello,
U can do it like this.
***********************************************************************
AT LINE-SELECTION.
***********************************************************************
PERFORM at_line_selection.
***********************************************************************
AT USER-COMMAND.
***********************************************************************
PERFORM at_user_command.
FORM AT_LINE_SELECTION.
DATA: LV_CURSOR_FIELD(30).
DATA: LV_MATNR TYPE MATNR.
CLEAR H_UCOMM.
GET CURSOR FIELD LV_CURSOR_FIELD.
CASE LV_CURSOR_FIELD.
WHEN 'PSPNR'.
PERFORM LAGER_AN_PSP USING WA_MATNR-M1-RSNUM
WA_MATNR-M1-RSPOS.
WHEN 'PSPNR2'.
H_UCOMM = 'PSPNR2'.
IF NOT PSPNR2 IS INITIAL AND IT_VKBEL-VBELN CN '0123456789'.
PERFORM LAGER_AN_PSP_VKBEL USING IT_VKBEL
0
PSPNR2
H_MAKTX
' '. "keine Blindbuchung
ENDIF.
ENDCASE.
CASE SY-UCOMM.
WHEN 'BACK_NEW'.
PERFORM NEU_START USING 'X'.
WHEN 'EXIT'.
PERFORM NEU_START USING 'X'.
WHEN 'CANC'.
PERFORM NEU_START USING 'X'.
WHEN 'CHECK'.
PERFORM NEU_START USING SPACE.
ENDCASE.
Vasanth
‎2007 Feb 07 11:23 AM
If you have a set pf status you cannot use both the events in the report .
Because moment you set a pf-status on the report at-line selection event doesn't work when you click on the screen .
If you have an interactive list then it is possible again set pf-status for that list should not be set.
Please reward if useful.
‎2007 Feb 07 11:23 AM
Hi,
If you have defined you own function code then those should be handled using the AT USER-COMMAND.
You can see the list of Function codes that you can handle AT LINE-SELECTION in the documentation of this keyword.
You can use both these events in a single report with out any problem.
Regards,
Sesh