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

issue in Remove error with condition

naveen_yadavs
Explorer
0 Likes
532

Hi experts,

I am facing a issue with a error message, i want to remove a error  with below condition.

loop at   LOOP AT tekpo INTO i_ekpo.

READ TABLE  tkomv INTO i_komv WITH KEY kposn = w_posnr

                                             kschl = 'ZMRP'.

      IF sy-subrc = 0.

        IF i_komv-kbetr IS INITIAL .

          CLEAR l_message.

          CONCATENATE 'ZMRP is Zero or Not available for line item' i_ekpo-ebelp INTO l_message

            SEPARATED BY space.

          MESSAGE l_message TYPE 'E'.

        ENDIF.

      ELSE.

        CLEAR l_message.

        CONCATENATE 'ZMRP is Zero or Not available for line item' i_ekpo-ebelp INTO l_message

          SEPARATED BY space.

        MESSAGE l_message TYPE 'E'.

*       endif.

      ENDIF.

      CLEAR i_ekpo.

    ENDLOOP.

this is my code i have put a error message, but here i want that this error is not coming if i_ekpo-umson IS NOT INITIAL.

give me some suggestions.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Ashokv
Explorer
0 Likes
505

Hi,

Fields used in READ TABLE command are not having any reference from I_EKPO. So i think i_ekpo-ebelp should be coded instead of W_POSNR.

3 REPLIES 3
Read only

Ashokv
Explorer
0 Likes
506

Hi,

Fields used in READ TABLE command are not having any reference from I_EKPO. So i think i_ekpo-ebelp should be coded instead of W_POSNR.

Read only

0 Likes
505

IF i_ekko-ekgrp <> '313' AND i_ekko-ekgrp <> '801' AND i_ekko-ekgrp <> '802' AND i_ekko-ekgrp <> '804' AND i_ekko-ekgrp <> '805'.

   IF ( i_ekko-kalsm = 'ZINTRA' AND i_ekko-aedat >= '20140108' AND i_ekko-bukrs <> '0262') OR " '0262' Added by Mital/Hiren on 21.08.2015

      ( i_ekko-kalsm = 'ZCTCNS' AND i_ekko-aedat >= '20140108' ).

     LOOP AT tekpo INTO i_ekpo WHERE loekz = space AND stapo <> 'X'

       CLEAR w_posnr.

       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

         EXPORTING

           input  = i_ekpo-ebelp

         IMPORTING

           output = w_posnr.

       CLEAR i_komv.

       READ TABLE  tkomv INTO i_komv WITH KEY kposn = w_posnr

                                              kschl = 'ZMRP'.

       IF sy-subrc = 0.

         IF i_komv-kbetr IS INITIAL .

           CLEAR l_message.

           CONCATENATE 'ZMRP is Zero or Not available for line item' i_ekpo-ebelp INTO l_message

             SEPARATED BY space.

           MESSAGE l_message TYPE 'E'.

         ENDIF.

       ELSE.

         CLEAR l_message.

         CONCATENATE 'ZMRP is Zero or Not available for line item' i_ekpo-ebelp INTO l_message

           SEPARATED BY space.

         MESSAGE l_message TYPE 'E'.

*       endif.

       ENDIF.

       CLEAR i_ekpo.

     ENDLOOP.

   ENDIF.

ENDIF.




thankyou ashok for quick reply this is my code where read table has also a reference, kindly solve my issue.

Read only

0 Likes
505

I am not sure about exact requirement but if requirement is not trigger error message then you can change it to different type than 'E'.