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

code

Former Member
0 Likes
631

Hi,

I am writting a code for the below logic..please help me:

IF nast-kschl = abc and werks = 1000 or 1010 or 1100 or 4000.

WRITE 1000 TO werks RIGHT-JUSTIFIED.

please tell me how???

Thanks in advance...

4 REPLIES 4
Read only

Former Member
0 Likes
603

HI,

YOu can do as below :

IF( nast-kschl = abc and ( werks = 1000 or werks = 1010 or werks = 1100 or werks = 4000 ) ).

WRITE 1000 TO werks RIGHT-JUSTIFIED.

or

Create a range for it

ranges : gr_werks for table-werks.

gr_werks-sign = 'I'.

gr_werks-option = 'EQ'.

gr_werks-low = '1000'.

append gr_werks.

add reaminging values.

and check the condition as below :

IF( nast-kschl = abc ) and ( werks in gr_werks.)

WRITE 1000 TO werks RIGHT-JUSTIFIED.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
603

IF nast-kschl = 'ABC' and ( werks = 1000 or werks = 1010 or werks = 1100 or werks = 4000 ).

werks = 1000.

ENDIF.

Awrd Points if useful

Bhupal

Read only

former_member386202
Active Contributor
0 Likes
603

Hi,

DO like this

IF nast-kschl = abc.

if ( werks = 1000 ) or

( werks = 1010 ) or

( werks = 1100 ) or

( werks = 4000).

WRITE 1000 TO werks RIGHT-JUSTIFIED.

endif.

endif.

Regards,

Prashant

Read only

Former Member
0 Likes
603

hi,

kindly clarify from where you are takeing werks because werks is not with NAST table.

one more question, is the change required to be effected in u r report or in database.

regards,

pavan