前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Language issue for downloaded product category

Language issue for downloaded product category

原创
作者头像
Jerry Wang
修改2020-02-10 16:13:33
2760
修改2020-02-10 16:13:33
举报

When you try to edit some downloaded product categories, you may meet with this error message:

The root cause is for example ERP supports language A and B, and CRM only supports A.

After you perform customizing download, description in language both A and B will be downloaded to CRM. And description in B looks like below in CRM, not valid!

Solution 1

Remove description B in ERP, and then do customizing download again.

Solution 2

If you are working on CRM dev system, execute the following ABAP code to remove category description with invalid language:

代码语言:txt
复制
  method REMOVE_INVALID_LANGUAGE.
    DATA: lt_cate_text TYPE STANDARD TABLE OF COMM_CATEGORYT,
          lt_delete LIKE lt_cate_text,
          LT_SEL type SEL_OBJT.
    data(ls_sel) = value SEL_WBTYPE( sign = 'I' option = 'EQ'  ).

    DATA(LV) = '1234567890ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.
    DATA(lv_length) = strlen( lv ).
    DO lv_length TIMES.
      data(lv_offset) = sy-index - 1.
      ls_sel-low = lv+lv_offset(1).
      APPEND ls_sel TO lt_sel.
    ENDDO.
    SELECT * INTO TABLE lt_cate_text FROM COMM_CATEGORYT where langu not in lt_sel.

*    LOOP AT lt_cate_text ASSIGNING FIELD-SYMBOL(<cat>).
*      CALL METHOD cl_com_product_basic=>t002_read_single
*      EXPORTING
*        iv_spras  = <cat>-langu
*      EXCEPTIONS
*        not_found = 1
*        no_desc   = 2.
*
*      IF sy-subrc = 1.
*         APPEND <cat> TO lt_cate_text.
*      ENDIF.
*    ENDLOOP.

    WRITE: 'total invalid language text deleted:' , lines( lt_cate_text ).

    If iv_prod_mode = abap_true.
       DELETE COMM_CATEGORYT FROM TABLE lt_cate_text.
       COMMIT WORK AND WAIT.
       WRITE:/ 'delete successful' COLOR COL_POSITIVE.
    ENDIF.
  endmethod.

After that you can edit downloaded category as usual:

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Solution 1
  • Solution 2
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档