Skip to Content
author's profile photo Former Member
Former Member

PROBLEM IN INTERACTIVE REPORT

----


  • Tables Declaration *

----


TABLES :

vbap,

kna1,

vbrk,

konv,

vbrp,

a978.

TYPE-POOLS : slis.

************************************************************************

  • DECLARATION FOR ALV

************************************************************************

DATA: fieldtab TYPE slis_t_fieldcat_alv,

fieldtab1 TYPE slis_t_fieldcat_alv,

heading TYPE slis_t_listheader,

heading1 TYPE slis_t_listheader,

temp_heading TYPE slis_t_listheader,

layout TYPE slis_layout_alv,

layout1 TYPE slis_layout_alv,

events TYPE slis_t_event,

events1 TYPE slis_t_event,

repname LIKE sy-repid,

f2code LIKE sy-ucomm VALUE '&ETA',

g_save(1) TYPE c,

g_variant LIKE disvariant,

gx_variant LIKE disvariant,

g_exit(1) TYPE c.

DATA: keyinfo TYPE slis_keyinfo_alv.

CONSTANTS: formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.

DATA: alv_print TYPE slis_print_alv.

DATA: alv_detail_func(30).

----


  • INTERNAL TABLE DECLARATION *

----


DATA : BEGIN OF it_vbrk OCCURS 0,

kunag LIKE vbrk-kunag,

vbeln LIKE vbrk-vbeln,

fkdat LIKE vbrk-fkdat,

knumv LIKE vbrk-knumv,

bukrs LIKE vbrk-bukrs,

waerk LIKE vbrk-waerk,

bzirk LIKE vbrk-bzirk,

spart LIKE vbrk-spart,

fkart LIKE vbrk-fkart,

END OF it_vbrk.

DATA : BEGIN OF it_vbrp OCCURS 0,

kunag LIKE vbrk-kunag,

vbeln LIKE vbrp-vbeln,

posnr LIKE vbrp-posnr,

  • fkimg LIKE vbrp-fkimg,

werks LIKE vbrp-werks,

knumv LIKE vbrk-knumv,

  • bukrs LIKE vbrk-bukrs,

  • waerk LIKE vbrk-waerk,

  • bzirk LIKE vbrk-bzirk,

spart LIKE vbrk-spart,

fkart LIKE vbrk-fkart,

name1 LIKE kna1-name1,

  • kschl LIKE konv-kschl,

kwert LIKE konv-kwert,

END OF it_vbrp.

DATA : BEGIN OF it_kna1 OCCURS 0,

kunnr LIKE kna1-kunnr,

name1 LIKE kna1-name1,

END OF it_kna1.

DATA : BEGIN OF it_konv OCCURS 0,

knumv LIKE konv-knumv,

kposn LIKE konv-kposn,

kschl LIKE konv-kschl,

kwert LIKE konv-kwert,

name1 LIKE kna1-name1,

END OF it_konv.

DATA : BEGIN OF it_a978 OCCURS 0,

kschl LIKE a978-kschl,

spart LIKE a978-spart,

knumh LIKE a978-knumh,

kunnr LIKE a978-kunnr,

datbi LIKE a978-datbi,

datab LIKE a978-datab,

kbetr TYPE konp-kbetr,

END OF it_a978.

DATA: BEGIN OF it_konp OCCURS 0,

knumh TYPE konp-knumh,

kschl TYPE konp-kschl,

kbetr TYPE konp-kbetr,

END OF it_konp.

DATA : BEGIN OF it_final OCCURS 0,

kunag LIKE vbak-kunnr,

name1 LIKE kna1-name1,

spart LIKE vbrk-spart,

fkart LIKE vbrk-fkart,

datbi LIKE a978-datbi,

datab LIKE a978-datab,

kwert LIKE konv-kwert,

kbetr1 LIKE konp-kbetr,

werks LIKE vbrp-werks,

zbalan LIKE konp-kbetr,

END OF it_final.

----


  • SELECTION-SCREEN *

----


----


  • SELECTION-SCREEN *

----


SELECTION-SCREEN BEGIN OF BLOCK d WITH FRAME TITLE text-s01.

PARAMETERS: p_vari LIKE disvariant-variant. " ALV Variant

SELECTION-SCREEN END OF BLOCK d.

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : p_spart LIKE a978-spart OBLIGATORY.

PARAMETERS : p_fkdat LIKE vbrk-fkdat.

SELECT-OPTIONS : s_kunag FOR vbrk-kunag,

s_fkart FOR a978-fkart.

SELECTION-SCREEN : END OF BLOCK b1.

----


  • INITIALIZATION

----


INITIALIZATION.

repname = sy-repid.

PERFORM build_eventtab USING events[].

PERFORM build_eventtab1 USING events1[].

PERFORM build_layout .

PERFORM build_layout1.

PERFORM build_comment USING heading[].

PERFORM build_comment1 USING heading1[].

PERFORM initialize_variant.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.

PERFORM f4_for_variant.

AT SELECTION-SCREEN.

PERFORM pai_of_selection_screen.

----


  • START - OF - SELECTION

----


START-OF-SELECTION.

PERFORM fetch-data.

PERFORM initialize_fieldcat USING fieldtab[].

PERFORM initialize_fieldcat1 USING fieldtab1[].

PERFORM fetch-data1.

PERFORM write_out.

  • PERFORM write_out1.

&----


*& Form fetch-data

&----


  • text

----


  • --> p1 text

  • <-- p2 tex

----


FORM fetch-data .

DATA : fdate LIKE sy-datum.

fdate = p_fkdat.

fdate+6(2) = '01'.

SELECT * FROM a978 INTO CORRESPONDING FIELDS OF TABLE it_a978

WHERE kschl = 'ZPD6'

AND kunnr IN s_kunag

AND datab LE fdate

AND datbi GE p_fkdat

AND fkart IN s_fkart

AND spart EQ p_spart.

CHECK it_a978[] IS NOT INITIAL.

SELECT * FROM konp INTO CORRESPONDING FIELDS OF TABLE it_konp

FOR ALL ENTRIES IN it_a978

WHERE kschl = it_a978-kschl

AND knumh = it_a978-knumh

AND loevm_ko EQ space

AND kbetr NE space.

CHECK it_konp[] IS NOT INITIAL.

SELECT * FROM vbrk INTO CORRESPONDING FIELDS OF TABLE it_vbrk

FOR ALL ENTRIES IN it_a978

WHERE kunag = it_a978-kunnr

AND fkdat BETWEEN fdate

AND p_fkdat

AND fkart IN s_fkart

AND spart EQ p_spart

AND fksto EQ space

AND sfakn EQ space.

CHECK it_vbrk[] IS NOT INITIAL.

SELECT * FROM vbrp INTO CORRESPONDING FIELDS OF TABLE it_vbrp

FOR ALL ENTRIES IN it_vbrk

WHERE vbeln = it_vbrk-vbeln

AND fkimg NE 0.

CHECK it_vbrp[] IS NOT INITIAL.

SELECT kunnr name1 FROM kna1 INTO TABLE it_kna1

FOR ALL ENTRIES IN it_vbrk

WHERE kunnr = it_vbrk-kunag.

LOOP AT it_vbrp.

READ TABLE it_vbrk WITH KEY vbeln = it_vbrp-vbeln.

IF sy-subrc = 0.

MOVE it_vbrk-knumv TO it_vbrp-knumv.

MOVE it_vbrk-kunag TO it_vbrp-kunag.

MOVE it_vbrk-fkart TO it_vbrp-fkart.

ENDIF.

READ TABLE it_kna1 WITH KEY kunnr = it_vbrp-kunag

.

IF sy-subrc EQ 0.

it_vbrp-name1 = it_kna1-name1.

ENDIF.

MODIFY it_vbrp.

CLEAR it_vbrp.

ENDLOOP.

SELECT * FROM konv INTO CORRESPONDING FIELDS OF TABLE it_konv

FOR ALL ENTRIES IN it_vbrp

WHERE knumv = it_vbrp-knumv

AND kposn = it_vbrp-posnr

AND kschl EQ 'ZPD6'

AND kwert NE space.

SORT it_konv BY knumv kposn.

LOOP AT it_vbrp.

READ TABLE it_konv WITH KEY knumv = it_vbrp-knumv

kposn = it_vbrp-posnr BINARY SEARCH.

IF sy-subrc EQ 0.

  • MOVE it_konv-kschl TO it_vbrp-kschl.

MOVE it_konv-kwert TO it_vbrp-kwert.

ELSE.

DELETE it_vbrp INDEX sy-tabix.

CLEAR it_vbrp.

CONTINUE.

ENDIF.

MOVE-CORRESPONDING it_vbrp TO it_final.

COLLECT it_final.

CLEAR it_final.

COLLECT it_vbrp.

CLEAR it_vbrp.

ENDLOOP.

CHECK it_final[] IS NOT INITIAL.

LOOP AT it_a978.

READ TABLE it_konp WITH KEY kschl = it_a978-kschl

knumh = it_a978-knumh.

IF sy-subrc EQ 0.

MOVE it_konp-kbetr TO it_a978-kbetr.

ENDIF.

COLLECT it_a978.

CLEAR it_a978.

ENDLOOP.

LOOP AT it_final.

READ TABLE it_a978 WITH KEY spart = it_final-spart

kunnr = it_final-kunag.

IF sy-subrc EQ 0.

MOVE it_a978-kbetr TO it_final-kbetr1.

MOVE it_a978-datab TO it_final-datab.

MOVE it_a978-datbi TO it_final-datbi.

it_final-kbetr1 = it_final-kbetr1 * -1.

it_final-kwert = it_final-kwert * -1.

it_final-zbalan = it_final-kbetr1 - it_final-kwert.

ENDIF.

MODIFY it_final.

CLEAR it_final.

ENDLOOP.

ENDFORM. " fetch-data

&----


*& Form build_eventtab

&----


  • text

----


  • -->P_EVENTS[] text

----


FORM build_eventtab USING p_events TYPE slis_t_event.

DATA: ls_event TYPE slis_alv_event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = p_events.

READ TABLE p_events WITH KEY name = slis_ev_top_of_page

INTO ls_event.

IF sy-subrc = 0.

MOVE formname_top_of_page TO ls_event-form.

APPEND ls_event TO p_events.

ENDIF.

ENDFORM. " build_eventtab

&----


*& Form build_layout

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM build_layout .

layout-f2code = f2code.

layout-zebra = 'X'.

layout-detail_popup = 'X'.

ENDFORM. " build_layout

&----


*& Form build_comment

&----


  • text

----


  • -->P_HEADING[] text

----


FORM build_comment USING p_heading TYPE slis_t_listheader.

DATA: hline TYPE slis_listheader,

text(60) TYPE c,

sep(20) TYPE c.

CLEAR: hline, text.

WRITE: 'User: ' TO text,

sy-uname TO text+6,

'Date: ' TO text+25,

sy-datum TO text+31.

hline-info = 'Balance Scheme Discount'.

hline-typ = 'H'.

APPEND hline TO p_heading.

CLEAR hline.

hline-info = text.

hline-typ = 'S'.

APPEND hline TO p_heading.

CLEAR hline.

ENDFORM. " build_comment

&----


*& Form initialize_variant

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM initialize_variant .

g_save = 'A'.

CLEAR g_variant.

g_variant-report = repname.

gx_variant = g_variant.

CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'

EXPORTING

i_save = g_save

CHANGING

cs_variant = gx_variant

EXCEPTIONS

not_found = 2.

IF sy-subrc = 0.

p_vari = gx_variant-variant.

ENDIF.

layout-get_selinfos = 'X'.

layout-group_change_edit = 'X'.

alv_print-no_print_selinfos = 'X'.

alv_print-no_coverpage = 'X'.

alv_print-no_print_listinfos = 'X'.

alv_detail_func = 'REUSE_ALV_LIST_DISPLAY'.

ENDFORM. " initialize_variant

&----


*& Form f4_for_variant

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f4_for_variant .

CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

EXPORTING

is_variant = g_variant

i_save = g_save

IMPORTING

e_exit = g_exit

es_variant = gx_variant

EXCEPTIONS

not_found = 2.

IF sy-subrc = 2.

MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE.

IF g_exit = space.

p_vari = gx_variant-variant.

ENDIF.

ENDIF.

ENDFORM. " f4_for_variant

&----


*& Form initialize_fieldcat

&----


  • text

----


  • -->P_FIELDTAB[] text

----


FORM initialize_fieldcat USING p_fieldtab TYPE slis_t_fieldcat_alv.

DATA : l_fieldcat TYPE slis_fieldcat_alv.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'KUNAG'.

l_fieldcat-seltext_m = 'Customer'.

l_fieldcat-seltext_l = 'Customer'.

l_fieldcat-seltext_s = 'Customer'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'NAME1'.

l_fieldcat-seltext_m = 'Customer Name'.

l_fieldcat-seltext_l = 'Customer Name'.

l_fieldcat-seltext_s = 'Customer Name'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'SPART'.

l_fieldcat-seltext_m = 'Division'.

l_fieldcat-seltext_l = 'Division'.

l_fieldcat-seltext_s = 'Division'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'FKART'.

l_fieldcat-seltext_m = 'Billing Type'.

l_fieldcat-seltext_l = 'Billing Type'.

l_fieldcat-seltext_s = 'Billing Type'.

  • l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

  • l_fieldcat-tabname = 'IT_FINAL'.

  • l_fieldcat-fieldname = 'KSCHL'.

  • l_fieldcat-seltext_m = 'Condition Type'.

  • l_fieldcat-seltext_l = 'Condition Type'.

  • l_fieldcat-seltext_s = 'Condition Type'.

  • l_fieldcat-ddictxt = 'L'.

  • APPEND l_fieldcat TO p_fieldtab.

  • CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'DATAB'.

l_fieldcat-seltext_m = 'Valid From'.

l_fieldcat-seltext_l = 'Valid From'.

l_fieldcat-seltext_s = 'Valid From'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'DATBI'.

l_fieldcat-seltext_m = 'Valid Till'.

l_fieldcat-seltext_l = 'Valid Till'.

l_fieldcat-seltext_s = 'Valid Till'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'KWERT'.

l_fieldcat-seltext_m = 'Scheme Discount'.

l_fieldcat-seltext_l = 'Scheme Discount'.

l_fieldcat-seltext_s = 'Scheme Discount'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'KBETR1'.

l_fieldcat-seltext_m = 'Scm.Disc.Allot'.

l_fieldcat-seltext_l = 'Scm.Disc.Allot'.

l_fieldcat-seltext_s = 'Scm.Disc.Allot'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'WERKS'.

l_fieldcat-seltext_m = 'Plant'.

l_fieldcat-seltext_l = 'Plant'.

l_fieldcat-seltext_s = 'Plant'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

l_fieldcat-tabname = 'IT_FINAL'.

l_fieldcat-fieldname = 'ZBALAN'.

l_fieldcat-seltext_m = 'Balance Disc'.

l_fieldcat-seltext_l = 'Balance Disc'.

l_fieldcat-seltext_s = 'Balance Disc'.

l_fieldcat-ddictxt = 'L'.

APPEND l_fieldcat TO p_fieldtab.

CLEAR l_fieldcat.

ENDFORM. " initialize_fieldcat

&----


*& Form write_out

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM write_out .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = repname

  • i_callback_pf_status_set = 'SET_PF_STAT_L'

i_callback_user_command = 'USER_COMMAND'

  • i_structure_name = 'IT_FINAL1'

is_layout = layout

it_fieldcat = fieldtab

i_default = 'A'

i_save = g_save

is_variant = g_variant

it_events = events[]

TABLES

t_outtab = it_final.

IF sy-subrc <> 0.

WRITE: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_LIST_DISPLAY'.

ENDIF.

ENDFORM. " write_out

&----


*& Form pai_of_selection_screen

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM pai_of_selection_screen .

IF NOT p_vari IS INITIAL.

MOVE g_variant TO gx_variant.

MOVE p_vari TO gx_variant-variant.

CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'

EXPORTING

i_save = g_save

CHANGING

cs_variant = gx_variant.

g_variant = gx_variant.

ELSE.

PERFORM initialize_variant.

ENDIF.

ENDFORM. " pai_of_selection_screen

----


  • FORM TOP_OF_PAGE *

----


  • ........ *

----


FORM top_of_page.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = heading.

  • WRITE :/2 'Customer Outstandings '.

  • PERFORM write_output.

ENDFORM. "TOP_OF_PAGE

" initialize_fieldcat1

&----


*& Form build_eventtab1

&----


  • text

----


  • -->P_EVENTS1[] text

----


FORM build_eventtab1 USING p_events1 TYPE slis_t_event.

DATA: ls_event1 TYPE slis_alv_event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 1

IMPORTING

et_events = p_events1.

READ TABLE p_events1 WITH KEY name = slis_ev_top_of_page

INTO ls_event1.

IF sy-subrc = 0.

MOVE formname_top_of_page TO ls_event1-form.

APPEND ls_event1 TO p_events1.

ENDIF.

ENDFORM. " build_eventtab1

&----


*& Form build_layout1

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM build_layout1 .

layout1-f2code = f2code.

layout1-zebra = 'X'.

layout1-detail_popup = 'X'.

ENDFORM. " build_layout1

&----


*& Form build_comment1

&----


  • text

----


  • -->P_HEADING1[] text

----


FORM build_comment1 USING p_heading1 TYPE slis_t_listheader.

DATA: hline1 TYPE slis_listheader,

text1(60) TYPE c,

sep1(20) TYPE c.

CLEAR: hline1, text1.

WRITE: 'User: ' TO text1,

sy-uname TO text1+6,

'Date: ' TO text1+25,

sy-datum TO text1+31.

hline1-info = 'Billing Detail for Customer'.

hline1-typ = 'H'.

APPEND hline1 TO p_heading1.

CLEAR hline1.

hline1-info = text1.

hline1-typ = 'S'.

APPEND hline1 TO p_heading1.

CLEAR hline1.

DATA : t1 TYPE kna1-kunnr.

CLEAR t1.

DELETE p_heading1[] WHERE typ EQ 'S' .

READ TABLE it_vbrp WITH KEY kunag = it_final-kunag.

IF sy-subrc = 0.

t1 = it_vbrp-kunag.

hline1-info = t1.

hline1-typ = 'S'.

hline1-key = 'Cust No'.

APPEND hline1 TO p_heading1.

CLEAR hline1.

CLEAR t1.

ENDIF.

ENDFORM. " build_comment1

&----


*& Form initialize_fieldcat1

&----


  • text

----


  • -->P_FIELDTAB1[] text

*----


FORM initialize_fieldcat1 USING p_fieldtab1 TYPE slis_t_fieldcat_alv

.

DATA : l_fieldcat1 TYPE slis_fieldcat_alv.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRP'.

l_fieldcat1-fieldname = 'KUNAG'.

l_fieldcat1-seltext_m = 'Customer'.

l_fieldcat1-seltext_l = 'Customer'.

l_fieldcat1-seltext_s = 'Customer'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRP'.

l_fieldcat1-fieldname = 'VBELN'.

l_fieldcat1-seltext_m = 'Billing Document'.

l_fieldcat1-seltext_l = 'Billing Document'.

l_fieldcat1-seltext_s = 'Billing Document'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRP'.

l_fieldcat1-fieldname = 'POSNR'.

l_fieldcat1-seltext_m = 'Billing Item'.

l_fieldcat1-seltext_l = 'Billing Item'.

l_fieldcat1-seltext_s = 'Billing Item'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRP'.

l_fieldcat1-fieldname = 'WERKS'.

l_fieldcat1-seltext_m = 'Plant'.

l_fieldcat1-seltext_l = 'Plant'.

l_fieldcat1-seltext_s = 'Plant'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRK'.

l_fieldcat1-fieldname = 'KNUMV'.

l_fieldcat1-seltext_m = 'Document Condition'.

l_fieldcat1-seltext_l = 'Document Condition'.

l_fieldcat1-seltext_s = 'Document Condition'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRK'.

l_fieldcat1-fieldname = 'SPART'.

l_fieldcat1-seltext_m = 'Division'.

l_fieldcat1-seltext_l = 'Division'.

l_fieldcat1-seltext_s = 'Division'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_VBRK'.

l_fieldcat1-fieldname = 'FKART'.

l_fieldcat1-seltext_m = 'Billing Type'.

l_fieldcat1-seltext_l = 'Billing Type'.

l_fieldcat1-seltext_s = 'Billing Type'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_KNA1'.

l_fieldcat1-fieldname = 'NAME1'.

l_fieldcat1-seltext_m = 'Name'.

l_fieldcat1-seltext_l = 'Name'.

l_fieldcat1-seltext_s = 'Name'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

CLEAR l_fieldcat1.

l_fieldcat1-tabname = 'IT_KONV'.

l_fieldcat1-fieldname = 'KWERT'.

l_fieldcat1-seltext_m = 'Condition Value'.

l_fieldcat1-seltext_l = 'Condition Value'.

l_fieldcat1-seltext_s = 'Condition Value'.

l_fieldcat1-ddictxt = 'L'.

APPEND l_fieldcat1 TO p_fieldtab1.

CLEAR l_fieldcat1.

ENDFORM. "initialize_fieldcat1

&----


*& Form fetch-data1

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM fetch-data1.

DATA : ucomm LIKE sy-ucomm,

sel_det TYPE slis_selfield.

CASE ucomm.

WHEN '&IC1'.

IF sel_det-fieldname EQ 'KUNAG'.

READ TABLE it_final INDEX sel_det-tabindex.

DELETE it_vbrp WHERE kunag NE it_final-kunag.

. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = repname

  • i_callback_pf_status_set = 'SET_PF_STAT_L'

i_callback_user_command = 'USER_COMMAND'

  • i_structure_name = 'IT_FINAL1'

is_layout = layout1

it_fieldcat = fieldtab1

i_default = 'A'

i_save = g_save

is_variant = g_variant

it_events = events1[]

TABLES

t_outtab = it_vbrp.

IF sy-subrc <> 0.

WRITE: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_LIST_DISPLAY'.

ENDIF.

ENDIF.

ENDCASE.

ENDFORM. " fetch-data1

&----


*& Form top-of-page1

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM top-of-page1 .

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = heading1.

ENDFORM. " top-of-page1

Above is my interactive report .in this report i am getting the basic list and i am not able to get the secondary list .pls go through it and problem me the solution .pls check in this report only.it's urgent.help me please.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 12, 2008 at 06:13 PM

    If this is not a standard program you will need to debug yourself. If it is a standard program I ´d search for the program name for OSS notes.

    I suggest posting your question to the ABAP forum instead of here.

    Markus

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2008 at 04:21 PM

    Hi,

    Please consult with abaper consultant he will debugg the programe and correct it.

    Anil

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.