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

At line selection

Former Member
0 Likes
884

Hi all,

I am writing secondary-list display...for that i am using

AT LINE-SELECTION.

GET CURSOR FIELD FNAM VALUE FVAL.

MOVE LS_VERSION-GUID TO FVAL.

CASE SY-LSIND.

WHEN 1.

IF FVAL <> LV_GUID.

  • PERFORM VERSION_DETAILS.

PERFORM PO_PDF_VIEWER.

  • PERFORM PO_PDF_DELETE.

  • WRITE : LS_VERSION-GUID .

ELSE.

PERFORM PO_PDF_VIEWER_ACTIVE.

  • PERFORM PO_PDF_DELETE.

ENDIF.

ENDCASE.

it is working fine...but i want to place a condition before it and placing this in an FORM..ENDFORM..

Here i am writing as ...

form REQUESTOR_DISPLAY .

...................

.......................

AT LINE-SELECTION.

GET CURSOR FIELD FNAM VALUE FVAL.

MOVE LS_VERSION-GUID TO FVAL.

CASE SY-LSIND.

WHEN 1.

IF FVAL <> LV_GUID.

  • PERFORM VERSION_DETAILS.

PERFORM PO_PDF_VIEWER.

  • PERFORM PO_PDF_DELETE.

  • WRITE : LS_VERSION-GUID .

ELSE.

PERFORM PO_PDF_VIEWER_ACTIVE.

  • PERFORM PO_PDF_DELETE.

ENDIF.

ENDCASE.

endform.

It is giving error as ""Incorrect nesting : Before the statement "AT",the structure introduced by "FORM" must be conculed by "ENDFORM".

Pls help...how to remove this error...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
846

Hi Srikanth,

<b> AT LINE-SELECTION</b> is a report event.

U can't use a report event inside a subroutine.

write ur subroutine after at line-selection.

<b>AT LINE-SELECTION.</b>

form REQUESTOR_DISPLAY .

GET CURSOR FIELD FNAM VALUE FVAL.

MOVE LS_VERSION-GUID TO FVAL.

CASE SY-LSIND.

WHEN 1.

IF FVAL <> LV_GUID.

  • PERFORM VERSION_DETAILS.

PERFORM PO_PDF_VIEWER.

  • PERFORM PO_PDF_DELETE.

  • WRITE : LS_VERSION-GUID .

ELSE.

PERFORM PO_PDF_VIEWER_ACTIVE.

  • PERFORM PO_PDF_DELETE.

ENDIF.

ENDCASE.

endform.

Regards,

Hemant

Hi all,

I am writing secondary-list display...for that i am using

AT LINE-SELECTION.

GET CURSOR FIELD FNAM VALUE FVAL.

MOVE LS_VERSION-GUID TO FVAL.

CASE SY-LSIND.

WHEN 1.

IF FVAL <> LV_GUID.

  • PERFORM VERSION_DETAILS.

PERFORM PO_PDF_VIEWER.

  • PERFORM PO_PDF_DELETE.

  • WRITE : LS_VERSION-GUID .

ELSE.

PERFORM PO_PDF_VIEWER_ACTIVE.

  • PERFORM PO_PDF_DELETE.

ENDIF.

ENDCASE.

it is working fine...but i want to place a condition before it and placing this in an FORM..ENDFORM..

Here i am writing as ...

form REQUESTOR_DISPLAY .

...................

.......................

AT LINE-SELECTION.

GET CURSOR FIELD FNAM VALUE FVAL.

MOVE LS_VERSION-GUID TO FVAL.

CASE SY-LSIND.

WHEN 1.

IF FVAL <> LV_GUID.

  • PERFORM VERSION_DETAILS.

PERFORM PO_PDF_VIEWER.

  • PERFORM PO_PDF_DELETE.

  • WRITE : LS_VERSION-GUID .

ELSE.

PERFORM PO_PDF_VIEWER_ACTIVE.

  • PERFORM PO_PDF_DELETE.

ENDIF.

ENDCASE.

endform.

It is giving error as ""Incorrect nesting : Before the statement "AT",the structure introduced by "FORM" must be conculed by "ENDFORM".

Pls help...how to remove this error...

7 REPLIES 7
Read only

former_member491305
Active Contributor
0 Likes
846

Hi srikanth ,

You can't put AT LINE-SELECTION event in a subroutine.That is why it is giving you the error.

Read only

Former Member
0 Likes
846

Hi

U can't insert AT LINE-SELECTION in a routine because it's a program event:

AT LINE-SELECTION.
   PERFORM REQUESTOR_DISPLAY.

FORM REQUESTOR_DISPLAY .
....................
ENDFORM.

Max

Read only

andreas_mann3
Active Contributor
0 Likes
846

try:

AT LINE-SELECTION.
perform REQUESTOR_DISPLAY .


...

form REQUESTOR_DISPLAY .
...................
.......................

GET CURSOR FIELD FNAM VALUE FVAL.
MOVE LS_VERSION-GUID TO FVAL.
CASE SY-LSIND.
WHEN 1.
IF FVAL <> LV_GUID.
* PERFORM VERSION_DETAILS.
PERFORM PO_PDF_VIEWER.
* PERFORM PO_PDF_DELETE.
* WRITE : LS_VERSION-GUID .
ELSE.
PERFORM PO_PDF_VIEWER_ACTIVE.
* PERFORM PO_PDF_DELETE.
ENDIF.
ENDCASE.
endform.

A.

Read only

Former Member
0 Likes
846

Hi ,

You cannot use this event inside a subroutine .

regards

Santosh

Read only

Former Member
0 Likes
846

Hi Srikanth,

try this (condition is your condition):

AT LINE-SELECTION.

*

if condition.

perform REQUESTOR_DISPLAY .

endif.

or

check condition.

perform REQUESTOR_DISPLAY .

Regards, Dieter

Read only

Former Member
0 Likes
847

Hi Srikanth,

<b> AT LINE-SELECTION</b> is a report event.

U can't use a report event inside a subroutine.

write ur subroutine after at line-selection.

<b>AT LINE-SELECTION.</b>

form REQUESTOR_DISPLAY .

GET CURSOR FIELD FNAM VALUE FVAL.

MOVE LS_VERSION-GUID TO FVAL.

CASE SY-LSIND.

WHEN 1.

IF FVAL <> LV_GUID.

  • PERFORM VERSION_DETAILS.

PERFORM PO_PDF_VIEWER.

  • PERFORM PO_PDF_DELETE.

  • WRITE : LS_VERSION-GUID .

ELSE.

PERFORM PO_PDF_VIEWER_ACTIVE.

  • PERFORM PO_PDF_DELETE.

ENDIF.

ENDCASE.

endform.

Regards,

Hemant

Read only

0 Likes
846

U can also acheive by........

AT LINE-SELECTION.

GET CURSOR FIELD FNAM VALUE FVAL.

.............................

form REQUESTOR_DISPLAY .

.......................

...............

..............

endform.