‎2022 May 09 10:54 AM
List all MATNRs from mara. Also create a coloumn heading for the list
How to do it with select statement
‎2022 May 09 10:55 AM
Hi ,
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.
For example, you can:
- outline what steps you took to find answers (and why they weren't helpful)
- share screenshots of what you've seen/done
- make sure you've applied the appropriate tags
- use a more descriptive subject line
The more details you provide, the more likely it is that members will be able to respond. Feel free to also take our Q&A tutorial at: https://developers.sap.com/tutorials/community-qa.html
Should you wish, you can revise your question by selecting Actions, then Edit.
By adding a picture to your profile you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html
Regards,
Dedi
‎2022 May 09 12:17 PM
Hi Nishant,
here a very simple example which selects all materials in the system and shows them in a ALV-Grid.
SELECT matnr FROM mara
INTO TABLE @DATA(lt_matnr).
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = DATA(lo_salv)
CHANGING
t_table = lt_Matnr.
lo_salv->display( ).
CATCH cx_salv_msg.
ENDTRY.I hope this helps you and answers your question
Kind regards
Jens
‎2022 May 09 12:42 PM
Using search tool, you would find many sapmles using a tool such as CL_SALV_TABLE or, for HANA, such as CL_SALV_GUI_TABLE_IDA.