Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8538

Re: Error in account coding allocation Message no. SE508 in creation of SES

$
0
0

You can try this report in your test system and accordingly use it in live system.

 

REPORT  Z_RESET_ESKL_LOEKZ.
tables : ekpo, eskl,ekkn.

parameter : p_ebeln type ekpo-ebeln,
p_ebelp
type ekpo-ebelp,
simu
type c as checkbox default 'X'.

data : t_eskl type table of eskl,
u_eskl
type table of eskl,
l_count
type sy-dbcnt,
INCON_EXISTS
.

if p_ebeln is initial or
p_ebelp
is initial.
write :/ 'Please enter a PO/Item '.
EXIT.
endif.

select single * from ekpo where ebeln = p_ebeln and ebelp = p_ebelp and loekz = ' '.

if sy-subrc NE 0.
write :/ 'No PO/Item with problem Exists !! '.
EXIT.
endif.

select count(*) into l_count from ekkn where ebeln = ekpo-ebeln and
ebelp
= ekpo-ebelp.

if l_count GT 1.
write :/ 'Requires Manual analysis , Multiple account assignment !!'.
exit.
endif .


select * from eskl into corresponding fields of table t_eskl
where hpackno = ekpo-packno.
loop at t_eskl into eskl.
if ekpo-loekz NE eskl-loekz.
INCON_EXISTS
= 'X'.
eskl
-loekz = ekpo-loekz.
append eskl to u_eskl.
endif.
endloop.
if simu NE 'X'.
update eskl from table u_eskl.
SKIP.
write :/ 'No of records updated in ESKL ', sy-dbcnt color 3.
SKIP.
write:/ 'Database updated successfully !!!' color 5.
else.
Write :/ 'REPORT was run in SIMULATION mode ONLY !!!' color 5.
SKIP.
IF INCON_EXISTS = 'X'.
write :/ 'Inconsistency detected in ESKL table ' color 3.
ENDIF.
endif.


Regards


Sathish K B


Viewing all articles
Browse latest Browse all 8538

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>