cancel
Showing results for 
Search instead for 
Did you mean: 

to yashpal Gupta-Select option range table

Former Member
0 Kudos

Dear Yashpal,

I have created range table and put conditions and passed empty table in this fashion.still the result is the same (If i give both input then functionality works,only one of then is given then sy-subrc = 4.).I am wondering ehther u haev passed empty table correctly or not.


if  Stru_Cn_Selcrtr-ca_slsrl is not initial.
    wa_salesno-sign = 'I'.
    wa_salesno-option = 'EQ'.
    wa_salesno-LOW = Stru_Cn_Selcrtr-ca_slsrl.
    APPEND wa_salesno TO r_salesno.
    CLEAR : wa_salesno .
  else.
    wa_salesno-sign = 'I'.
    wa_salesno-option = 'EQ'.
    wa_salesno-LOW = space.
    APPEND wa_salesno TO r_salesno.
     CLEAR : wa_salesno .
  endif.

  if  Stru_Cn_Selcrtr-ca_brand is not initial.
    wa_brandid-sign = 'I'.
    wa_brandid-option = 'EQ'.
    wa_brandid-LOW = Stru_Cn_Selcrtr-ca_brand.
    APPEND  wa_brandid TO  r_brandid.
    CLEAR :  wa_brandid .
  else.
    wa_brandid-sign = 'I'.
    wa_brandid-option = 'EQ'.
     wa_brandid-LOW = space.
    APPEND wa_brandid  TO  r_brandid.
    CLEAR : wa_brandid  .
  endif.

**Situation where these fields are not provided  on the screen.
*If any of these are given then select data accordingly.
    select * from ZNSLVWHDIMMD_LCL
             into corresponding fields of table IT_VIEW
             WHERE SALESRLNO in  r_salesno
*             and   CREATEDBY in It_crtby_selopt
*            and   STARTDATE in It_validfrm_selopt
*             and   ENDDATE   in It_validto_selopt
*             and  STATUS     in It_status_selopt1
             and   BRANDID   in r_brandid.
*             and   MODELNO   in It_model_selopt

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

dynamic selection on data.thnx