2021 Nov 04 4:28 PM
Hi ABAPers Guru,
i try to joint selected fields from 2 standard table into internal table. I also input some parameter into the program.
But the data not loaded to my internal table. Can any of you advise me, where is the failure?
REPORT zmn_pflegen_benutzer_drucker.
*Input parameter
PARAMETERS: p_pfzz TYPE b919-zzuser,
p_pfldne TYPE nach-ldest,
p_pfta TYPE i.
*Data declaration
TYPES: BEGIN OF s_pflegen_benutzer_drucker,
benutzer TYPE b919-zzuser,
konditionssatz TYPE b919-knumh,
drucker TYPE nach-ldest,
END OF s_pflegen_benutzer_drucker.
DATA: ls_pflegen_benutzer_drucker TYPE s_pflegen_benutzer_drucker,
lt_pflegen_benutzer_drucker TYPE TABLE OF s_pflegen_benutzer_drucker.
*Combine b919-zzuser, b919-knumh/nach-knumh and nach-ldest
SELECT b919~zzuser b919~knumh nach~ldest
FROM b919 INNER JOIN nach ON b919~knumh = nach~knumh
INTO CORRESPONDING FIELDS OF TABLE lt_pflegen_benutzer_drucker
WHERE b919~zzuser = p_pfzz.
Thanks in advance for the helpful advice!
2021 Nov 05 9:16 AM
Thank you for your tips. I found the ‘bug’! My original statement is correct. The failure is due to parameter that I use is in small capitals! If I write the input in the parameter with all capital, it work!
Hi ABAPers Guru,
i try to joint selected fields from 2 standard table into internal table. I also input some parameter into the program.
But the data not loaded to my internal table. Can any of you advise me, where is the failure?
REPORT zmn_pflegen_benutzer_drucker.
*Input parameter
PARAMETERS: p_pfzz TYPE b919-zzuser,
p_pfldne TYPE nach-ldest,
p_pfta TYPE i.
*Data declaration
TYPES: BEGIN OF s_pflegen_benutzer_drucker,
benutzer TYPE b919-zzuser,
konditionssatz TYPE b919-knumh,
drucker TYPE nach-ldest,
END OF s_pflegen_benutzer_drucker.
DATA: ls_pflegen_benutzer_drucker TYPE s_pflegen_benutzer_drucker,
lt_pflegen_benutzer_drucker TYPE TABLE OF s_pflegen_benutzer_drucker.
*Combine b919-zzuser, b919-knumh/nach-knumh and nach-ldest
SELECT b919~zzuser b919~knumh nach~ldest
FROM b919 INNER JOIN nach ON b919~knumh = nach~knumh
INTO CORRESPONDING FIELDS OF TABLE lt_pflegen_benutzer_drucker
WHERE b919~zzuser = p_pfzz.
Thanks in advance for the helpful advice!
2021 Nov 04 5:59 PM
Do a SELECT only on table B919 to see if you get rows with ZZUSER = P_PFZZ.
If yes, take the value of KNUMH of the first line of B919, and do a SELECT on table NACH to see if there's at least one line with same KNUMH.
2021 Nov 05 9:16 AM
Thank you for your tips. I found the ‘bug’! My original statement is correct. The failure is due to parameter that I use is in small capitals! If I write the input in the parameter with all capital, it work!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |