Skip to Content
0

Extractor enhancement with user exit RSAP0001

Jan 18 at 07:11 PM

71

avatar image

Hi Experts,

I need enhance a field "KLABC" from Table "KNVV" to Master Attr. "0CUSTOMER_ATTR", Ext.Structure "BIW_KNA1_S". I appended field "KLABC" in to KNVV.

Now I try to write abap code on include "XRSAU02". Could anybody help me to write code? i am not sure my code is true. Please consider KUNNR, VKORG, VTWEG, VKGRP, VKBUR.

Thanks Alot

Sascha

*&---------------------------------------------------------------------*
*&  Include           ZXRSAU02
*&---------------------------------------------------------------------*
* TABLES knvv,kna1.
*TYPES BEGIN OF TYPE_BIW_KNA1_S.
*  INCLUDE STRUCTURE BIW_KNA1_S.
*  TYPES END OF TYPE_BIW_KNA1_S.
*  WHEN '0CUSTOMER_ATTR'.
*    DATA:
*          ITAB_BIW_KNA1_S TYPE SORTED TABLE OF TYPE_BIW_KNA1_S.
*          WITH HEADER LINE.
*          WITH NON-UNIQUE SORTED KEY INITAL SIZE 0.
*    DATA:
*          ITAB_KNVV TYPE STANDARD TABLE OF TYPE_KNVV.
*          WITH HEADER LINE.
*          WITH NON-UNIQUE DEFAULT KEY INITAL SIZE 0.
*          ITAB_BIW_KNA1_S[] = I_T_DATA[].
*          SELECT KUNNR KLABC FROM knvv INTO CORRESPONDING FIELDS OF TABLE.
*            ITAB_KNVV FOR ALL ENTRIES IN ITAB_BIW_KNA1_S.
*            WHERE KUNNR = ITAB_BIW_KNA1_S-KUNNR.
*
*            LOOP AT ITAB_BIW_KNA1_S.
*              READ TABLE ITAB_KNVV WITH KEY KUNNR = ITAB_BIW_KNA1_S-KUNNR.
*              IF SY-SUBRC EQ 0.
*                ITAB_BIW_KNA1_S-ZCUST_GROUP = ITAB_KNVV-KDGRP.
*                MODIFY ITAB_BIW_KNA1_S.
*                ENDIF.
*                CLEAR ITAB_BIW_KNA1_S.
*                ENDLOOP.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers