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

Print out problem

Former Member
0 Likes
702

Hai Friends,

How can i take the print out of REUSE_BLOCK_ALV_LIST.

I am getting a dump error when i click the print button.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
679

When i Run the Report BALVBT01, and Press the print Button it is printing correctly with out any Dump.

If you are getting the Dump, what is the Dump analysis.

Mostly this will cause from the Fieldcatalog..if at all you are getting any Dump.

show your fieldcatalog population .

6 REPLIES 6
Read only

Former Member
0 Likes
680

When i Run the Report BALVBT01, and Press the print Button it is printing correctly with out any Dump.

If you are getting the Dump, what is the Dump analysis.

Mostly this will cause from the Fieldcatalog..if at all you are getting any Dump.

show your fieldcatalog population .

Read only

0 Likes
679

I am getting the dump in the below mentioned line.

FORM GEN_FIELD_OUT2

form gen_field_out2.

field-symbols <l_initial>.

case gs_out-field_colcount.

when 001.

if gs_out_flags-slave ne 'X'.

assign <fm01> to <field>.

gs_fc = gs_mfc01.

else.

assign <fs01> to <field>.

gs_fc = gs_sfc01.

endif.

when 002.

if gs_out_flags-slave ne 'X'.

assign <fm02> to <field>. (Dump is in this line)

gs_fc = gs_mfc02.

else.

assign <fs02> to <field>.

gs_fc = gs_sfc02.

endif.

when 003.

if gs_out_flags-slave ne 'X'.

assign <fm03> to <field>.

gs_fc = gs_mfc03.

else.

Read only

0 Likes
679

Show me your fieldcatalog population code and Functions modules calls. Leave the Short dump code. If you don't populate the fieldcatalog or passing wrong parameters to the Functions may lead to Errors in the Run time.

Read only

0 Likes
679

The below is my program

&----


*& Report ZBLOCK_ALV

*&

&----


*&

*&

&----


REPORT ZBLOCK_ALV.

TYPE-POOLS : SLIS.

TABLES: KNA1.

TYPES: BEGIN OF TY_KNA1,

KUNNR TYPE KNA1-KUNNR,

ADRNR TYPE KNA1-ADRNR,

END OF TY_KNA1,

BEGIN OF TY_ADRC,

NAME1 TYPE ADRC-NAME1,

CITY1 TYPE ADRC-CITY1,

POST_CODE1 TYPE ADRC-POST_CODE1,

LOCATION TYPE ADRC-LOCATION,

END OF TY_ADRC,

BEGIN OF TY_KNVV,

KUNNR TYPE KNVV-KUNNR,

VKORG TYPE KNVV-VKORG,

VTWEG TYPE KNVV-VTWEG,

KDGRP TYPE KNVV-KDGRP,

VKBUR TYPE KNVV-VKBUR,

END OF TY_KNVV.

DATA: IT_KNA1 TYPE TABLE OF TY_KNA1,

IT_ADRC TYPE TABLE OF TY_ADRC,

IT_KNVV TYPE TABLE OF TY_KNVV.

DATA: WA_KNA1 TYPE TY_KNA1,

WA_ADRC TYPE TY_ADRC,

WA_KNVV TYPE TY_KNVV.

DATA : IT_FLCAT1 TYPE TABLE OF SLIS_FIELDCAT_ALV,

IT_FLCAT2 LIKE IT_FLCAT1,

IT_FLCAT3 LIKE IT_FLCAT1.

DATA: IT_EVENTS1 TYPE SLIS_T_EVENT,

IT_EVENTS2 LIKE IT_EVENTS1,

IT_EVENTS3 LIKE IT_EVENTS1.

DATA: I_LAYOUT1 TYPE SLIS_LAYOUT_ALV,

I_LAYOUT2 LIKE I_LAYOUT1,

I_LAYOUT3 LIKE I_LAYOUT2.

DATA: WA_FLCAT1 LIKE LINE OF IT_FLCAT1,

WA_FLCAT2 LIKE WA_FLCAT1,

WA_FLCAT3 LIKE WA_FLCAT1.

INITIALIZATION.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: SO_CUST FOR KNA1-KUNNR OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

AT SELECTION-SCREEN.

***FETCHING THE ADDRESS NUMBER FOR ALL THE CUSTOMERS

SELECT KUNNR

ADRNR

FROM KNA1

INTO TABLE IT_KNA1

WHERE KUNNR IN SO_CUST.

***FETCHING THE ADDRESS DETAILS FOR ALL THE CUSTOMERS

IF NOT IT_KNA1 IS INITIAL.

SELECT NAME1

CITY1

POST_CODE1

LOCATION

FROM ADRC

INTO TABLE IT_ADRC

FOR ALL ENTRIES IN IT_KNA1

WHERE ADDRNUMBER = IT_KNA1-ADRNR.

ENDIF.

***FETCHING THE CUSTOMER RELATED DETAILS

IF NOT IT_KNA1 IS INITIAL.

SELECT KUNNR

VKORG

VTWEG

KDGRP

VKBUR

FROM KNVV

INTO TABLE IT_KNVV

FOR ALL ENTRIES IN IT_KNA1

WHERE KUNNR = IT_KNA1-KUNNR.

ENDIF.

PERFORM FCAT.

PERFORM BLOCK_ALV.

&----


*& Form FCAT

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM FCAT .

***FOR THE INTERNAL TABLE IT_KNA1

CLEAR WA_FLCAT1.

WA_FLCAT1-COL_POS = 1.

WA_FLCAT1-FIELDNAME = 'KUNNR'.

WA_FLCAT1-TABNAME = 'IT_KNA1'.

WA_FLCAT1-SELTEXT_L = 'KUNNR'.

APPEND WA_FLCAT1 TO IT_FLCAT1.

CLEAR WA_FLCAT1.

WA_FLCAT1-COL_POS = 2.

WA_FLCAT1-FIELDNAME = 'ADRNR'.

WA_FLCAT1-TABNAME = 'IT_KNA1'.

WA_FLCAT1-SELTEXT_L = 'ADRNR'.

APPEND WA_FLCAT1 TO IT_FLCAT1.

***FOR THE INTERNAL TABLE IT_ADRC

CLEAR WA_FLCAT2.

WA_FLCAT2-COL_POS = 1.

WA_FLCAT2-FIELDNAME = 'NAME1'.

WA_FLCAT2-TABNAME = 'IT_ADRC'.

WA_FLCAT2-SELTEXT_L = 'NAME1'.

APPEND WA_FLCAT2 TO IT_FLCAT2.

CLEAR WA_FLCAT2.

WA_FLCAT2-COL_POS = 2.

WA_FLCAT2-FIELDNAME = 'CITY1'.

WA_FLCAT2-TABNAME = 'IT_ADRC'.

WA_FLCAT2-SELTEXT_L = 'CITY1'.

APPEND WA_FLCAT2 TO IT_FLCAT2.

CLEAR WA_FLCAT2.

WA_FLCAT2-COL_POS = 3.

WA_FLCAT2-FIELDNAME = 'POST_CODE1'.

WA_FLCAT2-TABNAME = 'IT_ADRC'.

WA_FLCAT2-SELTEXT_L = 'POST_CODE1'.

APPEND WA_FLCAT2 TO IT_FLCAT2.

CLEAR WA_FLCAT2.

WA_FLCAT2-COL_POS = 4.

WA_FLCAT2-FIELDNAME = 'LOCATION'.

WA_FLCAT2-TABNAME = 'IT_ADRC'.

WA_FLCAT2-SELTEXT_L = 'LOCATION'.

APPEND WA_FLCAT2 TO IT_FLCAT2.

***FOR THE INTERNAL TABLE IT_KNVV

CLEAR WA_FLCAT3.

WA_FLCAT3-COL_POS = 1.

WA_FLCAT3-FIELDNAME = 'CUSTOMER'.

WA_FLCAT3-TABNAME = 'IT_KNVV'.

WA_FLCAT3-SELTEXT_L = 'CUSTOMER'.

APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.

WA_FLCAT3-COL_POS = 2.

WA_FLCAT3-FIELDNAME = 'SALES ORG'.

WA_FLCAT3-TABNAME = 'IT_KNVV'.

WA_FLCAT3-SELTEXT_L = 'SALES ORG'.

APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.

WA_FLCAT3-COL_POS = 3.

WA_FLCAT3-FIELDNAME = 'DIST.CHANNEL'.

WA_FLCAT3-TABNAME = 'IT_KNVV'.

WA_FLCAT3-SELTEXT_L = 'DIST.CHANNEL'.

APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.

WA_FLCAT3-COL_POS = 4.

WA_FLCAT3-FIELDNAME = 'CUST.GROUP'.

WA_FLCAT3-TABNAME = 'IT_KNVV'.

WA_FLCAT3-SELTEXT_L = 'CUST.GROUP'.

APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.

WA_FLCAT3-COL_POS = 5.

WA_FLCAT3-FIELDNAME = 'SALES OFFICE'.

WA_FLCAT3-TABNAME = 'IT_KNVV'.

WA_FLCAT3-SELTEXT_L = 'SALES OFFICE'.

APPEND WA_FLCAT3 TO IT_FLCAT3.

ENDFORM. " FCAT

&----


*& Form BLOCK_ALV

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM BLOCK_ALV .

***INITIALIZING THE BLOCK

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = ' '.

***APPENDING THE BLOCK

***GRID FOR ADDRESS NUMBER DETAILS

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = I_LAYOUT1

IT_FIELDCAT = IT_FLCAT1[]

I_TABNAME = 'IT_KNA1'

IT_EVENTS = IT_EVENTS1[]

I_TEXT = 'Address Number Details'

TABLES

T_OUTTAB = IT_KNA1

EXCEPTIONS

PROGRAM_ERROR = 1

MAXIMUM_OF_APPENDS_REACHED = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

***GRID FOR ADDRESS DETAILS

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = I_LAYOUT2

IT_FIELDCAT = IT_FLCAT2[]

I_TABNAME = 'IT_ADRC'

IT_EVENTS = IT_EVENTS2[]

I_TEXT = 'Address Details'

TABLES

T_OUTTAB = IT_ADRC

EXCEPTIONS

PROGRAM_ERROR = 1

MAXIMUM_OF_APPENDS_REACHED = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

***GRID FOR CUSTOMER RELATED DETAILS

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = I_LAYOUT2

IT_FIELDCAT = IT_FLCAT3[]

I_TABNAME = 'IT_KNVV'

IT_EVENTS = IT_EVENTS3[]

I_TEXT = 'Customer Related Details'

TABLES

T_OUTTAB = IT_KNVV

EXCEPTIONS

PROGRAM_ERROR = 1

MAXIMUM_OF_APPENDS_REACHED = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

***DISPLAYING THE FINAL BLOCK

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " BLOCK_ALV

Read only

0 Likes
679

mistake is here.. in the population of this fieldcat.

i modified it check it now with this code.

CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 1.
WA_FLCAT3-FIELDNAME = 'KUNNR'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'CUSTOMER'.
APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 2.
WA_FLCAT3-FIELDNAME = 'VKORG'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'SALES ORG'.
APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 3.
WA_FLCAT3-FIELDNAME = 'VTWEG'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'DIST.CHANNEL'.
APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 4.
WA_FLCAT3-FIELDNAME = 'KDGRP'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'CUST.GROUP'.
APPEND WA_FLCAT3 TO IT_FLCAT3.

CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 5.
WA_FLCAT3-FIELDNAME = 'VKBUR'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'SALES OFFICE'.
APPEND WA_FLCAT3 TO IT_FLCAT3.

Read only

0 Likes
679

this is working in my system, and i modified the fieldcatalog code check it once.

REPORT ZBLOCK_ALV. 

TYPE-POOLS : SLIS. 

TABLES: KNA1. 

TYPES: BEGIN OF TY_KNA1, 
KUNNR TYPE KNA1-KUNNR, 
ADRNR TYPE KNA1-ADRNR, 
END OF TY_KNA1, 

BEGIN OF TY_ADRC, 
NAME1 TYPE ADRC-NAME1, 
CITY1 TYPE ADRC-CITY1, 
POST_CODE1 TYPE ADRC-POST_CODE1, 
LOCATION TYPE ADRC-LOCATION, 
END OF TY_ADRC, 

BEGIN OF TY_KNVV, 
KUNNR TYPE KNVV-KUNNR, 
VKORG TYPE KNVV-VKORG, 
VTWEG TYPE KNVV-VTWEG, 
KDGRP TYPE KNVV-KDGRP, 
VKBUR TYPE KNVV-VKBUR, 
END OF TY_KNVV. 

DATA: IT_KNA1 TYPE TABLE OF TY_KNA1, 
IT_ADRC TYPE TABLE OF TY_ADRC, 
IT_KNVV TYPE TABLE OF TY_KNVV. 

DATA: WA_KNA1 TYPE TY_KNA1, 
WA_ADRC TYPE TY_ADRC, 
WA_KNVV TYPE TY_KNVV. 

DATA : IT_FLCAT1 TYPE TABLE OF SLIS_FIELDCAT_ALV, 
IT_FLCAT2 LIKE IT_FLCAT1, 
IT_FLCAT3 LIKE IT_FLCAT1. 

DATA: IT_EVENTS1 TYPE SLIS_T_EVENT, 
IT_EVENTS2 LIKE IT_EVENTS1, 
IT_EVENTS3 LIKE IT_EVENTS1. 

DATA: I_LAYOUT1 TYPE SLIS_LAYOUT_ALV, 
I_LAYOUT2 LIKE I_LAYOUT1, 
I_LAYOUT3 LIKE I_LAYOUT2. 


DATA: WA_FLCAT1 LIKE LINE OF IT_FLCAT1, 
WA_FLCAT2 LIKE WA_FLCAT1, 
WA_FLCAT3 LIKE WA_FLCAT1. 

INITIALIZATION. 

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. 
SELECT-OPTIONS: SO_CUST FOR KNA1-KUNNR OBLIGATORY. 
SELECTION-SCREEN END OF BLOCK B1. 

AT SELECTION-SCREEN. 

***FETCHING THE ADDRESS NUMBER FOR ALL THE CUSTOMERS 

SELECT KUNNR 
ADRNR 
FROM KNA1 
INTO TABLE IT_KNA1 
WHERE KUNNR IN SO_CUST. 

***FETCHING THE ADDRESS DETAILS FOR ALL THE CUSTOMERS 

IF NOT IT_KNA1 IS INITIAL. 
SELECT NAME1 
CITY1 
POST_CODE1 
LOCATION 
FROM ADRC 
INTO TABLE IT_ADRC 
FOR ALL ENTRIES IN IT_KNA1 
WHERE ADDRNUMBER = IT_KNA1-ADRNR. 
ENDIF. 

***FETCHING THE CUSTOMER RELATED DETAILS 

IF NOT IT_KNA1 IS INITIAL. 
SELECT KUNNR 
VKORG 
VTWEG 
KDGRP 
VKBUR 
FROM KNVV 
INTO TABLE IT_KNVV 
FOR ALL ENTRIES IN IT_KNA1 
WHERE KUNNR = IT_KNA1-KUNNR. 
ENDIF. 

PERFORM FCAT. 
PERFORM BLOCK_ALV. 



***FOR THE INTERNAL TABLE IT_KNA1 

CLEAR WA_FLCAT1. 
WA_FLCAT1-COL_POS = 1. 
WA_FLCAT1-FIELDNAME = 'KUNNR'. 
WA_FLCAT1-TABNAME = 'IT_KNA1'. 
WA_FLCAT1-SELTEXT_L = 'KUNNR'. 
APPEND WA_FLCAT1 TO IT_FLCAT1. 

CLEAR WA_FLCAT1. 
WA_FLCAT1-COL_POS = 2. 
WA_FLCAT1-FIELDNAME = 'ADRNR'. 
WA_FLCAT1-TABNAME = 'IT_KNA1'. 
WA_FLCAT1-SELTEXT_L = 'ADRNR'. 
APPEND WA_FLCAT1 TO IT_FLCAT1. 

***FOR THE INTERNAL TABLE IT_ADRC 

CLEAR WA_FLCAT2. 
WA_FLCAT2-COL_POS = 1. 
WA_FLCAT2-FIELDNAME = 'NAME1'. 
WA_FLCAT2-TABNAME = 'IT_ADRC'. 
WA_FLCAT2-SELTEXT_L = 'NAME1'. 
APPEND WA_FLCAT2 TO IT_FLCAT2. 

CLEAR WA_FLCAT2. 
WA_FLCAT2-COL_POS = 2. 
WA_FLCAT2-FIELDNAME = 'CITY1'. 
WA_FLCAT2-TABNAME = 'IT_ADRC'. 
WA_FLCAT2-SELTEXT_L = 'CITY1'. 
APPEND WA_FLCAT2 TO IT_FLCAT2. 

CLEAR WA_FLCAT2. 
WA_FLCAT2-COL_POS = 3. 
WA_FLCAT2-FIELDNAME = 'POST_CODE1'. 
WA_FLCAT2-TABNAME = 'IT_ADRC'. 
WA_FLCAT2-SELTEXT_L = 'POST_CODE1'. 
APPEND WA_FLCAT2 TO IT_FLCAT2. 

CLEAR WA_FLCAT2. 
WA_FLCAT2-COL_POS = 4. 
WA_FLCAT2-FIELDNAME = 'LOCATION'. 
WA_FLCAT2-TABNAME = 'IT_ADRC'. 
WA_FLCAT2-SELTEXT_L = 'LOCATION'. 
APPEND WA_FLCAT2 TO IT_FLCAT2. 

***FOR THE INTERNAL TABLE IT_KNVV 
"Corrected code from here................
CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 1.
WA_FLCAT3-FIELDNAME = 'KUNNR'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'CUSTOMER'.
APPEND WA_FLCAT3 TO IT_FLCAT3.
 
CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 2.
WA_FLCAT3-FIELDNAME = 'VKORG'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'SALES ORG'.
APPEND WA_FLCAT3 TO IT_FLCAT3.
 
CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 3.
WA_FLCAT3-FIELDNAME = 'VTWEG'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'DIST.CHANNEL'.
APPEND WA_FLCAT3 TO IT_FLCAT3.
 
CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 4.
WA_FLCAT3-FIELDNAME = 'KDGRP'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'CUST.GROUP'.
APPEND WA_FLCAT3 TO IT_FLCAT3.
 
CLEAR WA_FLCAT3.
WA_FLCAT3-COL_POS = 5.
WA_FLCAT3-FIELDNAME = 'VKBUR'.
WA_FLCAT3-TABNAME = 'IT_KNVV'.
WA_FLCAT3-SELTEXT_L = 'SALES OFFICE'.
APPEND WA_FLCAT3 TO IT_FLCAT3.

" end of correction...

ENDFORM. " FCAT 


FORM BLOCK_ALV . 

***INITIALIZING THE BLOCK 

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT' 
EXPORTING 
I_CALLBACK_PROGRAM = SY-REPID 
I_CALLBACK_PF_STATUS_SET = ' ' 
I_CALLBACK_USER_COMMAND = ' '. 

***APPENDING THE BLOCK 

***GRID FOR ADDRESS NUMBER DETAILS 

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND' 
EXPORTING 
IS_LAYOUT = I_LAYOUT1 
IT_FIELDCAT = IT_FLCAT1[] 
I_TABNAME = 'IT_KNA1' 
IT_EVENTS = IT_EVENTS1[] 
I_TEXT = 'Address Number Details' 
TABLES 
T_OUTTAB = IT_KNA1 
EXCEPTIONS 
PROGRAM_ERROR = 1 
MAXIMUM_OF_APPENDS_REACHED = 2 
OTHERS = 3. 
IF SY-SUBRC <> 0. 
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF. 

***GRID FOR ADDRESS DETAILS 

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND' 
EXPORTING 
IS_LAYOUT = I_LAYOUT2 
IT_FIELDCAT = IT_FLCAT2[] 
I_TABNAME = 'IT_ADRC' 
IT_EVENTS = IT_EVENTS2[] 
I_TEXT = 'Address Details' 
TABLES 
T_OUTTAB = IT_ADRC 
EXCEPTIONS 
PROGRAM_ERROR = 1 
MAXIMUM_OF_APPENDS_REACHED = 2 
OTHERS = 3. 
IF SY-SUBRC <> 0. 
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF. 

***GRID FOR CUSTOMER RELATED DETAILS 

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND' 
EXPORTING 
IS_LAYOUT = I_LAYOUT2 
IT_FIELDCAT = IT_FLCAT3[] 
I_TABNAME = 'IT_KNVV' 
IT_EVENTS = IT_EVENTS3[] 
I_TEXT = 'Customer Related Details' 
TABLES 
T_OUTTAB = IT_KNVV 
EXCEPTIONS 
PROGRAM_ERROR = 1 
MAXIMUM_OF_APPENDS_REACHED = 2 
OTHERS = 3. 
IF SY-SUBRC <> 0. 
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF. 

***DISPLAYING THE FINAL BLOCK 

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY' 
EXCEPTIONS 
PROGRAM_ERROR = 1 
OTHERS = 2. 
IF SY-SUBRC <> 0. 
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF. 

ENDFORM. " BLOCK_ALV