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

fetching data from READ_TEXT functn. modul.& to update exist.Internal table

Former Member
0 Likes
623

I am fetching data from function module READ_TEXT;; data into XTLINE-TDLINE and now I want to add the data into existing internal table.

data of internal table is :- itemp :-

LINE1 | KUNNR | NAME1 | VKORG | SPART | MATNR | POSNR | XTLINE1|

1 | 32721 | ABC COMP. | DRPB | TD | 1211 | 10 | |

2 | 32721 | ABC COMP. | DRPB | TD | 1221 | 20 | |

-


Now within XTLINE we have following data :-

XTLINE-TDLINE

QTY 10 DATE 30.02.2010

QTY 50 DATE 30.01.2010

-


I want to update XTLINE-TDLINE into XTLINE1

Can plz provide me the logic to do so.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
593

Hello,

Try the following. Incase required make changes accordingly.

Data: lv_index type sy-index.

loop at XTLINE into WA_XTLINE.

lv_index = sy-index.

Read table ITEMP into WA_ITEMP index lv_index.

WA_ITEMP-XTLINE1 = WA_XTLINE-TDLINE.

Modify ITEMP from WA_ITEMP index lv_index.

Endloop.

Hope this helps.

Regards,

Abhijeet Kapgate

I am fetching data from function module READ_TEXT;; data into XTLINE-TDLINE and now I want to add the data into existing internal table.

data of internal table is :- itemp :-

LINE1 | KUNNR | NAME1 | VKORG | SPART | MATNR | POSNR | XTLINE1|

1 | 32721 | ABC COMP. | DRPB | TD | 1211 | 10 | |

2 | 32721 | ABC COMP. | DRPB | TD | 1221 | 20 | |

-


Now within XTLINE we have following data :-

XTLINE-TDLINE

QTY 10 DATE 30.02.2010

QTY 50 DATE 30.01.2010

-


I want to update XTLINE-TDLINE into XTLINE1

Can plz provide me the logic to do so.

3 REPLIES 3
Read only

Former Member
0 Likes
593

MODIFY statement can update the internal table.

Find out the correct record in itemp and using MODIFY statement update itemp.

Check the documentation for more information about MODIFY statement

Read only

0 Likes
593

you have use the statement like 'append wa_tdline into itemp-XTLINE-TDLINE' then modiy the statement

Read only

Former Member
0 Likes
594

Hello,

Try the following. Incase required make changes accordingly.

Data: lv_index type sy-index.

loop at XTLINE into WA_XTLINE.

lv_index = sy-index.

Read table ITEMP into WA_ITEMP index lv_index.

WA_ITEMP-XTLINE1 = WA_XTLINE-TDLINE.

Modify ITEMP from WA_ITEMP index lv_index.

Endloop.

Hope this helps.

Regards,

Abhijeet Kapgate