‎2010 Oct 13 4:37 AM
Hi,
I have a requirement where I have to upload a file from C drive, the fields in this file are VBELN, description & date of creation.
I am able to get this file into the internal table. After this i need to cross check the VBELN against VBRK-VBELN, if present then update a Z-table.... How do I do the cross check part ?...
if not tw_zvatcn[] is initial,
select * from vbrk
into table tw_vbrk
for all entries in tw_zvatcn
where vbeln = tw_zvztcn-vbeln
and vkorg = p_vkorg.
if sy-subrc = 0.
modify ztzb from lw_zvatcn.
endif.
endif.
Internal table tw_vbrk is coming blank, which is not correct because I see the data in db tbl VBRK
‎2010 Oct 13 4:56 AM
Hi
Once you get the data from c drive to internal table, modify all VEBLN of tw_zvatcn[] into SAP format using function module CONVERSION_EXIT_ALPHA_INPUT. This might solve ur issue.
Regards
Sachin
‎2010 Oct 13 4:55 AM
Is p_vkorg a parameter or select option.
If it is parameter and is blank you will not get data in the table.
In that case make a condition for that field also.
if not tw_zvatcn[] is initial.
if p_vkorg is not initial.
select * from vbrk
into table tw_vbrk
for all entries in tw_zvatcn
where vbeln = tw_zvztcn-vbeln
and vkorg = p_vkorg.
if sy-subrc = 0.
modify ztzb from lw_zvatcn.
endif.
else.
select * from vbrk
into table tw_vbrk
for all entries in tw_zvatcn
where vbeln = tw_zvztcn-vbeln.
if sy-subrc = 0.
modify ztzb from lw_zvatcn.
endif.
endif.
endif.
‎2010 Oct 13 4:59 AM
Thank You Gautham, but p_vkorg is obligatory in teh selection-screen.
‎2010 Oct 13 4:56 AM
Hi
Once you get the data from c drive to internal table, modify all VEBLN of tw_zvatcn[] into SAP format using function module CONVERSION_EXIT_ALPHA_INPUT. This might solve ur issue.
Regards
Sachin
‎2010 Oct 13 4:56 AM
Hi,
Check if there are any entries in table "vbrk" with vbeln and p_vkorg combination.
Also check if you need to use conversion exit for field "VBELN".
Regards,
Srini.
‎2010 Oct 13 4:57 AM
Howdy,
Make sure the VBELN data in your internal table has leading zeros, eg instead of 90000123 you need 009000123.
To do the conversion use FM CONVERSION_EXIT_ALPHA_INPUT.
Cheers
Alex