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

HI

Former Member
0 Likes
677

Hi,

I am uploading one file with matnr,vkorg,vtweg through internal table(t_file)....and after calling GUI_UPLOAD,I have to check the internal table data with MVKE(matnr,vkorg,vtweg).

If the record exists then I have to delete the record and I have to send the record to as an errored record..

Can you please give me the logic????

Thanks in advance.

Reward will be given.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
615

hi,

1 first fetch the records to a internal table(itab) GUI UPLOAD

2 loop through the internal table(itab) and check the condition u want.

3 if the conditon is true then move the record to another internal table(jtab) and delete the record from the present table(itab).

4 loop at jtab and display in output.

Hi,

I am uploading one file with matnr,vkorg,vtweg through internal table(t_file)....and after calling GUI_UPLOAD,I have to check the internal table data with MVKE(matnr,vkorg,vtweg).

If the record exists then I have to delete the record and I have to send the record to as an errored record..

Can you please give me the logic????

Thanks in advance.

Reward will be given.

4 REPLIES 4
Read only

Former Member
0 Likes
616

hi,

1 first fetch the records to a internal table(itab) GUI UPLOAD

2 loop through the internal table(itab) and check the condition u want.

3 if the conditon is true then move the record to another internal table(jtab) and delete the record from the present table(itab).

4 loop at jtab and display in output.

Read only

former_member156446
Active Contributor
0 Likes
615

1. data into t_file gui_upload

2. select * from MVKE

into t_mvke.

3. loop at smaller table and sort and read t_mvke with key and use binary search for quick processing.

4. loop at t_file

read table t_mvke.

if sy-subrc = 0.

delete t_file.

endif.

endloop.

Read only

Former Member
0 Likes
615

Data: t_index type sy-tabix.

Select matnr vkorg vtweg from mvke into it_mvke for all entries in t_file where matnr = t_file-matnr and vkorg in t_file-vkorg and vtweg in t_file-vtweg.

Loop at t_file.

t_index = sy-tabix.

Read table it_mvke with key matnr = t_file-matnr vkorg = t_file- vkorg vtweg = t_file-vtweg.

If sy-subrc = 0.

delete t_file index t_index.

Endif.

Endloop.

Read only

Former Member
0 Likes
615

Hi

Check this code.I think this will help you.

loop at t_file into wa_file.

Read table t_mvke into wa_mvke with key matnr = wa_file-matnr

vkorg = wa_file-vkorg

vtweg = wa_file-vtweg.

if sy-subrc = '0'.

append wa_file into t_error.

else.

append wa_file into t_file2.

endif.

endloop.

Reward points if useful.

Regards

Shibin