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

in zee table creation

Former Member
0 Likes
687

hi

I created a zee table with some fields from vbak, some fields from vbap and somr fields from kna1.

how to get the data to that zee table?

hi

I created a zee table with some fields from vbak, some fields from vbap and somr fields from kna1.

how to get the data to that zee table?

3 REPLIES 3
Read only

vinod_vemuru2
Active Contributor
0 Likes
590

Hi Jyotsna,

Populate the data for all fields in to an internal table using select queries and use *INSERT/MODIFY statement to insert the data in to the table.

DATA: i_ztab TYPE STANDARD TABLE OF ztable,

wa_ztable TYPE ztable.

U acn use either joins or individual selects to get the data from the tables.

SELECT ....FROM VBAK WHERE....

SELECT...FROM VBAP WHERE....

SELECT .... FROM KNA1 WHERE....

LOOP AT VBAP.

Populoate i_ztable internal table.

ENDLOOP.

SORT i_ztable BY key fields(SPECIFY KEY FIELDS).

DELETE ADJACENT DUPLICATES FROM i_ztable COMPARING give key fields here.

CHECK NOT i_ztable[] IS INITIAL.

INSERT/MODIFY ztable FROM TABLE i_ztable.

CHECK sy-subrc IS INITIAL.

COMMIT WORK AND WAIT.

Thanks,

Vinod.

Read only

ravisankara_varaprasad
Active Participant
0 Likes
590

Hi,

You need to create the Table Maintainance Generator to create the entries in to your Z Table.

other wise choose the option ' Maintainance allowed ' under 'Delivery and Maintainance ' tab.

and then go to 'Utilities -> Table Contents -> Create entries'.

Kind Regards,

Ravi Sankar.Z

Read only

Former Member
0 Likes
590

*********I am taking three tables .

data : itab type table of ztable,

wa like line of ztable.

SELECT ccarrname pconnid f~fldate

INTO CORRESPONDING FIELDS OF TABLE itab

FROM ( ( scarr AS c

INNER JOIN spfli AS p ON pcarrid = ccarrid

AND p~cityfrom = p_cityfr

AND p~cityto = p_cityto )

INNER JOIN sflight AS f ON fcarrid = pcarrid

AND fconnid = pconnid ).

loop at itab into wa.

insert INTO ztable values wa.

endloop.

**********You use VBAK , VBAP and KNA! instead of SCARR , SFLIGHT , SPFLI tables.