Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

# is coming on variable screen

Hi All,

I have a department variable which is having values like #, cargo , it, etc....

But client is asking that when he is doing f4 on department variable it should not show the '#' value.

In Master data and info provider we are having # value for department.

Kindly suggest how to resolve this.

Thanks,

Naveen

Former Member
replied

Hi Naveen,

Please check below code, you may need small change.

DATA: l_s_range LIKE LINE OF c_t_range.

  TYPES: BEGIN OF ty_dept,

           Dept TYPE /bic/oidept,

           Count TYPE /bic/oiCount,

       

         END OF ty_dept.

  DATA: t_Dept TYPE STANDARD TABLE OF ty_dept,

        w_Dept TYPE                   ty_dept.

  CASE i_vnam.

    WHEN 'variable tech name'.

      CLEAR : c_t_range, l_s_range.

      SELECT /bic/Dept /bic/Count FROM /bic/Pdept

        INTO TABLE t_Dept WHERE

        /bic/Dept ne space and

        objvers = 'A'.

      IF sy-subrc EQ 0.

        SORT t_Dept BY dept.

        LOOP AT t_Dept INTO w_dept.

          l_s_range-iobjnm = i_iobjnm.

          l_s_range-sign = 'I'.

          l_s_range-option = 'EQ'.

          l_s_range-low = w_dept-dept.

          APPEND l_s_range TO c_t_range.

          l_s_range-iobjnm = 'Count' .

          l_s_range-sign = 'I'.

          l_s_range-option = 'EQ'.

          l_s_range-low = w_dept-Count.

          APPEND l_s_range TO c_t_range.

        

        ENDLOOP.

        CLEAR: t_dept.

      ENDIF.

  ENDCASE.

Thank you,

Nanda

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question