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

anyone help the condition type problem

Former Member
0 Likes
754

Hi,

My requirement is if ZFI6 having values then it will display the ZFI6value no need no activate ZFI4 and ZFI3.

if ZFI6 having no values ZFI4 having value then it display ZFI4 only no need no activate ZFI3 and ZFI6.

if ZFI6 having ZERO then ZFI4 having ZERO so need to activate ZFI3 only.

i developed the below coding but its not working correctly anyone plz explain how to solve this issue.

READ TABLE XKOMV INTO L_XKOMV

WITH KEY

KSCHL = 'ZFI6'.

IF sy-subrc = 0.

XKOMV-KINAK = 'X'.

MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZFI4'.

endif.

point will be sure.

Vijai

4 REPLIES 4
Read only

Former Member
0 Likes
706

Hi Vijaya,

Try this

READ TABLE XKOMV INTO L_XKOMV
WITH KEY
KSCHL = 'ZFI6'.

IF SY-SUBRC = 0.
 XKOMV-KINAK = 'X'.
 MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZFI4' OR KSCHL = 'ZFI3' .
 CLEAR XKOMV.
ELSE.
 READ TABLE XKOMV INTO L_XKOMV
 WITH KEY KSCHL = 'ZFI4'.
 IF SY-SUBRC = 0.
  XKOMV-KINAK = 'X'.
  MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZFI6' OR KSCHL = 'ZFI3' .
  CLEAR XKOMV.
 ELSE.
   XKOMV-KINAK = 'X'.
  MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZFI3'.
  CLEAR XKOMV.
 ENDIF.
ENDIF.

Regards,

Satish

Read only

0 Likes
706

Hi Sathis,

Thanks for your information, your program working fine but in my condition type i have ZFI3, ZFI4,ZFI5, ZFI6.

Now its doing the hiding the ZFI3 only. but my condition if ZFI6 comes no need of ZFI4 and ZFI3.

plz help the issue,

Vijai

Read only

0 Likes
706

That is what we are doing in the below statements

 XKOMV-KINAK = 'X'.
 MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZFI4' OR KSCHL = 'ZFI3' .
 CLEAR XKOMV.

Regards,

Satish

Read only

0 Likes
706

Then try this

XKOMV-KINAK = 'X'. "<< Make it ' ' instead of 'X'.

MODIFY XKOMV TRANSPORTING KINAK WHERE KSCHL = 'ZFI4' OR KSCHL = 'ZFI3' .

CLEAR XKOMV.

Regards,

Satish