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

Logic

Former Member
0 Likes
476

Hello,

In ALV I am trying to move a text to a particular field only once in single column.

I want to display the text only once LV_COUNTER = 6,,but it gets displayed here four times like LV_COUNTER = 6,

LV_COUNTER = 7,LV_COUNTER = 8,LV_COUNTER = 9

How to change the code here....

IF LV_COUNTER = 6.

MOVE TEXT-015 TO WA_BPSTAB-MONDAY.

ENDIF.

IF LV_COUNTER = 10.

MOVE TEXT-005 TO WA_BPSTAB-MONDAY.

MOVE TEXT-006 TO WA_BPSTAB-TUESDAY.

MOVE TEXT-007 TO WA_BPSTAB-WEDNESDAY.

MOVE TEXT-008 TO WA_BPSTAB-THURSDAY.

MOVE TEXT-009 TO WA_BPSTAB-FRIDAY.

MOVE TEXT-010 TO WA_BPSTAB-SATURDAY.

MOVE TEXT-012 TO WA_BPSTAB-SUNDAY.

ENDIF.

2 REPLIES 2
Read only

Former Member
0 Likes
422

Add the code in bold...

It would clear the field for counters apart from 6 and 10.

<b>CLEAR WA_BPSTAB-MONDAY.</b>

IF LV_COUNTER = 6.

MOVE TEXT-015 TO WA_BPSTAB-MONDAY.

ENDIF.

IF LV_COUNTER = 10.

MOVE TEXT-005 TO WA_BPSTAB-MONDAY.

MOVE TEXT-006 TO WA_BPSTAB-TUESDAY.

MOVE TEXT-007 TO WA_BPSTAB-WEDNESDAY.

MOVE TEXT-008 TO WA_BPSTAB-THURSDAY.

MOVE TEXT-009 TO WA_BPSTAB-FRIDAY.

MOVE TEXT-010 TO WA_BPSTAB-SATURDAY.

MOVE TEXT-012 TO WA_BPSTAB-SUNDAY.

ENDIF.

Message was edited by: Anurag Bankley

<u><b><i>It seems that the server is UP ..may be you can do the needful..Thanks )</i></b></u>

Message was edited by: Anurag Bankley

Read only

0 Likes
422

Thank u Anurag, i am trying to mark points but there is some error in rewarding points.