Application Development 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: 

Im fresher to sap can u plz suggest

2950008
Discoverer
0 Kudos
344

i want like this output
i have 4 entries but i don't want to show all, i want to show only one record in that one record is in 4 record, and im fresher i don't no ALV so please i want to write code some basic coding.

Thanks

4 REPLIES 4

2950008
Discoverer
0 Kudos
288

this is only one table

xiswanto
Active Participant
288

I'm not exactly sure about the output result on ALV you wanted, since the provided table structure is kind of unclear to me.

To clarify first, I need to make sure, do you know at least these part:

1. how to create a report program using SE38 tcode? ( good understanding of internal table, and basic syntax )

2. know which Function Module of ALV you want to use ( the grid, list, or hierarchy ALV)

Then moving on to the unclear table in your question, could you show how it exactly looks on SE16N based on your where condition?

I do have some assumption such as you want to combine rows where the value of 'BUKRS' WEARS' 'WERKS' is exactly the same but, it might be clearer if you could show how the data exactly looks like ( you could hide the content of sensitive data but still showing the column name ), as the current data you shown could just be done by filtering the OUTPUT field with condition OUTPUT = '4 ENTRIES'

matt
Active Contributor
0 Kudos
288

Don't use any function module for ALV.

Use CL_SALV_TABLE.
It's easy.

  DATA alv TYPE REF TO cl_salv_table.
  cl_salv_table=>factory( IMPORTING r_salv_table = alv
                           CHANGING t_table = my_internal_table ).
  alv->display( ).

matt
Active Contributor
0 Kudos
288

So you have one table with five columns:

BUKRS, WEARS, WERKS, something, OUTPUT. But you only want to show OUTPUT. How about.

LOOP AT my_internal_table ASSIGNING FIELD-SYMBOL(<record>).
WRITE / <record>-bukrs, <record>-wears, <record>-werks, <record>-output. ENDLOOP.

If you're not using ALV, then how are you creating your output? Write statements?