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

using both at line-selection and at user-command

Former Member
0 Likes
605

hellow friends ,

to use both at line-selection and at user-command in the same report.

3 REPLIES 3
Read only

Former Member
0 Likes
577

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

Read only

Former Member
0 Likes
577

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.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
577

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