我是靠谱客的博主 柔弱小笼包,最近开发中收集的这篇文章主要介绍打印基于某category创建的所有productCreated by Jerry Wang on Sep 04, 2014,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Created by Jerry Wang on Sep 04, 2014

例如希望得到所有基于product category MAT_JERR创建的product list:
clipboard1

clipboard3

输出product ID和创建时间:
clipboard2

REPORT PROD_LIST_CREATED_BY_CATEGORY.


PARAMETERS: id TYPE COMM_CAtegory-category_id OBLIGATORY DEFAULT 'MAT_JERR'.


START-OF-SELECTION.

 DATA: lv_guid TYPE comm_category-category_guid,

       lt_guid TYPE STANDARD TABLE OF COMM_PRODUCT-product_guid,

       lt_prod TYPE STANDARD TABLE OF comm_product.


 SELECT SINGLE category_guid FROM comm_category INTO lv_guid WHERE category_id = id.

 IF sy-subrc <> 0.

   WRITE: / 'category id not valid.'.

   RETURN.

 ENDIF.


 SELECT product_guid INTO TABLE lt_guid FROM COMM_PRPRDCATR WHERE category_guid = lv_guid.

 IF sy-subrc <> 0.

    WRITE: / 'no product exists which are created based on current category.'.

    RETURN.

 ENDIF.


 SELECT * INTO TABLE lt_prod FROM COmm_product FOR ALL ENTRIES IN lt_guid WHERE product_guid = lt_guid-table_line.

 SORT lt_prod BY product_id.

 LOOP AT lt_prod ASSIGNING FIELD-SYMBOL(<prod>).

    WRITE: / <prod>-product_id COLOR COL_NEGATIVE, 'Created on: ' , <prod>-valid_from.

 ENDLOOP.

最后

以上就是柔弱小笼包为你收集整理的打印基于某category创建的所有productCreated by Jerry Wang on Sep 04, 2014的全部内容,希望文章能够帮你解决打印基于某category创建的所有productCreated by Jerry Wang on Sep 04, 2014所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部