2015 Oct 07 5:55 AM
Hi All,
I'm a novice on ABAP programming.Is there anybody to help me to fix my issue?
The following is the my code. I just want to get the email address from xk03. But didn't get SMTP_ADDR(email) though I got the NAME1(vendor name) by the following inner join. But why I couldn't get the email/SMTP_ADDR. If anybody know the solution then please help me.
Thanks
SELECT smtp_addr smtp_srch name1 adrc~addrnumber INTO TABLE t_adrc FROM adrc
INNER JOIN adr6 ON adrc~addrnumber = adr6~addrnumber
WHERE adrc~name1 IN s_name1 AND
adrc~addrnumber IN s_adrnr.
Hi All,
I'm a novice on ABAP programming.Is there anybody to help me to fix my issue?
The following is the my code. I just want to get the email address from xk03. But didn't get SMTP_ADDR(email) though I got the NAME1(vendor name) by the following inner join. But why I couldn't get the email/SMTP_ADDR. If anybody know the solution then please help me.
Thanks
SELECT smtp_addr smtp_srch name1 adrc~addrnumber INTO TABLE t_adrc FROM adrc
INNER JOIN adr6 ON adrc~addrnumber = adr6~addrnumber
WHERE adrc~name1 IN s_name1 AND
adrc~addrnumber IN s_adrnr.
2015 Oct 07 6:42 AM
Hi,
Check at the table level if there is any value in SMTP_ADDR in ADR6.
Write the query as below.
SELECT adr6~smtp_addr adr6~smtp_srch adrc~addrnumber adrc~name1 INTO TABLE t_adrc FROM
adrc INNER JOIN adr6 ON adrc~addrnumber = adr6~addrnumber
WHERE adrc~name1 IN s_name1 AND
adrc~addrnumber IN s_adrnr.
Hope this helps.
2015 Oct 07 6:45 AM
2015 Oct 07 7:06 AM
I wonder about the 2 fields in the where part of the selection.
The name is very unspecific, you could even have duplicates, the address number is unique in your SAP, but from where could you even know this number.
If you know this number already then specifying the name is not needed and even can lead to the fact that you don't find a record because of a mismatch in the entered name.
If you are working with international addresses then better use the address version (field NATION) to get a single hit.
2015 Oct 07 11:56 AM
@Gaurav Dubey, @Raymond Giuseppi, @Jürgen L, thanks a lot to you all. In fact it was my fault, I made some errors in variable declaration. Now it fixed and working properly. Thanks again for your response.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |