打印系统所有维护了sales area的BP id

Created by Jerry Wang, last modified on May 14, 2015

使用如下report打印所有维护了sales area的business partner id:

REPORT ZBP_DISPLAY_SALES_AREA_ENABLED.
data: lt_sales TYPE STANDARD TABLE OF CRMM_BUT_LNK0011,
      lt_bp TYPE STANDARD TABLE OF but000.
START-OF-SELECTION.
   SELECT * INTO TABLE lt_sales FROM CRMM_BUT_LNK0011.
   If sy-subrc <> 0.
      WRITE: / 'in this system there is no bp who has maintained sales area'.
      RETURN.
   ENDIF.
   SELECT * INTO TABLE lt_bp FROM but000 FOR ALL ENTRIES IN lt_sales
      WHERE partner_guid = lt_sales-partner_guid.
   LOOP AT lt_bp ASSIGNING FIELD-SYMBOL(<bp>).
      WRITE: / 'bp id: ' , <bp>-partner.
   ENDLOOP.

report输出:
打印系统所有维护了sales area的BP id

上一篇:闭包的使用场景


下一篇:SQL Server完整备份