Skip to Content
avatar image
Former Member

ERROR in this BAPI_CUSTOMER_GETLIST

Hello,

Please help me ,I am getting error while executing this report.

I want to Execute a BAPI .

BAPI_CUSTOMER_GETLIST.

INPUT : I,EQ,0000002156.

where it went wrong

REPORT ZRBAPI_CUSTOMER_GETLIST.

DATA : IDRANGE LIKE BAPICUSTOMER_IDRANGE OCCURS 0.

DATA : ADDRESSDATA LIKE BAPICUSTOMER_ADDRESSDATA OCCURS 0.

DATA : SPECIALDATA LIKE BAPICUSTOMER_SPECIALDATA OCCURS 0.

DATA : BEGIN OF DUP_IDRANGE OCCURS 0 ,

SIGN like BAPICUSTOMER_IDRANGE-SIGN ,

OPTION like BAPICUSTOMER_IDRANGE-OPTION ,

LOW like BAPICUSTOMER_IDRANGE-LOW,

END OF DUP_IDRANGE.

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: SIGN like BAPICUSTOMER_IDRANGE-SIGN ,

OPTION like BAPICUSTOMER_IDRANGE-OPTION ,

LOW like BAPICUSTOMER_IDRANGE-LOW .

SELECTION-SCREEN: END OF BLOCK b1.

DUP_IDRANGE-SIGN = SIGN.

DUP_IDRANGE-OPTION = OPTION.

DUP_IDRANGE-LOW = LOW.

Write : DUP_IDRANGE.

CALL FUNCTION 'BAPI_CUSTOMER_GETLIST'

  • Exporting

  • MAXROWS = 0

  • CPDONLY =

  • IMPORTING

  • RETURN =

TABLES

IDRANGE = DUP_IDRANGE

ADDRESSDATA = ADDRESSDATA

SPECIALDATA = SPECIALDATA

.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 16, 2007 at 07:49 PM

    Check the below code and modified ..

    REPORT ZRBAPI_CUSTOMER_GETLIST.

    DATA : IDRANGE LIKE BAPICUSTOMER_IDRANGE OCCURS 0.

    DATA : ADDRESSDATA LIKE BAPICUSTOMER_ADDRESSDATA OCCURS 0 with header

    line.

    DATA : SPECIALDATA LIKE BAPICUSTOMER_SPECIALDATA OCCURS 0.

    data DUP_IDRANGE like BAPICUSTOMER_IDRANGE occurs 0 with header

    line.

    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    PARAMETERS: SIGN like BAPICUSTOMER_IDRANGE-SIGN ,

    OPTION like BAPICUSTOMER_IDRANGE-OPTION ,

    LOW like BAPICUSTOMER_IDRANGE-LOW .

    SELECTION-SCREEN: END OF BLOCK b1.

    DUP_IDRANGE-SIGN = SIGN.

    DUP_IDRANGE-OPTION = OPTION.

    DUP_IDRANGE-LOW = LOW.

    append dup_idrange.

    Write : DUP_IDRANGE.

    CALL FUNCTION 'BAPI_CUSTOMER_GETLIST'

    • Exporting

    • MAXROWS = 0

    • CPDONLY =

    • IMPORTING

    • RETURN =

    TABLES

    IDRANGE = DUP_IDRANGE

    ADDRESSDATA = ADDRESSDATA

    SPECIALDATA = SPECIALDATA

    .

    break sy-uname.

    loop at ADDRESSDATA.

    endloop.

    Thanks

    Seshu

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      See the code :

      REPORT ZRBAPI_CUSTOMER_GETLIST.

      DATA : IDRANGE LIKE BAPICUSTOMER_IDRANGE OCCURS 0.

      DATA : ADDRESSDATA LIKE BAPICUSTOMER_ADDRESSDATA OCCURS 0 with header

      line.

      DATA : SPECIALDATA LIKE BAPICUSTOMER_SPECIALDATA OCCURS 0.

      data DUP_IDRANGE like BAPICUSTOMER_IDRANGE occurs 0 with header

      line.

      SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

      PARAMETERS: SIGN like BAPICUSTOMER_IDRANGE-SIGN ,

      OPTION like BAPICUSTOMER_IDRANGE-OPTION ,

      LOW like BAPICUSTOMER_IDRANGE-LOW .

      SELECTION-SCREEN: END OF BLOCK b1.

      DUP_IDRANGE-SIGN = SIGN.

      DUP_IDRANGE-OPTION = OPTION.

      DUP_IDRANGE-LOW = LOW.

      append dup_idrange.

      Write : DUP_IDRANGE.

      CALL FUNCTION 'BAPI_CUSTOMER_GETLIST'

      • Exporting

      • MAXROWS = 0

      • CPDONLY =

      • IMPORTING

      • RETURN =

      TABLES

      IDRANGE = DUP_IDRANGE

      ADDRESSDATA = ADDRESSDATA

      SPECIALDATA = SPECIALDATA

      .

      <b>loop at ADDRESSDATA.

      write:/ addressdata-COUNTRY

      endloop.</b>

  • avatar image
    Former Member
    Aug 16, 2007 at 07:43 PM

    Replace the declaration of DUP_IDRANGE as below

    data: dup_idrange like standard table of BAPICUSTOMER_IDRANGE with

    header line.

    Also you are not appending the record after passing Sign Option and Low values.

    Append DUP_IDRANGE just before your write statement

    Write : DUP_IDRANGE.

    -Kriss

    Add comment
    10|10000 characters needed characters exceeded