2022 Mar 24 7:32 PM
I am new to SAP programming and trying to pull data from this table AGR_DEFINE which has a Text Table AGR_TEXTS apart of it. The data I need is the Role(AGR_NAME) and Short Description(TEXT), which the Role I have no problem grabbing but the Description is causing problems. I defined my types:
TYPES: BEGIN OF TY_AGR,<br> AGR_NAME LIKE AGR_DEFINE-AGR_NAME,<br> TEXT LIKE AGR_TEXTS-TEXT,<br> END OF TY_AGR.
But selecting the data gives me the error "Unknown column name "Text". until runtime, you cannot specify a field list"
SELECT AGR_NAME<br> TEXT<br> FROM AGR_DEFINE INTO CORRESPONDING FIELDS OF TABLE ITAB_AGR.
How am I able to grab this data?
I am new to SAP programming and trying to pull data from this table AGR_DEFINE which has a Text Table AGR_TEXTS apart of it. The data I need is the Role(AGR_NAME) and Short Description(TEXT), which the Role I have no problem grabbing but the Description is causing problems. I defined my types:
TYPES: BEGIN OF TY_AGR,<br> AGR_NAME LIKE AGR_DEFINE-AGR_NAME,<br> TEXT LIKE AGR_TEXTS-TEXT,<br> END OF TY_AGR.
But selecting the data gives me the error "Unknown column name "Text". until runtime, you cannot specify a field list"
SELECT AGR_NAME<br> TEXT<br> FROM AGR_DEFINE INTO CORRESPONDING FIELDS OF TABLE ITAB_AGR.
How am I able to grab this data?
2022 Mar 24 7:33 PM
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members. Feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will help you when submitting questions to the community.
I also recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html.
Kind regards,
--Jerry
Moderation Lead
2022 Mar 25 3:06 AM
Hi,
Use Inner join instead. This code should work.
Types: Begin of ty_agr,
agr_name Like agr_define-agr_name,
text Like agr_texts-text,
End of ty_agr.
Data: itab type standard table of ty_agr.
Select from agr_define as a
inner join agr_texts as b on a~agr_name = b~agr_name
fields a~agr_name as a1,
b~text as b1 into Table @itab. Note: Specify your Condition in select Statement.
2022 Mar 25 4:23 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |