Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sap select statement

0 Likes
977

List all MATNRs from mara. Also create a coloumn heading for the list

How to do it with select statement

3 REPLIES 3
Read only

former_member27
Product and Topic Expert
Product and Topic Expert
0 Likes
934

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

Regards,
Dedi Metser
Read only

Jeansy
Active Contributor
934

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
934

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.