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

Need quick help !!

samiullah_qureshi
Active Contributor
0 Likes
293

DATA: Begin of zitab1 occurs 0,

fld_str(822) type c,

end of zitab1.

DATA : zitab2 like table of zitab1 with header line.

DATA : zitab3 like table of Zitab1 with header line.

DATA : Zitab4 like table of zitab1 with header line.

DATA : Zitab5 like table of zitab1 with header line.

when data is fetched into all the internal tables namely zitab1,zitab2 ,zitab3,zitab4 and zitab5 the following code is to be executed so that whole data is sequentially fed into a single internal table which is then moved onto a function module which encrypts the file.

Insert lines of ZITAB1 into ZITAB2 index 1.

Insert lines of ZITAB2 into ZITAB3 index 1.

Insert lines of Zitab3 into Zitab4 index 1.

Insert lines of Zitab4 into Zitab5 index 1.

The filed length for zitab1 is 33.

The filed length for zitab2 is 77.

The filed length for zitab3 is 822.

The filed length for zitab4 is 217.

The filed length for zitab5 is 26.

The data in the encrypted file should be such that the first record should end at 33 for data from zitab1.(no matter how much data is in it), the data for second record should end at 77 for data from zitab2 ( no matter how mcuh data is in it ) and subsequently the same for zitab3 ,zitab4 and zitab5.

The data should come in this format:

H639403 (field should be 30 characters)

Pgfdfhk hsdfwfw shrwhvs (field should be 77 characters)

Imnssgbvkvsjkbgvsjj ( field should be 822 characters )

hfasfhwj jsdvhjdfsg jkafgsees ( field should be 822 characters )

Afhgshfsk fjdghdf jfvbdf ( field should be 217 characters )

cfahagc hjfgsd jhfgwsf ( field should be 217 characters )

Tbdsfhsdgf ( field should be 26 characters )

1 REPLY 1
Read only

Former Member
0 Likes
272

DATA: Begin of zitab1 occurs 0,

fld_str(822) type c,

end of zitab1.

DATA : zitab2 like table of zitab1 with header line.

DATA : zitab3 like table of Zitab1 with header line.

DATA : Zitab4 like table of zitab1 with header line.

DATA : Zitab5 like table of zitab1 with header line.

when data is fetched into all the internal tables namely zitab1,zitab2 ,zitab3,zitab4 and zitab5 the following code is to be executed so that whole data is sequentially fed into a single internal table which is then moved onto a function module which encrypts the file.

Insert lines of ZITAB1 into ZITAB2 index 1.

Insert lines of ZITAB2 into ZITAB3 index 1.

Insert lines of Zitab3 into Zitab4 index 1.

Insert lines of Zitab4 into Zitab5 index 1.

The filed length for zitab1 is 33.

The filed length for zitab2 is 77.

The filed length for zitab3 is 822.

The filed length for zitab4 is 217.

The filed length for zitab5 is 26.

The data in the encrypted file should be such that the first record should end at 33 for data from zitab1.(no matter how much data is in it), the data for second record should end at 77 for data from zitab2 ( no matter how mcuh data is in it ) and subsequently the same for zitab3 ,zitab4 and zitab5.

The data should come in this format:

H639403 (field should be 30 characters)

Pgfdfhk hsdfwfw shrwhvs (field should be 77 characters)

Imnssgbvkvsjkbgvsjj ( field should be 822 characters )

hfasfhwj jsdvhjdfsg jkafgsees ( field should be 822 characters )

Afhgshfsk fjdghdf jfvbdf ( field should be 217 characters )

cfahagc hjfgsd jhfgwsf ( field should be 217 characters )

Tbdsfhsdgf ( field should be 26 characters )

=========================================

DO not use obsolete statement occurs and with header line are obsoleted. Declare table with TYPE table of addition.

You have to declare a table with a line type with a cumulative length as 2301(addition lenght of all the fields) you have to declare a work area with same length and then in a do loop you read lines of each table with index sy-tabix and concatenate them into the new wa declared..then append the values in work area to the new table....