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

regarding function module

Former Member
0 Likes
472

Hi to all,

here my requirement is to display customers in perticular range.i tried withselect-optionsbut getting error like is not allowed and also tried with RANGES option but i didn't get any output .

and please tell me what parameters to give to bapi_customer_getlist function module.in this function module is there but i didn't get any output.here i'm given input like i cp 1 1000 and 0000000001 00000001000 but there is no response. if input given like i cp * is displayed entire customer data.

please help asap.

thanks and regards,

surya.

3 REPLIES 3
Read only

Former Member
0 Likes
418

hi,

if you are passing data to range 'BT' for range.

RANGE Table of Customer Numbers

Description

Selection area for the customer numbers

Value range

Field SIGN: 'I' (inclusive) or 'E' (exclusive)

Field OPTOPNS: (EQ,NE,GT,GE,LE,LT,BT,NB,CP,NP)

CP means customer contains these value.

Regards,

SB

Read only

Former Member
0 Likes
418

Hello

idrange-sign = 'I'.

idrange-option = 'BT'.

idrange-low = '1'.

idrange-high = '1000'.

append idrange.

idrange-low = '0000000001'.

idrange-high = '00000001000'.

append idrange.

Read only

vinod_vemuru2
Active Contributor
0 Likes
418

Hi surya,

Check below sample code.


DATA: i_idrange TYPE STANDARD TABLE OF bapicustomer_idrange,
      wa_idrange TYPE bapicustomer_idrange,
      i_address TYPE STANDARD TABLE OF bapicustomer_addressdata,
      maxrows TYPE bapif4a-max_rows VALUE 1000.

CLEAR wa_idrange.
wa_idrange-sign = 'I'.
wa_idrange-option = 'BT'.
wa_idrange-low = '0000000010'.
wa_idrange-high = '0000001000'.
APPEND wa_idrange TO i_idrange.

CALL FUNCTION 'BAPI_CUSTOMER_GETLIST'
 EXPORTING
   maxrows           = maxrows
*         CPDONLY           =
*       IMPORTING
*         RETURN            =
  TABLES
    idrange           = i_idrange
   addressdata       = i_address
*         SPECIALDATA       =
          .

Make sure that u r passing customer number with

leading zeros and option eq BT.

Thanks,

Vinod.