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

Problem in moving the data into final internal table

Former Member
0 Likes
690

Hello all,

I am stuck in apeculair situation.

I have a internal table having header record and a internal table having its line items.

Header record :: 90006103 A 20080110 ALBERTA 3456

Detail record :: 90006103 D2 2219CR1710441

90006103 D2 2219M11710443

90006103 D2 2219M21710442

90006103 A 20080115 ALBERTA 3456

90006103 D2 2219CR1710441

90006103 D2 2219M11710443

90006103 D2 2219M21710442

I collected the header record in one internal table and another internal table having all the line items.But the problem is when i am moving the values to the final inernal table i am getting the same payment date

20080110 (Date field in first record of header internal table) for all the line items .

But my requirement is that date should be 20080110 for the first 3 line items of first header record and similarly date should be 20080115 for all the line items of the next header record.

Kindly suggest.

Regards,

Arun

Hello all,

I am stuck in apeculair situation.

I have a internal table having header record and a internal table having its line items.

Header record :: 90006103 A 20080110 ALBERTA 3456

Detail record :: 90006103 D2 2219CR1710441

90006103 D2 2219M11710443

90006103 D2 2219M21710442

90006103 A 20080115 ALBERTA 3456

90006103 D2 2219CR1710441

90006103 D2 2219M11710443

90006103 D2 2219M21710442

I collected the header record in one internal table and another internal table having all the line items.But the problem is when i am moving the values to the final inernal table i am getting the same payment date

20080110 (Date field in first record of header internal table) for all the line items .

But my requirement is that date should be 20080110 for the first 3 line items of first header record and similarly date should be 20080115 for all the line items of the next header record.

Kindly suggest.

Regards,

Arun

5 REPLIES 5
Read only

former_member191735
Active Contributor
0 Likes
668

Well, it is confusing i mean, your question is confusing. In your example, all item records showing the same values.

If you have different records, then loop at header internal table and then loop at item table or loop at item table and then read header table to collect in new internal table

Read only

0 Likes
668

Hello,

As you can see i have different details record .

The problem is there is no matching field between header and detail record which i can make as the key field.

Can you suggest something else.

Arun

Read only

Former Member
0 Likes
668

assumption: some mistake in ur posting that, How belnr and date r same for both header records, so i guess, either one is different.

try with AT NEW - ENDAT.

AT NEW belnr.

here use looping, READing of ur itabs.---> so, u need to build couple of itabs to move forth and back.

ENDAT.

pls. note that, when u use this AT NEW all the CHAR fileds of itab wuld show as STARS **.....so, this is the necessity behind building new itabs.

thanq

Edited by: SAP ABAPer on Dec 30, 2008 6:24 PM

Read only

0 Likes
668

Hello,

Actually it is nor BELNR.It is some ID number.

The problem is i am not able to match my header records with my details record.

So when i am looping my details table and reading the header table the first date field is getting reflected in all my line items.

But ideally only the first 3 line items should have the date corresponding to the header record.

Arun

Read only

Former Member
0 Likes
668

Thanks..