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: 

How to use the FM G_SET_GET_ALL_VALUES in the ALV report

manorama_b
Explorer
0 Kudos
1,169

what to pass to set_values in Function module ? how to write alv report and how to use above function module in it to populate gl account in the created SET(ZHRA_GL)

4 REPLIES 4

shantraj
Explorer
0 Kudos
1,074

Please check the below link, it may help you.

Using G_SET_GET_ALL_VALUES Method | SAP Community

raymond_giuseppi
Active Contributor
0 Kudos
1,074

This FM will return the values of a set of data. (in your case a list of GL accounts)

What's your exact requirement

  • Selecting some documents with a G/L account in a parameter set
  • Displaying those in hierarchy mode?)

Hints:

  • First call G_SET_GET_ID_FROM_NAME to get the set number from its name (check GS03 transaction)
  • Class field for GL account group is 0109
  • Don't hesitate to perform some tests with SE37 and where-used search

0 Kudos
1,074

i want to populate G/L account from set ZHRA_GL and input should be

and output should be in below format and tables are faglflext skat and set name is zhra_gl

0 Kudos
1,074

Steps to perform

  • Check set definition (GS03)
  • First call G_SET_GET_ID_FROM_NAME with set name (SHORTNAME = 'ZHRA_GL') and table name (TABNAME = 'GLT0') to get SETNR
  • Then call G_SET_GET_ALL_VALUES with this id (SETNR) and get list of account in SET_VALUES
  • Build a range (select-options) from this table SET_VALUES or use it in a FOR ALL ENTRIES
  • Use this range in your SELECT to build the ALV displayed table