‎2010 Oct 14 2:45 PM
hi gurus
i need to enhance extractor 0customer_attr so that field from KNKK-GRUPP is pulled in along with 0customer_attr extraction
so i enhance the extractor using append and type it in the data element, PROVIDED zzxyzno in the field name
Activated it and UNHIDE it.
now my abap code in CMOD in ZXRSAU01 for EXIT RS*01 DOESNT WORK...
now i wrote below code:
DATA: L_S_INFOSTRU LIKE biw_kna1_s.
CASE I_DATASOURCE.
WHEN '0ustomer_attr'.
DATA: biw_kna1_s_data LIKE biw_kna1_s.
LOOP AT C_T_DATA INTO L_S_INFOSTRU.
L_TABIX = SY-TABIX.
biw_kna1_s_data-ZZXYZNO = KNKK-GRUPP
ENDLOOP.
ENDCASE.
but it is still not pulling in values from extractor...
can you please correct my code ???
‎2010 Oct 14 2:56 PM
‎2010 Oct 14 2:56 PM
‎2010 Oct 14 3:01 PM
THANKS Raymond
i am newbie and i am trying to learn ABAP
can you please provide me missing code
i tried tos earch sdn but couldnt find the code that is required for me??
appreciate ur help..
‎2010 Oct 14 3:06 PM
Try something like
FIELD-SYMBOLS: <customer_attr> TYPE biw_kna1_s.
CASE i_datasource.
WHEN '0CUSTOMER_ATTR'. " Upper case
LOOP AT c_t_data ASSIGNING <customer_attr>.
SELECT grupp INTO <customer_attr>-zzxyzno
FROM knkk UP TO 1 ROWS
WHERE kunnr = <customer_attr>-kunnr.
ENDSELECT. " not whole primary key
ENDLOOP.
ENDCASE.If performance problems arise ("SELECT in a LOOP"), first fill an internal table with a FOR ALL ENTRIES IN c_t_data in a sorted internal table (kunnr and grupp field, key kunnr) , then in the LOOP use a READ TABLE. (mandatory if you use such exits on big extractions.
Regards,
Raymond
‎2010 Oct 14 3:26 PM
What do i have to type here "<customer_attr>"
should it be 0CUSTOMER_ATTR
or should it be zzxyzno or BIW_KNA1_S
or jsut copy paste the code as zzxyzno
‎2010 Oct 14 3:33 PM
Type it exactly as i did, this is a [FIELD-SYMBOLS|http://help.sap.com/abapdocu_70/en/ABAPFIELD-SYMBOLS.htm] when used in a LOOP AT internal table ASSIGNING <fs> the field-symbol points to the actual line of the internal table, so no need to use any MODIFY statement to update the record. Those are also most useful when using dynamic structure only known at execution time.
Regards,
Raymond
‎2010 Oct 14 3:34 PM
Here is the code
DATA: L_S_INFOSTRU LIKE biw_kna1_s.
CASE I_DATASOURCE.
FIELD-SYMBOLS: <customer_attr> TYPE biw_kna1_s.
CASE i_datasource.
WHEN '0CUSTOMER_ATTR'. " Upper case
LOOP AT c_t_data ASSIGNING <customer_attr>.
SELECT grupp INTO <customer_attr>-zzxyzno
FROM knkk UP TO 1 ROWS
WHERE kunnr = <customer_attr>-kunnr.
ENDSELECT. " not whole primary key
ENDLOOP.
ENDCASE.
It gives me error that KUNNR is unknown...
this is how the code is in cmod
Edited by: Hem Bhatt on Oct 14, 2010 9:34 AM
‎2010 Oct 14 3:51 PM
Correct exit is ZXRSAU02 "Master Data" (like 0CUSTOMER_ATTR) , ZXRSAU01 is for "Transaction Data" (like 0FI_AR_3)
Nevertheless, when i add the sample to my include, there is no syntax error (kunnr exist in KNKK and biw_kna1_s, so your message is strange. Check for missing or extra ".", is there more code in your include, or any other include of the function group, try to perform a syntax check of the whole FM XRSA (Program SAPLXRSA)
Regards,
Raymond
‎2010 Oct 14 7:47 PM
thanks
it works
i had error for ".:"
i also have need for transaction data cmod i am posting it in new thread please reply....