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: 

ALV

Former Member
0 Kudos

hi i need to do develop an alv report in which in selection screen i will have company code vendor number,

date range,key date.

the report will extract all vendor open items for specified company code and generate ageing report at any given date and also turnover with one particular vendor.

the report should be able to run on any date that shows open items at keydate functionality in sap.

can u pls help me with the coding in alv!!1

5 REPLIES 5

Former Member
0 Kudos

Hi,

Check this demo program for ALV.

BALVEX01

BALVEX02

Regards,

Pankaj

0 Kudos

can u plss help me wid the code!!!its urgent!!!

0 Kudos

Hi,

First create the fieldcatlog. refer to the code below.

wa_fieldcat-col_pos = '1'.

wa_fieldcat-fieldname = 'QMNUM'.

wa_fieldcat-seltext_l = text-010.

wa_fieldcat-outputlen = 12.

wa_fieldcat-hotspot = 'X'.

APPEND wa_fieldcat TO i_fieldcat .

CLEAR wa_fieldcat.

wa_fieldcat-col_pos = '2'.

wa_fieldcat-fieldname = 'QMTXT'.

wa_fieldcat-seltext_l = text-011.

wa_fieldcat-outputlen = 20.

APPEND wa_fieldcat TO i_fieldcat .

CLEAR wa_fieldcat.

Mention all fields which u need in output.

Then Populate internal table which contain data to display output .. say i_output has all data.

Use this

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'USER_COMMAND'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • i_callback_html_end_of_list =

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT = alv_def

it_fieldcat = i_fieldcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • i_default = ' '

  • i_save =

  • is_variant =

  • it_events =

  • IT_EVENT_EXIT =

  • is_print =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = i_output

EXCEPTIONS

program_error = 1

OTHERS

Regards,

Pankaj

0 Kudos

thnaks for ur help but can u plss help me wid the coding for this particular object,

the tables are bsik and bsak and the fields are

Program will take data from table BSIK & BSAK

Based on selection parameters search BSIK table and move the required values to an internal table.

Calculation of ageing analysis : key date in selection screen – net due date of the open items

Former Member
0 Kudos

Hi,

Please refer to the link below :

http://www.sapdev.co.uk/reporting/alv/alvgrid_basic.htm

Thanks,

Sriram Ponna.