‎2012 Feb 28 8:10 AM
Hi Experts,
I need to enhance datasource 0VENDOR_ATTR with e-mail address of the vendor. Email address can be obtained from ADR6 table.
We can directly link both tables LFA1 and ADR6.
ADDRNUMBER - is the joining field in both these tables to determine the mail address of the vendor.
ADRNR field in the lfa1 table and ADDRNUMBER field in ADR6 table.
The logic will be as follows
*Selecting the ADRNE from LFA1...
SELECT SINGLE ADRNR FROM LFA1 INTO I_ADRNR
WHERE LIFNR = ITAB-LIFNR.
*Passing ADRNR to ADR6 to get Email...
SELECT SMTP_ADDR INTO TABLE I_Z1EMAIL
FROM ADR6 WHERE ADDRNUMBER = I_ADRNR.
I dont have much knowledge in ABAP so experts please help me in completing this code in the enhancement EXIT_SAPLRSAP_002 .
CASE i_datasource. When '0vendor_ATTR'.
???????????????
??????????????
??????????????
SELECT SINGLE ADRNR FROM LFA1 INTO I_ADRNR
WHERE LIFNR = ITAB-LIFNR.
SELECT SMTP_ADDR INTO TABLE I_Z1EMAIL
FROM ADR6 WHERE ADDRNUMBER = I_ADRNR.
??????????????????????????
????????????????????????
???????????????????????.
Any help would be greatly appriciated.
Thanks in advance
‎2012 Feb 28 9:51 AM
Sample
* Include ZXRSAU02. " master data enhancement
CASE i_datasource.
WHEN '0VENDOR_ATTR'.
PERFORM 0vendor_attr TABLES i_t_data.
ENDCASE.
* Include ZXRSAZZZ. " Subprograms and Modules
FORM 0vendor_attr TABLES itab.
DATA: itab TYPE TABLE OF biw_lfa1_s,
record TYPE biw_lfa1_s.
" Here select required data from LFA1, ADR6 into itab for values received
LOOP AT itab INTO record.
" Here read the itab and map data
MODIFY itab FROM biw_lfa1_s.
ENDLOOP.
ENDFORM.Read [SELECT|http://help.sap.com/abapdocu_70/en/ABAPSELECT.htm]/[FOR ALL ENTRIES|http://help.sap.com/abapdocu_70/en/ABENWHERE_LOGEXP_ITAB.htm] and [READ TABLE|http://help.sap.com/abapdocu_70/en/ABAPREAD_TABLE.htm] documentation.
Regards,
Raymond