Application Development 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: 

corretct the Validation for company code in select-options

former_member421418
Participant
0 Kudos

Hi

I am using below code to validate company code but extended program check is showing errors like obselete statements.

Please correct any statements used as obselete.

  DATA:l_t_bukrs TYPE TABLE OF bukrs WITH HEADER LINE,
       v_ms TYPE char50,                                    "#EC NEEDED
       v_ms1 TYPE char50,
       v_msg1 TYPE char50.
  RANGES : r_bukrs for t001-bukrs.                          "#EC NEEDED
  REFRESH r_bukrs.
  LOOP AT s_bukrs.
    IF NOT s_bukrs-low IS INITIAL.
      CLEAR r_bukrs.
      r_bukrs-sign = c_i.
      r_bukrs-option = c_eq.
      r_bukrs-low = s_bukrs-low.
      APPEND r_bukrs.
    ENDIF.
    IF NOT s_bukrs-high IS INITIAL.
      CLEAR r_bukrs.
      r_bukrs-sign = c_i.
      r_bukrs-option = c_eq.
      r_bukrs-low = s_bukrs-high.
      APPEND r_bukrs.
    ENDIF.
  ENDLOOP.
  SELECT  bukrs INTO  TABLE  l_t_bukrs FROM  t001
                        WHERE  bukrs  IN  s_bukrs.
  LOOP AT s_bukrs.
    IF s_bukrs-low <>  space.
      READ TABLE l_t_bukrs  WITH  KEY  = s_bukrs-low.
      IF  sy-subrc  <>  0.
        v_msg = text-005.
        REPLACE '&' IN v_msg WITH s_bukrs-low.
        v_ms1 = text-008.
        CONCATENATE v_msg ' ' v_ms1 INTO v_msg1.
        MESSAGE v_msg1 TYPE c_e.
      ENDIF.
      IF s_bukrs-high  <>  space.
        READ  TABLE  l_t_bukrs  WITH  KEY  =  s_bukrs-high.
        IF  sy-subrc  <>  0.
          v_ms = text-005.
          REPLACE '&' IN v_ms WITH s_bukrs-high.
          v_ms1 = text-008.
          CONCATENATE v_msg space v_ms1 INTO v_msg1.
          MESSAGE v_msg1 TYPE c_e.
        ENDIF.
      ENDIF.
    ENDIF.
    CLEAR:l_t_bukrs.
  ENDLOOP.

Please correct the obselete statements in above code.

2 REPLIES 2

former_member214878
Active Participant
0 Kudos

No wonder you didn't get a single response from last one hour.

I am just trying to be straight with you, the question itself is with wrong intention. Forum doesent entertain quiz or ready made kind of solution.

Please post back with exactly which sentense is bothering you. You might get lot of solution to overcome it. but posting whole code and asking to remove obselete statement wont work properly here.

Former Member
0 Kudos

You can learn a lot by pressing F1.

Locked.

Rob