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

interactive alv report

Former Member
0 Likes
246

hi all ,

i have one interactiv alv report on transport request .

in that basic list contains trasnport request , text , released date , released user ,.

In the secondary list when i click on Trasport request it should display all programs , T.codes , gunction groups , tables under that trasport request .

here all the filds are getting the data from same data base table field of E071-obj_name based on E071-object .

i coded lik this

AT LINE-SELECTION .

FORM USER_COMM USING P_COMM LIKE SY-UCOMM P_FIELD TYPE SLIS_SELFIELD .

IF P_COMM = '&IC1' .

SELECT OBJECT

OBJ_NAME FROM E071

INTO TABLE IT_TMP1

WHERE TRKORR = P_FIELD-VALUE

AND ( OBJECT EQ 'PROG' OR OBJECT EQ 'TRAN' OR OBJECT EQ 'TABL'

OR OBJECT EQ 'FUGR' OR OBJECT EQ 'REPS' OR OBJECT EQ 'DYNP' ).

IF SY-SUBRC NE 0 .

WRITE : /'no records found ' .

ENDIF .

LOOP AT IT_TMP1 .

IF IT_TMP1-OBJECT = 'PROG' .

IT_TMP2-PROGRAM = IT_TMP1-OBJ_NAME.

ELSEIF IT_TMP1-OBJECT = 'TRAN' .

IT_TMP2-TCODE = IT_TMP1-OBJ_NAME.

ELSEIF IT_TMP1-OBJECT = 'TABL' .

IT_TMP2-TABL = IT_TMP1-OBJ_NAME.

ELSEIF IT_TMP1-OBJECT = 'FUGR'.

IT_TMP2-FUGR = IT_TMP1-OBJ_NAME .

ELSEIF IT_TMP1-OBJECT = 'DYNP'.

IT_TMP2-DYNP = IT_TMP1-OBJ_NAME .

ELSEIF IT_TMP1-OBJECT = 'REPS'.

IT_TMP2-PROGRAM = IT_TMP1-OBJ_NAME .

ELSE.

ENDIF.

*CLEAR: IT_TMP1.

*ENDIF .

APPEND IT_TMP2.

CLEAR IT_TMP2.

ENDLOOP.

IF IT_TMP2[] IS INITIAL .

WRITE : / ' NO Records Found' .

ENDIF .

But in the ALV the out put is displaying as shown

program T.code table functiongroup screen no

Zabc

zxyz

zdfg

zmfg

ztab1

Ztab2

zfug1

zscn1

but here i want to show each column from starting row .

How to code it .

please tellme .

Thanks in advance .

regards ,

Srinivas

1 REPLY 1
Read only

Former Member
0 Likes
230

Hi Try appending the below code


IF IT_TMP2[] IS INITIAL .
WRITE : / ' NO Records Found' .
ELSE.
WRITE : / IT_TMP2-PROGRAM, IT_TMP2-TCODE, IT_TMP2-TABL , IT_TMP2-FUGR,  IT_TMP2-DYNP, 
ENDIF .

Cheers,

Chandru